org.apache.uima.cas.impl
Class SofaFSImpl

java.lang.Object
  extended by org.apache.uima.cas.impl.FeatureStructureImpl
      extended by org.apache.uima.cas.impl.FeatureStructureImplC
          extended by org.apache.uima.cas.impl.SofaFSImpl
All Implemented Interfaces:
java.lang.Cloneable, FeatureStructure, SofaFS

public class SofaFSImpl
extends FeatureStructureImplC
implements SofaFS

Implementation of the SofaFS interface.


Field Summary
 
Fields inherited from class org.apache.uima.cas.impl.FeatureStructureImplC
addr, casImpl
 
Constructor Summary
SofaFSImpl(int addr, CASImpl cas)
           
 
Method Summary
 FeatureStructure getLocalFSData()
          Get the Local Subject of Analysis returns null if not previously set.
 java.lang.String getLocalStringData()
          Get the Local Subject of Analysis returns null if not previously set.
 java.io.InputStream getSofaDataStream()
          Provides stream access to both local and remote Sofa data.
 java.lang.String getSofaID()
          Get the Sofa globally unique name, after mapping.
 java.lang.String getSofaMime()
          Get the Sofa mime type.
 int getSofaRef()
          Get the Sofa Ref value.
 java.lang.String getSofaURI()
          Get the Sofa URI value.
 void setFeatureValue(Feature feat, FeatureStructure fs)
          Set a feature value to another FS.
 void setIntValue(Feature feat, java.lang.Integer val)
           
 void setLocalSofaData(FeatureStructure aFS)
          Set the Local Subject of Analysis to be a predefined ArrayFS.
 void setLocalSofaData(java.lang.String aString)
          Set the Local Subject of Analysis to be a String.
 void setRemoteSofaURI(java.lang.String aURI)
          Set the URI for a Remote Subject of Analysis.
 void setStringValue(Feature feat, java.lang.String val)
          Set the string value of a feature.
 
Methods inherited from class org.apache.uima.cas.impl.FeatureStructureImplC
equals, getAddress, getCAS, getCASImpl, hashCode, setUp
 
Methods inherited from class org.apache.uima.cas.impl.FeatureStructureImpl
clone, getBooleanValue, getByteValue, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getShortValue, getStringValue, getType, prettyPrint, prettyPrint, prettyPrint, setBooleanValue, setByteValue, setDoubleValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, toString, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.uima.cas.FeatureStructure
clone, equals, getBooleanValue, getByteValue, getCAS, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getShortValue, getStringValue, getType, hashCode, setBooleanValue, setByteValue, setDoubleValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue
 

Constructor Detail

SofaFSImpl

public SofaFSImpl(int addr,
                  CASImpl cas)
Method Detail

setLocalSofaData

public void setLocalSofaData(FeatureStructure aFS)
Description copied from interface: SofaFS
Set the Local Subject of Analysis to be a predefined ArrayFS. Once set, the Sofa data cannot be changed.

Specified by:
setLocalSofaData in interface SofaFS
See Also:
This method is duplicated in org.apache.uima.jcas.cas.Sofa. Any changes should be made in both places.

setLocalSofaData

public void setLocalSofaData(java.lang.String aString)
Description copied from interface: SofaFS
Set the Local Subject of Analysis to be a String. Once set, the Sofa data cannot be changed.

Specified by:
setLocalSofaData in interface SofaFS
See Also:
This method is duplicated in org.apache.uima.jcas.cas.Sofa. Any changes should be made in both places.

setRemoteSofaURI

public void setRemoteSofaURI(java.lang.String aURI)
Description copied from interface: SofaFS
Set the URI for a Remote Subject of Analysis. Once set, this URI may not be changed.

Specified by:
setRemoteSofaURI in interface SofaFS
See Also:
This method is duplicated in org.apache.uima.jcas.cas.Sofa. Any changes should be made in both places.

getLocalFSData

public FeatureStructure getLocalFSData()
Description copied from interface: SofaFS
Get the Local Subject of Analysis returns null if not previously set.

Specified by:
getLocalFSData in interface SofaFS
See Also:
This method is duplicated in org.apache.uima.jcas.cas.Sofa. Any changes should be made in both places.

getLocalStringData

public java.lang.String getLocalStringData()
Description copied from interface: SofaFS
Get the Local Subject of Analysis returns null if not previously set.

Specified by:
getLocalStringData in interface SofaFS
See Also:
This method is duplicated in org.apache.uima.jcas.cas.Sofa. Any changes should be made in both places.

setStringValue

public void setStringValue(Feature feat,
                           java.lang.String val)
Description copied from interface: FeatureStructure
Set the string value of a feature.

Specified by:
setStringValue in interface FeatureStructure
Overrides:
setStringValue in class FeatureStructureImpl
Parameters:
feat - The feature whose value we want to set.
val - The string we're setting the feature to.

setFeatureValue

public void setFeatureValue(Feature feat,
                            FeatureStructure fs)
Description copied from interface: FeatureStructure
Set a feature value to another FS.

Specified by:
setFeatureValue in interface FeatureStructure
Overrides:
setFeatureValue in class FeatureStructureImpl
Parameters:
feat - The feature whose value should be set.
fs - The value FS.

setIntValue

public void setIntValue(Feature feat,
                        java.lang.Integer val)

getSofaMime

public java.lang.String getSofaMime()
Description copied from interface: SofaFS
Get the Sofa mime type.

Specified by:
getSofaMime in interface SofaFS
Returns:
SofA mime type

getSofaURI

public java.lang.String getSofaURI()
Description copied from interface: SofaFS
Get the Sofa URI value.

Specified by:
getSofaURI in interface SofaFS
Returns:
Sofa URI or null if not valid

getSofaRef

public int getSofaRef()
Description copied from interface: SofaFS
Get the Sofa Ref value.

Specified by:
getSofaRef in interface SofaFS

getSofaDataStream

public java.io.InputStream getSofaDataStream()
Description copied from interface: SofaFS
Provides stream access to both local and remote Sofa data. For remote sofa data, a custom URLStreamHandler may be registered for a protocol via the java.protocol.handler.pkgs system property.

Specified by:
getSofaDataStream in interface SofaFS
Returns:
an InputStream for reading Sofa data. null returned if there is no Sofa data.

getSofaID

public java.lang.String getSofaID()
Description copied from interface: SofaFS
Get the Sofa globally unique name, after mapping.

Specified by:
getSofaID in interface SofaFS
Returns:
Sofa globally unique name, after mapping
See Also:
This method is duplicated in org.apache.uima.jcas.cas.Sofa. Any changes should be made in both places.


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.