Class BlankNodeFilteringModelMaker

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

    public class BlankNodeFilteringModelMaker
    extends AbstractModelMakerDecorator
    Still not sure why this is needed, but... Let's assume that there are some model operations that are implemented by multiple SPARQL queries against the RDFService. Those multiple queries might return different values for the same blank node, so when the results of the queries were combined, the relationships would be lost. To avoid this, we assume that all of the statements involving blank nodes will fit nicely into memory, and we fetch them all at once. After that, all of our operations are against the union of the actual model minus blank nodes and the memory model. The models do retain the same ID for each blank node on successive operations, so we can execute repeated queries and it will work fine. Writing blank nodes is probably a different matter, unless unrelated to existing blank nodes.
    • Constructor Detail

      • BlankNodeFilteringModelMaker

        public BlankNodeFilteringModelMaker​(RDFService rdfService,
                                            org.apache.jena.rdf.model.ModelMaker inner)
    • Method Detail

      • 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
      • 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
      • 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
      • getModel

        public org.apache.jena.rdf.model.Model getModel​(String name)
        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 name,
                                                        org.apache.jena.rdf.model.ModelReader loadIfAbsent)
        Specified by:
        getModel in interface org.apache.jena.rdf.model.ModelGetter
        Overrides:
        getModel 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
      • wrapModelWithFilter

        public org.apache.jena.rdf.model.Model wrapModelWithFilter​(String name,
                                                                   org.apache.jena.rdf.model.Model model)