Class RawType
- java.lang.Object
-
- com.evolveum.prism.xml.ns._public.types_3.RawType
-
- All Implemented Interfaces:
JaxbVisitable
,Revivable
,ShortDumpable
,Serializable
,Cloneable
,org.jvnet.jaxb2_commons.lang.Equals
public class RawType extends Object implements Serializable, Cloneable, org.jvnet.jaxb2_commons.lang.Equals, Revivable, ShortDumpable, JaxbVisitable
A class used to hold raw XNodes until the definition for such an object is known.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RawType(PrismContext prismContext)
RawType(PrismValue parsed, QName explicitTypeName, PrismContext prismContext)
RawType(XNode node, PrismContext prismContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(JaxbVisitor visitor)
RawType
clone()
static RawType
create(XNode node, PrismContext prismContext)
static RawType
create(String value, PrismContext prismContext)
boolean
equals(Object obj)
boolean
equals(org.jvnet.jaxb2_commons.locator.ObjectLocator thisLocator, org.jvnet.jaxb2_commons.locator.ObjectLocator thatLocator, Object that, org.jvnet.jaxb2_commons.lang.EqualsStrategy equalsStrategy)
String
extractString()
TEMPORARY.String
extractString(String defaultValue)
static RawType
fromPropertyRealValue(Object realValue, QName explicitTypeName, PrismContext prismContext)
PrismValue
getAlreadyParsedValue()
QName
getExplicitTypeName()
<IV extends PrismValue,ID extends ItemDefinition>
Item<IV,ID>getParsedItem(ID itemDefinition)
<IV extends PrismValue,ID extends ItemDefinition>
Item<IV,ID>getParsedItem(ID itemDefinition, QName itemName)
<V,ID extends ItemDefinition>
VgetParsedRealValue(ID itemDefinition, ItemPath itemPath)
<T> T
getParsedRealValue(Class<T> clazz)
<IV extends PrismValue,ID extends ItemDefinition>
IVgetParsedValue(ItemDefinition itemDefinition, QName itemName)
PrismContext
getPrismContext()
RootXNode
getRootXNode(QName itemName)
Object
getValue()
Object
getValue(boolean store)
Extracts a "real value" from RawType object without expecting any specific type beforehand.static Object
getValue(Object value)
Extracts a "real value" from a potential RawType object without expecting any specific type beforehand.XNode
getXnode()
String
guessFormattedValue()
int
hashCode()
boolean
isParsed()
void
revive(PrismContext prismContext)
XNode
serializeToXNode()
void
shortDump(StringBuilder sb)
Show the content of the object intended for diagnostics.String
toString()
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
-
-
-
Constructor Detail
-
RawType
public RawType(PrismContext prismContext)
-
RawType
public RawType(XNode node, @NotNull PrismContext prismContext)
-
RawType
public RawType(PrismValue parsed, QName explicitTypeName, @NotNull PrismContext prismContext)
-
-
Method Detail
-
fromPropertyRealValue
public static RawType fromPropertyRealValue(Object realValue, QName explicitTypeName, @NotNull PrismContext prismContext)
-
getValue
public static Object getValue(Object value) throws SchemaException
Extracts a "real value" from a potential RawType object without expecting any specific type beforehand. (Useful e.g. for determining value of xsd:anyType XML property.)- Throws:
SchemaException
-
getValue
public Object getValue() throws SchemaException
- Throws:
SchemaException
-
getValue
public Object getValue(boolean store) throws SchemaException
Extracts a "real value" from RawType object without expecting any specific type beforehand. If no explicit type is present, assumes xsd:string (and fails if the content is structured).- Throws:
SchemaException
-
extractString
public String extractString()
TEMPORARY. EXPERIMENTAL. DO NOT USE.
-
revive
public void revive(PrismContext prismContext) throws SchemaException
- Specified by:
revive
in interfaceRevivable
- Throws:
SchemaException
-
getXnode
public XNode getXnode()
-
getPrismContext
public PrismContext getPrismContext()
-
getExplicitTypeName
public QName getExplicitTypeName()
-
getParsedValue
public <IV extends PrismValue,ID extends ItemDefinition> IV getParsedValue(@Nullable ItemDefinition itemDefinition, @Nullable QName itemName) throws SchemaException
- Throws:
SchemaException
-
getParsedRealValue
public <V,ID extends ItemDefinition> V getParsedRealValue(ID itemDefinition, ItemPath itemPath) throws SchemaException
- Throws:
SchemaException
-
getAlreadyParsedValue
public PrismValue getAlreadyParsedValue()
-
getParsedRealValue
public <T> T getParsedRealValue(@NotNull Class<T> clazz) throws SchemaException
- Throws:
SchemaException
-
getParsedItem
public <IV extends PrismValue,ID extends ItemDefinition> Item<IV,ID> getParsedItem(ID itemDefinition) throws SchemaException
- Throws:
SchemaException
-
getParsedItem
public <IV extends PrismValue,ID extends ItemDefinition> Item<IV,ID> getParsedItem(ID itemDefinition, QName itemName) throws SchemaException
- Throws:
SchemaException
-
serializeToXNode
public XNode serializeToXNode() throws SchemaException
- Throws:
SchemaException
-
equals
public boolean equals(org.jvnet.jaxb2_commons.locator.ObjectLocator thisLocator, org.jvnet.jaxb2_commons.locator.ObjectLocator thatLocator, Object that, org.jvnet.jaxb2_commons.lang.EqualsStrategy equalsStrategy)
- Specified by:
equals
in interfaceorg.jvnet.jaxb2_commons.lang.Equals
-
create
public static RawType create(String value, PrismContext prismContext)
-
create
public static RawType create(XNode node, PrismContext prismContext)
-
shortDump
public void shortDump(StringBuilder sb)
Description copied from interface:ShortDumpable
Show the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.- Specified by:
shortDump
in interfaceShortDumpable
- Parameters:
sb
- StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
-
isParsed
public boolean isParsed()
-
guessFormattedValue
public String guessFormattedValue() throws SchemaException
- Throws:
SchemaException
-
accept
public void accept(JaxbVisitor visitor)
- Specified by:
accept
in interfaceJaxbVisitable
-
-