Package org.biopax.paxtools.model
Class BioPAXFactory
java.lang.Object
org.biopax.paxtools.model.BioPAXFactory
- Direct Known Subclasses:
MockFactory
Abstract factory class for instantiating BioPAX classes. Different implementations of BioPAX model should also
implement their own factory
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected Constructor without parameters. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanInstantiate(Class<? extends BioPAXElement> aClass) Checks whether objects of a BioPAX model interface can be created (some types are not official BioPAX types, abstract classes).<T extends BioPAXElement>
TUniversal method that creates a new BioPAX object.Creates a new BioPAX model.<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.abstract BioPAXLevelgetLevel()Gets the level.abstract StringmapClassName(Class<? extends BioPAXElement> aClass) Maps a BioPAX type (model interface) to the full-qualified class name of an implementing class.
-
Constructor Details
-
BioPAXFactory
protected BioPAXFactory()Protected Constructor without parameters.
-
-
Method Details
-
getLevel
Gets the level.- Returns:
- the biopax level
-
create
-
create
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 typeuri- absolute URI of the new BioPAX object- Returns:
- new BioPAX object
-
mapClassName
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
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
Creates a new BioPAX model.- Returns:
- BioPAX object model implementation
-
getImplClass
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
-