gate.creole
Class AnnotationSchema
java.lang.Object
|
+--gate.util.AbstractFeatureBearer
|
+--gate.creole.AbstractResource
|
+--gate.creole.AbstractLanguageResource
|
+--gate.creole.AnnotationSchema
- All Implemented Interfaces:
- FeatureBearer, LanguageResource, NameBearer, Resource, Serializable
- public class AnnotationSchema
- extends AbstractLanguageResource
This class handles annotation schemas.An annotation schema is a
representation of an annotation, together with its types and their
attributes, values and types.
- See Also:
- Serialized Form
Methods inherited from class gate.creole.AbstractResource |
checkParameterValues, getName, getParameterValue, getParameterValue, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
AnnotationSchema
public AnnotationSchema()
- Constructs an annotation schema.
getAnnotationName
public String getAnnotationName()
- Returns the value of annotation name
setAnnotationName
public void setAnnotationName(String annotationName)
- Sets the annotation name
getFeatureSchemaSet
public Set getFeatureSchemaSet()
- Returns the feature schema set
setFeatureSchemaSet
public void setFeatureSchemaSet(Set featureSchemaSet)
- Sets the feature schema set
getFeatureSchema
public FeatureSchema getFeatureSchema(String featureName)
- Returns:
- a FeatureSchema object from featureSchemaSet, given a
feature name.It will return null if the feature name is not found.
init
public Resource init()
throws ResourceInstantiationException
- Initialise this resource, and return it. If the schema XML source file
URL has been set, it will construct itself from that file.
- Overrides:
init
in class AbstractResource
setXmlFileUrl
public void setXmlFileUrl(URL xmlFileUrl)
- Set method for the resource xml file URL
getXmlFileUrl
public URL getXmlFileUrl()
- Get method for the resource xml file URL
fromXSchema
public void fromXSchema(URL anXSchemaURL)
throws ResourceInstantiationException
- Creates an AnnotationSchema object from an XSchema file
- Parameters:
anXSchemaURL
- the URL where to find the XSchema file
fromXSchema
public void fromXSchema(InputStream anXSchemaInputStream)
throws ResourceInstantiationException
- Creates an AnnotationSchema object from an XSchema file
- Parameters:
anXSchemaInputStream
- the Input Stream containing the XSchema file
createAndAddFeatureSchemaObject
public void createAndAddFeatureSchemaObject(org.jdom.Element anAttributeElement)
- This method creates and adds a FeatureSchema object to the current
AnnotationSchema one.
- Parameters:
anElement
- is an XSchema attribute element
toXSchema
public String toXSchema()
- Returns:
- a String containing the XSchema document representing
an AnnotationSchema object.