org.weblab_project.core.factory
Class AnnotationFactory

java.lang.Object
  extended by org.weblab_project.core.factory.AnnotationFactory

public class AnnotationFactory
extends java.lang.Object

To create Annotations 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 Annotations that takes a Resource in parameter. As a result, the created Annotation is added to the Annotation List of the Resource.

Author:
EADS WebLab Team
Date:
2008-01-18

Method Summary
static Annotation createAndLinkAnnotation(Resource resource)
          Automatically set a valid WebLabRI to the created Annotation using the Resource in parameter to generate an unique id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createAndLinkAnnotation

public static final Annotation createAndLinkAnnotation(Resource resource)
Automatically set a valid WebLabRI to the created Annotation using the Resource in parameter to generate an unique id. Created Annotation will be added to resource.

Parameters:
resource - the Resource that will contains the created Annotation
Returns:
a new Annotation with a valid WebLabRI and added to resource


Copyright © 2004-2010. All Rights Reserved.