PEG vocabprocess--tjl: process for RDF vocabularies

Author: Tuomas J. Lukka
Last-Modified:2003-05-13
Revision: 1.14
Status: Implemented

It seems that vocabularies are easy to create but difficult to define and maintain. We need more process for vocabularies which will be put into actual public use.

This PEG changes the current fenfire vocabulary quite a bit, moves a lot of stuff into lava and creates rules on how new vocabulary terms are started and how they end up in the proper vocab instead of lava.

Issues

Changes

Goals of the structure

It would be Really Nice if we could structure the vocabularies so that each class contains a small, self-contained structural universe. This means that the code implementing access using the vocab. of a certain class should be relatively independent of the other vocabularies.

For instance, a spatial canvas is a reasonable unit: there is a canvas, it contains certain nodes at certain locations. However, structlinks or content links between different canvases do not actually belong in the same place; they are orthogonal to the spatial structure.

Currently, our code is pretty well along this structure: CanvasView2D takes care of the spatial canvas, and PPConnector (name needs to change) of the structlinks.

The more independent we can make the codes using the different orthogonal structural pieces, the easier it will be to slot in new behaviours.

Overall changes

Create new package, org.fenfire.vocab.lava.

Move most of the vocabulary entries into lava.

Freeze org.fenfire.vocab. Changes only through PEG process.

Change the prefix http://fenfire.org/vocabulary/ to http://fenfire.org/rdf-v/. After the prefix, each namespace shall contain the year and month it was originally defined in, in the form 2003/05/. After that, the name of the namespace, lowercase. Finally, the name of the resource is specified using # and the resource name. So, for instance, FF.content would be http://fenfire.org/rdf-v/2003/05/fenfire#content.

All new words define without PEG go into org.fenfire.vocab.lava and use the prefix http://fenfire.org/EXPERIMENTAL/rdf-v, after which the URI continues as above.

All entries in vocabulary classes shall have their official definitions there, in their javadocs. There shall be no members or classes without good documentation. This is mandatory for offical vocabularies and strongly recommended for lava vocabularies.

The vocabulary classes' names shall be, as before, all caps.

Vocabulary changes, prior to freezing

ALPH

Remove content, is in FF.

Remove clone and cloneType and dataType, not current/relevant.

Remove xuType, should be xuLinkType.

Then, we have left xuLinkFrom, xuLinkTo, xuLinkType. We should probably avoid 'xu' in the permanent names, just in case. These should be moved to CLINK (defined below) as CLINK.CLink, CLINK.cLinkFrom, CLINK.cLinkTo for clink, "content link", a term Ted at some point used.

FF

Retain. Javadocs:

/** RDF Vocabulary of central concepts of Fenfire.
 */
public class FF {

    static public final String _nsId = 
        "http://fenfire.org/rdf-v/2003/05/ff";

    /** A property signifying fluid media "content" of a node.
     * Used as  (node, FF.content, literal) where the literal is
     * an XML literal containing an enfilade
     * parseable by alph.
     * This is analogous to spreadsheet or zzStructure cell contents.
     */
    static public final Object content;
}

PAPER, SPATIAL

Combine to one class, CANVAS2D.

Rename coordX, coordY to x, y.

Javadoc:

/** RDF Vocabulary of 2D spatial canvases.
 */
public class CANVAS2D {
    static public final String _nsId = 
        "http://fenfire.org/rdf-v/2003/05/canvas2d";

    /** The RDF class of spatial 2D canvases.
     * Canvases contain (with the "contains" property)
     * nodes, which shall have the "x" and "y" properties.
     */
    static public final Object Canvas;
    /** The property by which the canvas is connected to
     * the nodes, as (canvas, contains, node).
     */
    static public final Object contains;
    /** The x and y coordinates of a node on a canvas.
     * (node, x, literal), where the literal is parseable
     * as a floating-point number (similar to Java doubles). 
     * Note that these are the <em>default</em> coordinate
     * properties: later on, we might make it possible for a Canvas2D
     * to define its own coordinate attributes, which would take
     * use close to Ted's floating world ideas.
     */
    static public final Object x, y;
}

PP

Remove this class. Move association to STRUCTLINK. PP is really a special-case user interface for a subset of the full fenfire structure, so it's quite reasonable not to include a special vocabulary for it.

RDF

Leave as is, javadoc properly. Javadoc:

/** RDF vocabulary of central RDF URIs defined outside fenfire.
 */
public class RDF {

    /** The RDF type attribute. A node's type can be declared 
     * to be Foo 
     * by a triple (node, RDF.type, Foo).
     */
    static public final Object type;
}

RST

Move to lava