Logo Search packages:      
Sourcecode: uimaj version File versions  Download package

Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

org::apache::uima::analysis_engine::impl::ResultSpecification_impl Class Reference

Inheritance diagram for org::apache::uima::analysis_engine::impl::ResultSpecification_impl:
Inheritance graph
Collaboration diagram for org::apache::uima::analysis_engine::impl::ResultSpecification_impl:
Collaboration graph

List of all members.


class  ToF_Languages

Public Member Functions

void addCapabilities (Capability[] capabilities)
void addCapabilities (Capability[] capabilities, boolean outputs)
void addResultFeature (String aFullFeatureName)
void addResultFeature (String aFullFeatureName, String[] aLanguageIDs)
void addResultType (String aTypeName, boolean aAllAnnotatorFeatures)
void addResultType (String aTypeName, boolean aAllAnnotatorFeatures, String[] aLanguageIDs)
void addResultTypeOrFeature (TypeOrFeature aTypeOrFeature, String[] aLanguageIDs)
void addResultTypeOrFeature (TypeOrFeature aTypeOrFeature)
final void buildFromXMLElement (Element aElement, XMLParser aParser) throws InvalidXMLException
void buildFromXMLElement (Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
Object clone ()
void compile (TypeSystem aTypeSystem)
boolean containsFeature (String aFullFeatureName)
boolean containsFeature (String aFullFeatureName, String language)
boolean containsType (String aTypeName)
boolean containsType (String aTypeName, String language)
boolean equals (Object aObj)
Class getAttributeClass (String aName)
Object getAttributeValue (String aName)
URL getRelativePathBase ()
TypeOrFeature[] getResultTypesAndFeatures (String language)
TypeOrFeature[] getResultTypesAndFeatures ()
URL getSourceUrl ()
String getSourceUrlString ()
TypeSystem getTypeSystem ()
int hashCode ()
boolean isModifiable ()
List< NameClassPairlistAttributes ()
void removeTypeOrFeature (TypeOrFeature aTypeOrFeature)
 ResultSpecification_impl (TypeSystem aTypeSystem)
 ResultSpecification_impl ()
void setAttributeValue (String aName, Object aValue)
void setResultTypesAndFeatures (TypeOrFeature[] aTypesAndFeatures, String[] aLanguageIDs)
void setResultTypesAndFeatures (TypeOrFeature[] aTypesAndFeatures)
void setSourceUrl (URL aUrl)
void setSourceUrlIfNull (URL aUrl)
void setTypeSystem (TypeSystem ts)
String toString ()
void toXML (OutputStream aOutputStream) throws SAXException, IOException
void toXML (Writer aWriter) throws SAXException, IOException
void toXML (ContentHandler aContentHandler, boolean aWriteDefaultNamespaceAttribute) throws SAXException
void toXML (ContentHandler aContentHandler) throws SAXException

Protected Member Functions

PropertyDescriptor[] getPropertyDescriptors () throws IntrospectionException
PropertyXmlInfo getPropertyXmlInfo (String aXmlElementName)
Class getWrapperClass (Class aPrimitiveType)
AttributesImpl getXMLAttributes ()
XmlizationInfo getXmlizationInfo ()
void readArrayPropertyValueFromXMLElement (PropertyXmlInfo aPropXmlInfo, Class aPropClass, Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
void readMapPropertyFromXml (String aPropName, Element aElement, String aKeyXmlAttribute, String aValueTagName, XMLParser aParser, XMLParser.ParsingOptions aOptions, boolean aValueIsArray) throws InvalidXMLException
void readPropertyValueFromXMLElement (PropertyXmlInfo aPropXmlInfo, Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) throws InvalidXMLException
void readUnknownPropertyValueFromXMLElement (Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions, List< String > aKnownPropertyNames) throws InvalidXMLException
void writeArrayPropertyAsElement (String aPropName, Class aPropClass, Object aValue, String aArrayElementTagName, String aNamespace, ContentHandler aContentHandler) throws SAXException
void writeMapPropertyToXml (String aPropName, String aXmlElementName, String aKeyXmlAttribute, String aValueTagName, boolean aOmitIfNull, String aNamespace, ContentHandler aContentHandler) throws SAXException
void writePropertyAsElement (PropertyXmlInfo aPropInfo, String aNamespace, ContentHandler aContentHandler) throws SAXException

Private Member Functions

void addResultType (String name, boolean allAnnotatorFeatures, BitSet languages)
void addResultTypeOrFeatureAddLanguage (String name, boolean isType, boolean allAnnotatorFeatures, String[] languages)
void addResultTypeOrFeatureAddLanguage (TypeOrFeature tof, String[] languages)
void addResultTypeOrFeatureAddLanguageCommon (ToF_Languages tof_langs, boolean allAnnotatorFeatures, String[] languages)
void addTypeOrFeatureInternal (TypeOrFeature tof, String[] languages)
Map< String, ToF_LanguagesavailName2tof_langs ()
void compile ()
void compileIfNeeded ()
void compileTypeRecursively (Type type, boolean allFeatures, BitSet languages)
TypeOrFeature createTypeOrFeature (String name, boolean isType, boolean aAllAnnotatorFeatures)
String getBaseLanguage (String language)
int getBaseLanguageIndex (String language)
int getLanguageIndex (String language)
boolean languageMatches (ToF_Languages tof_langs, int languageIndex, int baseLanguageIndex)
boolean languageMatches (ToF_Languages tof_langs, String language)
String[] normalizeLanguages (String[] languages)
 ResultSpecification_impl (ResultSpecification_impl original)
void setNeedsCompilation ()

Private Attributes

final Map< String, Integer > lang2int
TypeSystem mTypeSystem
final Map< String, ToF_Languagesname2tof_langs
boolean needsCompilation = true
final Map< String, ToF_LanguageswithSubtypesName2tof_langs

Static Private Attributes

static final char LANGUAGE_SEPARATOR = '-'
static final String[] mDefaultLanguage = new String[] {Language.UNSPECIFIED_LANGUAGE}
static final long serialVersionUID = 8516517600467270594L

Detailed Description

Reference implementaion of ResultSpecification.

Notes on the implementation

There are two ways this data is used: with and without "compiling" Compiling means: adding subtypes of types and adding all features of a type Uncompiled form is called ORIGINAL.

Compiling is deferred - until the first reference to containsType or Feature.

Many instances of this class are made, sometimes via cloning.

Sometimes types and features are deleted - the intent is to do this operation on the uncompiled form, and then "recompile" it.

Types and Features are kept on a per-language basis. Language can include a special value, x-unspecified, which "matches" any other language.

Language specifications are simplified to eliminate the country part. All refs to test if a type or feature is in the result spec for a language uses the simplified language.

Set operations are done to combine, for a particular type or feature, the languages for which it is valid. This is a Union operation Set operations are done to union the input types/features with the output types/features when computing the default result-spec for an aggregate. Set operations are done to intersect the result spec with the output capabilities of a component.

Languages are represented as integers; there is a hash table from the string to the integer, and an array to go from integer to lang string.

A result set of ORIGINALs consists of types/features with associated language sets.

Definition at line 72 of file ResultSpecification_impl.java.

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index