|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.umu.jasb.convert.ConvertFactory
public class ConvertFactory
This class contains all the mapping processes used into the architecture and could be seen as the real brigde among the languages offering all the translation primitives.
Field Summary | |
---|---|
static boolean |
ADD_ALL_DIFFERENT
This configurable constant is for determine if the OWL resultants in the conversion from object instances to the ABox will contains the tag all different or not (if true the performance could be reduced) |
Constructor Summary | |
---|---|
ConvertFactory()
|
Method Summary | |
---|---|
static java.lang.String |
convertToOWLABox(java.util.HashMap<java.lang.Class,java.util.Collection<?>> Allindividuals,
java.lang.String ontologyURL)
This method obtain the dynamic representation of the ontology (the ABox component) from all the object-instances which corforms the domain. |
static java.lang.String |
convertToOWLTBox(java.util.Collection<java.lang.Class> Allclasses,
java.lang.String ontologyURL)
This method obtain the statical representation of the ontology (the TBox component) from all the object-classes which corforms the domain. |
private static boolean |
couldBe(java.util.Collection<java.lang.String> classes,
java.lang.Class c)
This auxiliar method return if a class could be any of the given classes |
private static java.lang.String |
getDatatypeURI(java.lang.reflect.Field field,
boolean isObjectProperty,
java.lang.String ontologyURL)
This auxiliar method obtain the OWL Data type URL used for represent the type of the given java class attribute. |
private static java.lang.Object |
getIndividualByURI(java.util.HashMap<java.lang.Class,java.util.Collection<?>> Allindividuals,
java.lang.String individualURI,
com.hp.hpl.jena.rdf.model.StmtIterator types,
java.util.HashMap<java.lang.String,java.lang.Object> newObject)
This auxiliar method return the java instance from a given OWL individual URL. |
private static java.lang.String |
getIndividualURI(java.lang.Object individual,
java.lang.String ontologyURI)
This auxiliar method return the OWL individual URL from a given java instance. |
static void |
updateFromOWLABox(java.util.HashMap<java.lang.Class,java.util.Collection<?>> Allindividuals,
com.hp.hpl.jena.rdf.model.Model newFacts)
This method produce the enforcing of the given set of facts into the java instances. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean ADD_ALL_DIFFERENT
Constructor Detail |
---|
public ConvertFactory()
Method Detail |
---|
public static java.lang.String convertToOWLTBox(java.util.Collection<java.lang.Class> Allclasses, java.lang.String ontologyURL) throws ConvertionException
Allclasses
- This is an array with all the classes that conform the domainontologyURL
- This is the URL that will be used in the generated OWL
ConvertionException
- In the case of any exception during the conversionpublic static java.lang.String convertToOWLABox(java.util.HashMap<java.lang.Class,java.util.Collection<?>> Allindividuals, java.lang.String ontologyURL) throws ConvertionException
Allindividuals
- All the registered instances into the architecture which will be transformed to the ABox component.ontologyURL
- This is the URL of the ontology that will be converted
ConvertionException
- In the case of any exception during the conversionpublic static void updateFromOWLABox(java.util.HashMap<java.lang.Class,java.util.Collection<?>> Allindividuals, com.hp.hpl.jena.rdf.model.Model newFacts) throws ConvertionException
Allindividuals
- All the registered instances into the architecture which will be transformed to the ABox component.newFacts
- This is the set of the facts that will be enforcing into the java instances.
ConvertionException
- In the case of any exception during the conversionprivate static java.lang.Object getIndividualByURI(java.util.HashMap<java.lang.Class,java.util.Collection<?>> Allindividuals, java.lang.String individualURI, com.hp.hpl.jena.rdf.model.StmtIterator types, java.util.HashMap<java.lang.String,java.lang.Object> newObject)
Allindividuals
- This is the data structure with all the registered instances into the architectureindividualURI
- This is the URL that represent the OWL individual that we want to obtain in java instancetypes
- This iterator contain all the possible classes that could be associated to the given instance
private static boolean couldBe(java.util.Collection<java.lang.String> classes, java.lang.Class c)
classes
- This is the list of the classes that we want to checkc
- This is the class for which we want to know if is capable to be one of the given classes
private static java.lang.String getIndividualURI(java.lang.Object individual, java.lang.String ontologyURI)
individual
- Is a Java instance for which we want to obtain the URL representation in OWLontologyURI
- This is the URL that represent the ontology given
private static java.lang.String getDatatypeURI(java.lang.reflect.Field field, boolean isObjectProperty, java.lang.String ontologyURL) throws ConvertionException
field
- This is the field which we want to know the URL for represent its typeisObjectProperty
- true if is an objectProperty or falta in otherwise (Dataproperty)ontologyURL
- This is the URL of the ontology for which the URL is required
ConvertionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |