Skip to content

Commit

Permalink
Merge pull request #398 from dgarijo/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
dgarijo authored May 25, 2020
2 parents 705d6ad + 51e55c9 commit 8c8e222
Show file tree
Hide file tree
Showing 26 changed files with 1,058 additions and 619 deletions.
50 changes: 28 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,50 +74,56 @@ A tutorial explaining the main features of the GUI can be found [here](http://dg
Download all the files of the "JAR" folder into the same folder. Then just double click the .jar file.

Now you can execute WIDOCO through the console. Usage:
```bash
java -jar widoco-VERSION-jar-with-dependencies.jar [OPTIONS]
```

java -jar widoco-VERSION-jar-with-dependencies.jar [-ontFile file] or [-ontURI uri] [-outFolder folderName] [-confFile propertiesFile] or [-getOntologyMetadata] [-oops] [-rewriteAll] [-crossRef] [-saveConfig configOutFile] [-useCustomStyle] [-lang lang1-lang2] [-includeImportedOntologies] [-htaccess] [-webVowl] [-licensius] [-ignoreIndividuals] [-analytics analyticsCode] [-doNotDisplaySerializations][-displayDirectImportsOnly] [-rewriteBase rewriteBasePath] [-excludeIntroduction] [-uniteSections]
**OPTIONS**:

The `ontFile` and `ontURI` options allow you to choose the ontology file or ontology URI of your ontology.
`-ontFile PATH` [required (unless -ontURI is used)]: Load a local ontology file (from PATH) to document. This option is incompatible with -ontURI

The `-outFolder` option specifies where you want to place the output.
`-ontURI URI` [required (unless -ontFile is used)]: Load an ontology to document from its URI. This option is incompatible with -ontFile

The `-confFile` allows you to choose your own configuration file for the ontology metadata. However you can tell WIDOCO to try to extract some of the metadata from the ontology with getOntologyMetadata.
`-outFolder folderName`: Specifies the name of the folder where to save the documentation. By default is 'myDocumentation'

The `-oops` flag creates an html page with the evaluation from the OOPS service (http://oops.linkeddata.es/)
`-confFile PATH`: Load your own configuration file for the ontology metadata. Incompatible with -getOntologyMetadata

The `-rewriteAll` option will tell WIDOCO to rewrite files if the new generate files are replacing existing files. Otherwise the tool will promt a window asking the user.
`-getOntologyMetadata`: Extract ontology metadata from the given ontology
-oops: Create an html page with the evaluation from the OOPS service (http://oops.linkeddata.es/)

The `-crossRef` option will ONLY generate the overview and cross reference sections. The index document will NOT be generated. The htaccess, provenance page, etc., will not be generated unless requested by other flags. This flag in intended to be used only after a first version of the documentation exists.
`-rewriteAll`: Replace any existing files when documenting an ontology (e.g., from a previous execution)

The `-saveConfig` option allows you to save a configuration file on the "configOutFile" route with the properties of a given ontology.
`-crossRef`: ONLY generate the overview and cross reference sections. The index document will NOT be generated. The htaccess, provenance page, etc., will not be generated unless requested by other flags. This flag is intended to be used only after a first version of the documentation exists.

The `-useCustomStyle` option allows exporting the documentation using alternate css files (thanks to Daniel Vila).
`-saveConfig PATH`: Save a configuration file on PATH with the properties of a given ontology

The `-lang` option allows showing the languages in which the documentation will be published (separated by "-"). Note that if the language is not supported, the system will load the labels in english. For example: en-pt-es
`-useCustomStyle`: Export the documentation using alternate css files (by Daniel Vila).

The `-includeImportedOntologies` flag indicates whether the terms of the imported ontologies of the current ontology should be documented as well or not.
`-lang LANG1-LANG2`: Generate documentation in multiple languages (separated by "-"). Note that if the language is not supported, the system will load the labels in english. For example: en-pt-es

The `-htaccess` flag creates a bundle for publication ready to be deployed on your apache server.
`-includeImportedOntologies`: Indicates whether the terms of the imported ontologies of the current ontology should be documented as well or not.
-htaccess: Create a bundle for publication ready to be deployed on your Apache server.

The `-webVowl` flag provides a link to a visualization based on WebVowl (http://vowl.visualdataweb.org/webvowl/index.html#).
`-webVowl`: Create a visualization based on WebVowl (http://vowl.visualdataweb.org/webvowl/index.html#) in the documentation.

The `-licensius` flag uses the Licensius web services (http://licensius.com/apidoc/index.html) to retrieve license metadata. Only works if the `-getOntologyMetadata` flag is enabled.
`-licensius`: Use the Licensius web services (http://licensius.com/apidoc/index.html) to retrieve license metadata. Only works if the -getOntologyMetadata flag is enabled.

The `-ignoreIndividuals` flag allows you to ignore the named individuals in the ontology.
`-ignoreIndividuals`: Individuals will not be included in the documentation.
-includeAnnotationProperties: Include annotation properties defined in your ontology in the documentation (by default they are not included)

The `-includeAnnotationProperties` flag will include annotation properties defined in your ontology (by default they are not included)
`-analytics CODE`: Add a code snippet for Google analytics to track your HTML documentation. You need to add your CODE next to the flag. For example: UA-1234

The `-analytics` flag will add a code snippet for Google analytics to track your page. You need to add your code next to it. For example: UA-1234
`-doNotDisplaySerializations`: The serializations of the ontology will not be displayed.

The `-doNotDisplaySerializations` flag allows not displaying available serializations of the ontology.
`-displayDirectImportsOnly`: Only those imported ontologies that are directly imported in the ontology being documented.

The `-displayDirectImportsOnly` flag allows displaying only those imported ontologies that are directly imported in the ontology being documented.
`-rewriteBase PATH`: Change the default rewrite base path. The default value is "/". This flag can only be used with the htaccess option.

The `-rewriteBase` flag allows changing the default rewrite base path (until the documentation folder). By default it is "/".
`-excludeIntroduction`: Skip the introduction section in the documentation.
-uniteSections: Write all HTML sections into a single HTML document.

The `-excludeIntroduction` flag skips adding an introduction section.
`-- help`: Shows a help message and exits.

The `-uniteSections` includes all sections in the same HTML document.

## How can I make WIDOCO automatically recognize my vocabulary annotations?
There are two ways for making WIDOCO get your vocabulary metadata annotations and use them automatically to document the ontology.
Expand Down
4 changes: 2 additions & 2 deletions doc/bestPractices/sections/checklist-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ <h4 class="list" id="backwardCompatibility">Backward compatibility [<em class="r
</p>

<ul class="hlist"><strong>Properties you may use</strong>:
<li><a target="_blank" href="http://purl.org/dc/terms/issued">owl:backwardCompatibility</a></li>
<li><a target="_blank" href="http://www.w3.org/2002/07/owl#backwardCompatibleWith">owl:backwardCompatibleWith</a></li>
</ul>

<h4 class="list" id="incompatibility">Incompatibility [<em class="rfc2119" title="OPTIONAL">OPTIONAL</em>]</h4>
Expand All @@ -94,7 +94,7 @@ <h4 class="list" id="incompatibility">Incompatibility [<em class="rfc2119" title
</p>

<ul class="hlist"><strong>Properties you may use</strong>:
<li><a target="_blank" href="http://purl.org/dc/terms/issued">owl:incompatibleWith</a></li>
<li><a target="_blank" href="http://www.w3.org/2002/07/owl#incompatibleWith">owl:incompatibleWith</a></li>
</ul>

<h3 id="prov" class="list">Vocabulary provenance</h3>
Expand Down
106 changes: 19 additions & 87 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@
<groupId>es.oeg</groupId>
<artifactId>widoco</artifactId>
<packaging>jar</packaging>
<version>1.4.13</version>
<version>1.4.14</version>
<name>Widoco</name>

<properties>
<ver.log4j>1.2.16</ver.log4j>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<java.version>1.8</java.version>
<jena.version>2.11.1</jena.version>
<jena-sdb.version>1.3.6</jena-sdb.version>
<jena-tdb.version>0.10.1</jena-tdb.version>
<jena-iri.version>0.9.6</jena-iri.version>
<jena-fuseki.version>0.2.7</jena-fuseki.version>
</properties>

<dependencies>
Expand All @@ -28,84 +22,22 @@
<version>0.3.5</version>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${ver.log4j}</version>
<exclusions>
<!-- Exclude things that don't resolve in some versions of log4j -->
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
</dependency>

<!-- We use "provided" scope because we are exporting the contents of these
libraries, and we don't want our bundle consumers to see and be confused
by these additional copies of the classes, as transitive dependencies. "provided"
prevents that from happening. -->

<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>apache-jena-libs</artifactId>
<type>pom</type>
<version>${jena.version}</version>

<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>lucene-core</artifactId>
<groupId>org.apache.lucene</groupId>
</exclusion>
<exclusion>
<artifactId>stax-api</artifactId>
<groupId>stax</groupId>
</exclusion>
<exclusion>
<artifactId>wstx-asl</artifactId>
<groupId>org.codehaus.woodstox</groupId>
</exclusion>
<exclusion>
<artifactId>log4j</artifactId>
<groupId>log4j</groupId>
</exclusion>
<exclusion>
<artifactId>icu4j</artifactId>
<groupId>com.ibm.icu</groupId>
</exclusion>
<exclusion>
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>


<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-core</artifactId>
<version>${jena.version}</version>
<exclusions>
<exclusion>
<artifactId>log4j</artifactId>
<groupId>log4j</groupId>
</exclusion>
</exclusions>
</dependency>

prevents that from happening.
-->
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
Expand All @@ -115,7 +47,7 @@
<dependency>
<groupId>net.sourceforge.owlapi</groupId>
<artifactId>owlapi-distribution</artifactId>
<version>5.1.11</version>
<version>5.1.14</version>
</dependency>

<dependency>
Expand All @@ -136,11 +68,11 @@
<scope>test</scope>
</dependency>

<dependency>
<!--<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
</dependency>-->
</dependencies>

<dependencyManagement>
Expand Down Expand Up @@ -205,11 +137,11 @@
<!-- Environment settings -->
<repositories>

<repository>
<!--<repository>
<id>maven-restlet</id>
<name>Restlet Framework repository</name>
<url>https://maven.restlet.org</url>
</repository>
<url>http://maven.restlet.org</url>
</repository>-->

<repository>
<id>jitpack.io</id>
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/diagram/DiagramGeneration.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,4 @@ public static void generateOntologyDiagram(String outFolder, Configuration c) {
logger.error("FAILED TO LOAD " + e.getMessage());
}
}

// public static void main(String[] args){
// File webvowl = new File("mydoc"+File.separator+"webvowl");
// boolean t = webvowl.mkdirs();
// WidocoUtils.unZipIt(Constants.WEBVOWL_RESOURCES, webvowl.getAbsolutePath());
// }

}
18 changes: 9 additions & 9 deletions src/main/java/diff/CompareOntologies.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ public class CompareOntologies {
private final Logger logger = LoggerFactory.getLogger(this.getClass());

//classes
private ArrayList<OWLAxiomInfo> modifiedClasses = new ArrayList<OWLAxiomInfo>();
private ArrayList<OWLAxiomInfo> newClasses = new ArrayList<OWLAxiomInfo>();
private ArrayList<OWLAxiomInfo> deletedClasses = new ArrayList<OWLAxiomInfo>();
private ArrayList<OWLAxiomInfo> modifiedClasses = new ArrayList<>();
private ArrayList<OWLAxiomInfo> newClasses = new ArrayList<>();
private ArrayList<OWLAxiomInfo> deletedClasses = new ArrayList<>();
//properties
private ArrayList<OWLAxiomInfo> modifiedProperties = new ArrayList<OWLAxiomInfo>();
private ArrayList<OWLAxiomInfo> newProperties = new ArrayList<OWLAxiomInfo>();
private ArrayList<OWLAxiomInfo> deletedProperties = new ArrayList<OWLAxiomInfo>();
private ArrayList<OWLAxiomInfo> modifiedProperties = new ArrayList<>();
private ArrayList<OWLAxiomInfo> newProperties = new ArrayList<>();
private ArrayList<OWLAxiomInfo> deletedProperties = new ArrayList<>();
//data properties
private ArrayList<OWLAxiomInfo> modifiedDataProperties = new ArrayList<OWLAxiomInfo>();
private ArrayList<OWLAxiomInfo> newDataProperties = new ArrayList<OWLAxiomInfo>();
private ArrayList<OWLAxiomInfo> deletedDataProperties = new ArrayList<OWLAxiomInfo>();
private ArrayList<OWLAxiomInfo> modifiedDataProperties = new ArrayList<>();
private ArrayList<OWLAxiomInfo> newDataProperties = new ArrayList<>();
private ArrayList<OWLAxiomInfo> deletedDataProperties = new ArrayList<>();

private String oldVersion, newVersion;

Expand Down
7 changes: 4 additions & 3 deletions src/main/java/lode/LODEGeneration.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,25 @@
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.log4j.Logger;
import org.semanticweb.owlapi.formats.RDFXMLDocumentFormat;
import org.semanticweb.owlapi.io.OWLOntologyDocumentTarget;
import org.semanticweb.owlapi.io.StringDocumentTarget;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.semanticweb.owlapi.model.OWLOntologyStorageException;
import org.semanticweb.owlapi.model.OWLOntologyManager;

import widoco.Configuration;

/**
*
* @author Silvio Peroni, adpated to Widoco (and modified) by Daniel Garijo
*/
public class LODEGeneration {

final static Logger logger = Logger.getLogger(LODEGeneration.class);
private static final Logger logger = LoggerFactory.getLogger(LODEGeneration.class);

public static String getLODEhtml(Configuration c, File lodeResources) throws Exception {
try {
Expand Down
Loading

0 comments on commit 8c8e222

Please sign in to comment.