Marmox™ Home Home
Folder Folder
Page Page
Page Folder Page Folder
Blog Entry Blog Entry
Upload… Upload…
selectedEdit Edit
Save Save
Rename… Rename…
Refresh Refresh
Delete Delete
Previous Previous
Next Next
Download… Download…
Add Comment… Add Comment…
Access… Access…
Properties… Properties…
About The Marmox™ Network About The Marmox™ Network
Log in Log in Join Join
URF PLOOP

PLOOP

URF
Quick Start
Specification
PLOOP

It is possible to use URF as a Programming Language Ontology for Objects and Properties (PLOOP), allowing long-term storage and/or object tree instance descriptions of programming languages using TURF, for example. The following specifies a canonical set of rules a processor must follow for for constructing a hierarchy of programming language objects based upon an URF description. All examples are represented using TURF and are given in the Java programming language using the Guise Internet application framework [Guise]. A complete PLOOP example is provided in the specification.

Classes

The URI of an URF class must indicate the complete package name and class name of a programming language class to instantiate. In the following example, the Java class com.guiseframework.component.Layoutpanel should be instantiated using its default constructor:

`URF¤
*«java:/com/guiseframework/component/LayoutPanel»
.

If a resource has a scoped urf.selector property with an urf.List value in the context of an urf.type declaration, a PLOOP processor must use all the corresponding values as arguments to the constructor of the specified type, converted the URF selector resources into programming language values as needed. A PLOOP instance would use the following example to indicate that an instance of the Guise class com.guiseframework.Category should be constructed using new Category("category1", "First Category"):

`URF¤
*«java:/com/guiseframework/Category»("category1", "First Category")
.

Properties

URF allows identification of programming language properties through use of the default URF namespace <http://urf.name/default/>. A PLOOP processor must use normal get/set conventions for the language in question for interpreting the read/write properties available for a particular class. For example, the local name of the property «http://urf.name/default/label» for a resource of type «java:/com/guiseframework/component/Button» is considered a property name for getting or setting a value of an instance of the Button class:

`URF¤
*«java:/com/guiseframework/component/Button»:
label="Push Me"
;
.

Values

In general, URF resources with URIs that are recognized must be converted to the equivalent type in the programming language. For example, in Java all resources of type urf.Integer must be converted to instances of java.lang.Integer. Likewise in Java urf.List, urf.Set, and urf.Map resources must be converted to java.util.List, java.util.Set, and java.util.Map instances, respectively, with each element or entry recursively instantiated or converted as needed. A resource with an inline URI must be converted if possible to a programming language type functioning as a lexical identifier, if its inlin type indicates such an enumerated type. In the following example, the Guise Java class com.guiseframework.component.layout.FlowLayout has a setFlow(com.guiseframework.component.layout.Flow) method. The inline URI «*layout.Flow("LINE")» indicates a type of com.guiseframework.component.layout.Flow, which is a Java enum class. A PLOOP processor must construct a com.guiseframework.component.layout.Flow object from the string "LINE" and assign it to the instance of com.guiseframework.component.layout.FlowLayout using com.guiseframework.component.layout.FlowLayout.setFlow(com.guiseframework.component.layout.Flow).

`URF¤
«java:/com/guiseframework/component/layout/FlowLayout»:
flow=«*layout.Flow("LINE")»
;
.