This page is obsolete and left here for historical purposes.
Loading Resources from properties files
1. Syntax for Resource definition:
welcomeText = sail.resource.StringResource string:Hi,%20I'm%20a%20sub%20POD
- welcomeText - The name of the resource
- sail.resource.StringResource - Type of resource being defined
- string:Hi,%20I'm%20a%20sub%20POD* - resource URI
2. There is a one to one mapping between pod's and PropertiesFiles. One property file represents one pod. Each property file contains a list of resources defined in the syntax above which can be used to define also:
helloPod = sail.resource.PODResource file:pstore1/pod3.properties
Loading Resources from xml files
1. Syntax for Resource definition:
A resource is defined as part of a collection of resources in the pod.
<pod> <resources> <resource> <name>pirateImage</name> <type>sail.resource.ImageResource</type> <uri>http://www.talklikeapirate.com/captainJackass.gif</uri> </resource> </pod>
Pod's can be defined within the xml file as Innerpods:
<pod> <resources> <resource> <name>piratePOD</name> <type>sail.resource.PODResource</type> <uri>ppod09202004</uri> </resource> <pod id=ppod09202004> <resources> <resource> . . . </resource> </pod> . . . </pod>
2. Each xml file represents one pod with can contain references to other pods.
Pod's can be defined outside the xml as Outerpods:
<pod> <resources> <resource> <name>piratePOD</name> <type>sail.resource.PODResource</type> <uri>xmlpod:http://www.wise.org/pods.xml!ppod09202004</uri> </resource> . . . </pod>
POC Requirements
- The poc defined in a pod must use POC_CLASS as its name.
POD Requirements
- A pod can only contain one POC.
- When defining pods as inner pods in xml files, they must be defined with an id. This id can be changed by the author.
- Everywhere in the pod tree universe a pod can only have one parent.
- Each pod can have a file(xml,style sheet, etc..) that will define its grapical layout. This definition is parsed and constructed into a component by a poc. This file is not required for each pod.
Resource Requirements
- Everything is a resource
Resource Definition's
StringResource
StringResource defines a resource from string or some store of strings.
Name:
user defined
type:
sail.resource.StringResource
Possible Uri's
string: ex. string:I%20heart%20people
file: ex. file:propertybasedStore1/my_pod_text.txt
ImageResource
ImageResource defines a raw image as a resource
name:
user defined
type:
sail.resource.ImageResource
Possible Uri's:
http: ex. http://www.foobar.com/foo.gif
file: ex. file:propertybasedStore1/foo.gif
POCResource
Defines the POC class for the POD.
Each POCResource must use POC_CLASS as the name of the resource.
name:
POC_CLASS
type:
sail.resource.POCResource
Possible Uri's:
classname: ex. classname:sail.poc.SomePOC
PropertiesPODResource
Defines a properties file as a pod.
name:
user defined
type:
sail.resource.PropertiesPODResource
Possible Uri's:
file: ex. file:propertybasedStore1/friendlyPod2.properties
XmlPODResource
Defines a XML file as a pod.
name:
user defined
type:
sail.resource.PropertiesPODResource
Possible Uri's:
file: ex. file:propertybasedStore1/pods.xml
When the pod definition is written in XML the following uri's are possible when referencing other pod's. 1. Referencing a pod in another xml file. This looks in pods.xml and finds a pod with the id hpod1 and includes it as a resource. file:...:hpod1 ex. xmlpod:file:propertybasedStore1/pods.xml!hpod1 http:...:hpod1 ex. xmlpod:http://www.pstore.com/pods.xml!hpod1 2. Defining the pod as an inner pod. <resource> <name>hurdlesPod</name> <type>sail.resource.XmlPODResource</type> <uri>hpod9202004</uri> . . . <pod id="hpod9202004"> . .
RIMFactory
name:
user defined
type:
sail.resource.RimFactory
Possible Uri's:
rim:scope:type ex. rim:global:Integer