Id: $Id: xxx.html,v 1.1 2005-11-23 16:01:03 chris-dollin Exp $.

the Assembler interface for creating Models

ja:FileModel a rdfs:Class
    ; rdfs:subClassOf ja:NamedModel
    ; rdfs:label "Assembler.FileModel"
    ; rdfs:comment
        """a FileModel is a file-backed NamedModel implemented as a
        MemoryModel with the name given by the modelName and in the
        directory given by fromDirectory."""
    .

ja:fromDirectory a rdf:Property
    ; rdfs:label "Assembler.fromDirectory"
    ; rdfs:comment
        """property of a FileModel giving the directory in which the
        modelName is to be resolved. Query: is the current behaviour
        of FileModels to be preserved?"""
    ; rdfs:domain ja:FileModel
    .

#
# database models
#

An Assembler knows how to create one or more kinds of objects from a specification written in RDF as per the assembler vocabulary. The core method is:

Assembler::create( Assembler sub, Resource root ) → Object

root is the RDF node which is the subject of the description. sub is the assembler to use for any sub-components of the root. The method:

Assembler::create( Resource root ) → Object

calls the core create passing itself as the first argument.

If an assembler cannot construct an appropriate object from the description, it throws a ICannotDoThat exception.

defaultModelAssembler

This Assembler constant assembles a default (memory-based) model, given a root of type ja:DefaultModel.

infModelAssembler

This Assembler constant assembles an InfModel from an (optional; default is a defaultModel) base Model and a Reasoner. The Model and Reasoner are constructed by recursive calls to the sub Assembler.

ontModelAssembler

This Assembler constant constructs an OntModel using the supplied ontLanguage property and any InfModel properties.

fileModelAssembler

This Assembler constant constructs a FileModel with the given name in the given directory. No recursive calls are used.

rdbModelAssembler

This Assembler constant constructs a RDBModel with the given modelName and the given, recursively constructed, Connection.

reasonerAssembler

This Assembler constant constructs a Reasoner object (for an inference model), recursively constructing any required RuleSets.

connectionAssembler

This Assembler constant constructs a Connection object for the specified database using the supplied user and password values. If these are not specified, it uses the values of the system properties jena.dbUser and jena.dbPassword as the user and password.

connectionAssemblerCreator

This factory creates versions of connectionAssembler with specified usernames and passwords locked in, using the method:

create( String userName, String password ) → Connection

prefixMappingAssembler

This Assembler constant creates a PrefixMapping from the supplied specification, using recursive calls to create sub-mappings.

ruleSetAssembler

This Assembler constant creates a RuleSet object from the supplied specification, using recursive calls to sub for sub-rulesets.

builtin

This Assembler is an AssemblerGroup initialised with the Assembler constants above. An AssemblerGroup selects an Assembler component by picking the most specific type of the root object and then invoking the Assembler which has been added to deal with that type using the method:

implementWith( Resource type, Assembler impl ) → this

Additional type→impl mappings can be added by the user, if required, or a fresh AssemblerGroup can be constructed using the method:

copy() → AssemblerGroup

which creates a copy of this AssemblerGroup, or:

static AssemblerGroup.create()

which creates a new empty AssemblerGroup.