|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectPropertyWrapper
public abstract class PropertyWrapper
This class represents the correspondences between Java accessor groups and OWL-Properties.
This is an abstract superclass for several classes specific for accessor group types.
Methods in several Java class can be mapped to the same OWL-Property. An example is a "has-part"-property which may occur in different Java classes, but is mapped to a single OWL-Property. Different methods in the same class, however, cannot be mapped to same OWL-property. Properties may be data properties and object properties.
Typical application:
A new PropertyWrapper is created for the first occurrence of a getter-method to be mapped to OWL.
Further getter-methods in other classes to be mapped to the same OWL-property are added by the join-method.
As soon as all methods have been processed, getInconsistencies() can be called to check for
internal inconsistencies.
If there are no inconsistencies, createOWLAxioms can be called to get the corresponding OWL-Axioms for
the OWL-Property.
Notice that a PropertyWrapper need not analyse and store all setter, adder and remover methods, because the J2OSynchroniser analyses the annotations separately. A PropertyWrapper needs only store the information which is necessary for the compilation of Java to OWL.
Field Summary | |
---|---|
protected boolean |
addRangeAxiom
controls whether range axioms should be added to the OWL-axioms |
protected boolean |
asymmetric
|
protected Class |
currentClass
is only used during construction of join. |
protected PropertyWrapperComponent |
currentPWC
is only used during construction of join. |
protected boolean |
irreflexive
|
protected boolean |
isFunctional
indicates a functional property. |
protected Map<Object,OWLProperty> |
key2Property
for Mapping properties: maps keys to OWL properties |
protected Logging |
logger
for logging messages. |
protected J2OManager |
manager
the top manager. |
protected String |
name
the OWL-name of the property. |
protected OWLProperty |
property
the corresponding OWL-property. |
protected Map<Class,PropertyWrapperComponent> |
pwComponents
maps the owner class to the component. |
protected boolean |
reflexive
|
protected boolean |
symmetric
|
protected boolean |
transitive
|
Method Summary | |
---|---|
protected abstract boolean |
determineClasses(StringBuffer errors)
determines the key class and the range class of the getter method |
protected Method |
findAccessor(String accessorType,
String annotation,
boolean required,
StringBuffer errors,
StringBuffer warnings)
Searches for a method of the given accessor type. |
protected abstract void |
findAccessors(J2OWLProperty annotation,
StringBuffer errors,
StringBuffer warnings)
finds all setter, getter, adder, remover, clearer, getKey methods. |
String |
toString()
returns a description of the PropertyWrapper |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected J2OManager manager
protected Logging logger
protected String name
protected OWLProperty property
protected Map<Class,PropertyWrapperComponent> pwComponents
Different getter methods in different classes can be mapped to the same OWL proprty. Therefore we need a data structure for each occurrence.
protected PropertyWrapperComponent currentPWC
protected Class currentClass
protected boolean isFunctional
protected boolean symmetric
protected boolean asymmetric
protected boolean reflexive
protected boolean irreflexive
protected boolean transitive
protected boolean addRangeAxiom
protected Map<Object,OWLProperty> key2Property
Method Detail |
---|
protected Method findAccessor(String accessorType, String annotation, boolean required, StringBuffer errors, StringBuffer warnings)
accessorType
- the type of the accessor.annotation
- the annotation for the accessorType, a comma separated names of the accessor methods.required
- if true then an accessor of the type is required.errors
- for collecting error messages.warnings
- the collection of warnings.
All accessor methods are type checked, but only one is returned.
protected abstract boolean determineClasses(StringBuffer errors)
errors
- collects error messages.
protected abstract void findAccessors(J2OWLProperty annotation, StringBuffer errors, StringBuffer warnings)
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |