|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.glitter.syntax.abstrakt.TreeNode
org.openanzo.glitter.syntax.abstrakt.GraphPattern
org.openanzo.glitter.syntax.abstrakt.Optional
public class Optional
Represents an OPTIONAL pattern in a SPARQL query, which consists possibly of a pattern that must match the underlying data, and a pattern that optionally might match the underlying data.
| Constructor Summary | |
|---|---|
Optional(GraphPattern mayMatch)
Constructs an Optional only from an optional pattern. |
|
Optional(GraphPattern mustMatch,
GraphPattern mayMatch,
java.lang.Iterable<Expression> filters)
Constructs an Optional from a pattern that must match, one that optionally matches,
and a collection of filter expressions. |
|
| Method Summary | |
|---|---|
void |
addChild(TreeNode child)
Adds the given child at the end of this node's children. |
java.util.Iterator<GraphPattern> |
getChildren()
|
java.util.Set<Expression> |
getFilters()
Default implementation of TreeNode.getFilters(). |
GraphPattern |
getMayMatchPattern()
|
GraphPattern |
getMustMatchPattern()
|
boolean |
removeChild(TreeNode child)
Removes the given child from the collection of children |
boolean |
replaceChild(TreeNode oldChild,
TreeNode newChild)
Changes the tree below this node by replacing oldChild with newChild |
java.lang.String |
toString()
|
| Methods inherited from class org.openanzo.glitter.syntax.abstrakt.TreeNode |
|---|
containsVariable, getBindableVariableCount, getBindableVariableSet, getInScopeFilterSet, getParent, getRoot, getVariableCount, getVariableSet, invalidateCache, invalidateCache, mightBindVariable, prettyPrint, prettyPrint |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Optional(GraphPattern mustMatch,
GraphPattern mayMatch,
java.lang.Iterable<Expression> filters)
Optional from a pattern that must match, one that optionally matches,
and a collection of filter expressions.
mustMatch - mayMatch - filters - public Optional(GraphPattern mayMatch)
Optional only from an optional pattern.
mayMatch - | Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Iterator<GraphPattern> getChildren()
getChildren in class TreeNodeIterator over the children of this node.public GraphPattern getMustMatchPattern()
public GraphPattern getMayMatchPattern()
public java.util.Set<Expression> getFilters()
TreeNodeTreeNode.getFilters(). Most tree nodes cannot contain filters.
getFilters in class TreeNodeTreeNode.getFilters().
public boolean replaceChild(TreeNode oldChild,
TreeNode newChild)
TreeNode
replaceChild in class TreeNodepublic boolean removeChild(TreeNode child)
TreeNode
removeChild in class TreeNodepublic void addChild(TreeNode child)
TreeNode
addChild in class TreeNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||