@CreoleResource(name="Annotation Schema", comment="An annotation type and its features.", helpURL="http://gate.ac.uk/userguide/sec:corpora:schemas") public class AnnotationSchema extends AbstractLanguageResource
Modifier and Type | Field and Description |
---|---|
protected String |
annotationName
The name of the annotation
|
protected Set<FeatureSchema> |
featureSchemaSet
Schemas for the attributes
|
static String |
FILE_URL_PARAM_NAME |
protected ResourceReference |
xmlFileUrl
The xml file URL of the resource
|
dataStore, lrPersistentId
name
features
Constructor and Description |
---|
AnnotationSchema()
Constructs an annotation schema.
|
Modifier and Type | Method and Description |
---|---|
void |
createAndAddFeatureSchemaObject(org.jdom.Element anAttributeElement,
org.jdom.Namespace namespace)
This method creates and adds a FeatureSchema object to the current
AnnotationSchema one.
|
void |
fromXSchema(InputStream anXSchemaInputStream)
Creates an AnnotationSchema object from an XSchema file
|
void |
fromXSchema(ResourceReference anXSchemaURL)
Creates an AnnotationSchema object from an XSchema file
|
void |
fromXSchema(URL anXSchemaURL)
Deprecated.
use a ResourceReference instead
|
String |
getAnnotationName()
Returns the value of annotation name
|
FeatureSchema |
getFeatureSchema(String featureName) |
Set<FeatureSchema> |
getFeatureSchemaSet()
Returns the feature schema set
|
ResourceReference |
getXmlFileUrl()
Get method for the resource xml file URL
|
Resource |
init()
Initialise this resource, and return it.
|
void |
setAnnotationName(String annotationName)
Sets the annotation name
|
void |
setFeatureSchemaSet(Set<FeatureSchema> featureSchemaSet)
Sets the feature schema set
|
void |
setXmlFileUrl(ResourceReference xmlFileUrl)
Set method for the resource xml file URL
|
String |
toXSchema() |
cleanup, getDataStore, getLRPersistenceId, getParent, isModified, setDataStore, setLRPersistenceId, setParent, sync
checkParameterValues, flushBeanInfoCache, forgetBeanInfo, getBeanInfo, getInitParameterValues, getInitParameterValues, getName, getParameterValue, getParameterValue, getParameterValues, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners, toString
getFeatures, setFeatures
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getParameterValue, setParameterValue, setParameterValues
getFeatures, setFeatures
getName, setName
public static final String FILE_URL_PARAM_NAME
protected String annotationName
protected Set<FeatureSchema> featureSchemaSet
protected ResourceReference xmlFileUrl
public String getAnnotationName()
public void setAnnotationName(String annotationName)
public Set<FeatureSchema> getFeatureSchemaSet()
public void setFeatureSchemaSet(Set<FeatureSchema> featureSchemaSet)
public FeatureSchema getFeatureSchema(String featureName)
public Resource init() throws ResourceInstantiationException
init
in interface Resource
init
in class AbstractResource
ResourceInstantiationException
@CreoleParameter(comment="The url to the definition file", suffixes="xml;xsd") public void setXmlFileUrl(ResourceReference xmlFileUrl)
public ResourceReference getXmlFileUrl()
@Deprecated public void fromXSchema(URL anXSchemaURL) throws ResourceInstantiationException
anXSchemaURL
- the URL where to find the XSchema fileResourceInstantiationException
public void fromXSchema(ResourceReference anXSchemaURL) throws ResourceInstantiationException
anXSchemaURL
- the ResourceReference where to find the XSchema fileResourceInstantiationException
public void fromXSchema(InputStream anXSchemaInputStream) throws ResourceInstantiationException
anXSchemaInputStream
- the Input Stream containing the XSchema fileResourceInstantiationException
public void createAndAddFeatureSchemaObject(org.jdom.Element anAttributeElement, org.jdom.Namespace namespace)
anAttributeElement
- is an XSchema attribute elementpublic String toXSchema()
Copyright © 2024 GATE. All rights reserved.