Class JenaUtilHelper


  • public class JenaUtilHelper
    extends Object
    This is an extension point for the SPIN library allowing modification of some low level utilities that are exposed through JenaUtil. Note: Unstable - should not be used outside of TopBraid.
    Author:
    Jeremy Carroll
    • Constructor Detail

      • JenaUtilHelper

        public JenaUtilHelper()
    • Method Detail

      • createMultiUnion

        public org.apache.jena.graph.compose.MultiUnion createMultiUnion()
        Return a multiunion.
        Returns:
        the MultiUnion graph
      • createMultiUnion

        public org.apache.jena.graph.compose.MultiUnion createMultiUnion​(Iterator<org.apache.jena.graph.Graph> graphs)
        Return a multiunion, initialized with the given graphs.
        Parameters:
        graphs - the Graphs to convert
        Returns:
        the MultiUnion graph
      • createMultiUnion

        public org.apache.jena.graph.compose.MultiUnion createMultiUnion​(org.apache.jena.graph.Graph[] graphs)
        Return a multiunion, initialized with the given graphs.
        Parameters:
        graphs - the Graphs to convert
        Returns:
        the MultiUnion graph
      • createDefaultGraph

        public org.apache.jena.graph.Graph createDefaultGraph()
        A memory graph with no reification.
        Returns:
        the default Graph
      • isMemoryGraph

        public boolean isMemoryGraph​(org.apache.jena.graph.Graph graph)
        Returns true if optimizations for faster graphs should be applied; false if graph is slower. A typical fast graph is stored in memory, a typical slow graph is stored in a database. The calling code JenaUtil.isMemoryGraph(Graph) deals with MultiUnions by taking the logical AND of the subgraphs.
        Parameters:
        graph - A simple graph, not a MultiUnion
        Returns:
        true if the graph is fast
      • asReadOnlyModel

        public org.apache.jena.rdf.model.Model asReadOnlyModel​(org.apache.jena.rdf.model.Model m)
      • asReadOnlyGraph

        public org.apache.jena.graph.Graph asReadOnlyGraph​(org.apache.jena.graph.Graph g)
      • createOntologyModel

        public org.apache.jena.ontology.OntModel createOntologyModel​(org.apache.jena.ontology.OntModelSpec spec,
                                                                     org.apache.jena.rdf.model.Model base)
      • createConcurrentGraph

        public org.apache.jena.graph.Graph createConcurrentGraph()
      • setGraphReadOptimization

        public void setGraphReadOptimization​(boolean b)
      • deepCloneReadOnlyGraph

        public org.apache.jena.graph.Graph deepCloneReadOnlyGraph​(org.apache.jena.graph.Graph g)