Package com.verisign.epp.codec.gen
Class EPPUtil
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPUtil
-
public class EPPUtil extends java.lang.Object
Provides a set of utility static methods for use by the EPP Codec classes.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DATE_FORMAT
Format used for the XML Schema date data type.static java.lang.String
DEFAULT_TIME_INSTANT_FORMAT
Default format used for the XML SchemadateTime
data type
-
Constructor Summary
Constructors Constructor Description EPPUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
appendChildren(org.w3c.dom.Element aSource, org.w3c.dom.Element aDest)
Appends the children Nodes ofaSource
as children nodes ofaDest
.static java.lang.String
collapseWhitespace(java.lang.String inString)
Collapse Whitespace, which means that all leading and trailing whitespace will be stripped, and all internal whitespace collapsed to single space characters.static java.math.BigDecimal
decodeBigDecimal(org.w3c.dom.Element aElement)
DecodeBigDecimal
, from an XML Element.static java.math.BigDecimal
decodeBigDecimal(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)
DecodeBigDecimal
, by XML namespace and tag name, from an XML Element.static java.lang.Boolean
decodeBoolean(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)
DecodeBoolean
, by XML namespace and tag name, from an XML Element.static boolean
decodeBooleanAttr(org.w3c.dom.Element aElement, java.lang.String aAttr)
Decodes a boolean attribute value given theElement
and attribute name.static EPPCodecComponent
decodeComp(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName, java.lang.Class aClass)
Decode aEPPCodecComponent
, by XML namespace and tag name, from an XML Element.static java.util.List
decodeCompList(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName, java.lang.Class aClass)
Decode aList
ofEPPCodecComponent
's, by XML namespace and tag name, from an XML Element.static java.util.Vector
decodeCompVector(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName, java.lang.Class aClass)
Decode aVector
ofEPPCodecComponent
's, by XML namespace and tag name, from an XML Element.static java.util.Date
decodeDate(java.lang.String aDateValue)
Decode an XML Schema date data type (YYYY-MM-DD) to a Java Date object.static java.util.Date
decodeDate(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)
DecodeDate
, by XML namespace and tag name, from an XML Element.static java.util.List
decodeEnumList(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName, java.lang.Class aEnumType)
Decode aList
ofEnum
's by XML namespace and tag name, from an XML Element.static java.lang.Integer
decodeInteger(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)
DecodeInteger
, by XML namespace and tag name, from an XML Element.static java.util.List
decodeIntegerList(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)
Decode aList
ofInteger
's by XML namespace and tag name, from an XML Element.static java.util.List
decodeList(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)
Decode aList
ofString
's by XML namespace and tag name, from an XML Element.static java.lang.String
decodeString(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)
DecodeString
, by XML namespace and tag name, from an XML Element.static java.lang.String
decodeStringAttr(org.w3c.dom.Element aElement, java.lang.String aAttr)
Decodes a string attribute by name.static java.lang.String
decodeStringValue(org.w3c.dom.Element aElement)
DecodeString
value from an XML Element.static java.util.Date
decodeTimeInstant(java.lang.String aTimeInstant)
Decode an XML Schema timeInstant data type to a Java Date object.static java.util.Date
decodeTimeInstant(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)
DecodeDate
, as date and time, by XML namespace and tag name, from an XML Element.static java.util.Vector
decodeVector(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)
Decode aVector
ofString
's by XML namespace and tag name, from an XML Element.static java.lang.String
encodeBase64(org.w3c.dom.Element aElement)
Base64 encode the XMLElement
tree.static void
encodeBigDecimal(org.w3c.dom.Document aDocument, org.w3c.dom.Element aElement, java.math.BigDecimal aBigDecimal, java.lang.String aFormat)
Encode aDouble
in XML with a given XML namespace and tag name.static void
encodeBigDecimal(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.math.BigDecimal aBigDecimal, java.lang.String aNS, java.lang.String aTagName, java.lang.String aFormat)
Encode aDouble
in XML with a given XML namespace and tag name.static void
encodeBoolean(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.lang.Boolean aBoolean, java.lang.String aNS, java.lang.String aTagName)
Encode aBoolean
in XML with a given XML namespace and tag name.static void
encodeBooleanAttr(org.w3c.dom.Element aElement, java.lang.String aAttr, boolean aVal)
Encodes a booleanElement
attribute value.static void
encodeComp(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, EPPCodecComponent aComp)
Encode aEPPCodecComponent
instance in XML.static void
encodeCompList(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.List aList)
Encode aList
ofEPPCodecComponent
's in XML.static void
encodeCompVector(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.Vector aVector)
Encode aVector
ofEPPCodecComponent
's in XML.static java.lang.String
encodeDate(java.util.Date aDate)
Encode a Java Date into an XML Schema date data type string.static void
encodeDate(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.Date aDate, java.lang.String aNS, java.lang.String aTagName)
Encode aDate
in XML with a given XML namespace and tag name.static void
encodeInteger(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.lang.Integer aInteger, java.lang.String aNS, java.lang.String aTagName)
Encode aInteger
in XML with a given XML namespace and tag name.static void
encodeIntegerList(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.List aList, java.lang.String aNS, java.lang.String aTagName)
Encode aList
ofInteger
's in XML with a given XML namespace and tag name.static void
encodeList(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.List aList, java.lang.String aNS, java.lang.String aTagName)
Encode aList
ofString
's in XML with a given XML namespace and tag name.static void
encodeNill(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.lang.String aNS, java.lang.String aTagName)
DOCUMENT ME!static void
encodeString(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.lang.String aString, java.lang.String aNS, java.lang.String aTagName)
Encode aString
in XML with a given XML namespace and tag name.static void
encodeStringList(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.List aList, java.lang.String aNS, java.lang.String aTagName)
static java.lang.String
encodeTimeInstant(java.util.Date aDate)
Encode a Java Date into an XML Schema timeInstant data type string.static void
encodeTimeInstant(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.Date aDate, java.lang.String aNS, java.lang.String aTagName)
Encode aDate
, as date and time, in XML with a given XML namespace and tag name.static void
encodeVector(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.Vector aVector, java.lang.String aNS, java.lang.String aTagName)
Encode aVector
ofString
's in XML with a given XML namespace and tag name.static boolean
equalLists(java.util.List aV1, java.util.List aV2)
compares twoList
instances.static boolean
equalVectors(java.util.Vector aV1, java.util.Vector aV2)
compares twoVector
instances.static java.util.Set<java.lang.String>
findDuplicateExtNamespaces(java.util.List<EPPCodecComponent> aExtensions)
Find the set of duplicate EPP extensions based on the list of EPP extensions.static java.util.Set<java.lang.String>
findExtNamespaces(java.util.List<EPPCodecComponent> aExtensions, java.util.List<java.lang.String> aFilterExtNamespaces)
Find the set of unique EPP extension XML namespaces based on the list of EPP extensions and the optional use of a list of XML namespaces to filter.static java.util.Set<java.lang.String>
findExtNamespaceSuffixes(java.util.List<EPPCodecComponent> aExtensions, java.util.List<java.lang.String> aFilterExtNamespaceSuffixes)
Find the set of unique EPP extension XML namespace suffixes based on the list of EPP extensions and the optional use of a list of XML namespace suffixes to filter.static java.util.Set<java.lang.String>
findUnsupportedExtNamespaces(java.util.List<java.lang.String> aSupportedExtNamespaces, java.util.List<EPPCodecComponent> aExtensions)
Find the set of unsupported EPP extensions based on passing the list of supported extension XML namespaces and the list of EPP extensions.static java.util.Set<java.lang.String>
findUnsupportedExtNamespaceSuffixes(java.util.List<java.lang.String> aSupportedExtNamespaceSuffixes, java.util.List<EPPCodecComponent> aExtensions)
Find the set of unsupported EPP extensions based on passing the list of supported extension XML namespace suffixes and the list of EPP extensions.static org.w3c.dom.Element
getElementByTagNameNS(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)
Gets the first direct child element with a given tag name and XML namespace.static java.util.Vector
getElementsByTagNameNS(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)
Gets all of the direct child element with a given tag name and XML namespace.static org.w3c.dom.Element
getFirstElementChild(org.w3c.dom.Element aElement)
Gets the first DOM Element Node of theaElement
DOM Element.static java.lang.String
getLocalName(java.lang.String aQualifiedName)
Gets the local name given the qualified element name.static org.w3c.dom.Element
getNextElementSibling(org.w3c.dom.Element aElement)
Gets the next sibling Element of a provided Element.static java.lang.String
getPrefix(java.lang.String aQualifiedName)
Gets the namespace prefix given a qualified name.static java.lang.String
getTextContent(org.w3c.dom.Node node)
A pass-thru to the getTextContent() method using a default value of false for the required flag.static java.lang.String
getTextContent(org.w3c.dom.Node node, boolean allowEmpty)
Return the text data within an XML tag.
<id>12345</id> yields the String "12345"
If the node==null, child==null, value==null, or value=="" => Exception
UNLESS allowEmpty, in which case return ""static java.lang.String
getTimeInstantFormat()
Gets the XML SchematimeDate
format used inand #encodeTimeInstant(Document, Element, Date, String, String)
.static boolean
listSubset(java.util.List aV1, java.util.List aV2)
Determines if oneList
is a subset of anotherList
.static java.lang.String
namespaceToNamespaceSuffix(java.lang.String aNamespace)
Convert an XML namespace to an XML namespace suffix.static java.lang.String
removeWhitespace(java.lang.String inString)
Remove Whitespace, which means that all whitespace will be stripped.static void
setTimeInstantFormat(java.lang.String aTimeInstantFormat)
Sets the XML SchematimeDate
format used inand #encodeTimeInstant(Document, Element, Date, String, String)
.static java.lang.String
toString(EPPCodecComponent aComponent)
Converts anEPPCodecComponent
to aString
for printing.static java.lang.String
toString(org.w3c.dom.Element aElement)
Converts anaElement
to aString
for printing.static java.lang.String
toStringNoIndent(org.w3c.dom.Element aElement)
Converts anaElement
to aString
for printing without pretty printing.static boolean
vectorSubset(java.util.Vector aV1, java.util.Vector aV2)
Determines if oneVector
is a subset of anotherVector
.
-
-
-
Field Detail
-
DEFAULT_TIME_INSTANT_FORMAT
public static final java.lang.String DEFAULT_TIME_INSTANT_FORMAT
Default format used for the XML SchemadateTime
data type- See Also:
- Constant Field Values
-
DATE_FORMAT
public static final java.lang.String DATE_FORMAT
Format used for the XML Schema date data type.- See Also:
- Constant Field Values
-
-
Method Detail
-
getTimeInstantFormat
public static java.lang.String getTimeInstantFormat()
Gets the XML SchematimeDate
format used inand #encodeTimeInstant(Document, Element, Date, String, String)
. The defauLt format is defined by the constantDEFAULT_TIME_INSTANT_FORMAT
and it can be overridden using thesetTimeInstantFormat(String)
method.- Returns:
- XML Schema
timeDate
format used inand #encodeTimeInstant(Document, Element, Date, String, String)
.
-
setTimeInstantFormat
public static void setTimeInstantFormat(java.lang.String aTimeInstantFormat)
Sets the XML SchematimeDate
format used inand #encodeTimeInstant(Document, Element, Date, String, String)
. The format must follow the format supported bySimpleDateFormat
.- Parameters:
aTimeInstantFormat
- XML SchematimeDate
format supported bySimpleDateFormat
.
-
appendChildren
public static void appendChildren(org.w3c.dom.Element aSource, org.w3c.dom.Element aDest)
Appends the children Nodes ofaSource
as children nodes ofaDest
.- Parameters:
aSource
- Source Element tree to get children fromaDest
- Destination Element to appendaSource
children.
-
decodeBigDecimal
public static java.math.BigDecimal decodeBigDecimal(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeException
DecodeBigDecimal
, by XML namespace and tag name, from an XML Element. The children elements ofaElement
will be searched for the specifiedaNS
namespace URI and the specifiedaTagName
. The first XML element found will be decoded and returned. If no element is found,null
is returned.- Parameters:
aElement
- XML Element to scan. For example, the element could be <domain:create>aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name is "domain:name".- Returns:
BigDecimal
value if found;null
otherwise.- Throws:
EPPDecodeException
- Error decodingaElement
.
-
decodeBigDecimal
public static java.math.BigDecimal decodeBigDecimal(org.w3c.dom.Element aElement) throws EPPDecodeException
DecodeBigDecimal
, from an XML Element. TheaElement
element will be decoded and returned. If element isnull
,null
is returned.- Parameters:
aElement
- XML Element to decode.- Returns:
BigDecimal
value ifaElement
is notnull
;null
otherwise.- Throws:
EPPDecodeException
- Error decodingaElement
.
-
decodeBoolean
public static java.lang.Boolean decodeBoolean(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeException
DecodeBoolean
, by XML namespace and tag name, from an XML Element. The children elements ofaElement
will be searched for the specifiedaNS
namespace URI and the specifiedaTagName
. The first XML element found will be decoded and returned. If no element is found,null
is returned.- Parameters:
aElement
- XML Element to scan. For example, the element could be <domain:create>aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name is "domain:name".- Returns:
Boolean
value if found;null
otherwise.- Throws:
EPPDecodeException
- Error decodingaElement
.
-
decodeBooleanAttr
public static boolean decodeBooleanAttr(org.w3c.dom.Element aElement, java.lang.String aAttr) throws EPPDecodeException
Decodes a boolean attribute value given theElement
and attribute name.- Parameters:
aElement
- Element with the attribute to look foraAttr
- Attribute name- Returns:
- Decoded boolean value
- Throws:
EPPDecodeException
- Cound not find attribute or the attribute value is not a valid boolean value
-
decodeStringAttr
public static java.lang.String decodeStringAttr(org.w3c.dom.Element aElement, java.lang.String aAttr)
Decodes a string attribute by name. If the attribute is not found,null
is returned.- Parameters:
aElement
- Element to search for the attributeaAttr
- Attribute name to search for- Returns:
- Attribute
String
value if exists;null
otherwise.
-
decodeComp
public static EPPCodecComponent decodeComp(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName, java.lang.Class aClass) throws EPPDecodeException
Decode aEPPCodecComponent
, by XML namespace and tag name, from an XML Element. The children elements ofaElement
will be searched for the specifiedaNS
namespace URI and the specifiedaTagName
. There first XML element found will be used to initial and instance ofaClass
.- Parameters:
aElement
- XML Element to scan. For example, the element could be <domain:update>aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name servers is "domain:server".aClass
- Class to instantiate for a found XML element. This must be a class that implementsEPPCodecComponent
- Returns:
- Instance of
aClass
that represents the found XML elements if found;null
otherwise. - Throws:
EPPDecodeException
- Error decodingaElement
.
-
decodeCompList
public static java.util.List decodeCompList(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName, java.lang.Class aClass) throws EPPDecodeException
Decode aList
ofEPPCodecComponent
's, by XML namespace and tag name, from an XML Element. The children elements ofaElement
will be searched for the specifiedaNS
namespace URI and the specifiedaTagName
. Each XML element found will result in the instantiation ofaClass
, which will decode the associated XML element and added to the returnedList
.- Parameters:
aElement
- XML Element to scan. For example, the element could be <domain:add>aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the contact elements of >domain:add> is "domain:contact".aClass
- Class to instantiate for each found XML element. This must be a class that implementsEPPCodecComponent
- Returns:
List
ofEPPCodecComponent
elements representing the found XML elements.- Throws:
EPPDecodeException
- Error decodingaElement
.
-
decodeCompVector
public static java.util.Vector decodeCompVector(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName, java.lang.Class aClass) throws EPPDecodeException
Decode aVector
ofEPPCodecComponent
's, by XML namespace and tag name, from an XML Element. The children elements ofaElement
will be searched for the specifiedaNS
namespace URI and the specifiedaTagName
. Each XML element found will result in the instantiation ofaClass
, which will decode the associated XML element and added to the returnedVector
.- Parameters:
aElement
- XML Element to scan. For example, the element could be <domain:add>aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the contact elements of <domain:add> is "domain:contact".aClass
- Class to instantiate for each found XML element. This must be a class that implementsEPPCodecComponent
- Returns:
Vector
ofEPPCodecComponent
elements representing the found XML elements.- Throws:
EPPDecodeException
- Error decodingaElement
.
-
decodeDate
public static java.util.Date decodeDate(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeException
DecodeDate
, by XML namespace and tag name, from an XML Element. The children elements ofaElement
will be searched for the specifiedaNS
namespace URI and the specifiedaTagName
. The first XML element found will be decoded and returned. If no element is found,null
is returned. The format used for decoding the date is defined by the constantEPPUtil.DATE_FORMAT
.- Parameters:
aElement
- XML Element to scan. For example, the element could be <trans-id>aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:epp".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the transaction Id date is "date".- Returns:
Date
value if found;null
otherwise.- Throws:
EPPDecodeException
- Error decodingaElement
.
-
decodeDate
public static java.util.Date decodeDate(java.lang.String aDateValue)
Decode an XML Schema date data type (YYYY-MM-DD) to a Java Date object.- Parameters:
aDateValue
- XML Schema date data type string (YYYY-MM-DD).- Returns:
- Java Date object.
-
decodeInteger
public static java.lang.Integer decodeInteger(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeException
DecodeInteger
, by XML namespace and tag name, from an XML Element. The children elements ofaElement
will be searched for the specifiedaNS
namespace URI and the specifiedaTagName
. The first XML element found will be decoded and returned. If no element is found,null
is returned.- Parameters:
aElement
- XML Element to scan. For example, the element could be <domain:create>aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name is "domain:name".- Returns:
Integer
value if found;null
otherwise.- Throws:
EPPDecodeException
- Error decodingaElement
.
-
decodeEnumList
public static java.util.List decodeEnumList(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName, java.lang.Class aEnumType) throws EPPDecodeException
Decode aList
ofEnum
's by XML namespace and tag name, from an XML Element. The children elements ofaElement
will be searched for the specifiedaNS
namespace URI and the specifiedaTagName
. Each XML element found will be decoded and added to the returnedList
ofEnum
values using theEnum.valueOf(Class, String)
method.- Parameters:
aElement
- XML Element to scan. For example, the element could be <domain:update>aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name servers is "domain:server".aEnumType
- Enum type associated with tag.- Returns:
List
ofEnum
elements that match theaEnumType
representing matching the XML element values.- Throws:
EPPDecodeException
- Error decodingaElement
.
-
decodeList
public static java.util.List decodeList(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeException
Decode aList
ofString
's by XML namespace and tag name, from an XML Element. The children elements ofaElement
will be searched for the specifiedaNS
namespace URI and the specifiedaTagName
. Each XML element found will be decoded and added to the returnedList
. Empty child elements, will result in empty string ("") returnList
elements.- Parameters:
aElement
- XML Element to scan. For example, the element could be <domain:update>aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name servers is "domain:server".- Returns:
List
ofString
elements representing the text nodes of the found XML elements.- Throws:
EPPDecodeException
- Error decodingaElement
.
-
decodeString
public static java.lang.String decodeString(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeException
DecodeString
, by XML namespace and tag name, from an XML Element. The children elements ofaElement
will be searched for the specifiedaNS
namespace URI and the specifiedaTagName
. The first XML element found will be decoded and returned. If no element is found,null
is returned.- Parameters:
aElement
- XML Element to scan. For example, the element could be <domain:create>aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name is "domain:name".- Returns:
String
value if found;null
otherwise.- Throws:
EPPDecodeException
- Error decodingaElement
.
-
decodeStringValue
public static java.lang.String decodeStringValue(org.w3c.dom.Element aElement)
DecodeString
value from an XML Element.- Parameters:
aElement
- XML Element to get theString
value.- Returns:
String
value if set; "" other.
-
decodeTimeInstant
public static java.util.Date decodeTimeInstant(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeException
DecodeDate
, as date and time, by XML namespace and tag name, from an XML Element. The children elements ofaElement
will be searched for the specifiedaNS
namespace URI and the specifiedaTagName
. The first XML element found will be decoded and returned. If no element is found,null
is returned. The format used for decoding the date is defined by the constantEPPUtil.TIME_INSTANT_FORMAT
.- Parameters:
aElement
- XML Element to scan. For example, the element could be <trans-id>aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:epp".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the transaction Id date is "date".- Returns:
Date
value as date and time if found;null
otherwise.- Throws:
EPPDecodeException
- Error decodingaElement
.
-
decodeTimeInstant
public static java.util.Date decodeTimeInstant(java.lang.String aTimeInstant)
Decode an XML Schema timeInstant data type to a Java Date object.- Parameters:
aTimeInstant
- XML Schema timeInstant data type string.- Returns:
- Java Date object if
aTimeInstant
format is valid;null
otherwise
-
decodeVector
public static java.util.Vector decodeVector(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeException
Decode aVector
ofString
's by XML namespace and tag name, from an XML Element. The children elements ofaElement
will be searched for the specifiedaNS
namespace URI and the specifiedaTagName
. Each XML element found will be decoded and added to the returnedVector
. Empty child elements, will result in empty string ("") returnVector
elements.- Parameters:
aElement
- XML Element to scan. For example, the element could be <domain:update>aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name servers is "domain:server".- Returns:
Vector
ofString
elements representing the text nodes of the found XML elements.- Throws:
EPPDecodeException
- Error decodingaElement
.
-
encodeBigDecimal
public static void encodeBigDecimal(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.math.BigDecimal aBigDecimal, java.lang.String aNS, java.lang.String aTagName, java.lang.String aFormat) throws EPPEncodeException
Encode aDouble
in XML with a given XML namespace and tag name. Takes an optional argument for the format of the Double, if not provided then it uses #0.00 which formats the double to 2 decimal places.- Parameters:
aDocument
- DOM Document ofaRoot
. This parameter also acts as a factory for XML elements.aRoot
- XML Element to add children nodes to. For example, the root node could be <domain:update>aBigDecimal
-Double
to add.aNS
- XML namespace of the element. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name is "domain:name".aFormat
- Format to use following theDecimalFormat
format. Ifnull
is passed, the default format of "#0.00" is used.- Throws:
EPPEncodeException
- Error encoding theDouble
.
-
encodeBigDecimal
public static void encodeBigDecimal(org.w3c.dom.Document aDocument, org.w3c.dom.Element aElement, java.math.BigDecimal aBigDecimal, java.lang.String aFormat) throws EPPEncodeException
Encode aDouble
in XML with a given XML namespace and tag name. Takes an optional argument for the format of the Double, if not provided then it uses #0.00 which formats the double to 2 decimal places.- Parameters:
aDocument
- DOM Document ofaRoot
. This parameter also acts as a factory for XML elements.aElement
- XML Element to add the text node encoded with theBigDecimal
value.aBigDecimal
-Double
to encode into the text node of the element.aFormat
- Format to use following theDecimalFormat
format. Ifnull
is passed, the default format of "#0.00" is used.- Throws:
EPPEncodeException
- Error encoding theDouble
.
-
encodeBoolean
public static void encodeBoolean(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.lang.Boolean aBoolean, java.lang.String aNS, java.lang.String aTagName) throws EPPEncodeException
Encode aBoolean
in XML with a given XML namespace and tag name. If aBoolean isnull
an element is not added.- Parameters:
aDocument
- DOM Document ofaRoot
. This parameter also acts as a factory for XML elements.aRoot
- XML Element to add children nodes to. For example, the root node could be <domain:update>aBoolean
-Boolean
to add.aNS
- XML namespace of the element. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name is "domain:name".- Throws:
EPPEncodeException
- Error encoding theBoolean
.
-
encodeBooleanAttr
public static void encodeBooleanAttr(org.w3c.dom.Element aElement, java.lang.String aAttr, boolean aVal)
Encodes a booleanElement
attribute value. The attribute is set to "1" with a value oftrue
and is set to "0" with a value offalse
.- Parameters:
aElement
- Element to add attribute toaAttr
- Attribute nameaVal
- Attribute boolean value
-
encodeComp
public static void encodeComp(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, EPPCodecComponent aComp) throws EPPEncodeException
Encode aEPPCodecComponent
instance in XML. The component is first checked for not beingnull
, than it will be appended as a child ofaRoot
.- Parameters:
aDocument
- DOM Document ofaRoot
. This parameter also acts as a factory for XML elements.aRoot
- XML Element to add to. For example, the root node could be <domain:update>aComp
-EPPCodecComponent's
to add.- Throws:
EPPEncodeException
- Error encodingEPPCodecComponent
.
-
encodeCompList
public static void encodeCompList(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.List aList) throws EPPEncodeException
Encode aList
ofEPPCodecComponent
's in XML. EachaList
element will be encoded and added toaRoot
.- Parameters:
aDocument
- DOM Document ofaRoot
. This parameter also acts as a factory for XML elements.aRoot
- XML Element to add children nodes to. For example, the root node could be <domain:update>aList
-List
ofEPPCodecComponent's
to add.- Throws:
EPPEncodeException
- Error encoding theList
ofEPPCodecComponent
's.
-
encodeCompVector
public static void encodeCompVector(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.Vector aVector) throws EPPEncodeException
Encode aVector
ofEPPCodecComponent
's in XML. EachaVector
element will be encoded and added toaRoot
.- Parameters:
aDocument
- DOM Document ofaRoot
. This parameter also acts as a factory for XML elements.aRoot
- XML Element to add children nodes to. For example, the root node could be <domain:update>aVector
-Vector
ofEPPCodecComponent's
to add.- Throws:
EPPEncodeException
- Error encoding theVector
ofEPPCodecComponent
's.
-
encodeDate
public static java.lang.String encodeDate(java.util.Date aDate)
Encode a Java Date into an XML Schema date data type string.- Parameters:
aDate
- Java Date to encode into a XML Schema date data type string.- Returns:
- Encoded XML Schema date data type string.
-
encodeDate
public static void encodeDate(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.Date aDate, java.lang.String aNS, java.lang.String aTagName) throws EPPEncodeException
Encode aDate
in XML with a given XML namespace and tag name. The format used for encoding the date is defined by the constantEPPUtil.DATE_FORMAT
.- Parameters:
aDocument
- DOM Document ofaRoot
. This parameter also acts as a factory for XML elements.aRoot
- XML Element to add children nodes to. For example, the root node could be <domain:update>aDate
-Date
to add.aNS
- XML namespace of the element. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name is "domain:name".- Throws:
EPPEncodeException
- Error encodingDate
.
-
encodeList
public static void encodeList(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.List aList, java.lang.String aNS, java.lang.String aTagName) throws EPPEncodeException
Encode aList
ofString
's in XML with a given XML namespace and tag name.- Parameters:
aDocument
- DOM Document ofaRoot
. This parameter also acts as a factory for XML elements.aRoot
- XML Element to add children nodes to. For example, the root node could be <domain:update>aList
-List
ofString's
to add.aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name servers is "domain:server".- Throws:
EPPEncodeException
- Error encoding theList
ofString
's.
-
encodeNill
public static void encodeNill(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.lang.String aNS, java.lang.String aTagName) throws EPPEncodeException
DOCUMENT ME!- Parameters:
aDocument
- DOCUMENT ME!aRoot
- DOCUMENT ME!aNS
- DOCUMENT ME!aTagName
- DOCUMENT ME!- Throws:
EPPEncodeException
- DOCUMENT ME!
-
encodeString
public static void encodeString(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.lang.String aString, java.lang.String aNS, java.lang.String aTagName) throws EPPEncodeException
Encode aString
in XML with a given XML namespace and tag name.- Parameters:
aDocument
- DOM Document ofaRoot
. This parameter also acts as a factory for XML elements.aRoot
- XML Element to add children nodes to. For example, the root node could be <domain:update>aString
-String
to add.aNS
- XML namespace of the element. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name is "domain:name".- Throws:
EPPEncodeException
- Error encoding theString
.
-
encodeInteger
public static void encodeInteger(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.lang.Integer aInteger, java.lang.String aNS, java.lang.String aTagName) throws EPPEncodeException
Encode aInteger
in XML with a given XML namespace and tag name. If theInteger
isnull
nothing will be encoded.- Parameters:
aDocument
- DOM Document ofaRoot
. This parameter also acts as a factory for XML elements.aRoot
- XML Element to add children nodes to. For example, the root node could be <domain:update>aInteger
-Integer
to add.aNS
- XML namespace of the element. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name is "domain:name".- Throws:
EPPEncodeException
- Error encoding theInteger
.
-
encodeStringList
public static void encodeStringList(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.List aList, java.lang.String aNS, java.lang.String aTagName)
-
encodeTimeInstant
public static java.lang.String encodeTimeInstant(java.util.Date aDate)
Encode a Java Date into an XML Schema timeInstant data type string. The XML Schema timeInstant data type string has the following format: CCYY-MM-DDThh:mm:ss.ssss can be followed by a Z to indicate Coordinated Universal Time- Parameters:
aDate
- Java Date to encode into a XML Schema timeInstant data type string.- Returns:
- Encoded XML Schema timeInstant data type string.
-
encodeTimeInstant
public static void encodeTimeInstant(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.Date aDate, java.lang.String aNS, java.lang.String aTagName) throws EPPEncodeException
Encode aDate
, as date and time, in XML with a given XML namespace and tag name. The format used for encoding the date is defined by the constantEPPUtil.TIME_INSTANT_FORMAT
.- Parameters:
aDocument
- DOM Document ofaRoot
. This parameter also acts as a factory for XML elements.aRoot
- XML Element to add children nodes to. For example, the root node could be <domain:expire-data>aDate
-Date
as date and time to add.aNS
- XML namespace of the element. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain expiration date and time is "domain:expiration-date".- Throws:
EPPEncodeException
- Error encodingDate
.
-
encodeVector
public static void encodeVector(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.Vector aVector, java.lang.String aNS, java.lang.String aTagName) throws EPPEncodeException
Encode aVector
ofString
's in XML with a given XML namespace and tag name.- Parameters:
aDocument
- DOM Document ofaRoot
. This parameter also acts as a factory for XML elements.aRoot
- XML Element to add children nodes to. For example, the root node could be <domain:update>aVector
-Vector
ofString's
to add.aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name servers is "domain:server".- Throws:
EPPEncodeException
- Error encoding theVector
ofString
's.
-
equalLists
public static boolean equalLists(java.util.List aV1, java.util.List aV2)
compares twoList
instances. The Java 1.1List
class does not implement theequals
methods, soequalLists
was written to implementequals
of twoLists
(aV1 and aV2). This method is not need for Java 2.- Parameters:
aV1
- First List instance to compare.aV2
- Second List instance to compare.- Returns:
true
if List's are equal;false
otherwise.
-
equalVectors
public static boolean equalVectors(java.util.Vector aV1, java.util.Vector aV2)
compares twoVector
instances. The Java 1.1Vector
class does not implement theequals
methods, soequalVectors
was written to implementequals
of twoVectors
(aV1 and aV2). This method is not need for Java 2.- Parameters:
aV1
- First Vector instance to compare.aV2
- Second Vector instance to compare.- Returns:
true
if Vector's are equal;false
otherwise.
-
getElementByTagNameNS
public static org.w3c.dom.Element getElementByTagNameNS(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)
Gets the first direct child element with a given tag name and XML namespace.- Parameters:
aElement
- Root element to start from to search for the elementaNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name to scan for.- Returns:
- Matching
Element
if found;null
otherwise.
-
getElementsByTagNameNS
public static java.util.Vector getElementsByTagNameNS(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)
Gets all of the direct child element with a given tag name and XML namespace.- Parameters:
aElement
- Root element to start from to search for the elementaNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name to scan for.- Returns:
Vector
ofNode
instances that are elements and have the specified tag name and XML namespace.
-
getLocalName
public static java.lang.String getLocalName(java.lang.String aQualifiedName)
Gets the local name given the qualified element name. If the local name is passed, it will be simply returned back.- Parameters:
aQualifiedName
- Qualified name of the element likedomain:name
. A localhost likename
can be passed without error.- Returns:
- Localname of the qualified name
-
getPrefix
public static java.lang.String getPrefix(java.lang.String aQualifiedName)
Gets the namespace prefix given a qualified name. If no prefix is found, empty string is returned.- Parameters:
aQualifiedName
- Qualified name of the element likedomain:name
.- Returns:
- Namespace prefix of the qualified name if found; empty string ("") if not found.
-
getFirstElementChild
public static org.w3c.dom.Element getFirstElementChild(org.w3c.dom.Element aElement)
Gets the first DOM Element Node of theaElement
DOM Element.- Parameters:
aElement
- Element to scan for the first element.- Returns:
- Found DOM Element Node if found;
null
otherwise.
-
getNextElementSibling
public static org.w3c.dom.Element getNextElementSibling(org.w3c.dom.Element aElement)
Gets the next sibling Element of a provided Element.- Parameters:
aElement
- Element to start scan for the next Element.- Returns:
- Found DOM Element Node if found;
null
otherwise.
-
getTextContent
public static java.lang.String getTextContent(org.w3c.dom.Node node) throws EPPDecodeException
A pass-thru to the getTextContent() method using a default value of false for the required flag.- Parameters:
node
- Node to get the text node from.- Returns:
- The text node
String
value if found; throwingEPPDecodeException
otherwise. - Throws:
EPPDecodeException
- Error getting text node
-
getTextContent
public static java.lang.String getTextContent(org.w3c.dom.Node node, boolean allowEmpty) throws EPPDecodeException
Return the text data within an XML tag.
<id>12345</id> yields the String "12345"
If the node==null, child==null, value==null, or value=="" => Exception
UNLESS allowEmpty, in which case return ""For reference:
<tag></tag> => child is null
<tag/> => child is null
<tag> </tag> => value is empty- Parameters:
node
- Node to get the text node from.allowEmpty
- Allow empty text node return value. Iftrue
then if the text node is not found, the empty string will be returned instead of throwing theEPPDecodeException
.- Returns:
- The text node
String
value if found; empty string ifallowEmpty
istrue
andEPPDecodeException
ifallowEmpty
isfalse
otherwise. - Throws:
EPPDecodeException
- Error getting text node
-
listSubset
public static boolean listSubset(java.util.List aV1, java.util.List aV2)
Determines if oneList
is a subset of anotherList
. If every element inaV1
is inaV2
returntrue
; otherwise returnfalse
.- Parameters:
aV1
- SubsetList
to compare againstaV2
aV2
- SupersetList
to compare againstaV1
- Returns:
true
ifaV1
is a subset ofaV2
;false
otherwise.
-
toString
public static java.lang.String toString(EPPCodecComponent aComponent)
Converts anEPPCodecComponent
to aString
for printing. EachEPPCodecComponent
can use this utility method to implementObject.toString()
.- Parameters:
aComponent
- a concreteEPPCodecComponent
instance- Returns:
String
representation ofEPPCodecComponent
if successful; "ERROR"String
otherwise.
-
toString
public static java.lang.String toString(org.w3c.dom.Element aElement)
Converts anaElement
to aString
for printing.- Parameters:
aElement
-Element
to print- Returns:
String
representation ofElement
if successful; "ERROR"String
otherwise.
-
toStringNoIndent
public static java.lang.String toStringNoIndent(org.w3c.dom.Element aElement)
Converts anaElement
to aString
for printing without pretty printing.- Parameters:
aElement
-Element
to print- Returns:
String
representation ofElement
if successful; "ERROR"String
otherwise.
-
vectorSubset
public static boolean vectorSubset(java.util.Vector aV1, java.util.Vector aV2)
Determines if oneVector
is a subset of anotherVector
. If every element inaV1
is inaV2
returntrue
; otherwise returnfalse
.- Parameters:
aV1
- SubsetVector
to compare againstaV2
aV2
- SupersetVector
to compare againstaV1
- Returns:
true
ifaV1
is a subset ofaV2
;false
otherwise.
-
decodeIntegerList
public static java.util.List decodeIntegerList(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeException
Decode aList
ofInteger
's by XML namespace and tag name, from an XML Element. The children elements ofaElement
will be searched for the specifiedaNS
namespace URI and the specifiedaTagName
. Each XML element found will be decoded and added to the returnedList
. Empty child elements, will result in anEPPDecodeException
.- Parameters:
aElement
- XML Element to scan. For example, the element could be <domain:update>aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name servers is "domain:server".- Returns:
List
ofInteger
elements representing the text nodes of the found XML elements.- Throws:
EPPDecodeException
- Error decodingaElement
.
-
encodeIntegerList
public static void encodeIntegerList(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.List aList, java.lang.String aNS, java.lang.String aTagName) throws EPPEncodeException
Encode aList
ofInteger
's in XML with a given XML namespace and tag name.- Parameters:
aDocument
- DOM Document ofaRoot
. This parameter also acts as a factory for XML elements.aRoot
- XML Element to add children nodes to. For example, the root node could be <domain:update>aList
-List
ofInteger
's to add.aNS
- XML namespace of the elements. For example, for domain element this is "urn:iana:xmlns:domain".aTagName
- Tag name of the element including an optional namespace prefix. For example, the tag name for the domain name servers is "domain:server".- Throws:
EPPEncodeException
- Error encoding theList
ofInteger
's.
-
collapseWhitespace
public static java.lang.String collapseWhitespace(java.lang.String inString)
Collapse Whitespace, which means that all leading and trailing whitespace will be stripped, and all internal whitespace collapsed to single space characters. Intended to emulate XML Schema whitespace (collapse) constraining facet: http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace- Parameters:
inString
-String
to be collapsed- Returns:
String
with whitespace collapsed, or null when result is empty
-
removeWhitespace
public static java.lang.String removeWhitespace(java.lang.String inString)
Remove Whitespace, which means that all whitespace will be stripped.- Parameters:
inString
-String
from which to remove whitespace- Returns:
String
with whitespace removed, or null when result is empty
-
encodeBase64
public static java.lang.String encodeBase64(org.w3c.dom.Element aElement) throws java.lang.Exception
Base64 encode the XMLElement
tree.- Parameters:
aElement
- Root element to encode in Base64- Returns:
- Base64 encoded value of the XML
Element
tree. - Throws:
java.lang.Exception
- Error encoding theElement
-
findDuplicateExtNamespaces
public static java.util.Set<java.lang.String> findDuplicateExtNamespaces(java.util.List<EPPCodecComponent> aExtensions)
Find the set of duplicate EPP extensions based on the list of EPP extensions.- Parameters:
aExtensions
- List of EPP extensions to find duplicates- Returns:
Set
of duplicate EPP extension XML namespaces;null
otherwise.
-
findUnsupportedExtNamespaces
public static java.util.Set<java.lang.String> findUnsupportedExtNamespaces(java.util.List<java.lang.String> aSupportedExtNamespaces, java.util.List<EPPCodecComponent> aExtensions)
Find the set of unsupported EPP extensions based on passing the list of supported extension XML namespaces and the list of EPP extensions.- Parameters:
aSupportedExtNamespaces
- List of supported EPP extension XML namespaces. Passnull
for no supported extensions.aExtensions
- List of EPP extensions to scan for unsupported XML namespaces- Returns:
Set
of unsupported EPP extension XML namespaces;null
otherwise.
-
findUnsupportedExtNamespaceSuffixes
public static java.util.Set<java.lang.String> findUnsupportedExtNamespaceSuffixes(java.util.List<java.lang.String> aSupportedExtNamespaceSuffixes, java.util.List<EPPCodecComponent> aExtensions)
Find the set of unsupported EPP extensions based on passing the list of supported extension XML namespace suffixes and the list of EPP extensions. SeenamespaceToNamespaceSuffix(String)
for conversion of an XML namespace to an XML namespace suffix.- Parameters:
aSupportedExtNamespaceSuffixes
- List of supported EPP extension XML namespace suffixes. Passnull
for no supported extensions.aExtensions
- List of EPP extensions to scan for unsupported XML namespace suffixes- Returns:
Set
of unsupported EPP extension XML namespace suffixes;null
otherwise.
-
findExtNamespaces
public static java.util.Set<java.lang.String> findExtNamespaces(java.util.List<EPPCodecComponent> aExtensions, java.util.List<java.lang.String> aFilterExtNamespaces)
Find the set of unique EPP extension XML namespaces based on the list of EPP extensions and the optional use of a list of XML namespaces to filter.- Parameters:
aExtensions
- List of EPP extension to find unique EPP extension XML namespaces.aFilterExtNamespaces
- Filter extension XML namespaces from the returned set. Set tonull
for no filtering.- Returns:
Set
of unique EPP extension XML namespaces.
-
findExtNamespaceSuffixes
public static java.util.Set<java.lang.String> findExtNamespaceSuffixes(java.util.List<EPPCodecComponent> aExtensions, java.util.List<java.lang.String> aFilterExtNamespaceSuffixes)
Find the set of unique EPP extension XML namespace suffixes based on the list of EPP extensions and the optional use of a list of XML namespace suffixes to filter. An XML namespace suffix is the last element of an XML namespace is "secDNS-1.1" for the XML namespace "urn:ietf:params:xml:ns:secDNS-1.1" or "sync-1.0" for "http://www.verisign.com/epp/sync-1.0".
Only two forms of XML namespaces is supported:- IANA XML namespace - Uses ':' as a separator
- URL namespace - Uses a uRL with "/" for the path separator
Any unsupported XML namespaces will be returned unmodified.- Parameters:
aExtensions
- List of EPP extensions to find unique EPP extension XML namespace suffixes.aFilterExtNamespaceSuffixes
- Filter extension XML namespace suffixes from the returned set. Set tonull
for no filtering.- Returns:
Set
of unique EPP extension XML namespace suffixes.
-
namespaceToNamespaceSuffix
public static java.lang.String namespaceToNamespaceSuffix(java.lang.String aNamespace)
Convert an XML namespace to an XML namespace suffix. An XML namespace suffix is the last element of an XML namespace is "secDNS-1.1" for the XML namespace "urn:ietf:params:xml:ns:secDNS-1.1" or "sync-1.0" for "http://www.verisign.com/epp/sync-1.0".
Only two forms of XML namespaces is supported:- IANA XML namespace - Uses ':' as a separator
- URL namespace - Uses a uRL with "/" for the path separator
An unsupported XML namespace will be returned unmodified.- Parameters:
aNamespace
- XML namespace to convert to an XML namespace suffix.- Returns:
- XML namespace suffix if format is supported; unmodified XML namespace otherwise.
-
-