Class GeoConstraintFactoryWgs

java.lang.Object
org.aksw.jena_sparql_api.sparql.ext.geosparql.GeoConstraintFactoryWgs
All Implemented Interfaces:
GeoConstraintFactory

public class GeoConstraintFactoryWgs extends Object implements GeoConstraintFactory
A bridge between a SPARQL relation that can be constrained to a bounding box and converting matching rows to WKT strings. (Could be extended to also expose JTS geometries and Jena's GeometryWrappers)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.jena.graph.Node
     
    protected org.aksw.jenax.sparql.fragment.api.Fragment3
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    GeoConstraintFactoryWgs(org.aksw.jenax.sparql.fragment.api.Fragment3 fragment, org.apache.jena.graph.Node castNode)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    org.apache.jena.sparql.expr.Expr
    createExpr(org.locationtech.jts.geom.Envelope bounds)
    Create a SPARQL expression that constrains the fragment to the given bounding box
    static org.aksw.jenax.sparql.fragment.api.Fragment3
    createXyFragment(org.apache.jena.graph.Node xProperty, org.apache.jena.graph.Node yProperty)
     
    org.apache.jena.graph.Node
     
    org.aksw.jenax.sparql.fragment.api.Fragment3
    Return a fragment which returns geometry information for an entity
    org.apache.jena.sparql.core.Var
    Return which of the fragment's variables is the id variable
    org.apache.jena.sparql.core.Var
     
    org.apache.jena.sparql.core.Var
     
    of(String xPropertyIri, String yPropertyIri, String castIri)
     
    of(org.apache.jena.graph.Node xProperty, org.apache.jena.graph.Node yProperty, org.apache.jena.graph.Node castNode)
     
    toWktString(org.apache.jena.sparql.engine.binding.Binding binding)
    Convert a binding into a WKT string

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • fragment

      protected org.aksw.jenax.sparql.fragment.api.Fragment3 fragment
    • castNode

      protected org.apache.jena.graph.Node castNode
  • Constructor Details

    • GeoConstraintFactoryWgs

      protected GeoConstraintFactoryWgs(org.aksw.jenax.sparql.fragment.api.Fragment3 fragment, org.apache.jena.graph.Node castNode)
  • Method Details

    • of

      public static GeoConstraintFactoryWgs of(String xPropertyIri, String yPropertyIri, String castIri)
    • of

      public static GeoConstraintFactoryWgs of(org.apache.jena.graph.Node xProperty, org.apache.jena.graph.Node yProperty, org.apache.jena.graph.Node castNode)
    • create

      public static GeoConstraintFactoryWgs create()
    • getFragment

      public org.aksw.jenax.sparql.fragment.api.Fragment3 getFragment()
      Description copied from interface: GeoConstraintFactory
      Return a fragment which returns geometry information for an entity
      Specified by:
      getFragment in interface GeoConstraintFactory
    • getIdVar

      public org.apache.jena.sparql.core.Var getIdVar()
      Description copied from interface: GeoConstraintFactory
      Return which of the fragment's variables is the id variable
      Specified by:
      getIdVar in interface GeoConstraintFactory
    • getXVar

      public org.apache.jena.sparql.core.Var getXVar()
    • getYVar

      public org.apache.jena.sparql.core.Var getYVar()
    • getCastNode

      public org.apache.jena.graph.Node getCastNode()
    • createExpr

      public org.apache.jena.sparql.expr.Expr createExpr(org.locationtech.jts.geom.Envelope bounds)
      Description copied from interface: GeoConstraintFactory
      Create a SPARQL expression that constrains the fragment to the given bounding box
      Specified by:
      createExpr in interface GeoConstraintFactory
    • toWktString

      public String toWktString(org.apache.jena.sparql.engine.binding.Binding binding)
      Convert a binding into a WKT string
      Specified by:
      toWktString in interface GeoConstraintFactory
    • createXyFragment

      public static org.aksw.jenax.sparql.fragment.api.Fragment3 createXyFragment(org.apache.jena.graph.Node xProperty, org.apache.jena.graph.Node yProperty)