- All Superinterfaces:
IAnyAtomicItem,IAtomicValuedItem,ICollectionValue,IItem
- All Known Subinterfaces:
IUriReferenceItem
An atomic Metapath item containing a URI data value.
-
Method Summary
Modifier and TypeMethodDescriptionasUri()Get the "wrapped" URI value.static IAnyUriItemcast(IAnyAtomicItem item) Cast the provided type to this item type.default IAnyUriItemcastAsType(IAnyAtomicItem item) Cast the provideditemto be the same type as this item.default intcompareTo(IAnyUriItem item) Compares this value with the argument.default IAtomicOrUnionType<? extends IAnyUriItem>getType()Get the type information for the item.default booleanDetermines if this URI has a scheme component, making it absolute.default booleanisOpaque()Determines if this URI is opaque.default IAnyUriItemresolve(IAnyUriItem other) Resolve the provided URI against this URI.static IAtomicOrUnionType<IAnyUriItem>type()Get the type information for this item.static IAnyUriItemConstruct a new URI item using the provided stringvalue.static IAnyUriItemConstruct a new URI item using the provided URIvalue.Methods inherited from interface dev.metaschema.core.metapath.item.atomic.IAnyAtomicItem
accept, asMapKey, asString, asStringItem, atomize, deepEquals, getJavaTypeAdapter, getValue, toAtomicItemMethods inherited from interface dev.metaschema.core.metapath.item.ICollectionValue
deepEquals, toSignatureMethods inherited from interface dev.metaschema.core.metapath.item.IItem
contentsAsSequence, flatten, hasValue, toSequence
-
Method Details
-
type
Get the type information for this item.- Returns:
- the type information
-
getType
Description copied from interface:IItemGet the type information for the item. -
valueOf
Construct a new URI item using the provided stringvalue.- Parameters:
value- a string representing a URI- Returns:
- the new item
- Throws:
InvalidTypeMetapathException- if the given string violates RFC2396
-
valueOf
Construct a new URI item using the provided URIvalue.Example usage:
URI uri = URI.create("http://example.com"); IAnyUriItem item = IAnyUriItem.valueOf(uri);- Parameters:
value- a URI- Returns:
- the new item as a
IAnyUriItemif the URI is absolute or opaque, otherwise as anIUriReferenceItem
-
cast
Cast the provided type to this item type.- Parameters:
item- the item to cast- Returns:
- the original item if it is already this type, otherwise a new item cast to this type
- Throws:
InvalidValueForCastFunctionException- if the provideditemcannot be cast to this type
-
castAsType
Description copied from interface:IAnyAtomicItemCast the provideditemto be the same type as this item.- Specified by:
castAsTypein interfaceIAnyAtomicItem- Parameters:
item- the item to cast- Returns:
- an atomic item of this type
-
asUri
Get the "wrapped" URI value.- Returns:
- the underlying URI value
-
isAbsolute
default boolean isAbsolute()Determines if this URI has a scheme component, making it absolute.- Returns:
trueif the URI is absolute, orfalseotherwise
-
isOpaque
default boolean isOpaque()Determines if this URI is opaque.- Returns:
trueif the URI is opaque, orfalseotherwise- See Also:
-
resolve
Resolve the provided URI against this URI.- Parameters:
other- the URI to resolve- Returns:
- the resolved URI
- See Also:
-
compareTo
Compares this value with the argument.- Parameters:
item- the item to compare with this value- Returns:
- a negative integer, zero, or a positive integer if this value is less
than, equal to, or greater than the
item.
-