Skip to content

Commit

Permalink
Added the PROV-O and Algorithm vocabularies.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelRoeder committed Dec 8, 2023
1 parent fe032a7 commit 49700f4
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
49 changes: 49 additions & 0 deletions src/main/java/org/hobbit/vocab/Algorithm.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package org.hobbit.vocab;

import org.apache.jena.rdf.model.Property;
import org.apache.jena.rdf.model.Resource;
import org.apache.jena.rdf.model.ResourceFactory;

/**
* Representation of the Algorithm vocabulary as Java objects.
*
* @author Farshad Afshari ([email protected])
* @author Michael Röder ([email protected])
*
*/
public class Algorithm {
protected static final String uri = "http://www.w3id.org/dice-research/ontologies/algorithm/2023/06/";

// Resources sorted alphabetically
public static final Resource AlgorithmDataRelation = resource("AlgorithmDataRelation");
public static final Resource AlgorithmExecution = resource("AlgorithmExecution");
public static final Resource AlgorithmSetup = resource("AlgorithmSetup");
public static final Resource Parameter = resource("Parameter");
public static final Resource Result = resource("Result");

// Properties sorted alphabetically
public static final Property errorDetails = property("errorDetails");
public static final Property instanceOf = property("instanceOf");
public static final Property parameter = property("parameter");
public static final Property produces = property("produces");
public static final Property subExecution = property("subExecution");

/**
* returns the URI for this schema
*
* @return the URI for this schema
*/
public static String getURI() {
return uri;
}

protected static final Resource resource(String local) {
Resource tmp = ResourceFactory.createResource(uri + local);
return tmp;

}

protected static final Property property(String local) {
return ResourceFactory.createProperty(uri, local);
}
}
49 changes: 49 additions & 0 deletions src/main/java/org/hobbit/vocab/PROV.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package org.hobbit.vocab;

import org.apache.jena.rdf.model.Property;
import org.apache.jena.rdf.model.Resource;
import org.apache.jena.rdf.model.ResourceFactory;

/**
* Representation of the PROV Ontology (https://www.w3.org/TR/2013/REC-prov-o-20130430/).
*
* @author Michael Röder ([email protected])
*
*/
public class PROV {

protected static final String uri = "http://www.w3.org/ns/prov#";

// Resources sorted alphabetically
public static final Resource Activity = resource("Activity");
public static final Resource Agent = resource("Agent");
public static final Resource Entity = resource("Entity");

// Properties sorted alphabetically
public static final Property actedOnBehalfOf = property("actedOnBehalfOf");
public static final Property endedAtTime = property("endedAtTime");
public static final Property startedAtTime = property("startedAtTime");
public static final Property used = property("used");
public static final Property wasAssociatedWith = property("wasAssociatedWith");
public static final Property wasAttributedTo = property("wasAttributedTo");
public static final Property wasDerivedFrom = property("wasDerivedFrom");
public static final Property wasGeneratedBy = property("wasGeneratedBy");
public static final Property wasInformedBy = property("wasInformedBy");

/**
* returns the URI for this schema
*
* @return the URI for this schema
*/
public static String getURI() {
return uri;
}

protected static final Resource resource(String local) {
return ResourceFactory.createResource(uri + local);
}

protected static final Property property(String local) {
return ResourceFactory.createProperty(uri, local);
}
}

0 comments on commit 49700f4

Please sign in to comment.