diff --git a/doc/bestPractices/sections/checklist-en.html b/doc/bestPractices/sections/checklist-en.html
index faab43e3..6791d360 100644
--- a/doc/bestPractices/sections/checklist-en.html
+++ b/doc/bestPractices/sections/checklist-en.html
@@ -23,7 +23,7 @@
Example:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix vann: <http://purl.org/vocab/vann/> .
<https://w3id.org/example> rdf:type owl:Ontology ;
- vann:preferredNamespaceUri "https://w3id.org/example" .
+ vann:preferredNamespaceUri <https://w3id.org/example#> .
Prefix [RECOMMENDED]
@@ -593,6 +593,24 @@ Example:
rdfs:seeAlso <http://www.wikipathways.org/> .
+Code repository (vocabulary maintenance) [OPTIONAL]
+
+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.
+
+
+
+
+Example:
+
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+<http://vocabularies.wikipathways.org/wpTypes#> a owl:Ontology ;
+ schema:codeRepository "https://github.com/user/repo"^^xsd:anyURI; .
+
+
Term checklist of metadata properties back to ToC
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:
@@ -698,7 +716,7 @@ Example:
Status [OPTIONAL]
-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 registry vocabulary 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 registry vocabulary proposes a hierarchy of status that may be used to represent terms as well (reg:statusAccepted, reg:statusValid, reg:statusDeprecated, etc.).
Properties you may use:
diff --git a/doc/bestPractices/sections/introduction-en.html b/doc/bestPractices/sections/introduction-en.html
index 93565994..a9e32f54 100644
--- a/doc/bestPractices/sections/introduction-en.html
+++ b/doc/bestPractices/sections/introduction-en.html
@@ -71,7 +71,8 @@ Properties summary
- abstract
- backward compatibility
- - bibliographic Citation
+ - bibliographic citation
+ - code repository
- diagram
- DOI
- extended Ontologies
@@ -80,7 +81,7 @@ Properties summary
- incompatibility
- issued date
- logo
- - modification Date
+ - modification date
- publisher
- see also
- source
diff --git a/doc/configuration/config.properties b/doc/configuration/config.properties
index 5a7e4103..d83d54ba 100644
--- a/doc/configuration/config.properties
+++ b/doc/configuration/config.properties
@@ -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
@@ -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
diff --git a/doc/configuration/configuration_doc.md b/doc/configuration/configuration_doc.md
index 9935407f..4d7ae370 100644
--- a/doc/configuration/configuration_doc.md
+++ b/doc/configuration/configuration_doc.md
@@ -6,33 +6,35 @@ 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
@@ -40,24 +42,27 @@ 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).
diff --git a/doc/configurationSamples/README.md b/doc/configurationSamples/README.md
deleted file mode 100644
index 1a2df36c..00000000
--- a/doc/configurationSamples/README.md
+++ /dev/null
@@ -1 +0,0 @@
-You can find Widoco's latest JAR on the Release tab in Github: https://github.com/dgarijo/Widoco/releases
diff --git a/doc/configurationSamples/config/config.properties b/doc/configurationSamples/config/config.properties
index 70b73b0e..91839f3b 100644
--- a/doc/configurationSamples/config/config.properties
+++ b/doc/configurationSamples/config/config.properties
@@ -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
diff --git a/doc/metadataGuide/guide.md b/doc/metadataGuide/guide.md
index 94817556..e8f0de3a 100644
--- a/doc/metadataGuide/guide.md
+++ b/doc/metadataGuide/guide.md
@@ -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]|
@@ -140,6 +141,7 @@ The following `Turtle` code block shows sample annotations for each of the metad
bibo:status ;
foaf:fundedBy ;
schema:funding ;
+ 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" .
@@ -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.
@@ -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 (Back to table)
@@ -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
@@ -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
@@ -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
diff --git a/src/main/java/lode/LODEGeneration.java b/src/main/java/lode/LODEGeneration.java
index 82ee47cc..c8f5eaf0 100644
--- a/src/main/java/lode/LODEGeneration.java
+++ b/src/main/java/lode/LODEGeneration.java
@@ -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;
@@ -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
@@ -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");
}
}
diff --git a/src/main/java/widoco/Configuration.java b/src/main/java/widoco/Configuration.java
index 5829962d..1780ee7f 100644
--- a/src/main/java/widoco/Configuration.java
+++ b/src/main/java/widoco/Configuration.java
@@ -228,6 +228,7 @@ private void initializeOntology() {
mainOntologyMetadata.setSeeAlso(new ArrayList<>());
mainOntologyMetadata.setFunders(new ArrayList<>());
mainOntologyMetadata.setFundingGrants(new ArrayList<>());
+ mainOntologyMetadata.setCodeRepository("");
this.namespaceDeclarations = new HashMap<>();
}
@@ -259,7 +260,7 @@ private void loadPropertyFile(String path) throws IOException {
mainOntologyMetadata.setPublisher(publisher);
String aux = propertyFile.getProperty(Constants.PF_AUTHORS, "");
String[] names, urls, authorInst, authorInstURI;
- if (!aux.equals("")) {
+ if (!aux.isEmpty()) {
names = aux.split(";");
aux = propertyFile.getProperty(Constants.PF_AUTHORS_URI, "");
urls = aux.split(";");
@@ -289,7 +290,7 @@ private void loadPropertyFile(String path) throws IOException {
}
}
aux = propertyFile.getProperty(Constants.PF_CONTRIBUTORS, "");
- if (!aux.equals("")) {
+ if (!aux.isEmpty()) {
names = aux.split(";");
aux = propertyFile.getProperty(Constants.PF_CONTRIBUTORS_URI, "");
urls = aux.split(";");
@@ -406,7 +407,12 @@ private void loadPropertyFile(String path) throws IOException {
if (!"".equals(funding)){
mainOntologyMetadata.setFundingGrants(new ArrayList(Arrays.asList(funding.split(";"))));
}
-
+ this.setAbstractPath(propertyFile.getProperty(Constants.PF_ABSTRACT_PATH, null));
+ this.setDescriptionPath(propertyFile.getProperty(Constants.PF_DESCRIPTION_PATH, null));
+ this.setIntroductionPath(propertyFile.getProperty(Constants.PF_INTRO_PATH, null));
+ this.setOverviewPath(propertyFile.getProperty(Constants.PF_OVERVIEW_PATH, null));
+ this.setReferencesPath(propertyFile.getProperty(Constants.PF_REFERENCES_PATH, null));
+ mainOntologyMetadata.setCodeRepository(propertyFile.getProperty(Constants.PF_REFERENCES_CODE_REPO, ""));
} catch (IOException ex) {
// Only a warning, as we can continue safely without a property file.
logger.warn("Error while reading configuration properties from [" + path + "]: " + ex.getMessage());
@@ -486,14 +492,14 @@ public void loadPropertiesFromOntology(OWLOntology o) {
mainOntologyMetadata.getLicense().setName(licName);
}
}
- if (this.mainOntologyMetadata.getName() == null || this.mainOntologyMetadata.getName().equals("")) {
+ if (this.mainOntologyMetadata.getName() == null || this.mainOntologyMetadata.getName().isEmpty()) {
this.mainOntologyMetadata.setName(mainOntologyMetadata.getTitle());
}
- if (mainOntologyMetadata.getStatus() == null || mainOntologyMetadata.getStatus().equals("")) {
+ if (mainOntologyMetadata.getStatus() == null || mainOntologyMetadata.getStatus().isEmpty()) {
mainOntologyMetadata.setStatus("Ontology Specification Draft");
}
// default name if no annotations are found
- if (mainOntologyMetadata.getName() == null || mainOntologyMetadata.getName().equals("")) {
+ if (mainOntologyMetadata.getName() == null || mainOntologyMetadata.getName().isEmpty()) {
this.mainOntologyMetadata.setName("[Ontology Name]");
}
// default citation if none is given
@@ -522,7 +528,7 @@ public void loadNamespaceDeclarations(OWLOntology o){
OWLOntologyXMLNamespaceManager nsManager = new OWLOntologyXMLNamespaceManager(o, o.getFormat());
for (String prefix : nsManager.getPrefixes()) {
String namespaceURI = nsManager.getNamespaceForPrefix(prefix);
- if ("".equals(prefix) || namespaceURI.equals(mainOntologyMetadata.getNamespaceURI())){
+ if (prefix.isEmpty() || namespaceURI.equals(mainOntologyMetadata.getNamespaceURI())){
namespaceDeclarations.put(mainOntologyMetadata.getNamespacePrefix(),namespaceURI);
}else{
namespaceDeclarations.put(prefix,nsManager.getNamespaceForPrefix(prefix));
@@ -531,7 +537,7 @@ public void loadNamespaceDeclarations(OWLOntology o){
}
private String appendDetails(final String detail, final String prefix, final boolean useFullStop) {
- if (detail == null || detail.equals("")) {
+ if (detail == null || detail.isEmpty()) {
return "";
}
@@ -581,7 +587,7 @@ private void completeOntologyMetadata(OWLAnnotation a, OWLOntology o) {
valueLanguage = a.getValue().asLiteral().get().getLang();
value = a.getValue().asLiteral().get().getLiteral();
if (this.currentLanguage.equals(valueLanguage)
- || (abstractSection == null || "".equals(abstractSection))) {
+ || (abstractSection == null || abstractSection.isEmpty())) {
abstractSection = value;
this.setIncludeAbstract(true); // in case users set no place holder text but added their own
}
@@ -689,11 +695,11 @@ private void completeOntologyMetadata(OWLAnnotation a, OWLOntology o) {
o.getAnnotationAssertionAxioms(valueURI).stream().forEach(i -> {
completeAgentMetadata(i, ag, o);
});
- if(ag.getName()==null || ag.getName().equals("")){
+ if(ag.getName()==null || ag.getName().isEmpty()){
//the value does not have annotations, so we keep it as it is.
ag.setName(valueURI.getIRIString());
}
- if(ag.getURL()==null || ag.getURL().equals("")){
+ if(ag.getURL()==null || ag.getURL().isEmpty()){
ag.setURL(valueURI.getIRIString());
}
}
@@ -826,7 +832,7 @@ private void completeOntologyMetadata(OWLAnnotation a, OWLOntology o) {
valueLanguage = a.getValue().asLiteral().get().getLang();
value = a.getValue().asLiteral().get().getLiteral();
if (this.currentLanguage.equals(valueLanguage)
- || (introText == null || "".equals(introText))) {
+ || (introText == null || introText.isEmpty())) {
introText = value;
this.setIncludeIntroduction(true);
}
@@ -851,6 +857,12 @@ private void completeOntologyMetadata(OWLAnnotation a, OWLOntology o) {
value = WidocoUtils.getValueAsLiteralOrURI(a.getValue());
mainOntologyMetadata.getSerializations().replace(Constants.TTL, value);
break;
+ case Constants.PROP_DOAP_REPO:
+ case Constants.PROP_SCHEMA_CODE_REPO_HTTP:
+ case Constants.PROP_SCHEMA_CODE_REPO_HTTPS:
+ value = WidocoUtils.getValueAsLiteralOrURI(a.getValue());
+ mainOntologyMetadata.setCodeRepository(value);
+ break;
}
}
@@ -937,11 +949,11 @@ private void completeAgentMetadata(OWLAnnotationAssertionAxiom ann, Agent ag, OW
o.getAnnotationAssertionAxioms(valueURI).stream().forEach(i -> {
completeAgentMetadata(i,aux,o);
});
- if(aux.getName()==null || aux.getName().equals("")){
+ if(aux.getName()==null || aux.getName().isEmpty()){
//the value does not have annotations, so we keep it as it is.
aux.setName(valueURI.getIRIString());
}
- if(aux.getURL()==null || aux.getURL().equals("")){
+ if(aux.getURL()==null || aux.getURL().isEmpty()){
aux.setURL(valueURI.getIRIString());
}
}
@@ -1267,7 +1279,7 @@ public void setIncludeNamedIndividuals(boolean includeNamedIndividuals) {
public void addLanguageToGenerate(String lang) {
if (!this.languages.containsKey(lang)) {
this.languages.put(lang, false);
- if (currentLanguage.equals("")) {
+ if (currentLanguage.isEmpty()) {
currentLanguage = lang;
}
}
diff --git a/src/main/java/widoco/Constants.java b/src/main/java/widoco/Constants.java
index 9f9088ad..daa2e685 100644
--- a/src/main/java/widoco/Constants.java
+++ b/src/main/java/widoco/Constants.java
@@ -75,6 +75,7 @@ public class Constants {
public static final String NS_VOAF = "http://purl.org/vocommons/voaf#";
public static final String NS_WDRS = "http://www.w3.org/2007/05/powder-s#";
public static final String NS_WIDOCO = "https://w3id.org/widoco/vocab#";
+ public static final String NS_DOAP = "http://usefulinc.com/ns/doap#";
public static final String PROP_RDFS_LABEL = NS_RDFS + "label";
public static final String PROP_RDFS_COMMENT = NS_RDFS + "comment";
@@ -125,6 +126,8 @@ public class Constants {
public static final String PROP_SCHEMA_LOGO_HTTPS = NS_SCHEMA_HTTPS + "logo";
public static final String PROP_SCHEMA_STATUS_HTTP = NS_SCHEMA_HTTP + "creativeWorkStatus";
public static final String PROP_SCHEMA_STATUS_HTTPS = NS_SCHEMA_HTTPS + "creativeWorkStatus";
+ public static final String PROP_SCHEMA_CODE_REPO_HTTP = NS_SCHEMA_HTTP + "codeRepository";
+ public static final String PROP_SCHEMA_CODE_REPO_HTTPS = NS_SCHEMA_HTTPS + "codeRepository";
public static final String PROP_OWL_VERSION_INFO = NS_OWL + "versionInfo";
public static final String PROP_OWL_PRIOR_VERSION = NS_OWL + "priorVersion";
@@ -156,6 +159,8 @@ public class Constants {
public static final String PROP_DCTERMS_HAS_VERSION = NS_DCTERMS + "hasVersion";
public static final String PROP_DCTERMS_SOURCE = NS_DCTERMS + "source";
+ public static final String PROP_DOAP_REPO = NS_DOAP + "repository";
+
public static final String PROP_BIBO_DOI = NS_BIBO + "doi";
public static final String PROP_BIBO_STATUS = NS_BIBO + "status";
@@ -273,6 +278,12 @@ public class Constants {
public static final String PF_SERIALIZATION_JSON = "JSONLDSerialization";
public static final String PF_SERIALIZATION_RDF = "RDFXMLSerialization";
public static final String PF_SERIALIZATION_TTL = "TurtleSerialization";
+ public static final String PF_ABSTRACT_PATH = "pathToAbstract";
+ public static final String PF_INTRO_PATH = "pathToIntro";
+ public static final String PF_DESCRIPTION_PATH = "pathToDescription";
+ public static final String PF_OVERVIEW_PATH = "pathToOverview";
+ public static final String PF_REFERENCES_PATH = "pathToReferences";
+ public static final String PF_REFERENCES_CODE_REPO = "codeRepository";
/*OWL_API RDF Serializations*/
public static final String RDF_XML = "RDF/XML";
@@ -349,6 +360,7 @@ public class Constants {
public static final String LANG_SEE_ALSO = "seeAlso";
public static final String LANG_FUNDER = "funder";
public static final String LANG_FUNDING = "funding";
+ public static final String LANG_CODE_REPO = "codeRepository";
// labels for the changelog
public static final String LANG_CHANGELOG_HEAD = "changelogHead";
@@ -568,7 +580,7 @@ private static String getOntologies(ArrayList ontos) {
while (it.hasNext()) {
Ontology currentOnto = it.next();
String currentOntoName = currentOnto.getName();
- if (currentOntoName == null || "".equals(currentOntoName)) {
+ if (currentOntoName == null || currentOntoName.isEmpty()) {
currentOntoName = "Onto" + i;
i++;
}
@@ -675,6 +687,9 @@ public static String getJSONLDSnippet(Configuration c) {
if (o.getLicense() != null && o.getLicense().getUrl() != null && !"".equals(o.getLicense().getUrl())) {
metadata += ", \"license\":\"" + o.getLicense().getUrl() + "\"";
}
+ if(o.getCodeRepository()!=null && !o.getCodeRepository().isEmpty()){
+ metadata += ", \"codeRepository\":\"" + o.getCodeRepository() + "\"";
+ }
// authors (optional)
ArrayList a = o.getCreators();
if (!a.isEmpty()) {
@@ -1083,13 +1098,20 @@ public static String getHeadSection(Configuration c, Properties l) {
+ ""
+ c.getMainOntology().getBackwardsCompatibleWith() +"" + "\n";
}
- if (!"".equals(c.getMainOntology().getIncompatibleWith())
+ if (!"".equals(c.getMainOntology().getIncompatibleWith())
&& c.getMainOntology().getIncompatibleWith() != null) {
// doi is common for all languages
head += "- " + l.getProperty(LANG_INCOMPATIBLE) + ":
\n- "
+ ""
+ c.getMainOntology().getIncompatibleWith() +"" + "
\n";
}
+ if (!"".equals(c.getMainOntology().getCodeRepository())
+ && c.getMainOntology().getCodeRepository() != null) {
+ // doi is common for all languages
+ head += "- " + l.getProperty(LANG_CODE_REPO) + ":
\n- "
+ + ""
+ + c.getMainOntology().getCodeRepository() +"" + "
\n";
+ }
// end definition list
head += "\n\n";
diff --git a/src/main/java/widoco/CreateResources.java b/src/main/java/widoco/CreateResources.java
index cc197798..f6f73280 100644
--- a/src/main/java/widoco/CreateResources.java
+++ b/src/main/java/widoco/CreateResources.java
@@ -291,7 +291,7 @@ private static String createOverviewSection(String path, Configuration c, String
}
// add the webvowl diagram, if selected
if (c.isCreateWebVowlVisualization()) {
- textToWrite += " ";
+ textToWrite += " ";
}
textToWrite += "\n";
if(!c.isIncludeAllSectionsInOneDocument()){
diff --git a/src/main/java/widoco/entities/Ontology.java b/src/main/java/widoco/entities/Ontology.java
index 70e9c3a4..eaa9f61b 100644
--- a/src/main/java/widoco/entities/Ontology.java
+++ b/src/main/java/widoco/entities/Ontology.java
@@ -156,6 +156,8 @@ public class Ontology {
private String logo;
+ private String codeRepository;
+
public Ontology() {
@@ -458,4 +460,12 @@ public ArrayList getSources() {
public void setSources(ArrayList sources) {
this.sources = sources;
}
+
+ public String getCodeRepository(){
+ return codeRepository;
+ }
+
+ public void setCodeRepository(String codeRepository) {
+ this.codeRepository = codeRepository;
+ }
}
diff --git a/src/main/java/widoco/gui/GuiStep2.java b/src/main/java/widoco/gui/GuiStep2.java
index b30c1359..db516855 100644
--- a/src/main/java/widoco/gui/GuiStep2.java
+++ b/src/main/java/widoco/gui/GuiStep2.java
@@ -210,35 +210,35 @@ private void refreshTable() {
}
}
for (Agent a : conf.getMainOntology().getContributors()) {
- if (a.getName() == null || a.getName().equals("")) {
+ if (a.getName() == null || a.getName().isEmpty()) {
contributors.append("contributor; ");
} else {
contributors.append(a.getName()).append("; ");
}
}
for (Agent a : conf.getMainOntology().getFunders()) {
- if (a.getName() == null || a.getName().equals("")) {
+ if (a.getName() == null || a.getName().isEmpty()) {
funders.append("funding; ");
} else {
funders.append(a.getName()).append("; ");
}
}
for (Ontology a : conf.getMainOntology().getImportedOntologies()) {
- if (a.getName() == null || a.getName().equals("")) {
+ if (a.getName() == null || a.getName().isEmpty()) {
imported.append("importedOnto; ");
} else {
imported.append(a.getName()).append("; ");
}
}
for (Ontology a : conf.getMainOntology().getExtendedOntologies()) {
- if (a.getName() == null || a.getName().equals("")) {
+ if (a.getName() == null || a.getName().isEmpty()) {
extended.append("extendedOnto; ");
} else {
extended.append(a.getName()).append("; ");
}
}
Agent p = conf.getMainOntology().getPublisher();
- if (p.getName() == null || p.getName().equals("")) {
+ if (p.getName() == null || p.getName().isEmpty()) {
if (p.getURL() != null) {
publisher.append("publisherName ");
}
@@ -246,22 +246,22 @@ private void refreshTable() {
publisher.append(p.getName());
}
for (String img: conf.getMainOntology().getImages()){
- if(!img.equals("")){
+ if(!img.isEmpty()){
images.append(img).append(";");
}
}
for (String source: conf.getMainOntology().getSources()){
- if(!source.equals("")){
+ if(!source.isEmpty()){
sources.append(source).append(";");
}
}
for (String see: conf.getMainOntology().getSeeAlso()){
- if(!see.equals("")){
+ if(!see.isEmpty()){
seeAlso.append(see).append(";");
}
}
for (String see: conf.getMainOntology().getFundingGrants()){
- if(!see.equals("")){
+ if(!see.isEmpty()){
funding.append(see).append(";");
}
}
@@ -295,11 +295,12 @@ private void refreshTable() {
{ "logo", conf.getMainOntology().getLogo() },
{ "sources", sources.toString() },
{ "funding", funding.toString() },
- { "see also", seeAlso.toString() }
+ { "see also", seeAlso.toString() },
+ { "code repository", conf.getMainOntology().getCodeRepository() }
},
new String[] { "Property", "Value" }) {
- Class[] types = new Class[] { java.lang.String.class, java.lang.Object.class };
- boolean[] canEdit = new boolean[] { false, true };
+ final Class[] types = new Class[] { java.lang.String.class, java.lang.Object.class };
+ final boolean[] canEdit = new boolean[] { false, true };
@Override
public Class getColumnClass(int columnIndex) {
@@ -402,6 +403,9 @@ private void saveMetadata() {
case "logo":
conf.getMainOntology().setLogo(value);
break;
+ case "code repository":
+ conf.getMainOntology().setCodeRepository(value);
+ break;
}
}
}
@@ -913,47 +917,6 @@ private void checkListLabelMouseExited(java.awt.event.MouseEvent evt) {// GEN-FI
* @param args
* the command line arguments
*/
- // public static void main(String args[]) {
- // /* Set the Nimbus look and feel */
- // //
- // /* If Nimbus (introduced in Java SE 6) is not available, stay with the
- // default look and feel.
- // * For details see
- // http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
- // */
- // try {
- // for (javax.swing.UIManager.LookAndFeelInfo info :
- // javax.swing.UIManager.getInstalledLookAndFeels()) {
- // if ("Nimbus".equals(info.getName())) {
- // javax.swing.UIManager.setLookAndFeel(info.getClassName());
- // break;
- // }
- // }
- // } catch (ClassNotFoundException ex) {
- // java.util.logging.Logger.getLogger(GuiStep2.class.getName()).log(java.util.logging.Level.SEVERE,
- // null, ex);
- // } catch (InstantiationException ex) {
- // java.util.logging.Logger.getLogger(GuiStep2.class.getName()).log(java.util.logging.Level.SEVERE,
- // null, ex);
- // } catch (IllegalAccessException ex) {
- // java.util.logging.Logger.getLogger(GuiStep2.class.getName()).log(java.util.logging.Level.SEVERE,
- // null, ex);
- // } catch (javax.swing.UnsupportedLookAndFeelException ex) {
- // java.util.logging.Logger.getLogger(GuiStep2.class.getName()).log(java.util.logging.Level.SEVERE,
- // null, ex);
- // }
- // //
- //
- // /* Create and display the form */
- // java.awt.EventQueue.invokeLater(new Runnable() {
- //
- // public void run() {
- // new GuiStep2().setVisible(true);
- // }
- // });
- // }
- // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton backButton;
private javax.swing.JProgressBar barStatus;
private javax.swing.JButton cancelButton;
@@ -980,5 +943,4 @@ private void checkListLabelMouseExited(java.awt.event.MouseEvent evt) {// GEN-FI
private javax.swing.JTextPane textPaneSteps;
private javax.swing.JCheckBox useLicensiusWSCheckBox;
private javax.swing.JLabel widocoLogo;
- // End of variables declaration//GEN-END:variables
}
diff --git a/src/main/java/widoco/gui/GuiStep3.java b/src/main/java/widoco/gui/GuiStep3.java
index 8c7ea117..865a9388 100644
--- a/src/main/java/widoco/gui/GuiStep3.java
+++ b/src/main/java/widoco/gui/GuiStep3.java
@@ -82,6 +82,11 @@ private void initializeGUI(){
checkBoxWebVowl.setSelected(true);
checkBoxAutomatedChangeLog.setSelected(true);
if(g.getConfig().getGoogleAnalyticsCode()!=null)analyticsField.setText(g.getConfig().getGoogleAnalyticsCode());
+ abstractPath = g.getConfig().getAbstractPath();
+ introductionPath = g.getConfig().getIntroductionPath();
+ descriptionPath = g.getConfig().getDescriptionPath();
+ overviewPath = g.getConfig().getOverviewPath();
+ referencesPath = g.getConfig().getReferencesPath();
}
/** This method is called from within the constructor to
diff --git a/src/main/resources/lode/extraction.xsl b/src/main/resources/lode/extraction.xsl
index 1fa54b6c..67b605fa 100644
--- a/src/main/resources/lode/extraction.xsl
+++ b/src/main/resources/lode/extraction.xsl
@@ -712,7 +712,7 @@ http://www.oxygenxml.com/ns/doc/xsl ">
-
+
diff --git a/src/main/resources/lode/rec.css b/src/main/resources/lode/rec.css
index 2da3a15c..0413b0c1 100644
--- a/src/main/resources/lode/rec.css
+++ b/src/main/resources/lode/rec.css
@@ -22,6 +22,13 @@ details:hover {
cursor: pointer;
}
+iframe {
+ margin:auto;
+ display:block;
+ width:100%;
+ height:500px;
+}
+
:link { color: var(--link); background: transparent }
:visited { color: var(--link-visited); background: transparent }
a:active { color: var(--link-active); background: transparent }
diff --git a/src/main/resources/widoco/cs.properties b/src/main/resources/widoco/cs.properties
index f97fdca9..0e3cc818 100644
--- a/src/main/resources/widoco/cs.properties
+++ b/src/main/resources/widoco/cs.properties
@@ -82,3 +82,4 @@ source=Zdroj:
seeAlso=Viz také:
funder=Sponzora:
funding=Financování:
+codeRepository=Slovní zásoba udrzovaná na
diff --git a/src/main/resources/widoco/de.properties b/src/main/resources/widoco/de.properties
index b177d631..f9d47ead 100644
--- a/src/main/resources/widoco/de.properties
+++ b/src/main/resources/widoco/de.properties
@@ -83,3 +83,4 @@ source=Quelle:
seeAlso=Siehe auch:
funder=Geldgeber:
funding=Finanzierung:
+codeRepository=Wortschatz gepflegt bei
diff --git a/src/main/resources/widoco/en.properties b/src/main/resources/widoco/en.properties
index b8776594..359bbd05 100644
--- a/src/main/resources/widoco/en.properties
+++ b/src/main/resources/widoco/en.properties
@@ -83,3 +83,4 @@ source=Source:
seeAlso=See also:
funder=Funder:
funding=Funding:
+codeRepository=Vocabulary maintained at
diff --git a/src/main/resources/widoco/es.properties b/src/main/resources/widoco/es.properties
index 4b55162f..19307978 100644
--- a/src/main/resources/widoco/es.properties
+++ b/src/main/resources/widoco/es.properties
@@ -83,3 +83,4 @@ source=Fuente:
seeAlso=Recursos similares:
funder=Entidad financiadora:
funding=Proyecto financiador:
+codeRepository=Vocabulario mantenido en
diff --git a/src/main/resources/widoco/fr.properties b/src/main/resources/widoco/fr.properties
index 83d12a7a..97a8f570 100644
--- a/src/main/resources/widoco/fr.properties
+++ b/src/main/resources/widoco/fr.properties
@@ -40,14 +40,14 @@ ackText=Remerciements retour au somma
prov1=Provenance pour
prov2=Documentation
createdBy=Ontologie créée par:
-contribBy=Contributeurs:
+contribBy=Contributeurs:
spec=est une spécialisation de l'URI générique
rev=est une révision de la version précédente
result=La documentation de l'ontologie résulte de l'utilisation de Widoco tool (qui utilise LODE pour générer les sections de référencement croisé).\n
generated=Cette documentation a été générée le (\u00c3\u00a0)
changeLog=Changements depuis la derniè re publication retour au sommaire
Ceci est le journal de changements. Cette section est optionnelle, mais recommandée
citeAs=Citer en tant que:
-back=Retour
+back=Retour
back1=documentation
back2=format TTL
back3=retour au sommaire
@@ -68,7 +68,7 @@ addedDataProp=Data properties ajoutées
deletedDataProp=Data properties supprimées
added=Ajouté
deleted=Supprimé
-subClassOf=Sous-classe de
+subClassOf=Sous-classe de
subPropOf=Sous-propriété de
domain=Domaine
range=Co-domaine
@@ -81,4 +81,5 @@ legend=Légende
source=Source:
seeAlso=Voir également:
funder=Bailleur de fonds:
-funding=Financement:
\ No newline at end of file
+funding=Financement:
+codeRepository=Vocabulaire maintenu a
\ No newline at end of file
diff --git a/src/main/resources/widoco/it.properties b/src/main/resources/widoco/it.properties
index 5b064b47..6f469927 100644
--- a/src/main/resources/widoco/it.properties
+++ b/src/main/resources/widoco/it.properties
@@ -32,7 +32,7 @@ descriptionTitle=Descrizione torna alla \nQui va inserita la descrizione dell'ontologia. la descrizione dovrebbe includere una spiegazione e diagrammi, per spiegare le relazioni tra le classi, esempio di utilizzo, etc.\n
crossRefTitle=Cross reference per
crossRefTitle2=classi, proprietà e dataproperty back to ToC
-crossRefPlaceHolder=Questa sezione fornisce i dettagli per ogni classe e proprietà definita da
+crossRefPlaceHolder=Questa sezione fornisce i dettagli per ogni classe e proprietà definita da
classes=Classi
objProp=Object Properties
dataProp=Data Properties
@@ -45,8 +45,8 @@ ackText=Ringraziamenti torna alla ToC
prov1=Provenance per
prov2=Documentazione
createdBy=Ontologia creata da:
-contribBy=Ontologia a cui hanno contribuito:
-spec=è una specializzazione della URI generica
+contribBy=Ontologia a cui hanno contribuito:
+spec=è una specializzazione della URI generica
rev=è una revisione della versione precedente
result=La documentazione dell'ontologia è stata prodotta usando il programma Widoco (che a sua volta usa LODE per generare la sezione dei riferimenti incrociati).\n
generated=La documentazione è stata generata il
@@ -74,7 +74,7 @@ deletedDataProp=Data property cancellate
added=Aggiunto
deleted=Cancellato
subClassOf=SottoClasse di
-subPropOf=Proprietà derivata da
+subPropOf=Proprietà derivata da
domain=Dominio
range=Codominio
unionOf=Unione di
@@ -86,4 +86,5 @@ legend=Legenda
source=Fonte:
seeAlso=Guarda anche:
funder=Finanziatore:
-funding=Finanziamento:
\ No newline at end of file
+funding=Finanziamento:
+codeRepository=Vocabolario mantenuto a
\ No newline at end of file
diff --git a/src/main/resources/widoco/nl.properties b/src/main/resources/widoco/nl.properties
index ba2f10f5..2ed18220 100644
--- a/src/main/resources/widoco/nl.properties
+++ b/src/main/resources/widoco/nl.properties
@@ -81,4 +81,5 @@ legend=Legenda
source=Zie ook:
seeAlso=See also:
funder=Financier:
-funding=Financiering:
\ No newline at end of file
+funding=Financiering:
+codeRepository=Woordenschat onderhouden op
\ No newline at end of file
diff --git a/src/main/resources/widoco/pt.properties b/src/main/resources/widoco/pt.properties
index 27e8affa..2f52ce81 100644
--- a/src/main/resources/widoco/pt.properties
+++ b/src/main/resources/widoco/pt.properties
@@ -81,4 +81,5 @@ legend=lenda
source=Fonte:
seeAlso=Veja também:
funder=Financiador:
-funding=Financiamento:
\ No newline at end of file
+funding=Financiamento:
+codeRepository=Vocabulário mantido em
\ No newline at end of file