Class HexBinaryValue
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.value.SimpleValue<V>
-
- org.ow2.authzforce.core.pdp.api.value.StringParseableValue<byte[]>
-
- org.ow2.authzforce.core.pdp.api.value.HexBinaryValue
-
- All Implemented Interfaces:
AttributeValue
,PrimitiveValue
,Value
public final class HexBinaryValue extends StringParseableValue<byte[]>
Representation of a xs:hexBinary value. This class supports parsing xs:hexBinary values. All objects of this class are immutable and all methods of the class are thread-safe. The choice of the Java type byte[] is based on JAXB schema-to-Java mapping spec: https://docs.oracle.com/javase/tutorial/jaxb/intro/bind.html- Version:
- $Id: $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ow2.authzforce.core.pdp.api.value.StringParseableValue
StringParseableValue.Factory<AV extends AttributeValue>
-
Nested classes/interfaces inherited from class org.ow2.authzforce.core.pdp.api.value.SimpleValue
SimpleValue.BaseFactory<AV extends AttributeValue>
-
-
Field Summary
-
Fields inherited from class org.ow2.authzforce.core.pdp.api.value.SimpleValue
value
-
-
Constructor Summary
Constructors Constructor Description HexBinaryValue(byte[] value)
Creates a newHexBinaryAttributeValue
that represents the byte [] value supplied.HexBinaryValue(String val)
Returns a newHexBinaryAttributeValue
that represents the xsi:hexBinary value indicated by the string provided.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
net.sf.saxon.s9api.XdmItem
getXdmItem()
int
hashCode()
String
printXML()
Converts the internal value (accessible viaSimpleValue.getUnderlyingValue()
) to a valid lexical representation for XML marshalling.-
Methods inherited from class org.ow2.authzforce.core.pdp.api.value.StringParseableValue
getXmlAttributes
-
Methods inherited from class org.ow2.authzforce.core.pdp.api.value.SimpleValue
getContent, getUnderlyingValue, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ow2.authzforce.core.pdp.api.value.PrimitiveValue
getXdmValue
-
-
-
-
Constructor Detail
-
HexBinaryValue
public HexBinaryValue(byte[] value)
Creates a newHexBinaryAttributeValue
that represents the byte [] value supplied.- Parameters:
value
- thebyte []
value to be represented
-
HexBinaryValue
public HexBinaryValue(String val) throws IllegalArgumentException
Returns a newHexBinaryAttributeValue
that represents the xsi:hexBinary value indicated by the string provided.- Parameters:
val
- a string representing the desired value- Throws:
IllegalArgumentException
- ifval
is not a valid string representation of xs:hexBinary
-
-
Method Detail
-
getXdmItem
public net.sf.saxon.s9api.XdmItem getXdmItem()
- Returns:
- corresponding XPath (XDM) value
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classSimpleValue<byte[]>
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classSimpleValue<byte[]>
-
printXML
public String printXML()
Converts the internal value (accessible viaSimpleValue.getUnderlyingValue()
) to a valid lexical representation for XML marshalling. Equivalent to the 'printMethod' in JAXB 'javaType' binding customizations. Implementations of this typically callDatatypeConverter
. This method is called bySimpleValue.getContent()
and its result cached by the same method for later use. Therefore, no need to cache the result in the implementation.- Specified by:
printXML
in classSimpleValue<byte[]>
- Returns:
- XML-valid lexical representation.
-
-