org.biopax.paxtools.controller
Class EditorMapAdapter

java.lang.Object
  extended by org.biopax.paxtools.controller.EditorMapAdapter
All Implemented Interfaces:
EditorMap

public abstract class EditorMapAdapter
extends java.lang.Object
implements EditorMap

This is the base adapter for all editor maps. A PropertyEditor is an object that can manipulate a certain property. Editor maps are responsible for initializing these editors and providing them. The default level is the latest official release of BioPAX.


Field Summary
protected  java.util.Map<java.lang.Class<? extends BioPAXElement>,java.util.Map<java.lang.String,PropertyEditor>> classToEditorMap
           
protected  java.util.Map<java.lang.Class<? extends BioPAXElement>,java.util.Set<PropertyEditor>> classToEditorSet
           
protected  java.util.Map<java.lang.Class<? extends BioPAXElement>,java.util.Set<ObjectPropertyEditor>> classToInverseEditorMap
           
protected  java.util.Map<java.lang.String,java.util.Set<PropertyEditor>> propertyToEditorMap
           
 
Constructor Summary
EditorMapAdapter()
           
 
Method Summary
protected  PropertyEditor createAndRegisterBeanEditor(java.lang.String pName, java.lang.Class domain, java.util.Map<java.lang.Class<? extends BioPAXElement>,java.util.Set<java.lang.Class<? extends BioPAXElement>>> rRestrictions)
           
<D extends BioPAXElement>
PropertyEditor<? super D,?>
getEditorForProperty(java.lang.String property, java.lang.Class<D> javaClass)
          This method returns the editor intended to handle property named property of a class (javaClass).
 java.util.Set<PropertyEditor> getEditorsForProperty(java.lang.String property)
          This method returns the set of editors intended to handle property named property.
 java.util.Set<PropertyEditor> getEditorsOf(BioPAXElement bpe)
          This method returns the set of editors whose domain contains the class of given BioPAX element.
 java.util.Set<PropertyEditor> getEditorsOf(java.lang.Class<? extends BioPAXElement> domain)
           
 java.util.Set<ObjectPropertyEditor> getInverseEditorsOf(BioPAXElement bpe)
           
 java.util.Set<ObjectPropertyEditor> getInverseEditorsOf(java.lang.Class<? extends BioPAXElement> domain)
           
<E extends BioPAXElement>
java.util.Set<java.lang.Class<E>>
getKnownSubClassesOf(java.lang.Class<E> javaClass)
          Returns a set of sub classes of a given class.
protected  java.lang.Class<? extends BioPAXElement> getModelInterface(java.lang.String localName)
           
<D extends BioPAXElement>
java.util.Set<PropertyEditor<? extends D,?>>
getSubclassEditorsForProperty(java.lang.String property, java.lang.Class<D> domain)
          This method returns the set of editors intended to handle property named property.
protected  boolean isInBioPAXNameSpace(java.lang.String nameSpace)
           
protected  void registerEditorsWithSubClasses(PropertyEditor editor, java.lang.Class<? extends BioPAXElement> domain)
           
protected  void registerModelClass(java.lang.String localName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.biopax.paxtools.controller.EditorMap
getLevel
 

Field Detail

propertyToEditorMap

protected final java.util.Map<java.lang.String,java.util.Set<PropertyEditor>> propertyToEditorMap

classToEditorMap

protected final java.util.Map<java.lang.Class<? extends BioPAXElement>,java.util.Map<java.lang.String,PropertyEditor>> classToEditorMap

classToInverseEditorMap

protected final java.util.Map<java.lang.Class<? extends BioPAXElement>,java.util.Set<ObjectPropertyEditor>> classToInverseEditorMap

classToEditorSet

protected final java.util.Map<java.lang.Class<? extends BioPAXElement>,java.util.Set<PropertyEditor>> classToEditorSet
Constructor Detail

EditorMapAdapter

public EditorMapAdapter()
Method Detail

getEditorsOf

public java.util.Set<PropertyEditor> getEditorsOf(BioPAXElement bpe)
Description copied from interface: EditorMap
This method returns the set of editors whose domain contains the class of given BioPAX element.

Specified by:
getEditorsOf in interface EditorMap
Parameters:
bpe - BioPAX element for which the avaliable editors will be returned
Returns:
empty set if there are no such editors

getEditorsOf

public java.util.Set<PropertyEditor> getEditorsOf(java.lang.Class<? extends BioPAXElement> domain)
Specified by:
getEditorsOf in interface EditorMap

getInverseEditorsOf

public java.util.Set<ObjectPropertyEditor> getInverseEditorsOf(BioPAXElement bpe)
Specified by:
getInverseEditorsOf in interface EditorMap

getInverseEditorsOf

public java.util.Set<ObjectPropertyEditor> getInverseEditorsOf(java.lang.Class<? extends BioPAXElement> domain)
Specified by:
getInverseEditorsOf in interface EditorMap

getEditorForProperty

public <D extends BioPAXElement> PropertyEditor<? super D,?> getEditorForProperty(java.lang.String property,
                                                                                  java.lang.Class<D> javaClass)
Description copied from interface: EditorMap
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.

Specified by:
getEditorForProperty in interface EditorMap
Parameters:
property - name of the property for which editor will be called
javaClass - class of the element
Returns:
null if there is no such editor

getSubclassEditorsForProperty

public <D extends BioPAXElement> java.util.Set<PropertyEditor<? extends D,?>> getSubclassEditorsForProperty(java.lang.String property,
                                                                                                            java.lang.Class<D> domain)
Description copied from interface: EditorMap
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.

Specified by:
getSubclassEditorsForProperty in interface EditorMap
Parameters:
property - name of the property for which editor will be called
Returns:
empty set if there are no such editors

getEditorsForProperty

public java.util.Set<PropertyEditor> getEditorsForProperty(java.lang.String property)
Description copied from interface: EditorMap
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.

Specified by:
getEditorsForProperty in interface EditorMap
Parameters:
property - name of the property for which editor will be called
Returns:
empty set if there are no such editors

getKnownSubClassesOf

public <E extends BioPAXElement> java.util.Set<java.lang.Class<E>> getKnownSubClassesOf(java.lang.Class<E> javaClass)
Description copied from interface: EditorMap
Returns a set of sub classes of a given class. This method can be used for class filtering methods.

Specified by:
getKnownSubClassesOf in interface EditorMap
Parameters:
javaClass - the class whose subclasses will be returned
Returns:
an empty set if there are no such editors

isInBioPAXNameSpace

protected boolean isInBioPAXNameSpace(java.lang.String nameSpace)

createAndRegisterBeanEditor

protected PropertyEditor createAndRegisterBeanEditor(java.lang.String pName,
                                                     java.lang.Class domain,
                                                     java.util.Map<java.lang.Class<? extends BioPAXElement>,java.util.Set<java.lang.Class<? extends BioPAXElement>>> rRestrictions)

registerEditorsWithSubClasses

protected void registerEditorsWithSubClasses(PropertyEditor editor,
                                             java.lang.Class<? extends BioPAXElement> domain)

registerModelClass

protected void registerModelClass(java.lang.String localName)

getModelInterface

protected java.lang.Class<? extends BioPAXElement> getModelInterface(java.lang.String localName)


Copyright © 2011 BioPAX. All Rights Reserved.