Class OntoCreator
- java.lang.Object
-
- fi.tut.mei.capabilityQueryLib.ontology.OntologyCreator
-
- fi.tut.mei.resdescapi.rdtoontoapi.ontology.OntoCreator
-
public class OntoCreator extends fi.tut.mei.capabilityQueryLib.ontology.OntologyCreator
-
-
Constructor Summary
Constructors Constructor Description OntoCreator(String uri)
OntoCreator(String uri, fi.tut.mei.resdescapi.rdapi.model.rd.ResourceDescription rd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addBlueprintToCatalogue(fi.tut.mei.resdescapi.rescatapi.ResCatStoImpl catalogue, String bpName)
connect blueprint and catalogue ontology individuals (containsResource and belongsToCatalogue)void
addIfStandard(fi.tut.mei.resdescapi.rdapi.model.rd.InterfaceStdCT ifStd, org.apache.jena.ontology.Individual target)
Add interface standard to the ontology.void
addInterfaceDefinition(fi.tut.mei.resdescapi.rdapi.model.rd.InterfaceImplRDCT ifImpl, org.apache.jena.ontology.Individual target)
map an interface definition from an object to an ontologyvoid
addInterfaceDefinitionList(List<fi.tut.mei.resdescapi.rdapi.model.rd.InterfaceImplRDCT> list, String bpName)
add list of interface definitions to the ontologyvoid
addPerformance(fi.tut.mei.resdescapi.rdapi.model.rd.PropertiesForRDCT.BusinessAndLifeCycleProperties properties, String bpName)
add the performance business property to the ontologyvoid
addStdBody(fi.tut.mei.resdescapi.rdapi.model.rd.StdBody stdBody, org.apache.jena.ontology.Individual target)
Add standard body object to the ontology.void
generateInterfaceImplementationId(String ifId)
add an interface implementationvoid
generateResourceId()
increase a resource index and generate new resource IdString
getBase()
return base urlString
getInterfaceImplementation()
get interface implementationString
getResourceDescriptionId()
get rd idString
getResourceId()
get a resource idorg.apache.jena.ontology.Individual
makeCatalogueOnto(fi.tut.mei.matchmaking.model.xml.msg.ResourceCatalogueCT catalogue)
Make a resource catalogue (MatchMaking) in an ontology.org.apache.jena.ontology.Individual
makeCatalogueOnto(fi.tut.mei.resdescapi.rescatapi.ResCatStoImpl catalogue)
Make a catalogue in an ontologyvoid
setRd(fi.tut.mei.resdescapi.rdapi.model.rd.ResourceDescription rd)
create resource description Id from a resource description objectvoid
setResourceId(int idx)
create a resource id
-
-
-
Method Detail
-
setRd
public void setRd(fi.tut.mei.resdescapi.rdapi.model.rd.ResourceDescription rd)
create resource description Id from a resource description object- Parameters:
rd
-
-
getResourceDescriptionId
public String getResourceDescriptionId()
get rd id- Returns:
-
setResourceId
public void setResourceId(int idx)
create a resource id- Parameters:
idx
- index of a resource
-
generateResourceId
public void generateResourceId()
increase a resource index and generate new resource Id
-
getResourceId
public String getResourceId()
get a resource id- Returns:
-
generateInterfaceImplementationId
public void generateInterfaceImplementationId(String ifId)
add an interface implementation- Parameters:
ifId
- interface id
-
getInterfaceImplementation
public String getInterfaceImplementation()
get interface implementation- Returns:
-
getBase
public String getBase()
return base url- Returns:
-
addStdBody
public void addStdBody(fi.tut.mei.resdescapi.rdapi.model.rd.StdBody stdBody, org.apache.jena.ontology.Individual target)
Add standard body object to the ontology. If an ontology exists, reference it instead of creating new one- Parameters:
stdBody
- standard body to be addedtarget
- the ontology individual, the standard body will be connected to
-
addIfStandard
public void addIfStandard(fi.tut.mei.resdescapi.rdapi.model.rd.InterfaceStdCT ifStd, org.apache.jena.ontology.Individual target)
Add interface standard to the ontology. the ontology id will be generate from a full Code. If the code doesn't exist, the interface standard instance's id will be used as the ontology id and the code will be generated from this id. If an ontology with same id exists, this ontology will be references instead of creating new one.- Parameters:
ifStd
- interface standard will be addedtarget
- the ontology individual the value of interface standard will be connected
-
addInterfaceDefinition
public void addInterfaceDefinition(fi.tut.mei.resdescapi.rdapi.model.rd.InterfaceImplRDCT ifImpl, org.apache.jena.ontology.Individual target)
map an interface definition from an object to an ontology- Parameters:
ifImpl
- interface implementationtarget
- the ontology individual the interface definition will be connected
-
addInterfaceDefinitionList
public void addInterfaceDefinitionList(List<fi.tut.mei.resdescapi.rdapi.model.rd.InterfaceImplRDCT> list, String bpName)
add list of interface definitions to the ontology- Parameters:
list
- list of interface definitionsbpName
- name of the blueprint
-
addPerformance
public void addPerformance(fi.tut.mei.resdescapi.rdapi.model.rd.PropertiesForRDCT.BusinessAndLifeCycleProperties properties, String bpName)
add the performance business property to the ontology- Parameters:
properties
- business and life cycle propertiesbpName
- name of the blueprint
-
makeCatalogueOnto
public org.apache.jena.ontology.Individual makeCatalogueOnto(fi.tut.mei.resdescapi.rescatapi.ResCatStoImpl catalogue)
Make a catalogue in an ontology- Parameters:
catalogue
- instance of catalogue- Returns:
- catalogue in an ontology
-
makeCatalogueOnto
public org.apache.jena.ontology.Individual makeCatalogueOnto(fi.tut.mei.matchmaking.model.xml.msg.ResourceCatalogueCT catalogue)
Make a resource catalogue (MatchMaking) in an ontology. If it already is created, return- Parameters:
catalogue
- instance of catalogue- Returns:
- catalogue in an ontology
-
addBlueprintToCatalogue
public boolean addBlueprintToCatalogue(fi.tut.mei.resdescapi.rescatapi.ResCatStoImpl catalogue, String bpName)
connect blueprint and catalogue ontology individuals (containsResource and belongsToCatalogue)- Parameters:
catalogue
- an instance of cataloguebpName
- blueprint name- Returns:
- true if success and otherwise
-
-