public class ObjResource extends Resource
Integer or Float, for example.
Alternatively, you can specify a parser and serialize/parse your own Java objects.
This automatically loads the contents in and does not dynamically retrieve each time.dataType, INFOANYTYPE, INFOBINARYTYPE, INFOHTMLTYPE, INFOSTREAMXMLTYPE, INFOSTRINGTYPE, INFOTEXTTYPE, INFOURLTYPE, INFOXMLTYPE, LISTCONTAINERTYPE, QUERYCONTAINERTYPE, RANDOMCONTAINERTYPE, uuid| Constructor and Description |
|---|
ObjResource(java.lang.String theDataType,
org.licas_xml.abs.Element dataXml)
Create a new instance of ObjResource.
|
ObjResource(java.lang.String theDataType,
java.lang.Object theData)
Create a new instance of ObjResource.
|
| 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 admin document to create the data object.
|
createResource, dataFromResourceType, getDataType, getUUID, parseValueElem, resourceTypeForDataType, setUUID, setUUIDpublic ObjResource(java.lang.String theDataType,
java.lang.Object theData)
throws java.lang.Exception
theDataType - the resource data type.theData - the data object. This is stored as is, do not need to parse anything.java.lang.Exception - any error.public ObjResource(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 ResourcedataXml - the Data element of the admin document. This should include
a Value element that stores a String-based file path description and possibly
an Action element. If there is no specified action, then the data is loaded
into the resource as default. There can also be a Parser element, as specified by
MetaFactory.createParserXML.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.java.lang.Exception - any error.public java.lang.Object getValue(org.licas_xml.abs.Element infoDescr)
throws java.lang.Exception