Module org.apache.jena.geosparql
Class AccessWGS84
java.lang.Object
org.apache.jena.geosparql.implementation.access.AccessWGS84
Central place for accessing Wgs84 point geometries in a
Graph.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsGeoLiteralProperties(org.apache.jena.graph.Graph graph) True iff the graph contains wgs84:{lat, long} triples.static org.apache.jena.util.iterator.ExtendedIterator<Map.Entry<org.apache.jena.graph.Node,GeometryWrapper>> findGeoLiterals(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s) For each matching resource, build geometry literals from the cartesian product of the WGS84 lat/long properties.static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple>findGeoLiteralsAsTriples(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s) For each matching resource, build triples of format 's geo:hasGeometry geometryLiteral'.static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple>findGeoLiteralsAsTriples(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p) For each matching resource and its geometries, create triples of format 's p geometryLiteral'static org.apache.jena.graph.NodegetGeoLiteral(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s) Read lat/lon values for the given subject.static booleanhasGeoLiteralProperties(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node feature) True iff the node has wgs84:{lat, long} triples.
-
Constructor Details
-
AccessWGS84
public AccessWGS84()
-
-
Method Details
-
containsGeoLiteralProperties
public static boolean containsGeoLiteralProperties(org.apache.jena.graph.Graph graph) True iff the graph contains wgs84:{lat, long} triples. True does not imply that there are resources that have both lat AND long properties. -
hasGeoLiteralProperties
public static boolean hasGeoLiteralProperties(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node feature) True iff the node has wgs84:{lat, long} triples. True does not imply that both lat AND long are present on the node. -
findGeoLiteralsAsTriples
public static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple> findGeoLiteralsAsTriples(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s) For each matching resource, build triples of format 's geo:hasGeometry geometryLiteral'. -
findGeoLiteralsAsTriples
public static org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.graph.Triple> findGeoLiteralsAsTriples(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p) For each matching resource and its geometries, create triples of format 's p geometryLiteral'- Parameters:
graph-s- The match subject. May be null.p- The predicate to use for creating triples. Can be chosen freely but must not be null.- Returns:
- Iterator of created triples (not obtained from the graph directly).
-
findGeoLiterals
public static org.apache.jena.util.iterator.ExtendedIterator<Map.Entry<org.apache.jena.graph.Node,GeometryWrapper>> findGeoLiterals(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s) For each matching resource, build geometry literals from the cartesian product of the WGS84 lat/long properties. Resources must have both properties, lat and long, to be matched by this method. -
getGeoLiteral
public static org.apache.jena.graph.Node getGeoLiteral(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s) Read lat/lon values for the given subject. Null if there are no such properties. ThrowsDatatypeFormatExceptionwhen detecting incorrect use of these properties.
-