Java Code Examples for org.apache.jena.ontology.OntModel#createIndividual()

The following examples show how to use org.apache.jena.ontology.OntModel#createIndividual() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ROEvoSerializer.java    From incubator-taverna-language with Apache License 2.0 5 votes vote down vote up
private void addRevision(OntModel model,
		Revision revision) {
	OntClass VersionableResource = model.createClass("http://purl.org/wf4ever/roevo#VersionableResource");
	VersionableResource.addSuperClass(prov.Entity);
	Individual revisionResource = model.createIndividual(revision.getIdentifier().toASCIIString(), 
			VersionableResource);
	revisionResource.addRDFType(prov.Entity);
}
 
Example 2
Source File: ROEvoSerializer.java    From incubator-taverna-language with Apache License 2.0 5 votes vote down vote up
private void addPrevious(OntModel model,
		Revision revision, Revision previous) {
	OntClass VersionableResource = model.createClass("http://purl.org/wf4ever/roevo#VersionableResource");
	VersionableResource.addSuperClass(prov.Entity);
	
	Individual revisionResource = model.createIndividual(revision.getIdentifier().toASCIIString(), 
			VersionableResource);
	Individual previousResource = model.createIndividual(previous.getIdentifier().toASCIIString(), 
			VersionableResource);
	revisionResource.addProperty(prov.wasRevisionOf, previousResource);
}