Class BioPAXFactory

java.lang.Object
org.biopax.paxtools.model.BioPAXFactory
Direct Known Subclasses:
MockFactory

public abstract class BioPAXFactory extends Object
Abstract factory class for instantiating BioPAX classes. Different implementations of BioPAX model should also implement their own factory
  • Constructor Details

    • BioPAXFactory

      protected BioPAXFactory()
      Protected Constructor without parameters.
  • Method Details

    • getLevel

      public abstract BioPAXLevel getLevel()
      Gets the level.
      Returns:
      the biopax level
    • create

      public BioPAXElement create(String localName, String uri)
    • create

      public <T extends BioPAXElement> T create(Class<T> aClass, String uri)
      Universal method that creates a new BioPAX object. (works with non-public, other package, implementations)
      Type Parameters:
      T - type
      Parameters:
      aClass - the class that corresponds to the BioPAX type
      uri - absolute URI of the new BioPAX object
      Returns:
      new BioPAX object
    • mapClassName

      public abstract String mapClassName(Class<? extends BioPAXElement> aClass)
      Maps a BioPAX type (model interface) to the full-qualified class name of an implementing class. BioPAX factories have to implement this method.
      Parameters:
      aClass - BioPAX type (model interface)
      Returns:
      full class name
    • canInstantiate

      public boolean canInstantiate(Class<? extends BioPAXElement> aClass)
      Checks whether objects of a BioPAX model interface can be created (some types are not official BioPAX types, abstract classes).
      Parameters:
      aClass - BioPAX interface class
      Returns:
      whether this factory can create an instance of the type
    • createModel

      public Model createModel()
      Creates a new BioPAX model.
      Returns:
      BioPAX object model implementation
    • getImplClass

      public <T extends BioPAXElement> Class<T> getImplClass(Class<T> aModelInterfaceClass)
      Get a concrete or abstract BioPAX type (not interface), from org.biopax.paxtools.impl..*, i.e., one that has persistence/search annotations, etc. This may be required for some DAO and web service controllers; it also returns such abstract BioPAX "adapters" as XReferrableImpl, ProcessImpl, etc.
      Type Parameters:
      T - BioPAX type/interface
      Parameters:
      aModelInterfaceClass - interface class for the BioPAX type
      Returns:
      concrete class that implements the BioPAX interface and can be created with this factory