org.weblab_project.core.factory
Class ResourceFactory
java.lang.Object
org.weblab_project.core.factory.ResourceFactory
public class ResourceFactory
- extends java.lang.Object
A factory to be used to create all the Resource
s defined in
the model. When creating a Resource
, this factory will ensure
that it contains an URI
compliant with WebLabRI
.
We strongly encourage NOT to use this class in order to create non
standalone resources. In fact, use this class to create Document
,
ResourceCollection
, Ontology
,
Query
, Service
and HumanResource
,
the only standalone Resource
s. For other
Resource
s, you should use other factories.
- Author:
- EADS WebLab Team
- See Also:
AnnotationFactory
,
LineFactory
,
MediaUnitFactory
,
SegmentFactory
,
LowLevelDescriptorFactory
,
CellFactory
- Date:
- 2008-01-15
Field Summary |
protected static char |
SEPARATOR
The separator |
Method Summary |
static
<T extends org.weblab_project.core.model.Resource>
T |
|
createResource(java.lang.String idRef,
java.lang.String idRes,
java.lang.Class<T> resClass)
Use this method to create Resource s that have a sense
alone, and that are not contained by anything (but a
ResourceCollection ). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEPARATOR
protected static final char SEPARATOR
- The separator
- See Also:
- Constant Field Values
createResource
public static <T extends org.weblab_project.core.model.Resource> T createResource(java.lang.String idRef,
java.lang.String idRes,
java.lang.Class<T> resClass)
- Use this method to create
Resource
s that have a sense
alone, and that are not contained by anything (but a
ResourceCollection
).
It's recommended to only use this class when creating
Document
, ResourceCollection
,
Ontology
, Query
, Service
and HumanResource
instances.
- Type Parameters:
T
- The class
of the Resource
to be
instancied.F- Parameters:
idRef
- Resource creator unique referenceidRes
- Resource unique reference in the creatorresClass
- The implementation class of the resource
- Returns:
- An instance of resourceClass with a valid WebLabRI
Copyright © 2004-2009. All Rights Reserved.