eu.larkc.jactr.scripting.sparql
Class SPARQLQueryInstantiation

java.lang.Object
  extended by eu.larkc.jactr.scripting.sparql.SPARQLQueryInstantiation

public class SPARQLQueryInstantiation
extends Object

Author:
Martijn Brakenhoff

Constructor Summary
SPARQLQueryInstantiation(String script, String autoCompleteType)
           
 
Method Summary
 void addPrefixes(Map<String,String> prefixes)
          Adds the given prefixes.
 String getBoundQuery(VariableBindings variableBindings)
          Returns the query-string, but replaces the variables with the objects from the bindings.
 String getBufferName()
          Returns the buffername, that was found in the script.
 Map<String,String> getPrefixes()
          Returns all the prefixes that were set.
 String getQuery()
          Returns the auto-completed query-string.
 boolean isConstruct()
          Checks if the auto-complete type is "Construct".
 boolean isSelect()
          Checks if the auto-complete type is "Select".
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPARQLQueryInstantiation

public SPARQLQueryInstantiation(String script,
                                String autoCompleteType)
Method Detail

isSelect

public boolean isSelect()
Checks if the auto-complete type is "Select".

Returns:
true if the auto-complete type is "Select", otherwise false.

isConstruct

public boolean isConstruct()
Checks if the auto-complete type is "Construct".

Returns:
true if the auto-complete type is "Construct", otherwise false.

getPrefixes

public Map<String,String> getPrefixes()
Returns all the prefixes that were set.

Returns:
the prefixes

addPrefixes

public void addPrefixes(Map<String,String> prefixes)
Adds the given prefixes.

Parameters:
prefixes - the prefixes that should be added.

getBufferName

public String getBufferName()
Returns the buffername, that was found in the script.

Returns:
the buffername.

getQuery

public String getQuery()
Returns the auto-completed query-string.

Returns:
the query-string

getBoundQuery

public String getBoundQuery(VariableBindings variableBindings)
Returns the query-string, but replaces the variables with the objects from the bindings.

Parameters:
variableBindings - the variable values.
Returns:
the bounded query.