|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.weblab.core.extended.factory.ResourceFactory
public class ResourceFactory
A factory to be used to create all the Resources 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, ComposedResource, Query and
UsageContext, the only standalone Resources. For other Resource s, you should
use other factories.
PoKFactory,
MediaUnitFactory,
SegmentFactory,
LowLevelDescriptorFactory| Field Summary | |
|---|---|
protected static java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
innerMap
This data structure is not well adapted to manage WebLab Resource |
protected static char |
SEPARATOR
The separator |
| Method Summary | ||
|---|---|---|
protected static void |
addAnnotation(org.ow2.weblab.core.model.Annotation annotation,
org.ow2.weblab.core.model.Resource resource,
org.ow2.weblab.core.model.Resource root)
|
|
protected static void |
addChild(org.ow2.weblab.core.model.MediaUnit mu,
org.ow2.weblab.core.model.Resource parent,
org.ow2.weblab.core.model.Resource root)
|
|
protected static void |
addDescriptor(org.ow2.weblab.core.model.LowLevelDescriptor descriptor,
org.ow2.weblab.core.model.Resource parent,
org.ow2.weblab.core.model.Resource root)
|
|
protected static void |
addSegment(org.ow2.weblab.core.model.Segment segment,
org.ow2.weblab.core.model.MediaUnit parent,
org.ow2.weblab.core.model.Resource root)
|
|
protected static void |
cleanMapping(java.lang.String uri)
|
|
static
|
createResource(java.lang.String idRef,
java.lang.String idRes,
java.lang.Class<T> resClass)
Use this method to create Resources that have a sense alone, and that are not contained by anything
(but a ComposedResource). |
|
protected static java.lang.String |
createUniqueURIFrom(org.ow2.weblab.core.model.Resource resource,
boolean isChild,
boolean isAnnotation)
|
|
protected static java.lang.String |
createUniqueURIin(java.util.Set<java.lang.String> uris,
boolean isChild,
boolean isAnnotation,
java.lang.String parentUri)
|
|
protected static org.ow2.weblab.core.model.Resource |
findParent(org.ow2.weblab.core.model.MediaUnit mu,
org.ow2.weblab.core.model.Resource resource)
|
|
protected static java.lang.String |
getUniqueWebLabRIFrom(org.ow2.weblab.core.model.Resource res,
boolean isChild,
boolean isAnnotation)
|
|
protected static java.util.Set<java.lang.String> |
getUris(java.lang.String key)
|
|
protected static java.util.Set<java.lang.String> |
listUri(org.ow2.weblab.core.model.Resource resource)
List uris in the resource |
|
protected static java.util.Set<java.lang.String> |
listUri(org.ow2.weblab.core.model.Resource resource,
boolean force)
|
|
protected static void |
removeChild(org.ow2.weblab.core.model.MediaUnit mu,
org.ow2.weblab.core.model.Resource parent,
org.ow2.weblab.core.model.Resource root)
|
|
protected static void |
setUris(java.lang.String key,
java.util.Set<java.lang.String> uris)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final char SEPARATOR
protected static final java.util.Map<java.lang.String,java.util.Set<java.lang.String>> innerMap
| Method Detail |
|---|
public static <T extends org.ow2.weblab.core.model.Resource> T createResource(java.lang.String idRef,
java.lang.String idRes,
java.lang.Class<T> resClass)
Resources that have a sense alone, and that are not contained by anything
(but a ComposedResource).Document, ComposedResource,
Ontology, Query, Service and HumanResource instances.
T - The class of the Resource to be instancied.FidRef - Resource creator unique referenceidRes - Resource unique reference in the creatorresClass - The implementation class of the resource
protected static void cleanMapping(java.lang.String uri)
protected static java.util.Set<java.lang.String> getUris(java.lang.String key)
protected static void setUris(java.lang.String key,
java.util.Set<java.lang.String> uris)
protected static java.util.Set<java.lang.String> listUri(org.ow2.weblab.core.model.Resource resource)
resource - a resource
protected static java.util.Set<java.lang.String> listUri(org.ow2.weblab.core.model.Resource resource,
boolean force)
protected static java.lang.String createUniqueURIFrom(org.ow2.weblab.core.model.Resource resource,
boolean isChild,
boolean isAnnotation)
protected static java.lang.String createUniqueURIin(java.util.Set<java.lang.String> uris,
boolean isChild,
boolean isAnnotation,
java.lang.String parentUri)
protected static void removeChild(org.ow2.weblab.core.model.MediaUnit mu,
org.ow2.weblab.core.model.Resource parent,
org.ow2.weblab.core.model.Resource root)
protected static void addAnnotation(org.ow2.weblab.core.model.Annotation annotation,
org.ow2.weblab.core.model.Resource resource,
org.ow2.weblab.core.model.Resource root)
protected static void addSegment(org.ow2.weblab.core.model.Segment segment,
org.ow2.weblab.core.model.MediaUnit parent,
org.ow2.weblab.core.model.Resource root)
protected static void addDescriptor(org.ow2.weblab.core.model.LowLevelDescriptor descriptor,
org.ow2.weblab.core.model.Resource parent,
org.ow2.weblab.core.model.Resource root)
protected static void addChild(org.ow2.weblab.core.model.MediaUnit mu,
org.ow2.weblab.core.model.Resource parent,
org.ow2.weblab.core.model.Resource root)
protected static org.ow2.weblab.core.model.Resource findParent(org.ow2.weblab.core.model.MediaUnit mu,
org.ow2.weblab.core.model.Resource resource)
protected static final java.lang.String getUniqueWebLabRIFrom(org.ow2.weblab.core.model.Resource res,
boolean isChild,
boolean isAnnotation)
res - The Resource to be used to create WebLabRI
String to be used as URI by the MediaUnit created
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||