com.hp.hpl.jena.rdf.model
Interface ModelSpec

All Superinterfaces:
ModelSource
All Known Subinterfaces:
ModelMaker
All Known Implementing Classes:
com.hp.hpl.jena.rdf.model.impl.ModelSpecImpl, OntModelSpec

public interface ModelSpec
extends ModelSource

A ModelSpec allows Models to be created.

Author:
kers

Method Summary
 Model addDescription(Model m, Resource self)
          Add this ModelSpec's description to a given model, under the given resource
 Model createModelOver(java.lang.String name)
          Answer a Model that fits the specification of this ModelSpec and is built over some underlying model with the given name.
 Model getDescription()
          Answer an RDF description of this ModelSpec using the JenaModelSpec vocabulary.
 Model getDescription(Resource root)
          Answer an RDF description of this ModelSpec using the JenaModelSpec vocabulary, with the given Resource as root.
 Model openModel()
          Open the "default" model.
 Model openModel(java.lang.String name)
          A specialisation of ModelSource::openModel( String ).
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.ModelSource
createDefaultModel, createFreshModel, createModel, getModel, openModelIfPresent
 

Method Detail

createModelOver

Model createModelOver(java.lang.String name)
Answer a Model that fits the specification of this ModelSpec and is built over some underlying model with the given name. [It is not necessary for the resulting model to be known by that name.]

NOTE: this method is likely to become deprecated, and then deleted, absent user pressure to retain it.


openModel

Model openModel(java.lang.String name)
A specialisation of ModelSource::openModel( String ). ModelSpecs will return the same Model when given the same String argument.

Specified by:
openModel in interface ModelSource
See Also:
ModelSource.openModel(java.lang.String)

openModel

Model openModel()
Open the "default" model. Do not create one.


getDescription

Model getDescription()
Answer an RDF description of this ModelSpec using the JenaModelSpec vocabulary. The description root will be a freshly-created bnode.


getDescription

Model getDescription(Resource root)
Answer an RDF description of this ModelSpec using the JenaModelSpec vocabulary, with the given Resource as root.

Parameters:
root - the resource to be used for all the top-level properties
Returns:
a description of this ModelSpec

addDescription

Model addDescription(Model m,
                     Resource self)
Add this ModelSpec's description to a given model, under the given resource

Parameters:
m - the model to which the description is to be added
self - the resource to which the properties are to be added
Returns:
the model m (for cascading and convenience)


Copyright © 2000, 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP