org.jbind.xml.instance.data
Class LanguageData

java.lang.Object
  extended byorg.jbind.xml.instance.data.AbstractData
      extended byorg.jbind.xml.instance.data.AbstractSimpleData
          extended byorg.jbind.xml.instance.data.LanguageData
All Implemented Interfaces:
IAnySimpleTypeData, IAnyTypeData, IHasLength, ILanguageData, INormalizedStringData, ISimpleData, IStringData, ITextContentProvider, ITokenData

public class LanguageData
extends AbstractSimpleData
implements ILanguageData


Constructor Summary
LanguageData()
           
 
Method Summary
 void doAccept(java.lang.String aString)
          Hook method that accepts the normalized value and converts it into a corresponging internal representation (the so called simple storage object).
 java.lang.String getCanonicalForm_()
          Gets the canonical form.
 ILanguage getLanguage()
           
 int getLength()
           
 java.lang.Object getSimpleStorageObject()
          Gets the simple storage object.
 java.lang.String getString()
           
 void setLanguage(ILanguage aNewValue)
           
protected  void setSimpleStorageObject(java.lang.Object anObject)
           
 void setString(java.lang.String aValue)
           
 boolean simpleStorageValueEquals(IAnyTypeData aData)
          Checks if the simple storage value of this data object is equal to the simple storage object of the specified data objects.
 int simpleStorageValueHashCode()
          Calculates a hash code based on the simple storage value.
 
Methods inherited from class org.jbind.xml.instance.data.AbstractSimpleData
acceptImpl_, completeSimpleStorageAssignment_, doAcceptEnds_, doAcceptStarts_, getLexicalValue_, getNormalizedValue_, getObject, getTextContent_, setLexicalValue_, setObject, toString
 
Methods inherited from class org.jbind.xml.instance.data.AbstractData
accept_, addReferencedData_, createElement_, createElement_, createUncheckedAttributeData_, equals, fetchByXPath_, getAttribute_, getDataDesc_, getFixed_, getImpl_, getParent_, getSubstitutionHead_, getType_, hashCode, isDefault_, isNil_, iterAttributes_, iterElements_, iterReferencedData_, newElementData_, numberByXPath_, removeAttributeData_, selectByXPath_, setAttribute_, setDataDesc_, setImpl_, setSubstitutionHead_, setType_, stringByXPath_, testByXPath_
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jbind.xml.core.data.IAnySimpleTypeData
getObject, setObject, toString
 
Methods inherited from interface org.jbind.xml.core.data.IAnyTypeData
accept_, acceptImpl_, addReferencedData_, createElement_, createElement_, equals, getAttribute_, getDataDesc_, getImpl_, getParent_, getSubstitutionHead_, getType_, hashCode, isDefault_, isNil_, iterAttributes_, iterElements_, setAttribute_, setDataDesc_, setImpl_, setSubstitutionHead_, setType_
 
Methods inherited from interface org.jbind.xml.core.data.ISimpleData
getLexicalValue_, getNormalizedValue_, setLexicalValue_
 
Methods inherited from interface org.jbind.xml.core.base.ITextContentProvider
getTextContent_
 

Constructor Detail

LanguageData

public LanguageData()
Method Detail

getCanonicalForm_

public java.lang.String getCanonicalForm_()
Description copied from interface: ISimpleData
Gets the canonical form. The canonical form of a data object is the result of converting the data into a string.

Specified by:
getCanonicalForm_ in interface ISimpleData
Returns:
A string (required).

getLength

public int getLength()
Specified by:
getLength in interface IHasLength

getSimpleStorageObject

public java.lang.Object getSimpleStorageObject()
Description copied from interface: ISimpleData
Gets the simple storage object. If the value of the simple data object is stored with a reference type then the simple storage object is the same as the value object. Otherwise the value is stored with a primitive type. In this case the simple storage object wraps the primitive value.

Specified by:
getSimpleStorageObject in interface ISimpleData
Returns:
(required).

setSimpleStorageObject

protected void setSimpleStorageObject(java.lang.Object anObject)
Specified by:
setSimpleStorageObject in class AbstractSimpleData

doAccept

public void doAccept(java.lang.String aString)
              throws XmlException
Description copied from class: AbstractSimpleData
Hook method that accepts the normalized value and converts it into a corresponging internal representation (the so called simple storage object).

If an exception is raised during execution of the method then this data object may be inconsistent. It is in the responsibility of the caller either to rollback the changes or to discard this data object.

Overrides:
doAccept in class AbstractSimpleData
Parameters:
aString - (required).
Throws:
XmlException - Raised iff the string can not be converted into the internal representation.

getString

public java.lang.String getString()
Specified by:
getString in interface IStringData

setString

public void setString(java.lang.String aValue)
               throws XmlException
Specified by:
setString in interface IStringData
Throws:
XmlException

getLanguage

public ILanguage getLanguage()
Specified by:
getLanguage in interface ILanguageData

setLanguage

public void setLanguage(ILanguage aNewValue)
                 throws XmlException
Specified by:
setLanguage in interface ILanguageData
Throws:
XmlException

simpleStorageValueEquals

public boolean simpleStorageValueEquals(IAnyTypeData aData)
Description copied from interface: ISimpleData
Checks if the simple storage value of this data object is equal to the simple storage object of the specified data objects.

Specified by:
simpleStorageValueEquals in interface ISimpleData
Returns:
Returns true iff the simple storage values are equal.

simpleStorageValueHashCode

public int simpleStorageValueHashCode()
Description copied from interface: ISimpleData
Calculates a hash code based on the simple storage value.

Specified by:
simpleStorageValueHashCode in interface ISimpleData
Returns:
A hash code.