public class InfoText extends Resource
InformationService
to store text-based information
that is probably read from a file.dataType, INFOANYTYPE, INFOBINARYTYPE, INFOHTMLTYPE, INFOSTREAMXMLTYPE, INFOSTRINGTYPE, INFOTEXTTYPE, INFOURLTYPE, INFOXMLTYPE, LISTCONTAINERTYPE, QUERYCONTAINERTYPE, RANDOMCONTAINERTYPE, uuid
Constructor and Description |
---|
InfoText(java.lang.String theDataType,
org.licas_xml.abs.Element dataXml)
Create a new instance of InfoText.
|
Modifier and Type | Method and Description |
---|---|
org.licas_xml.abs.Element |
getInfo(org.licas_xml.abs.Element infoDescr)
Get the currently loaded source information wrapped in an XML element.
|
java.lang.Object |
getValue(org.licas_xml.abs.Element infoDescr)
Get the value itself and not a wrapped description.
|
protected boolean |
parseInfo(org.licas_xml.abs.Element dataXml)
Parse the data description in the document to create the data object.
|
createResource, dataFromResourceType, getDataType, getUUID, parseValueElem, resourceTypeForDataType, setUUID, setUUID
public InfoText(java.lang.String theDataType, org.licas_xml.abs.Element dataXml) throws java.lang.Exception
theDataType
- the resource data type.dataXml
- a description of the initialisation parameters. Can be null.java.lang.Exception
- any error.protected boolean parseInfo(org.licas_xml.abs.Element dataXml) throws java.lang.Exception
parseInfo
in class Resource
dataXml
- the outermost element is not checked for, but might be a DATA
or DATASET
element. This should include a VALUE
element that stores
a String-based file path description and possibly an ACTION
element that can
define if the data is stored in the resource or dynamically retrieved upon request
through <Data><Value>file path</Value><Action>the action</Action></Data>
.
The action (AiConst
.LOADREMOTE
) stores the file path to dynamically
retrieve the data upon request. Anything else, including no action, loads the data
into the resource as text contents.java.lang.Exception
- any error.public org.licas_xml.abs.Element getInfo(org.licas_xml.abs.Element infoDescr) throws java.lang.Exception
getInfo
in class Resource
infoDescr
- a description of the info resource value that should be retrieved.
Can be null as not used in this version.java.lang.Exception
- any error.public java.lang.Object getValue(org.licas_xml.abs.Element infoDescr) throws java.lang.Exception