Show:

The GroupGraphPattern combines multiple GraphPatterns

Constructor

GroupGraphPattern

(
  • elements
)

Parameters:

  • elements GraphPattern | Array
    • Initial GraphPattern items for the GroupGraphPattern

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: