Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

jCOMODI

jCOMDO is a Java client for the COMODI ontology. For COMODI consult the official website: purl.uni-rostock.de/comodi/

COMODI overview (click to get a larger version)

Usage

The easiest way to include jCOMODI is to add the artifact as a dependency to your Maven project:

<dependency>
	<groupId>de.uni-rostock.sbi</groupId>
	<artifactId>jCOMODI</artifactId>
	<version>$version</version>
</dependency>

You can then for example annotate a deletion with:

import java.net.URI;
import de.unirostock.sems.comodi.Change;
import de.unirostock.sems.comodi.ChangeFactory;
import de.unirostock.sems.comodi.branches.ComodiXmlEntity;
import de.unirostock.sems.comodi.branches.ComodiReason;
import de.unirostock.sems.comodi.branches.ComodiTarget;

[...]

ChangeFactory changeFac = new ChangeFactory (URI.create ("http://base.uri"));
Change change = changeFac.createDeletion ("subjectid");
change.appliesTo (ComodiXmlEntity.getAttribute ());
change.affects (ComodiTarget.getReactionDefinition ());
change.hasReason (ComodiReason.getKnowledgeGain ());

System.out.println (changeFac.getRdfXml ());

The snippet above will result in an XML, which may look like this:

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:prov="http://www.w3.org/ns/prov#"
    xmlns:pav="http://purl.org/pav/"
    xmlns:ore="http://www.openarchives.org/ore/terms/"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:comodi="http://purl.uni-rostock.de/comodi/comodi#"
    xmlns:foaf="http://xmlns.com/foaf/0.1/">
  <comodi:Deletion rdf:about="http://base.uri#subjectid">
    <comodi:hasReason rdf:resource="http://purl.uni-rostock.de/comodi/comodi#KnowledgeGain"/>
    <comodi:affects rdf:resource="http://purl.uni-rostock.de/comodi/comodi#ReactionDefinition"/>
    <comodi:appliesTo rdf:resource="http://purl.uni-rostock.de/comodi/comodi#XmlAttribute"/>
  </comodi:Deletion>
</rdf:RDF>

Further examples can be found in BiVeS, which uses jCOMODI to annotate differences between computational models:

LICENSE

Artwork and text etc is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License Creative Commons License

The code is licensed under an Apache 2.0 license:

Copyright martin scharm <https://binfalse.de/contact/>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

java api for comodi

Resources

License

Releases

No releases published

Packages

No packages published

Languages