Class Imports

java.lang.Object
org.apache.jena.shacl.Imports

public class Imports extends Object
Import processing.

Imports are triggered by a base (a single triple "? rdf:type owl:Ontology") and imports (triples "base owl:Imports URI").

If there are other "? owl:imports ?" triples, they are ignored.

  • Method Details

    • loadWithImports

      public static Graph loadWithImports(String url)
      Load a graph and process owl:imports to create a new, single graph.
    • withImports

      public static Graph withImports(Graph graph)
      Process and return the owl:imports closure of a graph. The graph is included in the results. Note that without knowing the URI, the start graph may be read again if it is named as an import.
    • withImports

      public static Graph withImports(String url, Graph graph)
      Process and return the owl:imports closure of a graph. The graph is included in the results.
    • imports

      public static List<Node> imports(Graph graph)
      Return the imports for a graph
    • baseAndImports

      public static org.apache.jena.atlas.lib.Pair<Node,List<Node>> baseAndImports(Graph graph)
      Locate the base (a single triple ? rdf:type owl:Ontology) and imports (triples "base owl:Imports URI"). May return null for the base in which case all imports are returned.
    • base

      public static Node base(Graph graph)
      Locate the base (a single triple ? rdf:type owl:Ontology). If none or more than one matching triple, then return null.
    • allImports

      public static List<Node> allImports(Node base, Graph graph)
      Locate any imports (triples "base owl:Imports URI"). Base may be a wildcard indicating "any owl:imports".