Package org.basex.query.value.item
Class Uri
URI item (
xs:anyURI).- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks the URIs for equality.booleanThis function is e.g.booleanTests if this is an absolute URI.booleanisValid()Checks the validity of this URI.Appends the specified address.simplifyFor(CompileContext.Simplify mode, CompileContext cc) This function is called at compile time for expressions whose operands might be simplified.byte[]string()Returns the string value.byte[]Returns a string representation of the value.toJava()Returns a Java representation of the value.static Uriuri(byte[] value) Creates a new uri instance.static Uriuri(byte[] value, boolean normalize) Creates a new uri instance.static UriCreates a new uri instance.Methods inherited from class org.basex.query.value.item.AStr
bool, comparable, diff, eq, plan, sameKeyMethods inherited from class org.basex.query.value.item.Item
atomItem, atomSize, atomValue, cache, dbl, ddo, dec, description, ebv, equiv, flt, hash, input, instanceOf, item, itemAt, iter, itr, materialize, persistent, plan, refineType, reverse, score, seqType, size, subsequence, test, typeId, xdmInfoMethods inherited from class org.basex.query.value.Value
accept, checkUp, compile, copy, count, exprSize, has, inline, inlineable, isEmpty, isItem, iter, iterator, materialize, serialize, serialize, serialize, valueMethods inherited from class org.basex.query.expr.Expr
arg, args, atomIter, data, data, funcType, hasFreeVars, indexAccessible, isSimple, markTailCalls, mergeEbv, optimize, typeCheck, uses, vacuous, visitAllMethods inherited from class org.basex.query.expr.ExprInfo
toErrorString, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
EMPTY
Empty URI.
-
-
Method Details
-
uri
Creates a new uri instance.- Parameters:
value- value- Returns:
- uri instance
-
uri
Creates a new uri instance.- Parameters:
value- string value- Returns:
- uri instance
-
uri
Creates a new uri instance.- Parameters:
value- valuenormalize- chop leading and trailing whitespaces- Returns:
- uri instance
-
eq
Checks the URIs for equality.- Parameters:
uri- to be compared- Returns:
- result of check
-
resolve
Appends the specified address. If one of the URIs is invalid, the original uri is returned.- Parameters:
add- address to be appendedii- input info- Returns:
- new uri
- Throws:
QueryException- query exception
-
isAbsolute
public boolean isAbsolute()Tests if this is an absolute URI.- Returns:
- result of check
-
isValid
public boolean isValid()Checks the validity of this URI.- Returns:
- result of check
-
string
Description copied from class:ItemReturns a string representation of the value. -
string
public byte[] string()Returns the string value.- Returns:
- string value
-
simplifyFor
Description copied from class:ExprThis function is called at compile time for expressions whose operands might be simplified.- Overrides:
simplifyForin classExpr- Parameters:
mode- mode of simplificationcc- compilation context- Returns:
- simplified or original expression
- See Also:
-
toJava
Description copied from class:ValueReturns a Java representation of the value.- Specified by:
toJavain classValue- Returns:
- Java object
- Throws:
QueryException- query exception
-
equals
Description copied from class:ExprThis function is e.g. called by:If.optimize(CompileContext),Switch.optimize(CompileContext),Typeswitch.optimize(CompileContext), in order to discard identical expressions.CmpR.mergeEbv(Expr, boolean, CompileContext)orCmpSR.mergeEbv(Expr, boolean, CompileContext), in order to merge expressions with identical input.CmpG.optimize(CompileContext)orCmpV.optimize(CompileContext), in order to pre-evaluate equality tests.CmpG.optimize(CompileContext)orPos.get(Expr, CmpV.OpV, InputInfo, CompileContext), in order to compare the start and end value.PathCache, in order to find identical root values at runtime.
-