Package org.biopax.paxtools.controller
Enum Class SimpleEditorMap
- All Implemented Interfaces:
Serializable,Comparable<SimpleEditorMap>,Constable,EditorMap
Provides a simple editor map for a level with a given factory.
This class initializes 3 singletons( 1 for each level) from a tab delimited text resources that lists the
properties and their domains. This is done to remove any dependencies to Jena.
The recommended usage is to use the
get(org.biopax.paxtools.model.BioPAXLevel) method.- Author:
- Emek Demir
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic EditorMapbuildCustomEditorMap(BioPAXLevel level, InputStream stream) static SimpleEditorMapget(BioPAXLevel level) To obtain a copy of the editor map for the corresponding level, use the<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()static SimpleEditorMapReturns the enum constant of this class with the specified name.static SimpleEditorMap[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
L2
-
L3
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
get
To obtain a copy of the editor map for the corresponding level, use the- Parameters:
level- the BioPAX level- Returns:
- SimpleEditorMap implementation for the BioPAX L2 or L3
-
getEditorForProperty
public <D extends BioPAXElement> PropertyEditor<? super D,?> getEditorForProperty(String property, Class<D> javaClass) Description copied from interface:EditorMapThis 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.- Specified by:
getEditorForPropertyin interfaceEditorMap- 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
Description copied from interface:EditorMapThis 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.- Specified by:
getEditorsForPropertyin interfaceEditorMap- Parameters:
property- name of the property for which editor will be called- Returns:
- empty set if there are no such editors
-
getSubclassEditorsForProperty
public <D extends BioPAXElement> Set<PropertyEditor<? extends D,?>> getSubclassEditorsForProperty(String property, Class<D> domain) Description copied from interface:EditorMapThis 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.- Specified by:
getSubclassEditorsForPropertyin interfaceEditorMap- 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
Description copied from interface:EditorMapThis method returns the set of editors whose domain subsumes the class of given BioPAX element.- Specified by:
getEditorsOfin interfaceEditorMap- Parameters:
bpe- BioPAX element for which the available editors will be returned- Returns:
- empty set if there are no such editors
-
getInverseEditorsOf
Description copied from interface:EditorMapProperties 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.- Specified by:
getInverseEditorsOfin interfaceEditorMap- Parameters:
bpe- BioPAX element for which the available inverse editors will be returned.- Returns:
- all inverse editors for this entity's class type.
-
getKnownSubClassesOf
Description copied from interface:EditorMapReturns a set of sub classes of a given class. This method can be used for class filtering methods.- Specified by:
getKnownSubClassesOfin interfaceEditorMap- 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
Description copied from interface:EditorMapReturns the BioPAX level for which editor map is created. Different BioPAX levels have different editor maps. -
getEditorsOf
Description copied from interface:EditorMapThis method returns the set of editors whose domain subsumes the given class- Specified by:
getEditorsOfin interfaceEditorMap- Parameters:
domain- BioPAX model interface for which the available editors will be returned- Returns:
- empty set if there are no such editors
-
getInverseEditorsOf
Description copied from interface:EditorMapProperties 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.- Specified by:
getInverseEditorsOfin interfaceEditorMap- Parameters:
domain- of the inverse property- Returns:
- all inverse editors for this class type.
-
iterator
-
buildCustomEditorMap
-