Class UnionModelsOntModelsCache
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.modelaccess.ontmodels.UnionModelsOntModelsCache
-
- All Implemented Interfaces:
OntModelCache
public class UnionModelsOntModelsCache extends Object implements OntModelCache
Decorates an OntModelCache with some "virtual" OntModels, each of which is a union of two actual OntModels. For example, we might create a model called FULL_ASSERTIONS, that is the union of two models called ABOX_ASSERTIONS and TBOX_ASSERTIONS. The inner class UnionSpec holds the model names, and allows us to lazily create the union models.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUnionModelsOntModelsCache.UnionSpecstatic classUnionModelsOntModelsCache.UnionSpecBasestatic classUnionModelsOntModelsCache.UnionSpecPair
-
Constructor Summary
Constructors Constructor Description UnionModelsOntModelsCache(OntModelCache inner, UnionModelsOntModelsCache.UnionSpec... unionModelSpecs)Create it like this:
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SortedSet<String>getModelNames()Get the names of all existing models.org.apache.jena.ontology.OntModelgetOntModel(String name)Get the model with this name (URI).StringtoString()
-
-
-
Constructor Detail
-
UnionModelsOntModelsCache
public UnionModelsOntModelsCache(OntModelCache inner, UnionModelsOntModelsCache.UnionSpec... unionModelSpecs)
Create it like this:new UnionModelsOntModelsCache(inner, UnionSpec.base("baseUri").plus("plusUri").yields("unionUri"), ...);
-
-
Method Detail
-
getOntModel
public org.apache.jena.ontology.OntModel getOntModel(String name)
Description copied from interface:OntModelCacheGet the model with this name (URI). If such a model does not exist, it will be created.- Specified by:
getOntModelin interfaceOntModelCache
-
getModelNames
public SortedSet<String> getModelNames()
Description copied from interface:OntModelCacheGet the names of all existing models.- Specified by:
getModelNamesin interfaceOntModelCache
-
-