public class InfoURL extends Resource
InformationService to store and parse a remote file location.
The URL link to the file is stored, where the link contents are returned upon request.
If the action is stored as AiConst.LOADREMOTE then the contents are
dynamically retrieved upon request, but if the action is stored as LOADCONTENTS
then the contents are stored once during initialisation and retrieved locally.| Modifier and Type | Field and Description |
|---|---|
protected java.net.URL |
url
The URL address
|
protected FileObject |
urlData
The url data
|
dataType, INFOANYTYPE, INFOBINARYTYPE, INFOHTMLTYPE, INFOSTREAMXMLTYPE, INFOSTRINGTYPE, INFOTEXTTYPE, INFOURLTYPE, INFOXMLTYPE, LISTCONTAINERTYPE, QUERYCONTAINERTYPE, RANDOMCONTAINERTYPE, uuid| Constructor and Description |
|---|
InfoURL(java.lang.String theDataType,
org.licas_xml.abs.Element dataXml)
Create a new instance of InfoURL.
|
| 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.String |
getURL()
Get the url address.
|
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 document to create the data object.
|
createResource, dataFromResourceType, getDataType, getUUID, parseValueElem, resourceTypeForDataType, setUUID, setUUIDprotected java.net.URL url
protected FileObject urlData
public InfoURL(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 - this must include a VALUE element that stores a String-based
URL path description. It can also contain an AiConst.ACTION
element, which can be set to LOADREMOTE to ask the URI and not the actual
contents to be stored.java.lang.Exception - any error.public java.lang.String getURL()
url.toExternalForm().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, or it can include an AiConst.ACTION element, which can
be set to LOADREMOTE to ask the URI and not the actual contents to be stored.java.lang.Exception - any error.public java.lang.Object getValue(org.licas_xml.abs.Element infoDescr)
throws java.lang.Exception
getValue in class ResourceinfoDescr - a description of the info resource value that should be retrieved.
Can be null, or it can include an AiConst.ACTION element, which can
be set to LOADREMOTE to ask the URI and not the actual contents to be stored.java.lang.Exception - any error.