Class PrimitiveXNodeImpl<T>
java.lang.Object
com.evolveum.midpoint.prism.AbstractFreezable
com.evolveum.midpoint.prism.impl.xnode.XNodeImpl
com.evolveum.midpoint.prism.impl.xnode.PrimitiveXNodeImpl<T>
- All Implemented Interfaces:
- Copyable<XNode>,- Freezable,- Visitable<XNode>,- MetadataAware,- PrimitiveXNode<T>,- XNode,- DebugDumpable,- Serializable,- Cloneable
- See Also:
- 
Field SummaryFields inherited from class com.evolveum.midpoint.prism.impl.xnode.XNodeImplelementName, KEY_CONTAINER_ID, KEY_OID, KEY_REFERENCE_DESCRIPTION, KEY_REFERENCE_FILTER, KEY_REFERENCE_OBJECT, KEY_REFERENCE_OID, KEY_REFERENCE_REFERENTIAL_INTEGRITY, KEY_REFERENCE_RELATION, KEY_REFERENCE_RESOLUTION_TIME, KEY_REFERENCE_TARGET_NAME, KEY_REFERENCE_TYPE, KEY_VERSION, maxOccurs, parent, typeQNameFields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRING
- 
Constructor SummaryConstructorsConstructorDescriptionPrimitiveXNodeImpl(T value) PrimitiveXNodeImpl(T value, PrismNamespaceContext ctx) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidcopy()debugDump(int indent) booleangetDesc()Returns a value that is correctly string-formatted according to its type definition.Returns formatted parsed value without actually changing node state from UNPARSED to PARSED (if node is originally unparsed).<X> XgetParsedValue(@NotNull QName typeName, @Nullable Class<X> expectedClass) <X> XgetParsedValue(@NotNull QName typeName, @Nullable Class<X> expectedClass, XNodeProcessorEvaluationMode mode) getParsedValueWithoutRecording(QName typeName) Returns parsed value without actually changing node state from UNPARSED to PARSED (if node is originally unparsed).This method is used with conjunction with getStringValue, typically when serializing unparsed values.Returns the value represented as string - in the best format that we can.getValue()inthashCode()The basic idea of equals() is: - if parsed, compare the value; - if unparsed, compare getStringValue() Therefore the hashcode is generated based on value (if parsed) or getStringValue() (if unparsed).booleanbooleanisEmpty()booleanisInfra()booleanisParsed()voidvoidsetAttribute(boolean isAttribute) voidsetInfra(boolean value) voidsetMetadataNodes(@NotNull List<MapXNode> metadataNodes) voidvoidsetValue(T value, QName typeQName, SerializationOptions options) voidsetValueParser(ValueParser<T> valueParser) toString()Methods inherited from class com.evolveum.midpoint.prism.impl.xnode.XNodeImplclone, cloneTransformKeys, copyCommonAttributesFrom, copyCommonTo, dumpSuffix, getComment, getElementName, getLineNumber, getMaxOccurs, getOriginDescription, getOriginFile, getParent, getParserData, getTypeQName, isExplicitTypeDeclaration, isHeterogeneousList, isSingleEntryMap, namespaceContext, setComment, setElementName, setExplicitTypeDeclaration, setLineNumber, setMaxOccurs, setOriginDescription, setOriginFile, setParent, setParserData, setTypeQName, toRootXNodeMethods inherited from class com.evolveum.midpoint.prism.AbstractFreezablefreeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutableMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpabledebugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.prism.FreezablecheckImmutable, checkMutable, freeze, isImmutableMethods inherited from interface com.evolveum.midpoint.prism.xnode.MetadataAwareaddMetadataNodeMethods inherited from interface com.evolveum.midpoint.prism.xnode.XNodeclone, frozen, getMaxOccurs, getTypeQName, hasMetadata, isExplicitTypeDeclaration, namespaceContext, toRootXNode
- 
Constructor Details- 
PrimitiveXNodeImplpublic PrimitiveXNodeImpl()
- 
PrimitiveXNodeImpl
- 
PrimitiveXNodeImpl
- 
PrimitiveXNodeImpl
 
- 
- 
Method Details- 
getValue- Specified by:
- getValuein interface- PrimitiveXNode<T>
 
- 
getParsedValuepublic <X> X getParsedValue(@NotNull @NotNull QName typeName, @Nullable @Nullable Class<X> expectedClass) throws SchemaException - Specified by:
- getParsedValuein interface- PrimitiveXNode<T>
- Throws:
- SchemaException
 
- 
getParsedValuepublic <X> X getParsedValue(@NotNull @NotNull QName typeName, @Nullable @Nullable Class<X> expectedClass, XNodeProcessorEvaluationMode mode) throws SchemaException - Throws:
- SchemaException
 
- 
getValueParser- Specified by:
- getValueParserin interface- PrimitiveXNode<T>
 
- 
setValueParser
- 
setValue
- 
setValue
- 
isParsedpublic boolean isParsed()- Specified by:
- isParsedin interface- PrimitiveXNode<T>
 
- 
isAttributepublic boolean isAttribute()
- 
setAttributepublic void setAttribute(boolean isAttribute) 
- 
isEmptypublic boolean isEmpty()
- 
getParsedValueWithoutRecordingReturns parsed value without actually changing node state from UNPARSED to PARSED (if node is originally unparsed). Useful when we are not sure about the type name and do not want to record parsed value based on wrong type name.- Throws:
- SchemaException
 
- 
getFormattedValueReturns a value that is correctly string-formatted according to its type definition. Works properly only if definition is set.
- 
getGuessedFormattedValueReturns formatted parsed value without actually changing node state from UNPARSED to PARSED (if node is originally unparsed). Useful e.g. to serialize nodes that have a type declaration but were not parsed yet. Experimental. Should be thought through yet.- Specified by:
- getGuessedFormattedValuein interface- PrimitiveXNode<T>
- Returns:
- properly formatted value
- Throws:
- SchemaException
 
- 
accept
- 
debugDump- Specified by:
- debugDumpin interface- DebugDumpable
 
- 
getDesc
- 
toString
- 
getStringValueDescription copied from interface:PrimitiveXNodeReturns the value represented as string - in the best format that we can. There is no guarantee that the returned value will be precise. This method is used as a "last instance" if everything else fails. Invocation of this method will not change the state of this xnode, e.g. it will NOT cause it to be parsed.- Specified by:
- getStringValuein interface- PrimitiveXNode<T>
 
- 
getRelevantNamespaceDeclarationsThis method is used with conjunction with getStringValue, typically when serializing unparsed values. Because the string value can represent QName or ItemPath, we have to provide relevant namespace declarations. Because we cannot know for sure, we are allowed to return namespace declarations that are not actually used. We should minimize number of such declarations, however. Current implementation simply grabs all potential namespace declarations and searches the xnode's string value for any 'prefix:' substrings. I'm afraid it is all we can do for now. THIS METHOD SHOULD BE CALLED ONLY ON EITHER UNPARSED OR EMPTY NODES.
- 
equals
- 
hashCodepublic int hashCode()The basic idea of equals() is: - if parsed, compare the value; - if unparsed, compare getStringValue() Therefore the hashcode is generated based on value (if parsed) or getStringValue() (if unparsed).
- 
performFreezepublic void performFreeze()- Overrides:
- performFreezein class- AbstractFreezable
 
- 
copy
- 
getMetadataNodes- Specified by:
- getMetadataNodesin interface- MetadataAware
 
- 
setMetadataNodes- Specified by:
- setMetadataNodesin interface- MetadataAware
 
- 
setInfrapublic void setInfra(boolean value) 
- 
isInfrapublic boolean isInfra()
 
-