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

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

public interface ModelSource

Interface for "create a model and here's a name as a hint". Primarily intended for import handling.

Author:
hedgehog

Method Summary
 Model getExistingModel(String name)
          If this ModelSource admits to having a Model with the given name, answer that Model, otherwise answer null.
 Model openModel(String name)
          Answer a model.
 

Method Detail

openModel

Model openModel(String name)
Answer a model. Different ModelSources may implement this in very different ways - ModelSource imposes few constraints other than the result is a proper Model. A ModelSource may use the name to identify an existing Model and re-use it, or it may create a fresh Model each time. However it *is* expected that uses of different names will answer different models (different in the strong sense of not having the same underlying graph, too). TODO implement that last sentence as a test.


getExistingModel

Model getExistingModel(String name)
If this ModelSource admits to having a Model with the given name, answer that Model, otherwise answer null. A ModelSource may freely forget existing Models, even ones that have just be created via openModel. (ModelMakers are not allowed to do that - as a subinterface they satisfy extra constraints.)



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