|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ow2.weblab.core.extended.factory.AnnotationFactory
public class AnnotationFactory
To create Annotation
s we strongly encourage to use this
class. It will enable the creation of an Annotation
having an URI
compliant with the
WebLabRI
recommendations.
Since an Annotation
hasn't any sense without being attached to
a Resource
, we only provide a method for creating Annotation
s that takes a
Resource
in
parameter. As a result, the created Annotation
is added to the Annotation
List
of the Resource
.
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 |
Method Summary | |
---|---|
protected static void |
addAnnotation(Annotation annotation,
Resource resource,
Resource root)
|
protected static void |
addChild(MediaUnit mu,
Resource parent,
Resource root)
|
protected static void |
addDescriptor(LowLevelDescriptor descriptor,
Resource parent,
Resource root)
|
protected static void |
addSegment(Segment segment,
MediaUnit parent,
Resource root)
|
protected static void |
cleanMapping(java.lang.String uri)
|
static Annotation |
createAndLinkAnnotation(Resource resource)
/** Automatically set a valid WebLabRI to the created Annotation using the
Resource in parameter
to generate an unique id. |
protected static java.lang.String |
createUniqueURIFrom(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 Resource |
findParent(MediaUnit mu,
Resource resource)
|
protected static java.lang.String |
getUniqueWebLabRIFrom(Resource res,
boolean isChild,
boolean isAnnotation)
|
protected static java.util.Set<java.lang.String> |
listUri(Resource resource)
List uris in the resource |
protected static java.util.Set<java.lang.String> |
listUri(Resource resource,
boolean force)
|
protected static void |
removeChild(MediaUnit mu,
Resource parent,
Resource root)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.util.Map<java.lang.String,java.util.Set<java.lang.String>> innerMap
Method Detail |
---|
public static final Annotation createAndLinkAnnotation(Resource resource)
WebLabRI
to the created Annotation
using the
Resource
in parameter
to generate an unique id. Created Annotation
will be added
to resource
.
resource
- the Resource
that will contains the created Annotation
Annotation
with a valid WebLabRI
and added to resource
protected static void cleanMapping(java.lang.String uri)
protected static java.util.Set<java.lang.String> listUri(Resource resource)
resource
- a resource
protected static java.util.Set<java.lang.String> listUri(Resource resource, boolean force)
protected static java.lang.String createUniqueURIFrom(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(MediaUnit mu, Resource parent, Resource root)
protected static void addAnnotation(Annotation annotation, Resource resource, Resource root)
protected static void addSegment(Segment segment, MediaUnit parent, Resource root)
protected static void addDescriptor(LowLevelDescriptor descriptor, Resource parent, Resource root)
protected static void addChild(MediaUnit mu, Resource parent, Resource root)
protected static Resource findParent(MediaUnit mu, Resource resource)
protected static final java.lang.String getUniqueWebLabRIFrom(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 |