Package org.apache.jena.sparql.core
Class Var
- java.lang.Object
-
- org.apache.jena.graph.Node
-
- org.apache.jena.graph.Node_Fluid
-
- org.apache.jena.graph.Node_Variable
-
- org.apache.jena.sparql.core.Var
-
- All Implemented Interfaces:
java.io.Serializable
public class Var extends Node_Variable
A SPARQL variable- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.jena.graph.Node_Variable
Node_Variable.VariableName
-
Nested classes/interfaces inherited from class org.apache.jena.graph.Node
Node.NotLiteral
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Var
alloc(java.lang.String varName)
static Var
alloc(Node v)
static Var
alloc(Node_Variable v)
static Var
alloc(Var v)
static Var
alloc(ExprVar nv)
Node
asNode()
static java.lang.String
canonical(java.lang.String x)
boolean
equals(java.lang.Object other)
java.lang.String
getVarName()
int
hashCode()
boolean
isAllocVar()
static boolean
isAllocVar(Node node)
static boolean
isAllocVarName(java.lang.String x)
boolean
isAnonVar()
static boolean
isAnonVar(Var var)
boolean
isBlankNodeVar()
static boolean
isBlankNodeVar(Node node)
static boolean
isBlankNodeVarName(java.lang.String x)
boolean
isNamedVar()
static boolean
isNamedVar(Node node)
static boolean
isNamedVarName(java.lang.String x)
static boolean
isRenamedVar(java.lang.String x)
static boolean
isRenamedVar(Node node)
static boolean
isVar(Node node)
static Node
lookup(java.util.function.Function<Var,Node> access, Node node)
Return the value of the access function or node itself.static Node
lookup(java.util.function.Function<Var,Node> access, Var var)
Return the value of the access function or var itself.static Node
lookup(Binding binding, Node node)
Return the value in the binding (if node is a Var) or the node itself.static Node
lookup(Binding binding, Var var)
Return the value in the binding or the variable itself.static java.util.List<Var>
varList(java.util.Collection<java.lang.String> varNames)
Convert a collection of variable names to variablesstatic java.util.List<java.lang.String>
varNames(java.util.Collection<Var> vars)
Return a list of String names from a collection of variables-
Methods inherited from class org.apache.jena.graph.Node_Variable
getName, isVariable, toString, variable, visitWith
-
Methods inherited from class org.apache.jena.graph.Node_Fluid
isConcrete
-
Methods inherited from class org.apache.jena.graph.Node
getBlankNodeId, getBlankNodeLabel, getGraph, getIndexingValue, getLiteral, getLiteralDatatype, getLiteralDatatypeURI, getLiteralIsXML, getLiteralLanguage, getLiteralLexicalForm, getLiteralValue, getLocalName, getNameSpace, getTriple, getURI, hasURI, isBlank, isExt, isLiteral, isNodeGraph, isNodeTriple, isURI, matches, sameValueAs, toString, toString, toString
-
-
-
-
Field Detail
-
ANON
public static Var ANON
-
-
Method Detail
-
alloc
public static Var alloc(java.lang.String varName)
-
alloc
public static Var alloc(Node_Variable v)
-
lookup
public static Node lookup(Binding binding, Node node)
Return the value in the binding (if node is a Var) or the node itself.
-
lookup
public static Node lookup(Binding binding, Var var)
Return the value in the binding or the variable itself.
-
lookup
public static Node lookup(java.util.function.Function<Var,Node> access, Node node)
Return the value of the access function or node itself.
-
lookup
public static Node lookup(java.util.function.Function<Var,Node> access, Var var)
Return the value of the access function or var itself.
-
asNode
public Node asNode()
-
getVarName
public java.lang.String getVarName()
-
equals
public final boolean equals(java.lang.Object other)
- Overrides:
equals
in classNode_Variable
-
isNamedVar
public boolean isNamedVar()
-
isBlankNodeVar
public boolean isBlankNodeVar()
-
isAllocVar
public boolean isAllocVar()
-
isAnonVar
public boolean isAnonVar()
-
canonical
public static java.lang.String canonical(java.lang.String x)
-
isVar
public static boolean isVar(Node node)
-
isRenamedVar
public static boolean isRenamedVar(Node node)
-
isRenamedVar
public static boolean isRenamedVar(java.lang.String x)
-
isNamedVar
public static boolean isNamedVar(Node node)
-
isNamedVarName
public static boolean isNamedVarName(java.lang.String x)
-
isBlankNodeVar
public static boolean isBlankNodeVar(Node node)
-
isBlankNodeVarName
public static boolean isBlankNodeVarName(java.lang.String x)
-
isAllocVar
public static boolean isAllocVar(Node node)
-
isAllocVarName
public static boolean isAllocVarName(java.lang.String x)
-
varList
public static java.util.List<Var> varList(java.util.Collection<java.lang.String> varNames)
Convert a collection of variable names to variables
-
isAnonVar
public static boolean isAnonVar(Var var)
-
varNames
public static java.util.List<java.lang.String> varNames(java.util.Collection<Var> vars)
Return a list of String names from a collection of variables
-
-