|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojavax.RichObjectFactory
public class RichObjectFactory
Runs a service that builds rich objects, and provides some default values for things like default ontology, default namespace, etc.
Method Summary | |
---|---|
static void |
clearLRUCache()
Removes all objects from the LRU cache. |
static void |
clearLRUCache(Class clazz)
Removes all objects of the specified class from the LRU cache. |
static void |
connectToBioSQL(Object session)
A utility method that configures the RichObjectFactory for use with a Hibernate session. |
static CrossReferenceResolver |
getDefaultCrossReferenceResolver()
Returns the default cross ref resolver object. |
static Namespace |
getDefaultNamespace()
Returns the default namespace object. |
static ComparableOntology |
getDefaultOntology()
Returns the default ontology object. |
static PositionResolver |
getDefaultPositionResolver()
Returns the default position resolver object. |
static RichSequenceHandler |
getDefaultRichSequenceHandler()
Returns the default sequence resolver object. |
static Object |
getObject(Class clazz,
Object[] params)
Delegates to a RichObjectBuilder to construct/retrieve the object, and returns it. |
static void |
setApplicationClass(Class theBiojavaClass,
Class theApplicationClass)
Allow application to override the default biojava class created in getObject - subclass restriction is checked in the builder. |
static void |
setDefaultCrossReferenceResolver(CrossReferenceResolver crr)
Sets the default crossref resolver to use when resolving remote entries. |
static void |
setDefaultNamespaceName(String name)
Sets the default namespace name to use when loading sequences. |
static void |
setDefaultOntologyName(String name)
Sets the default ontology name to use when loading sequences. |
static void |
setDefaultPositionResolver(PositionResolver pr)
Sets the default position resolver to use when creating new rich feature locations. |
static void |
setDefaultRichSequenceHandler(RichSequenceHandler rsh)
Sets the default sequence handler to use when performing sequence manipulation. |
static void |
setLRUCacheSize(Class clazz,
int size)
Sets the size of the LRU cache. |
static void |
setLRUCacheSize(int size)
Sets the size of the LRU cache. |
static void |
setRichObjectBuilder(RichObjectBuilder b)
Sets the builder to use when instantiating new Rich objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void setRichObjectBuilder(RichObjectBuilder b)
b
- the builder to use.SimpleRichObjectBuilder
,
BioSQLRichObjectBuilder
public static Object getObject(Class clazz, Object[] params)
clazz
- the class to buildparams
- the parameters to pass to the class' constructor
public static final void setApplicationClass(Class theBiojavaClass, Class theApplicationClass)
theBiojavaClass
- one of the well-known builder classes: SimpleNamespace, SimpleComparableOntology, SimpleNCBITaxon, SimpleCrossRef, or SimpleDocReftheApplicationClass
- - a subclass of theBiojavaClasspublic static void clearLRUCache()
public static void clearLRUCache(Class clazz)
clazz
- The class of the objects to remove.public static void setLRUCacheSize(int size)
size
- the size of the cache.public static void setLRUCacheSize(Class clazz, int size)
size
- the size of the cache.public static void setDefaultNamespaceName(String name)
name
- the namespace name to use.public static void setDefaultOntologyName(String name)
name
- the ontology name to use.public static void setDefaultPositionResolver(PositionResolver pr)
pr
- the position resolver to use.PositionResolver
,
PositionResolver.AverageResolver
,
RichLocation
public static void setDefaultCrossReferenceResolver(CrossReferenceResolver crr)
crr
- the resolver to use.CrossReferenceResolver
,
DummyCrossReferenceResolver
public static void setDefaultRichSequenceHandler(RichSequenceHandler rsh)
rsh
- the resolver to use.RichSequenceHandler
,
DummyRichSequenceHandler
public static Namespace getDefaultNamespace()
public static ComparableOntology getDefaultOntology()
public static PositionResolver getDefaultPositionResolver()
PositionResolver.AverageResolver
public static CrossReferenceResolver getDefaultCrossReferenceResolver()
DummyCrossReferenceResolver
public static RichSequenceHandler getDefaultRichSequenceHandler()
DummyRichSequenceHandler
public static void connectToBioSQL(Object session)
session
- an object containing a Hibernate session.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |