public class InfoBinary extends Resource
InformationService to store any binary Object directly.
It might be used particularly for binary files, for example.dataType, INFOANYTYPE, INFOBINARYTYPE, INFOHTMLTYPE, INFOSTREAMXMLTYPE, INFOSTRINGTYPE, INFOTEXTTYPE, INFOURLTYPE, INFOXMLTYPE, LISTCONTAINERTYPE, QUERYCONTAINERTYPE, RANDOMCONTAINERTYPE, uuid| Constructor and Description |
|---|
InfoBinary(java.lang.String theDataType,
org.licas_xml.abs.Element dataXml)
Create a new instance of InfoBinary.
|
| 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.
|
boolean |
parseInfo(org.licas_xml.abs.Element dataXml)
Parse the data description in the data description document to create the data object.
|
createResource, dataFromResourceType, getDataType, getUUID, parseValueElem, resourceTypeForDataType, setUUID, setUUIDpublic InfoBinary(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.public boolean parseInfo(org.licas_xml.abs.Element dataXml)
throws java.lang.Exception
parseInfo in class ResourcedataXml - the outermost element is not checked for, but might be a DATA
or DATASET element. This should include a Const.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 binary 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 ResourceinfoDescr - a description of the info resource value that should be retrieved.
Can be null as not used in this version.Data element through an admin document. The
binary data is stored as a ByteArray tokenised String and not a byte[]. It
can be converted into a byte[] for display, by using the ByteArray toBytes method.java.lang.Exception - any error.public java.lang.Object getValue(org.licas_xml.abs.Element infoDescr)
throws java.lang.Exception