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 Varalloc(java.lang.String varName)static Varalloc(Node v)static Varalloc(Node_Variable v)static Varalloc(Var v)static Varalloc(ExprVar nv)NodeasNode()static java.lang.Stringcanonical(java.lang.String x)booleanequals(java.lang.Object other)java.lang.StringgetVarName()inthashCode()booleanisAllocVar()static booleanisAllocVar(Node node)static booleanisAllocVarName(java.lang.String x)booleanisAnonVar()static booleanisAnonVar(Var var)booleanisBlankNodeVar()static booleanisBlankNodeVar(Node node)static booleanisBlankNodeVarName(java.lang.String x)booleanisNamedVar()static booleanisNamedVar(Node node)static booleanisNamedVarName(java.lang.String x)static booleanisRenamedVar(java.lang.String x)static booleanisRenamedVar(Node node)static booleanisVar(Node node)static Nodelookup(java.util.function.Function<Var,Node> access, Node node)Return the value of the access function or node itself.static Nodelookup(java.util.function.Function<Var,Node> access, Var var)Return the value of the access function or var itself.static Nodelookup(Binding binding, Node node)Return the value in the binding (if node is a Var) or the node itself.static Nodelookup(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, 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:
equalsin 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
-
-