findAllQueryVariables [line 699]
array findAllQueryVariables(
)
|
|
Find all query variables used in the WHERE clause.
parseAnd [line 443]
Parse the AND clause of an RDQL query
parseExpressions [line 582]
array parseExpressions(
$filterStr, string
$filteStr)
|
|
Parse expressions inside the passed filter: 1) regex equality expressions: ?var [~~ | =~ | !~ ] REG_EX 2a) string equality expressions: ?var [eq | ne] "literal"@lang^^dtype.
2b) string equality expressions: ?var [eq | ne] <URI> or ?var [eq | ne] prefix:local_name 3) numerical expressions: e.q. (?var1 - ?var2)*4 >= 20
In cases 1-2 parse each expression of the given filter into an array of variables. For each parsed expression put a place holder (e.g. ##RegEx_1##) into the filterStr. The RDQLengine will then replace each place holder with the outcomming boolean value of the corresponding expression. The remaining filterStr contains only numerical expressions and place holders.
Parameters:
parseFilter [line 534]
void parseFilter(
integer
$n, string
$filter)
|
|
Check if a filter from the AND clause contains an equal number of '(' and ')' and parse filter expressions.
Parameters:
parseFrom [line 305]
Parse the FROM/SOURCES clause of an RDQL query When the parsing of this clause is finished, parseWhere() will be called.
parseQuery [line 74]
array &parseQuery(
string
$queryString)
|
|
Parse the given RDQL query string and return an array with query variables and constraints.
Parameters:
parseSelect [line 217]
Parse the SELECT clause of an RDQL query.
When the parsing of the SELECT clause is finished, this method will call a suitable method to parse the subsequent clause.
parseUsing [line 481]
Parse the USING clause of an RDQL query
parseWhere [line 358]
*' Parse the WHERE clause of an RDQL query.
When the parsing of the WHERE clause is finished, this method will call a suitable method to parse the subsequent clause if provided.
removeComments [line 106]
string removeComments(
string
$query)
|
|
Remove comments from the passed query string.
Parameters:
replaceNamespacePrefixes [line 727]
void replaceNamespacePrefixes(
)
|
|
Replace all namespace prefixes in the pattern and constraint clause of an RDQL query with the namespaces declared in the USING clause and default namespaces.
startParsing [line 204]
Start parsing of the tokenized query string.
tokenize [line 178]
void tokenize(
string
$queryString)
|
|
Divide the query string into tokens.
A token is either: ' ' or "\n" or "\r" or '\t' or ',' or '(' or ')' or a string containing any character except from the above.
Parameters:
_checkComma [line 859]
void _checkComma(
string
$commaExpected, string
$clause_error)
|
|
Check if the query string of the given clause contains an undesired ','.
If a comma was correctly placed then remove it and clear all whitespaces.
Parameters:
_checkRegExQuotation [line 1239]
void _checkRegExQuotation(
string
$filterString, string
$lQuotMark, string
$rQuotMark)
|
|
Throw an error if the regular expression from the AND clause is not quoted.
Parameters:
_checkSelectVars [line 1198]
Check if all variables from the SELECT clause are defined in the WHERE clause
_clearWhiteSpaces [line 839]
void _clearWhiteSpaces(
)
|
|
Remove whitespace-tokens from the array $this->tokens
_isDefined [line 1216]
string _isDefined(
$var
$var)
|
|
Check if the given variable is defined in the WHERE clause.
Parameters:
_replaceNamespacePrefix [line 1183]
string _replaceNamespacePrefix(
string
$qName,
$clause_error, string
$clasue_error)
|
|
Replace a prefix in a given QName and return a full URI.
Parameters:
_validateLiteral [line 1035]
array _validateLiteral(
string
$token)
|
|
Check if $token is the first token of a valid literal ("LITERAL") and return an array with literal properties (value, language, datatype).
Parameters:
_validateNCName [line 1146]
boolean _validateNCName(
string
$token)
|
|
Check if the given token is a valid NCName.
Parameters:
_validatePrefix [line 1163]
string _validatePrefix(
string
$token)
|
|
Check if the given token is a valid namespace prefix.
Parameters:
_validateQName [line 1120]
boolean _validateQName(
string
$token, string
$clause_error)
|
|
Check if the given token is a valid QName.
Parameters:
_validateURI [line 977]
string _validateURI(
string
$token, string
$clause_error)
|
|
Check if $token is the first token of a valid URI (<URI>) and return the whole URI string
Parameters:
_validateVar [line 956]
string _validateVar(
string
$token,
$clause_error, string
$clause)
|
|
Check if the given token is a valid variable name (?var).
Parameters:
_validateVarUri [line 885]
array _validateVarUri(
string
$token)
|
|
Check if the given token is either a variable (?var) or the first token of an URI (<URI>).
In case of an URI this function returns the whole URI string.
Parameters:
_validateVarUriLiteral [line 916]
array _validateVarUriLiteral(
string
$token)
|
|
Check if the given token is either a variable (?var) or the first token of either an URI (<URI>) or a literal ("Literal").
In case of a literal return an array with literal properties (value, language, datatype). In case of a variable or an URI return only ['value'] = string.
Parameters: