Enum Class SimpleEditorMap

java.lang.Object
java.lang.Enum<SimpleEditorMap>
org.biopax.paxtools.controller.SimpleEditorMap
All Implemented Interfaces:
Serializable, Comparable<SimpleEditorMap>, java.lang.constant.Constable, EditorMap

public enum SimpleEditorMap extends Enum<SimpleEditorMap> implements 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
  • Enum Constant Details

  • Method Details

    • values

      public static SimpleEditorMap[] 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

      public static SimpleEditorMap valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • get

      public static SimpleEditorMap get(BioPAXLevel level)
      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: 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
      Type Parameters:
      D - domain
      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
    • getEditorsForProperty

      public Set<PropertyEditor> getEditorsForProperty(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
    • getSubclassEditorsForProperty

      public <D extends BioPAXElement> Set<PropertyEditor<? extends D,?>> getSubclassEditorsForProperty(String property, 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
      Type Parameters:
      D - domain biopax type
      Parameters:
      property - name of the property for which editor will be called
      domain - biopax type/class the property belongs to
      Returns:
      empty set if there are no such editors
    • getEditorsOf

      public Set<PropertyEditor> getEditorsOf(BioPAXElement bpe)
      Description copied from interface: EditorMap
      This method returns the set of editors whose domain subsumes the class of given BioPAX element.
      Specified by:
      getEditorsOf in interface EditorMap
      Parameters:
      bpe - BioPAX element for which the available editors will be returned
      Returns:
      empty set if there are no such editors
    • getInverseEditorsOf

      public Set<ObjectPropertyEditor> getInverseEditorsOf(BioPAXElement bpe)
      Description copied from interface: EditorMap
      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.
      Specified by:
      getInverseEditorsOf in interface EditorMap
      Parameters:
      bpe - BioPAX element for which the available inverse editors will be returned.
      Returns:
      all inverse editors for this entity's class type.
    • getKnownSubClassesOf

      public <E extends BioPAXElement> Set<? extends Class<E>> getKnownSubClassesOf(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
      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

      public BioPAXLevel getLevel()
      Description copied from interface: EditorMap
      Returns the BioPAX level for which editor map is created. Different BioPAX levels have different editor maps.
      Specified by:
      getLevel in interface EditorMap
      Returns:
      BioPAX Level
    • getEditorsOf

      public Set<PropertyEditor> getEditorsOf(Class<? extends BioPAXElement> domain)
      Description copied from interface: EditorMap
      This method returns the set of editors whose domain subsumes the given class
      Specified by:
      getEditorsOf in interface EditorMap
      Parameters:
      domain - BioPAX model interface for which the available editors will be returned
      Returns:
      empty set if there are no such editors
    • getInverseEditorsOf

      public Set<ObjectPropertyEditor> getInverseEditorsOf(Class<? extends BioPAXElement> domain)
      Description copied from interface: EditorMap
      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.
      Specified by:
      getInverseEditorsOf in interface EditorMap
      Parameters:
      domain - of the inverse property
      Returns:
      all inverse editors for this class type.
    • iterator

      public Iterator<PropertyEditor> iterator()
      Specified by:
      iterator in interface EditorMap
      Returns:
      An iterator over all the properties in this EditorMap
    • buildCustomEditorMap

      public static EditorMap buildCustomEditorMap(BioPAXLevel level, InputStream stream)