Class PrologHandler

  • All Implemented Interfaces:
    Handler

    public class PrologHandler
    extends java.lang.Object
    implements Handler
    The prolog handler
    • Constructor Summary

      Constructors 
      Constructor Description
      PrologHandler​(Query query)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAll​(PrologHandler pfxHandler)
      Add the settings from the prolog handler argument.
      void addPrefix​(java.lang.String pfx, java.lang.String uri)
      Add a prefix to the prefix mapping.
      void addPrefixes​(java.util.Map<java.lang.String,​java.lang.String> prefixes)
      Add the map of prefixes to the query prefixes.
      void addPrefixes​(PrefixMapping prefixes)
      Add prefixes from a prefix mapping.
      void build()
      Called by the build process for this handler to perform any adjustments to the query before the build completes.
      void clearPrefixes()
      Clear the prefix mapping.
      ExprFactory getExprFactory()  
      PrefixMapping getPrefixes()  
      void setBase​(java.lang.String base)
      Set the base for the query.
      void setBase​(org.apache.jena.irix.IRIx base)
      Set the base for the query.
      void setVars​(java.util.Map<Var,​Node> values)
      Set the values for variables managed by the handler implementation.
      • Methods inherited from class java.lang.Object

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

      • PrologHandler

        public PrologHandler​(Query query)
        Constructor.
        Parameters:
        query - The query to handle.
    • Method Detail

      • setBase

        public void setBase​(org.apache.jena.irix.IRIx base)
        Set the base for the query. This is the IRI against which relative names will be resolved.
        Parameters:
        base - The base URI.
      • setBase

        public void setBase​(java.lang.String base)
        Set the base for the query. This is the IRI against which relative names will be resolved.
        Parameters:
        base - The string to set the base from.
      • addPrefix

        public void addPrefix​(java.lang.String pfx,
                              java.lang.String uri)
        Add a prefix to the prefix mapping.
        Parameters:
        pfx - The prefix to add.
        uri - The uri to resolve the prefix to.
      • clearPrefixes

        public void clearPrefixes()
        Clear the prefix mapping.
      • addPrefixes

        public void addPrefixes​(java.util.Map<java.lang.String,​java.lang.String> prefixes)
        Add the map of prefixes to the query prefixes.
        Parameters:
        prefixes - The map of prefixes to URIs.
      • addPrefixes

        public void addPrefixes​(PrefixMapping prefixes)
        Add prefixes from a prefix mapping.
        Parameters:
        prefixes - THe prefix mapping to add from.
      • addAll

        public void addAll​(PrologHandler pfxHandler)
        Add the settings from the prolog handler argument.
        Parameters:
        pfxHandler - The PrologHandler to read from
      • setVars

        public void setVars​(java.util.Map<Var,​Node> values)
        Description copied from interface: Handler
        Set the values for variables managed by the handler implementation. This method is called by the builder to set values handled by this Handler implementation.
        Specified by:
        setVars in interface Handler
        Parameters:
        values - The map of variable to node value.
      • build

        public void build()
        Description copied from interface: Handler
        Called by the build process for this handler to perform any adjustments to the query before the build completes. The adjustments are made after setVars() has been called.
        Specified by:
        build in interface Handler