- All Superinterfaces:
IAnyAtomicItem,IAtomicValuedItem,ICollectionValue,IItem
- All Known Subinterfaces:
IEmailAddressItem,IHostnameItem,INcNameItem,ITokenItem,IUuidItem
An atomic Metapath item containing a text data value.
-
Method Summary
Modifier and TypeMethodDescriptiondefault IStringItemConverts this atomic item to a string item representation.static IStringItemcast(IAnyAtomicItem item) Cast the provided type to this item type.default IStringItemcastAsType(IAnyAtomicItem item) Cast the provideditemto be the same type as this item.default intcompareTo(IStringItem other) Compares this value with the argument.default IBase64BinaryItemencode()Encode this string as base64.default IAtomicOrUnionType<? extends IStringItem>getType()Get the type information for the item.default intlength()Get the length of the string.An implementation of fn::normalize-space.static IAtomicOrUnionType<IStringItem>type()Get the type information for this item.static IStringItemConstruct a new item using the provided stringvalue.Methods inherited from interface dev.metaschema.core.metapath.item.atomic.IAnyAtomicItem
accept, asMapKey, asString, 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 item using the provided stringvalue.- Parameters:
value- a string value that must conform to Metaschema string validation rules- Returns:
- the new item
- Throws:
InvalidTypeMetapathException- if the value fails string validation
-
encode
Encode this string as base64.- Returns:
- the base64 encoded text
-
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
-
asStringItem
Description copied from interface:IAnyAtomicItemConverts this atomic item to a string item representation.- Specified by:
asStringItemin interfaceIAnyAtomicItem- Returns:
- a new
IStringItemcontaining the string representation of this item - See Also:
-
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
-
compareTo
Compares this value with the argument. Ordering is in lexical dictionary order.- Parameters:
other- 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.
-
normalizeSpace
An implementation of fn::normalize-space.- Returns:
- the normalized string value for this string
-
length
default int length()Get the length of the string.- Returns:
- the length
-