Package org.biopax.paxtools.controller
Interface EditorMap
- All Known Implementing Classes:
EditorMapImpl,SimpleEditorMap
public interface EditorMap
This class contains methods that eases to use editors for
specific or a set of property. Using the methods of this class
editors of a class, editors of a property, and editors of a property
with the given domain can be obtained; and these editors/this editor
can be used to modify object's properties.
The functionallity of this class plays key roles on several other classes'
functionallity; e.g.
org.biopax.paxtools.io, org.biopax.paxtools.model,-
Method Summary
Modifier and TypeMethodDescription<D extends BioPAXElement>
PropertyEditor<? super D, ?> getEditorForProperty(String property, Class<D> javaClass) This method returns the editor intended to handle property named property of a class (javaClass).getEditorsForProperty(String property) This method returns the set of editors intended to handle property named property.getEditorsOf(Class<? extends BioPAXElement> domain) This method returns the set of editors whose domain subsumes the given classThis method returns the set of editors whose domain subsumes the class of given BioPAX element.getInverseEditorsOf(Class<? extends BioPAXElement> domain) Properties in BioPAX specification is unidirectional.Properties in BioPAX specification is unidirectional.<E extends BioPAXElement>
Set<? extends Class<E>> getKnownSubClassesOf(Class<E> javaClass) Returns a set of sub classes of a given class.getLevel()Returns the BioPAX level for which editor map is created.<D extends BioPAXElement>
Set<PropertyEditor<? extends D, ?>> getSubclassEditorsForProperty(String property, Class<D> domain) This method returns the set of editors intended to handle property named property.iterator()
-
Method Details
-
getEditorForProperty
<D extends BioPAXElement> PropertyEditor<? super D,?> getEditorForProperty(String property, Class<D> javaClass) This method returns the editor intended to handle property named property of a class (javaClass). This editor can then be used to modify the property of an element of class javaClass. To put in other words, this methods returns the editor of which domain includes javaClass, and the editor that can handle the property.- Type Parameters:
D- domain- Parameters:
property- name of the property for which editor will be calledjavaClass- class of the element- Returns:
- null if there is no such editor
-
getEditorsForProperty
This method returns the set of editors intended to handle property named property. This editor can then be used to modify the property of an element which is in editor's domain list. In other words, this methods returns the set of the editors that can handle the property. Editors are not filtered for a specific domain class.- Parameters:
property- name of the property for which editor will be called- Returns:
- empty set if there are no such editors
-
getSubclassEditorsForProperty
<D extends BioPAXElement> Set<PropertyEditor<? extends D,?>> getSubclassEditorsForProperty(String property, Class<D> domain) This method returns the set of editors intended to handle property named property. This editor can then be used to modify the property of an element which is in editor's domain list. In other words, this methods returns the set of the editors that can handle the property. Editors are not filtered for a specific domain class.- Type Parameters:
D- domain biopax type- Parameters:
property- name of the property for which editor will be calleddomain- biopax type/class the property belongs to- Returns:
- empty set if there are no such editors
-
getEditorsOf
This method returns the set of editors whose domain subsumes the class of given BioPAX element.- Parameters:
bpe- BioPAX element for which the available editors will be returned- Returns:
- empty set if there are no such editors
-
getInverseEditorsOf
Properties in BioPAX specification is unidirectional. e.g. entityReference property that links a PhysicalEntity to EntityReference has no defined corresponding inverse property that links EntityReferences to their corresponding entities. Most OWL reasoners can query the inverse of a property at no additional cost, but for most OO implementations this would require an expensive O(n) lookup. An OO implementation requires keeping additional properties for efficiency purposes. Inverse editors are read-only editors that captures these "inverse" part of the bidirectional properties specifically implemented in Paxtools. They have the pattern PropertyNameOf e.g. entityReferenceOf.- Parameters:
bpe- BioPAX element for which the available inverse editors will be returned.- Returns:
- all inverse editors for this entity's class type.
-
getKnownSubClassesOf
Returns a set of sub classes of a given class. This method can be used for class filtering methods.- Type Parameters:
E- biopax type (biopax object model interface)- Parameters:
javaClass- the class whose subclasses will be returned- Returns:
- an empty set if there are no such editors
-
getLevel
BioPAXLevel getLevel()Returns the BioPAX level for which editor map is created. Different BioPAX levels have different editor maps.- Returns:
- BioPAX Level
-
getEditorsOf
This method returns the set of editors whose domain subsumes the given class- Parameters:
domain- BioPAX model interface for which the available editors will be returned- Returns:
- empty set if there are no such editors
-
getInverseEditorsOf
Properties in BioPAX specification is unidirectional. e.g. entityReference property that links a PhysicalEntity to EntityReference has no defined corresponding inverse property that links EntityReferences to their corresponding entities. Most OWL reasoners can query the inverse of a property at no additional cost, but for most OO implementations this would require an expensive O(n) lookup. An OO implementation requires keeping additional properties for efficiency purposes. Inverse editors are read-only editors that captures these "inverse" part of the bidirectional properties specifically implemented in Paxtools. They have the pattern PropertyNameOf e.g. entityReferenceOf.- Parameters:
domain- of the inverse property- Returns:
- all inverse editors for this class type.
-
iterator
Iterator<PropertyEditor> iterator()- Returns:
- An iterator over all the properties in this EditorMap
-