Class TypeTemplate
- java.lang.Object
-
- de.julielab.jcore.reader.xmlmapper.genericTypes.TypeTemplate
-
- Direct Known Subclasses:
FeatureTemplate
public class TypeTemplate extends Object
Represents a Template for a type which Contains a List of Feature Templates and all necessary Informations to build a concrete Type.- Author:
- Weigel
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Integer,String>additionalDataprotected booleanexternalParserprotected List<FeatureTemplate>featuresprotected StringfullClassNameprotected booleaninlineAnnotationprotected booleanmultipleInstancesprotected TypeParserparserprotected List<Integer>partOfDocumentsprotected List<String>xPaths
-
Constructor Summary
Constructors Constructor Description TypeTemplate()Creates a new instance of a TypeTemplate
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAdditionalData(String value, int index)voidaddFeature(FeatureTemplate feature)adds a FeatureTemplate to the ListvoidaddPartOfDocumentText(int partOfDocumentId)voidaddXPath(String xpath)protected TypeTemplateclone()String[]getAdditionalData()List<FeatureTemplate>getFeatures()StringgetFullClassName()int[]getOffsetPartIDs()returns the first and the last of partOfDocument ids that should be covered by this annotation; that is, the begin of this annotation should be at the begin of the first returned part and the end should be the end of the second returned part.TypeParsergetParser()List<String>getXPaths()booleanisInlineAnnotation()booleanisMultipleInstances()voidsetFeatures(List<FeatureTemplate> features)voidsetFullClassName(String fullClassName)voidsetInlineAnnotation(boolean inlineAnnotation)voidsetMultipleInstances(boolean b)voidsetParser(String trim)Overrides the parser and sets an external parserStringtoString()
-
-
-
Field Detail
-
fullClassName
protected String fullClassName
-
features
protected List<FeatureTemplate> features
-
parser
protected TypeParser parser
-
externalParser
protected boolean externalParser
-
multipleInstances
protected boolean multipleInstances
-
inlineAnnotation
protected boolean inlineAnnotation
-
-
Method Detail
-
addFeature
public void addFeature(FeatureTemplate feature)
adds a FeatureTemplate to the List- Parameters:
feature-
-
getFeatures
public List<FeatureTemplate> getFeatures()
- Returns:
- the List of all FeatureTemplates
-
setFeatures
public void setFeatures(List<FeatureTemplate> features)
- Parameters:
features- the features to set
-
getFullClassName
public String getFullClassName()
- Returns:
- the fullClassName
-
setFullClassName
public void setFullClassName(String fullClassName)
- Parameters:
fullClassName- the fullClassName to set
-
setParser
public void setParser(String trim) throws org.apache.uima.collection.CollectionException
Overrides the parser and sets an external parser- Parameters:
trim- a String containing the full qualified Classname of the parser- Throws:
org.apache.uima.collection.CollectionException
-
getParser
public TypeParser getParser()
- Returns:
- the externalParser
-
addAdditionalData
public void addAdditionalData(String value, int index)
-
getAdditionalData
public String[] getAdditionalData()
-
addPartOfDocumentText
public void addPartOfDocumentText(int partOfDocumentId)
-
getOffsetPartIDs
public int[] getOffsetPartIDs()
returns the first and the last of partOfDocument ids that should be covered by this annotation; that is, the begin of this annotation should be at the begin of the first returned part and the end should be the end of the second returned part.- Returns:
- int[] ( int[0]->begin index, int[1] -> endIndex )
-
addXPath
public void addXPath(String xpath)
-
clone
protected TypeTemplate clone()
-
isMultipleInstances
public boolean isMultipleInstances()
-
isInlineAnnotation
public boolean isInlineAnnotation()
-
setMultipleInstances
public void setMultipleInstances(boolean b)
-
setInlineAnnotation
public void setInlineAnnotation(boolean inlineAnnotation)
-
-