|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A ModelMaker contains a collection of named models, methods for creating new models [both named and anonymous] and opening previously-named models, removing models, and accessing a single "default" Model for this Maker.
| Method Summary | |
void |
close()
Close the factory - no more requests need be honoured, and any clean-up can be done. |
Model |
createModel()
Create a new anonymous Model, as per ModelSpec. |
Model |
createModel(java.lang.String name)
Create a Model that does not already exist - equivalent to createModel( name, false ). |
Model |
createModel(java.lang.String name,
boolean strict)
Create a new Model associated with the given name. |
GraphMaker |
getGraphMaker()
Answer a GraphMaker that makes graphs the same way this ModelMaker makes models. |
Model |
getModel()
Answer the default Model for this Maker. |
boolean |
hasModel(java.lang.String name)
return true iff the factory has a Model with the given name |
ExtendedIterator |
listModels()
Answer an [extended] iterator where each element is the name of a model in the maker, and the complete sequence exhausts the set of names. |
Model |
openModel(java.lang.String name)
Equivalent to openModel( name, false ) |
Model |
openModel(java.lang.String name,
boolean strict)
Find an existing Model that this factory knows about under the given name. |
void |
removeModel(java.lang.String name)
Remove the association between the name and the Model. create will now be able to create a Model with that name, and open will no longer be able to find it. |
| Methods inherited from interface com.hp.hpl.jena.rdf.model.ModelSpec |
addDescription, createModelOver, getDescription, getDescription |
| Method Detail |
public Model createModel(java.lang.String name,
boolean strict)
strict
is false, return the associated Model. Otherwise throw an AlreadyExistsException.
name - the name to give to the new Modelstrict - true to cause existing bindings to throw an exception
AlreadyExistsException - if that name is already bound.public Model createModel(java.lang.String name)
createModel( name, false ).
public Model createModel()
createModel in interface ModelSpecpublic Model getModel()
public Model openModel(java.lang.String name,
boolean strict)
strict
is false, create a new Model, associate it with the name, and return it.
Otherwise throw a DoesNotExistException.
name - the name of the Model to find and returnstrict - false to create a new one if one doesn't already exist
DoesNotExistException - if there's no such named Modelpublic Model openModel(java.lang.String name)
openModel( name, false )
public void removeModel(java.lang.String name)
name - the name to disassociate
DoesNotExistException - if the name is unboundpublic boolean hasModel(java.lang.String name)
name - the name of the Model to look for
public void close()
public GraphMaker getGraphMaker()
public ExtendedIterator listModels()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||