Skip to content

Commit

Permalink
Merge pull request #687 from dgarijo/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
dgarijo authored Apr 4, 2024
2 parents a4e5242 + a6905c3 commit 20f8af6
Show file tree
Hide file tree
Showing 24 changed files with 195 additions and 128 deletions.
22 changes: 20 additions & 2 deletions doc/bestPractices/sections/checklist-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h5>Example:</h5>
@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .
@prefix vann: &lt;http://purl.org/vocab/vann/&gt; .
&lt;https://w3id.org/example&gt; rdf:type owl:Ontology ;
vann:preferredNamespaceUri "https://w3id.org/example" .
vann:preferredNamespaceUri &lt;https://w3id.org/example#&gt; .
</pre>

<h4 class="list" id="prefix">Prefix [<em class="rfc2119" title="RECOMMENDED">RECOMMENDED</em>]</h4>
Expand Down Expand Up @@ -593,6 +593,24 @@ <h5>Example:</h5>
rdfs:seeAlso &lt;http://www.wikipathways.org/&gt; .
</pre>

<h3 id="code" class="list">Code repository (vocabulary maintenance) [<em class="rfc2119" title="OPTIONAL">OPTIONAL</em>]</h3>
<p>
Property used to indicate if there is a public code repository where the vocabulary is maintained. This information may be helpful to the adopter of your vocabulary, in order to raise issues and see current discussions.
</p>

<ul class="hlist"><strong>Properties you may use</strong>:
<li><a target="_blank" href="http://schema.org/codeRepository">schema:codeRepository</a> <strong>(PREFERRED)</strong></li>
<li><a target="_blank" href="http://usefulinc.com/ns/doap#repository">doap:repository</a></li>
</ul>

<h5>Example:</h5>
<pre>
@prefix owl: &lt;http://www.w3.org/2002/07/owl#&gt; .
@prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; .
&lt;http://vocabularies.wikipathways.org/wpTypes#&gt; a owl:Ontology ;
schema:codeRepository "https://github.com/user/repo"^^xsd:anyURI; .
</pre>


<h2 id="desc-term" class="list">Term checklist of metadata properties <span class="backlink"> back to <a href="#toc">ToC</a></span></h2>
These metadata terms are targeted towards describing the classes, properties and data properties of the ontology. Adding them as part of the ontology is crucial for potential reusers:
Expand Down Expand Up @@ -698,7 +716,7 @@ <h5>Example:</h5>

<h4 class="list" id="status1">Status [<em class="rfc2119" title="OPTIONAL">OPTIONAL</em>]</h4>
<p>
Property indicating the usage status of the term. For example, whether the term is mature enough, whether it has been deprecated, curated, etc. Note that some of the properties proposed below, such as obo:IAO_0000114, have as range a set of fixed values. The <a href="https://github.com/UKGovLD/registry-core/wiki/Principles-and-concepts#status-and-life-cycle">registry vocabulary</a> proposes a hierarchy of status that may be used to represent terms as well (reg:statusAccepted, reg:statusValid, reg:statusDeprecated, etc.).
Property indicating the usage status of the term. For example, whether the term is mature enough, whether it has been deprecated, curated, etc. Note that some of the properties proposed below, such as obo:IAO_0000114, have as range a set of fixed values. The <a href="https://github.com/UKGovLD/registry-core/wiki/Principles-and-concepts#status-and-life-cycle">registry vocabulary</a> proposes a hierarchy of status that may be used to represent terms as well (reg:statusAccepted, reg:statusValid, reg:statusDeprecated, etc.).
</p>

<ul class="hlist"><strong>Properties you may use</strong>:
Expand Down
5 changes: 3 additions & 2 deletions doc/bestPractices/sections/introduction-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ <h2 id="conv" class="list">Properties summary</h2>
<ul class="hlist" id="opt">
<li><a href="#abs">abstract</a></li>
<li><a href="#backwardCompatibility">backward compatibility</a></li>
<li><a href="#biblio">bibliographic Citation</a></li>
<li><a href="#biblio">bibliographic citation</a></li>
<li><a href="#code">code repository</a></li>
<li><a href="#diagram">diagram</a></li>
<li><a href="#doi">DOI</a></li>
<li><a href="#extended">extended Ontologies</a></li>
Expand All @@ -80,7 +81,7 @@ <h2 id="conv" class="list">Properties summary</h2>
<li><a href="#incompatibility">incompatibility</a></li>
<li><a href="#issuedDate">issued date</a></li>
<li><a href="#logo">logo</a></li>
<li><a href="#modificationDate">modification Date</a></li>
<li><a href="#modificationDate">modification date</a></li>
<li><a href="#publisher">publisher</a></li>
<li><a href="#similar">see also</a></li>
<li><a href="#source">source</a></li>
Expand Down
16 changes: 10 additions & 6 deletions doc/configuration/config.properties
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@

abstract=An example ontology
backwardCompatibleWith=https://w3id.org/example/1.0.0
citeAs="add some citattion text here."
dateCreated="13 Nov, 2022"
dateModified="15 Nov, 2022"
authors=First Author;Second Author
authorsURI=http://example.org/author1;http://example.org/author2
authorsInstitution=First author institution;Second author institution
authorsInstitutionURI=https://www.isi.edu/;https://www.isi.edu/
citeAs="add some citation text here."
backwardCompatibleWith=https://w3id.org/example/1.0.0
codeRepository=https://github.com/dgarijo/example
contributors=First contributor;Second contributor
contributorsURI=http://example.org/contributor1;http://example.org/contributor2
contributorsInstitution=First contributor institution;Second contributor institution
contributorsInstitutionURI=https://isi.edu/;https://isi.edu/
dateCreated="13 Nov, 2022"
dateModified="15 Nov, 2022"
description="A description of what the ontology does goes here"
diagram="https://example.org/diagram.svg"
DOI=
funders=
fundingGrants=
funding=
incompatibleWith=
issued=
images=image1.png;image2.png
introduction="This is some introduction text"
issued=
licenseURI=http://creativecommons.org/licenses/by/2.0/
licenseName=CC-BY
licenseIconURL=https://i.creativecommons.org/l/by/2.0/88x31.png
Expand All @@ -45,3 +47,5 @@ extendedOntologyURIs=http://example.org/test1; http://example.org/test2
RDFXMLSerialization=ontology.xml
TurtleSerialization=ontology.ttl
NTSerialization=ontology.nt
pathToOverview=overview.html
pathToReferences=references.html
37 changes: 21 additions & 16 deletions doc/configuration/configuration_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,63 @@ In order to have Widoco accept a configuration file, you need to create a `confi

```
abstract=An example ontology
backwardCompatibleWith=https://w3id.org/example/1.0.0
citeAs="add some citattion text here."
dateCreated="13 Nov, 2022"
dateIssued=
dateModified="15 Nov, 2022"
authors=First Author;Second Author
authorsURI=http://example.org/author1;http://example.org/author2
authorsInstitution=First author institution;Second author institution
authorsInstitutionURI=https://www.isi.edu/;https://www.isi.edu/
backwardCompatibleWith=https://w3id.org/example/1.0.0
citeAs="add some citattion text here."
contributors=First contributor;Second contributor
contributorsURI=http://example.org/contributor1;http://example.org/contributor2
contributorsInstitution=First contributor institution;Second contributor institution
contributorsInstitutionURI=https://isi.edu/;https://isi.edu/
dateCreated="13 Nov, 2022"
dateIssued=
dateModified="15 Nov, 2022"
description="A description of what the ontology does goes here"
diagram="https://example.org/diagram.svg"
DOI=
funder=
fundingGrant=
funding=
incompatibleWith=
introduction=A brief text for the introduction section may be written here.
images=image1.png;image2.png
licenseURI=http://creativecommons.org/licenses/by/2.0/
licenseName=CC-BY
licenseIconURL=https://i.creativecommons.org/l/by/2.0/88x31.png
logo="https://example.org/logo.svg"
ontologyName=Example
ontologyPrefix=exo
ontologyNamespaceURI=https://w3id.org/example
ontologyRevisionNumber=1.0.0
ontologyTitle=The Example Ontology
ontologyPrefix=exo
previousVersionURI=https://w3id.org/example/1.0.0
publisher=Ontology Engineering Group
publisherURI=https://oeg-upm.es
publisherInstitution=UPM
publisherInstitutionURI=https://www.upm.es
source=http://source1;http://source2
seeAlso=http://firstResource
ontologyTitle=The Example Ontology
thisVersionURI=https://w3id.org/example/1.0.1
ontologyRevisionNumber=v1.0.0
status=Ontology Specification Draft
```

Additional configuration options include the following
```
importedOntologyNames=Imported Ontology 1; Imported Ontology 2
importedOntologyURIs=http://example.org/test11; http://example.org/test22
contextURI=JSON-LD context URI.
extendedOntologyNames=test1; test2
extendedOntologyURIs=http://example.org/test1; http://example.org/test2
importedOntologyNames=Imported Ontology 1; Imported Ontology 2
importedOntologyURIs=http://example.org/test11; http://example.org/test22
pathToAbstract=abstract.html (superseedes abstract)
pathToDescription=description.html (superseedes description)
pathToIntro=intro.html (supersedes introduction)
pathToOverview=overview.html
pathToReferences=references.html
GoogleAnalyticsCode=UA-TestCodeGoesHere
JSONLDSerialization=URL of the file with JSON-LD serialization. E.g., http://my-onto/onto.jsonld
NTSerialization=URL of the file with N3 serialization. E.g., http://my-onto/onto.n3
RDFXMLSerialization=URL of the file with RDF-XML serialization. E.g., http://my-onto/onto.owl
TurtleSerialization=URL of the file with Turtle serialization. E.g., http://my-onto/onto..ttl;
NTSerialization=URL of the file with N3 serialization. E.g., http://my-onto/onto.n3
JSONLDSerialization=URL of the file with JSON-LD serialization. E.g., http://my-onto/onto.jsonld
GoogleAnalyticsCode=UA-TestCodeGoesHere
contextURI=JSON-LD context URI.
```

For more information, see the [Widoco readme options](https://github.com/dgarijo/Widoco/#options).
Expand Down
1 change: 0 additions & 1 deletion doc/configurationSamples/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion doc/configurationSamples/config/config.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

abstract=An example ontology
backwardCompatibleWith=https://w3id.org/example/1.0.0
citeAs="add some citattion text here."
citeAs="add some citation text here."
creationDate="13 Nov, 2022"
authors=First Author;Second Author
authorsURI=http://example.org/author1;http://example.org/author2
Expand Down
41 changes: 27 additions & 14 deletions doc/metadataGuide/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ The table below shows which ontology metadata annotations are recognized in WIDO
|Abstract |[dc:abstract], [dcterms:abstract]|abstract |[Sec 3.2.4] **[OPTIONAL]**|[Text]|[ontology](#onto), [config]|
|Backwards compatible|[owl:backwardCompatibleWith] |backwardCompatibleWith|[Sec 3.3.3] **[OPTIONAL]**|[URI] |[ontology](#onto), [config]|
|Bibliographic citation|[dcterms:bibliographicCitation], [schema:citation]|citeAs|[Sec 3.6.2] **[OPTIONAL]**|[Text]|[ontology](#onto), [config]|
|Code repository|[schema:codeRepository], [doap:repository]|codeRepository|[Sec 3.10] **[OPTIONAL]**|[URI]|[ontology](#onto), [config]|
|Contributors|[dcterms:contributor], [dc:contributor], [schema:contributor], [pav:contributedBy], [doap:documenter], [doap:maintainer], [doap:helper], [doap:translator]|contributors, contributorsURI, contributorsInstitution, contributorsInstitutionURI|[Sec 3.5.2] **[RECOMMENDED]**|[Text] or [Person] or [BNode]|[ontology](#onto), [config]|
|Creation date|[dcterms:created], [schema:dateCreated], [prov:generatedAtTime], [pav:createdOn], [doap:created]|dateCreated|[Sec 3.4.2] **[OPTIONAL]**|[Text]|[ontology](#onto), [config]|
|Creators|[dcterms:creator], [dc:creator], [schema:creator], [pav:createdBy], [pav:authoredBy], [prov:wasAttributedTo], [doap:developer], [foaf:maker]|authors, authorsURI, authorsInstitution, authorsInstitutionURI|[Sec 3.5.1] **[RECOMMENDED]**|[Text] or [Person] or [BNode]|[ontology](#onto), [config]|
|Contributors|[dcterms:contributor], [dc:contributor], [schema:contributor], [pav:contributedBy], [doap:documenter], [doap:maintainer], [doap:helper], [doap:translator]|contributors, contributorsURI, contributorsInstitution, contributorsInstitutionURI|[Sec 3.5.2] **[RECOMMENDED]**|[Text] or [Person] or [BNode]|[ontology](#onto), [config]|
|Description|[dc:description], [dcterms:description], [schema:description], [rdfs:comment], [skos:note], [doap:description], [doap:shortdesc]|description|[Sec 3.2.3] **[OPTIONAL]**|[Text]|[ontology](#onto), [config]|
|Diagram|[foaf:image], [foaf:depiction], [schema:image]|diagram |[Sec 3.8.2] **[OPTIONAL]**|[Text] |[ontology](#onto), [config]|
|DOI |[bibo:doi] |DOI |[Sec 3.6.1] **[OPTIONAL]**|[Text] |[ontology](#onto), [config]|
Expand Down Expand Up @@ -140,6 +141,7 @@ The following `Turtle` code block shows sample annotations for each of the metad
bibo:status <http://purl.org/ontology/bibo/status/draft> ;
foaf:fundedBy <https://example.org/fundingOrganization> ;
schema:funding <https://example.org/fundingGrant> ;
schema:codeRepository "https://github.com/dgarijo/example"^^xsd:anyURI;
widoco:introduction "A paragraph with the introduction section of the documentation about your resource"@en ;
widoco:rdfxmlSerialization "https://example.org/serialization/ontology.xml"^^xsd:anyURI ;
owl:versionInfo "1.0.1" .
Expand Down Expand Up @@ -212,27 +214,28 @@ Create a `config.properties` file and use the `-confFile` option to invoke Widoc

```
abstract=An example ontology
backwardCompatibleWith=https://w3id.org/example/1.0.0
citeAs="add some citattion text here."
authors=First Author;Second Author
authorsURI=http://example.org/author1;http://example.org/author2
authorsInstitution=First author institution;Second author institution
authorsInstitutionURI=https://www.isi.edu/;https://www.isi.edu/
backwardCompatibleWith=https://w3id.org/example/1.0.0
citeAs="add some citattion text here."
codeRepository=https://github.com/dgarijo/example
contributors=First contributor;Second contributor
contributorsURI=http://example.org/contributor1;http://example.org/contributor2
contributorsInstitution=First contributor institution;Second contributor institution
contributorsInstitutionURI=https://isi.edu/;https://isi.edu/
description=A description of what the ontology does goes here
dateCreated="13 Nov, 2022"
dateIssued="14 Nov, 2022"
dateModified="15 April, 2023"
diagram="https://example.org/diagram.svg"
description=A description of what the ontology does goes here
extendedOntologyNames=test1; test2
extendedOntologyURIs=http://example.org/test1; http://example.org/test2
DOI=https://dx.doi.org/SOME/DOI
funder=https://example.org/institution
funding=https://example.org/fundingGrant
incompatibleWith=https://w3id.org/example/0.0.1
images=image1.png;image2.png
importedOntologyNames=Imported Ontology 1; Imported Ontology 2
importedOntologyURIs=http://example.org/test11; http://example.org/test22
introduction=A brief text for the introduction section may be written here.
Expand All @@ -241,21 +244,28 @@ licenseName=CC-BY
licenseIconURL=https://i.creativecommons.org/l/by/2.0/88x31.png
logo="https://example.org/logo.svg"
ontologyName=The Cohort Ontology
ontologyPrefix=exo
ontologyNamespaceURI=https://w3id.org/example
previousVersionURI=https://w3id.org/example/1.0.0
publisher=
publisherURI=
publisherInstitution=
publisherInstitutionURI=
ontologyTitle=The Example Ontology
ontologyPrefix=exo
ontologyRevisionNumber=1.0.0
pathToAbstract=abstract.html (superseedes abstract)
pathToDescription=description.html (superseedes description)
pathToIntro=intro.html (supersedes introduction)
pathToOverview=overview.html
pathToReferences=references.html
previousVersionURI=https://w3id.org/example/1.0.0
publisher=Ontology Engineering Group
publisherURI=https://oeg-upm.es
publisherInstitution=UPM
publisherInstitutionURI=https://www.upm.es
thisVersionURI=https://w3id.org/example/1.0.1
ontologyRevisionNumber=v1.0.0
source=http://source1;http://source2
seeAlso=http://firstResource
status=Ontology Specification Draft
JSONLDSerialization=ontology.nt
NTSerialization=ontology.nt
RDFXMLSerialization=ontology.xml
TurtleSerialization=ontology.ttl
NTSerialization=ontology.nt
JSONLDSerialization=ontology.nt
```

## Glossary (<a href="#table">Back to table</a>)
Expand Down Expand Up @@ -309,6 +319,7 @@ JSONLDSerialization=ontology.nt
[Sec 3.8.1]: https://dgarijo.github.io/Widoco/doc/bestPractices/index-en.html#logo
[Sec 3.8.2]: https://dgarijo.github.io/Widoco/doc/bestPractices/index-en.html#diagram
[Sec 3.9]: https://dgarijo.github.io/Widoco/doc/bestPractices/index-en.html#similar
[Sec 3.10]: https://dgarijo.github.io/Widoco/doc/bestPractices/index-en.html#code
[Sec 4.1]: https://dgarijo.github.io/Widoco/doc/bestPractices/index-en.html#label
[Sec 4.2]: https://dgarijo.github.io/Widoco/doc/bestPractices/index-en.html#def
[Sec 4.3]: https://dgarijo.github.io/Widoco/doc/bestPractices/index-en.html#osource
Expand Down Expand Up @@ -351,6 +362,7 @@ JSONLDSerialization=ontology.nt
[doap:maintainer]: http://usefulinc.com/ns/doap#maintainer
[doap:shortdesc]: http://usefulinc.com/ns/doap#shortdesc
[doap:translator]: http://usefulinc.com/ns/doap#translator
[doap:repository]: http://usefulinc.com/ns/doap#repository
[foaf:depiction]: http://xmlns.com/foaf/0.1/depiction
[foaf:family_name]: http://xmlns.com/foaf/0.1/family_name
[foaf:fundedBy]: http://xmlns.com/foaf/0.1/fundedBy
Expand Down Expand Up @@ -391,6 +403,7 @@ JSONLDSerialization=ontology.nt
[schema:affiliation]: https://schema.org/affiliation
[schema:citation]: https://schema.org/citation
[schema:contributor]: https://schema.org/contributor
[schema:codeRepository]: https://schema.org/codeRepository
[schema:creator]: https://schema.org/creator
[schema:creativeWorkStatus]: https://schema.org/creativeWorkStatus
[schema:dateCreated]: https://schema.org/dateCreated
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/lode/LODEGeneration.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.util.HashSet;
import java.util.Set;
import javax.xml.transform.Transformer;
Expand Down Expand Up @@ -61,7 +62,7 @@ public static String getLODEhtml(Configuration c, File lodeResources) throws Exc

String content = "";
String lang = c.getCurrentLanguage();
if (lang == null || "".equals(lang)) {
if (lang == null || lang.isEmpty()) {
lang = "en";
}
// we have stored the ontology locally
Expand Down Expand Up @@ -318,7 +319,7 @@ private static String applyXSLTTransformation(String source, String ontologyUrl,

transformer.transform(inputSource, new StreamResult(output));

return output.toString("UTF-8").replace("any u r i", "anyURI");
return output.toString(StandardCharsets.UTF_8).replace("any u r i", "anyURI");
}

}
Loading

0 comments on commit 20f8af6

Please sign in to comment.