java.lang.Object
org.apache.jena.geosparql.implementation.access.AccessGeoSPARQL

public class AccessGeoSPARQL extends Object
Central place for accessing GeoSparql spatial objects in a Graph. Note: Using the "GeoLiterals" methods on RDF data that do not conform to the GeoSparql specification will return whatever values are present - regardless of whether those values are valid literals.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    containsGeoLiterals(org.apache.jena.graph.Graph graph)
    True iff the graph contains geometry literals.
    static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple>
    findDefaultGeoResources(org.apache.jena.graph.Graph graph)
     
    static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple>
    findSpecificGeoLiterals(org.apache.jena.graph.Graph graph)
    Iterate all triples of geometry resources with their most specific serialization form.
    static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple>
    findSpecificGeoLiterals(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node geometry)
    Iterate a given geometry resource's most specific geometry literals.
    static Iterator<org.apache.jena.graph.Triple>
    findSpecificGeoLiteralsByFeature(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node feature)
    Resolve a feature to its set of specific geometries via the following chain:
    static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple>
    findSpecificGeoResources(org.apache.jena.graph.Graph graph)
    Find all triples with geo:hasDefaultGeometry and geo:hasGeometry predicates.
    static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple>
    findSpecificGeoResources(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node feature)
     
    static org.apache.jena.graph.Node
    getGeoLiteral(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node geometry)
     
    static org.apache.jena.graph.Triple
    getGeoLiteralTriple(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node geometry)
     
    static boolean
    hasGeoLiterals(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node geometry)
    True iff the node has geometry literals.
    static boolean
    hasGeoResources(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node feature)
    True if the node has a geometry or default geometry.
    static boolean
    isPredicateOfFeature(org.apache.jena.graph.Node n)
     
    static boolean
    isPredicateOfGeoResource(org.apache.jena.graph.Node n)
     
    static boolean
    isSpatialObjectByProperties(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node featureOrGeometry)
    True if the node is a geosparql spatial object by the present (geometry-related) properties.
    static boolean
    isTripleOfFeature(org.apache.jena.graph.Triple t)
     
    static boolean
    isTripleOfGeoResource(org.apache.jena.graph.Triple t)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AccessGeoSPARQL

      public AccessGeoSPARQL()
  • Method Details

    • isPredicateOfFeature

      public static boolean isPredicateOfFeature(org.apache.jena.graph.Node n)
    • isPredicateOfGeoResource

      public static boolean isPredicateOfGeoResource(org.apache.jena.graph.Node n)
    • isTripleOfFeature

      public static boolean isTripleOfFeature(org.apache.jena.graph.Triple t)
    • isTripleOfGeoResource

      public static boolean isTripleOfGeoResource(org.apache.jena.graph.Triple t)
    • containsGeoLiterals

      public static boolean containsGeoLiterals(org.apache.jena.graph.Graph graph)
      True iff the graph contains geometry literals.
    • hasGeoLiterals

      public static boolean hasGeoLiterals(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node geometry)
      True iff the node has geometry literals. Arguments must not be null.
    • hasGeoResources

      public static boolean hasGeoResources(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node feature)
      True if the node has a geometry or default geometry. Arguments must not be null.
    • isSpatialObjectByProperties

      public static boolean isSpatialObjectByProperties(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node featureOrGeometry)
      True if the node is a geosparql spatial object by the present (geometry-related) properties. A mere "SpatialObject" type does not count. Arguments must not be null. Wgs84 does not count
    • findSpecificGeoResources

      public static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple> findSpecificGeoResources(org.apache.jena.graph.Graph graph)
      Find all triples with geo:hasDefaultGeometry and geo:hasGeometry predicates. If a feature has a default geometry, then this method will omit all its (non-default) geometries.
    • findDefaultGeoResources

      public static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple> findDefaultGeoResources(org.apache.jena.graph.Graph graph)
    • findSpecificGeoResources

      public static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple> findSpecificGeoResources(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node feature)
    • findSpecificGeoLiteralsByFeature

      public static Iterator<org.apache.jena.graph.Triple> findSpecificGeoLiteralsByFeature(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node feature)
      Resolve a feature to its set of specific geometries via the following chain:
         feature -> (geo:hasDefaultGeometry, geo:hasGeometry) ->
           ({geo:asWKT, geo:asGML}, geo:hasSerialization) -> geo-literal.
       
      If a geo:hasDefaultGeometry does not lead to a valid geo-literal there is no backtracking to geo:hasGeometry.
    • findSpecificGeoLiterals

      public static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple> findSpecificGeoLiterals(org.apache.jena.graph.Graph graph)
      Iterate all triples of geometry resources with their most specific serialization form. The specific properties geo:asWKT and geo:asGML take precedence over the more general geo:hasSerialization. This means if a resource has wkt and/or gml then all geo:hasSerialization triples will be omitted for it.
    • findSpecificGeoLiterals

      public static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple> findSpecificGeoLiterals(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node geometry)
      Iterate a given geometry resource's most specific geometry literals. The geometry resource must not be null. A specific serialization (WKT, GML) takes precedence over the more general hasSerialization property.
    • getGeoLiteral

      public static org.apache.jena.graph.Node getGeoLiteral(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node geometry)
    • getGeoLiteralTriple

      public static org.apache.jena.graph.Triple getGeoLiteralTriple(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node geometry)