GroupGraphPattern Class
Extends GraphPattern
Defined in:
src/sparql/group-graph-pattern.js:6
The GroupGraphPattern combines multiple GraphPatterns
Constructor
GroupGraphPattern
(
-
elements
Parameters:
-
elements
GraphPattern | Array- Initial GraphPattern items for the GroupGraphPattern
Item Index
Methods
addElement
(
-
element
-
atIndex
Adds an element to the pattern
Parameters:
-
element
Object- Single item to add
-
atIndex
Number- Optional index for the added element (default is end of list)
clear
()
Clear the pattern
countElements
()
Number
Get the element count
Returns:
Number:
getElements
()
Array
Retrieves the elements from the pattern
Returns:
Array:
removeElements
(
-
atIndex
-
count
Removes one or more elements from the pattern
Parameters:
-
atIndex
Number- Index of item to remove (default is first)
-
count
Number- Number of elements to remove (default is 1)
toString
()
String
Retrieves the SPARQL string representation of the current instance
Returns:
String: