Constructor of SparqlParser
SparqlParser
SparqlParser
()
Checks if $token is a Blanknode.
boolean
bNodeCheck
(String $token)
Checks if there is a datatype given and appends it to the node.
void
checkDtypeLang
(String $node)
Checks if the Node is a typed Literal.
boolean
dtypeCheck
(String $node)
Error reporting.
String
error
(SparqlException $e)
Gets the full URI of a qname token.
String
getFN
(String $token)
Checks if $token is an IRI.
boolean
iriCheck
(String $token)
Checks if $token is a Literal.
boolean
literalCheck
(String $token)
Main function of SparqlParser. Parses a query string.
Query
parse
([
String $queryString =
false])
-
String
$queryString: The SPARQL query
Sets result form to 'ASK'.
void
parseAsk
()
Parses the BASE part of the query.
void
parseBase
()
Parses a bracketted expression.
void
parseBrackettedExpression
(
Constraint $constraint)
Parses an RDF collection.
Node
parseCollection
(
TriplePattern $trp)
Parses a value constraint.
Parses the CONSTRUCT clause.
void
parseConstruct
()
Adds a new variable to the query and sets result form to 'DESCRIBE'.
void
parseDescribe
()
Parses an expression.
void
parseExpression
(
$constraint,
Constraint $constrain)
Parses the FROM clause.
void
parseFrom
()
Parses a graph pattern.
void
parseGraphPattern
([int $optional = false], [int $union = false], [string $graph = false], [boolean $constr = false], [ $external = false])
-
int
$optional: Optional graph pattern
-
int
$union: Union graph pattern
-
string
$graph: Graphname
-
boolean
$constr: TRUE if the pattern is a construct pattern
-
$external
Parses a literal.
void
parseLiteral
(String $node, String $sep)
-
String
$node
-
String
$sep: used separator " or '
Parses the solution modifiers of a query.
void
parseModifier
()
Parses a String to an RDF node.
Node
parseNode
([
String $node =
false])
Parses order conditions of a query.
void
parseOrderCondition
()
Adds a new namespace prefix to the query object.
void
parsePrefix
()
Starts parsing the tokenized SPARQL Query.
void
parseQuery
()
Parses the SELECT part of a query.
void
parseSelect
()
Parses the WHERE clause.
void
parseWhere
()
Checks if $token is a qname.
boolean
qnameCheck
(String $token)
Tokenizes the querystring.
void
tokenize
(String $queryString)
Removes comments in the query string. Comments are indicated by '#'.
String
uncomment
(String $queryString)
Checks if $token is a variable.
boolean
varCheck
(String $token)
FastForward until next token which is not blank.
void
_fastForward
()
Rewind until next token which is not blank.
void
_rewind
()
Inherited Methods
Inherited From Object
Object::toString()