Class ListCachingModelMaker

  • All Implemented Interfaces:
    org.apache.jena.rdf.model.ModelGetter, org.apache.jena.rdf.model.ModelMaker, org.apache.jena.rdf.model.ModelSource

    public class ListCachingModelMaker
    extends AbstractModelMakerDecorator
    This ModelMaker keeps a cached list of the available models. The methods that create a model must add its name to the list. The methods that remove a model must remove its name from the list. This is a useful decorator for some ModelMakers where listModels() is a costly operation. The drawback is that it will not see models that were created at a lower level; perhaps by RDFServiceDataset.getNamedModel(). If listModels() is not costly, you might be better off with a ModelMakerWithPersistentEmptyModels.
    • Constructor Detail

      • ListCachingModelMaker

        public ListCachingModelMaker​(org.apache.jena.rdf.model.ModelMaker inner)
    • Method Detail

      • listModels

        public org.apache.jena.util.iterator.ExtendedIterator<String> listModels()
        Specified by:
        listModels in interface org.apache.jena.rdf.model.ModelMaker
        Overrides:
        listModels in class AbstractModelMakerDecorator
      • getModel

        public org.apache.jena.rdf.model.Model getModel​(String URL)
        Specified by:
        getModel in interface org.apache.jena.rdf.model.ModelGetter
        Overrides:
        getModel in class AbstractModelMakerDecorator
      • getModel

        public org.apache.jena.rdf.model.Model getModel​(String URL,
                                                        org.apache.jena.rdf.model.ModelReader loadIfAbsent)
        Specified by:
        getModel in interface org.apache.jena.rdf.model.ModelGetter
        Overrides:
        getModel in class AbstractModelMakerDecorator
      • createModel

        public org.apache.jena.rdf.model.Model createModel​(String name,
                                                           boolean strict)
        Specified by:
        createModel in interface org.apache.jena.rdf.model.ModelMaker
        Overrides:
        createModel in class AbstractModelMakerDecorator
      • createModel

        public org.apache.jena.rdf.model.Model createModel​(String name)
        Specified by:
        createModel in interface org.apache.jena.rdf.model.ModelMaker
        Overrides:
        createModel in class AbstractModelMakerDecorator
      • openModel

        public org.apache.jena.rdf.model.Model openModel​(String name)
        Specified by:
        openModel in interface org.apache.jena.rdf.model.ModelSource
        Overrides:
        openModel in class AbstractModelMakerDecorator
      • openModel

        public org.apache.jena.rdf.model.Model openModel​(String name,
                                                         boolean strict)
        Specified by:
        openModel in interface org.apache.jena.rdf.model.ModelMaker
        Overrides:
        openModel in class AbstractModelMakerDecorator