public class RichObjectFactory extends Object
Modifier and Type | Method and Description |
---|---|
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 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.
|
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' constructorpublic 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
Copyright © 2014 BioJava. All rights reserved.