Package com.verisign.epp.codec.gen
Class EPPUtil
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPUtil
-
public class EPPUtil extends java.lang.ObjectProvides a set of utility static methods for use by the EPP Codec classes.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDATE_FORMATFormat used for the XML Schema date data type.static java.lang.StringDEFAULT_TIME_INSTANT_FORMATDefault format used for the XML SchemadateTimedata type
-
Constructor Summary
Constructors Constructor Description EPPUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidappendChildren(org.w3c.dom.Element aSource, org.w3c.dom.Element aDest)Appends the children Nodes ofaSourceas children nodes ofaDest.static java.lang.StringcollapseWhitespace(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.BigDecimaldecodeBigDecimal(org.w3c.dom.Element aElement)DecodeBigDecimal, from an XML Element.static java.math.BigDecimaldecodeBigDecimal(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.BooleandecodeBoolean(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 booleandecodeBooleanAttr(org.w3c.dom.Element aElement, java.lang.String aAttr)Decodes a boolean attribute value given theElementand attribute name.static EPPCodecComponentdecodeComp(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.ListdecodeCompList(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName, java.lang.Class aClass)Decode aListofEPPCodecComponent's, by XML namespace and tag name, from an XML Element.static java.util.VectordecodeCompVector(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName, java.lang.Class aClass)Decode aVectorofEPPCodecComponent's, by XML namespace and tag name, from an XML Element.static java.util.DatedecodeDate(java.lang.String aDateValue)Decode an XML Schema date data type (YYYY-MM-DD) to a Java Date object.static java.util.DatedecodeDate(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.ListdecodeEnumList(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName, java.lang.Class aEnumType)Decode aListofEnum's by XML namespace and tag name, from an XML Element.static java.lang.IntegerdecodeInteger(org.w3c.dom.Element aElement)DecodeIntegerfromaElementparameter.static java.lang.IntegerdecodeInteger(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.ListdecodeIntegerList(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)Decode aListofInteger's by XML namespace and tag name, from an XML Element.static java.util.ListdecodeList(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)Decode aListofString's by XML namespace and tag name, from an XML Element.static java.lang.StringdecodeString(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.StringdecodeStringAttr(org.w3c.dom.Element aElement, java.lang.String aAttr)Decodes a string attribute by name.static java.lang.StringdecodeStringValue(org.w3c.dom.Element aElement)DecodeStringvalue from an XML Element.static java.util.DatedecodeTimeInstant(java.lang.String aTimeInstant)Decode an XML Schema timeInstant data type to a Java Date object.static java.util.DatedecodeTimeInstant(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.VectordecodeVector(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName)Decode aVectorofString's by XML namespace and tag name, from an XML Element.static java.lang.StringencodeBase64(org.w3c.dom.Element aElement)Base64 encode the XMLElementtree.static voidencodeBigDecimal(org.w3c.dom.Document aDocument, org.w3c.dom.Element aElement, java.math.BigDecimal aBigDecimal, java.lang.String aFormat)Encode aDoublein XML with a given XML namespace and tag name.static voidencodeBigDecimal(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 aDoublein XML with a given XML namespace and tag name.static voidencodeBoolean(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.lang.Boolean aBoolean, java.lang.String aNS, java.lang.String aTagName)Encode aBooleanin XML with a given XML namespace and tag name.static voidencodeBooleanAttr(org.w3c.dom.Element aElement, java.lang.String aAttr, boolean aVal)Encodes a booleanElementattribute value.static voidencodeComp(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, EPPCodecComponent aComp)Encode aEPPCodecComponentinstance in XML.static voidencodeCompList(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.List aList)Encode aListofEPPCodecComponent's in XML.static voidencodeCompVector(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.Vector aVector)Encode aVectorofEPPCodecComponent's in XML.static java.lang.StringencodeDate(java.util.Date aDate)Encode a Java Date into an XML Schema date data type string.static voidencodeDate(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.Date aDate, java.lang.String aNS, java.lang.String aTagName)Encode aDatein XML with a given XML namespace and tag name.static voidencodeInteger(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.lang.Integer aInteger, java.lang.String aNS, java.lang.String aTagName)Encode aIntegerin XML with a given XML namespace and tag name.static voidencodeIntegerList(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.List aList, java.lang.String aNS, java.lang.String aTagName)Encode aListofInteger's in XML with a given XML namespace and tag name.static voidencodeList(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.List aList, java.lang.String aNS, java.lang.String aTagName)Encode aListofString's in XML with a given XML namespace and tag name.static voidencodeNill(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.lang.String aNS, java.lang.String aTagName)DOCUMENT ME!static voidencodeString(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.lang.String aString, java.lang.String aNS, java.lang.String aTagName)Encode aStringin XML with a given XML namespace and tag name.static voidencodeStringList(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.StringencodeTimeInstant(java.util.Date aDate)Encode a Java Date into an XML Schema timeInstant data type string.static voidencodeTimeInstant(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 voidencodeVector(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.Vector aVector, java.lang.String aNS, java.lang.String aTagName)Encode aVectorofString's in XML with a given XML namespace and tag name.static booleanequalLists(java.util.List aV1, java.util.List aV2)compares twoListinstances.static booleanequalVectors(java.util.Vector aV1, java.util.Vector aV2)compares twoVectorinstances.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.ElementgetElementByTagNameNS(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.VectorgetElementsByTagNameNS(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.ElementgetFirstElementChild(org.w3c.dom.Element aElement)Gets the first DOM Element Node of theaElementDOM Element.static java.lang.StringgetLocalName(java.lang.String aQualifiedName)Gets the local name given the qualified element name.static org.w3c.dom.ElementgetNextElementSibling(org.w3c.dom.Element aElement)Gets the next sibling Element of a provided Element.static java.lang.StringgetPrefix(java.lang.String aQualifiedName)Gets the namespace prefix given a qualified name.static java.lang.StringgetTextContent(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.StringgetTextContent(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.StringgetTimeInstantFormat()Gets the XML SchematimeDateformat used inand #encodeTimeInstant(Document, Element, Date, String, String).static booleanlistSubset(java.util.List aV1, java.util.List aV2)Determines if oneListis a subset of anotherList.static java.lang.StringnamespaceToNamespaceSuffix(java.lang.String aNamespace)Convert an XML namespace to an XML namespace suffix.static java.lang.StringnamespaceToNamespaceSuffixBasename(java.lang.String aNamespace)Convert an XML namespace to an XML namespace suffix baseename.static java.lang.StringremoveWhitespace(java.lang.String inString)Remove Whitespace, which means that all whitespace will be stripped.static voidsetTimeInstantFormat(java.lang.String aTimeInstantFormat)Sets the XML SchematimeDateformat used inand #encodeTimeInstant(Document, Element, Date, String, String).static java.lang.StringtoString(EPPCodecComponent aComponent)Converts anEPPCodecComponentto aStringfor printing.static java.lang.StringtoString(org.w3c.dom.Element aElement)Converts anaElementto aStringfor printing.static java.lang.StringtoStringNoIndent(org.w3c.dom.Element aElement)Converts anaElementto aStringfor printing without pretty printing.static booleanvectorSubset(java.util.Vector aV1, java.util.Vector aV2)Determines if oneVectoris 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 SchemadateTimedata 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 SchematimeDateformat used inand #encodeTimeInstant(Document, Element, Date, String, String). The defauLt format is defined by the constantDEFAULT_TIME_INSTANT_FORMATand it can be overridden using thesetTimeInstantFormat(String)method.- Returns:
- XML Schema
timeDateformat used inand #encodeTimeInstant(Document, Element, Date, String, String).
-
setTimeInstantFormat
public static void setTimeInstantFormat(java.lang.String aTimeInstantFormat)
Sets the XML SchematimeDateformat used inand #encodeTimeInstant(Document, Element, Date, String, String). The format must follow the format supported bySimpleDateFormat.- Parameters:
aTimeInstantFormat- XML SchematimeDateformat supported bySimpleDateFormat.
-
appendChildren
public static void appendChildren(org.w3c.dom.Element aSource, org.w3c.dom.Element aDest)Appends the children Nodes ofaSourceas children nodes ofaDest.- Parameters:
aSource- Source Element tree to get children fromaDest- Destination Element to appendaSourcechildren.
-
decodeBigDecimal
public static java.math.BigDecimal decodeBigDecimal(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeExceptionDecodeBigDecimal, by XML namespace and tag name, from an XML Element. The children elements ofaElementwill be searched for the specifiedaNSnamespace URI and the specifiedaTagName. The first XML element found will be decoded and returned. If no element is found,nullis 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:
BigDecimalvalue if found;nullotherwise.- Throws:
EPPDecodeException- Error decodingaElement.
-
decodeBigDecimal
public static java.math.BigDecimal decodeBigDecimal(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecodeBigDecimal, from an XML Element. TheaElementelement will be decoded and returned. If element isnull,nullis returned.- Parameters:
aElement- XML Element to decode.- Returns:
BigDecimalvalue ifaElementis notnull;nullotherwise.- 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 EPPDecodeExceptionDecodeBoolean, by XML namespace and tag name, from an XML Element. The children elements ofaElementwill be searched for the specifiedaNSnamespace URI and the specifiedaTagName. The first XML element found will be decoded and returned. If no element is found,nullis 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:
Booleanvalue if found;nullotherwise.- Throws:
EPPDecodeException- Error decodingaElement.
-
decodeBooleanAttr
public static boolean decodeBooleanAttr(org.w3c.dom.Element aElement, java.lang.String aAttr) throws EPPDecodeExceptionDecodes a boolean attribute value given theElementand 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,nullis returned.- Parameters:
aElement- Element to search for the attributeaAttr- Attribute name to search for- Returns:
- Attribute
Stringvalue if exists;nullotherwise.
-
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 ofaElementwill be searched for the specifiedaNSnamespace 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
aClassthat represents the found XML elements if found;nullotherwise. - 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 EPPDecodeExceptionDecode aListofEPPCodecComponent's, by XML namespace and tag name, from an XML Element. The children elements ofaElementwill be searched for the specifiedaNSnamespace 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:
ListofEPPCodecComponentelements 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 EPPDecodeExceptionDecode aVectorofEPPCodecComponent's, by XML namespace and tag name, from an XML Element. The children elements ofaElementwill be searched for the specifiedaNSnamespace 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:
VectorofEPPCodecComponentelements 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 EPPDecodeExceptionDecodeDate, by XML namespace and tag name, from an XML Element. The children elements ofaElementwill be searched for the specifiedaNSnamespace URI and the specifiedaTagName. The first XML element found will be decoded and returned. If no element is found,nullis 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:
Datevalue if found;nullotherwise.- 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) throws EPPDecodeExceptionDecodeIntegerfromaElementparameter.- Parameters:
aElement- XML Element to scan for theIntegervalue.- Returns:
Integervalue if found;nullotherwise.- Throws:
EPPDecodeException- Error decodingaElement.
-
decodeInteger
public static java.lang.Integer decodeInteger(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeExceptionDecodeInteger, by XML namespace and tag name, from an XML Element. The children elements ofaElementwill be searched for the specifiedaNSnamespace URI and the specifiedaTagName. The first XML element found will be decoded and returned. If no element is found,nullis 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:
Integervalue if found;nullotherwise.- 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 EPPDecodeExceptionDecode aListofEnum's by XML namespace and tag name, from an XML Element. The children elements ofaElementwill be searched for the specifiedaNSnamespace URI and the specifiedaTagName. Each XML element found will be decoded and added to the returnedListofEnumvalues 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:
ListofEnumelements that match theaEnumTyperepresenting 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 EPPDecodeExceptionDecode aListofString's by XML namespace and tag name, from an XML Element. The children elements ofaElementwill be searched for the specifiedaNSnamespace URI and the specifiedaTagName. Each XML element found will be decoded and added to the returnedList. Empty child elements, will result in empty string ("") returnListelements.- 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:
ListofStringelements 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 EPPDecodeExceptionDecodeString, by XML namespace and tag name, from an XML Element. The children elements ofaElementwill be searched for the specifiedaNSnamespace URI and the specifiedaTagName. The first XML element found will be decoded and returned. If no element is found,nullis 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:
Stringvalue if found;nullotherwise.- Throws:
EPPDecodeException- Error decodingaElement.
-
decodeStringValue
public static java.lang.String decodeStringValue(org.w3c.dom.Element aElement)
DecodeStringvalue from an XML Element.- Parameters:
aElement- XML Element to get theStringvalue.- Returns:
Stringvalue if set; "" other.
-
decodeTimeInstant
public static java.util.Date decodeTimeInstant(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeExceptionDecodeDate, as date and time, by XML namespace and tag name, from an XML Element. The children elements ofaElementwill be searched for the specifiedaNSnamespace URI and the specifiedaTagName. The first XML element found will be decoded and returned. If no element is found,nullis 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:
Datevalue as date and time if found;nullotherwise.- 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
aTimeInstantformat is valid;nullotherwise
-
decodeVector
public static java.util.Vector decodeVector(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeExceptionDecode aVectorofString's by XML namespace and tag name, from an XML Element. The children elements ofaElementwill be searched for the specifiedaNSnamespace URI and the specifiedaTagName. Each XML element found will be decoded and added to the returnedVector. Empty child elements, will result in empty string ("") returnVectorelements.- 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:
VectorofStringelements 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 EPPEncodeExceptionEncode aDoublein 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-Doubleto 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 theDecimalFormatformat. Ifnullis 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 EPPEncodeExceptionEncode aDoublein 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 theBigDecimalvalue.aBigDecimal-Doubleto encode into the text node of the element.aFormat- Format to use following theDecimalFormatformat. Ifnullis 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 EPPEncodeExceptionEncode aBooleanin XML with a given XML namespace and tag name. If aBoolean isnullan 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-Booleanto 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 booleanElementattribute value. The attribute is set to "1" with a value oftrueand 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 EPPEncodeExceptionEncode aEPPCodecComponentinstance 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'sto 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 EPPEncodeExceptionEncode aListofEPPCodecComponent's in XML. EachaListelement 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-ListofEPPCodecComponent'sto add.- Throws:
EPPEncodeException- Error encoding theListofEPPCodecComponent's.
-
encodeCompVector
public static void encodeCompVector(org.w3c.dom.Document aDocument, org.w3c.dom.Element aRoot, java.util.Vector aVector) throws EPPEncodeExceptionEncode aVectorofEPPCodecComponent's in XML. EachaVectorelement 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-VectorofEPPCodecComponent'sto add.- Throws:
EPPEncodeException- Error encoding theVectorofEPPCodecComponent'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 EPPEncodeExceptionEncode aDatein 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-Dateto 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 EPPEncodeExceptionEncode aListofString'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-ListofString'sto 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 theListofString'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 EPPEncodeExceptionDOCUMENT 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 EPPEncodeExceptionEncode aStringin 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-Stringto 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 EPPEncodeExceptionEncode aIntegerin XML with a given XML namespace and tag name. If theIntegerisnullnothing 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-Integerto 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 EPPEncodeExceptionEncode 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-Dateas 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 EPPEncodeExceptionEncode aVectorofString'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-VectorofString'sto 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 theVectorofString's.
-
equalLists
public static boolean equalLists(java.util.List aV1, java.util.List aV2)compares twoListinstances. The Java 1.1Listclass does not implement theequalsmethods, soequalListswas written to implementequalsof 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:
trueif List's are equal;falseotherwise.
-
equalVectors
public static boolean equalVectors(java.util.Vector aV1, java.util.Vector aV2)compares twoVectorinstances. The Java 1.1Vectorclass does not implement theequalsmethods, soequalVectorswas written to implementequalsof 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:
trueif Vector's are equal;falseotherwise.
-
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
Elementif found;nullotherwise.
-
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:
VectorofNodeinstances 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 likenamecan 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 theaElementDOM Element.- Parameters:
aElement- Element to scan for the first element.- Returns:
- Found DOM Element Node if found;
nullotherwise.
-
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;
nullotherwise.
-
getTextContent
public static java.lang.String getTextContent(org.w3c.dom.Node node) throws EPPDecodeExceptionA 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
Stringvalue if found; throwingEPPDecodeExceptionotherwise. - Throws:
EPPDecodeException- Error getting text node
-
getTextContent
public static java.lang.String getTextContent(org.w3c.dom.Node node, boolean allowEmpty) throws EPPDecodeExceptionReturn 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. Iftruethen if the text node is not found, the empty string will be returned instead of throwing theEPPDecodeException.- Returns:
- The text node
Stringvalue if found; empty string ifallowEmptyistrueandEPPDecodeExceptionifallowEmptyisfalseotherwise. - Throws:
EPPDecodeException- Error getting text node
-
listSubset
public static boolean listSubset(java.util.List aV1, java.util.List aV2)Determines if oneListis a subset of anotherList. If every element inaV1is inaV2returntrue; otherwise returnfalse.- Parameters:
aV1- SubsetListto compare againstaV2aV2- SupersetListto compare againstaV1- Returns:
trueifaV1is a subset ofaV2;falseotherwise.
-
toString
public static java.lang.String toString(EPPCodecComponent aComponent)
Converts anEPPCodecComponentto aStringfor printing. EachEPPCodecComponentcan use this utility method to implementObject.toString().- Parameters:
aComponent- a concreteEPPCodecComponentinstance- Returns:
Stringrepresentation ofEPPCodecComponentif successful; "ERROR"Stringotherwise.
-
toString
public static java.lang.String toString(org.w3c.dom.Element aElement)
Converts anaElementto aStringfor printing.- Parameters:
aElement-Elementto print- Returns:
Stringrepresentation ofElementif successful; "ERROR"Stringotherwise.
-
toStringNoIndent
public static java.lang.String toStringNoIndent(org.w3c.dom.Element aElement)
Converts anaElementto aStringfor printing without pretty printing.- Parameters:
aElement-Elementto print- Returns:
Stringrepresentation ofElementif successful; "ERROR"Stringotherwise.
-
vectorSubset
public static boolean vectorSubset(java.util.Vector aV1, java.util.Vector aV2)Determines if oneVectoris a subset of anotherVector. If every element inaV1is inaV2returntrue; otherwise returnfalse.- Parameters:
aV1- SubsetVectorto compare againstaV2aV2- SupersetVectorto compare againstaV1- Returns:
trueifaV1is a subset ofaV2;falseotherwise.
-
decodeIntegerList
public static java.util.List decodeIntegerList(org.w3c.dom.Element aElement, java.lang.String aNS, java.lang.String aTagName) throws EPPDecodeExceptionDecode aListofInteger's by XML namespace and tag name, from an XML Element. The children elements ofaElementwill be searched for the specifiedaNSnamespace 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:
ListofIntegerelements 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 EPPEncodeExceptionEncode aListofInteger'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-ListofInteger'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 theListofInteger'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-Stringto be collapsed- Returns:
Stringwith 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-Stringfrom which to remove whitespace- Returns:
Stringwith whitespace removed, or null when result is empty
-
encodeBase64
public static java.lang.String encodeBase64(org.w3c.dom.Element aElement) throws java.lang.ExceptionBase64 encode the XMLElementtree.- Parameters:
aElement- Root element to encode in Base64- Returns:
- Base64 encoded value of the XML
Elementtree. - 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:
Setof duplicate EPP extension XML namespaces;nullotherwise.
-
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. Passnullfor no supported extensions.aExtensions- List of EPP extensions to scan for unsupported XML namespaces- Returns:
Setof unsupported EPP extension XML namespaces;nullotherwise.
-
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. Passnullfor no supported extensions.aExtensions- List of EPP extensions to scan for unsupported XML namespace suffixes- Returns:
Setof unsupported EPP extension XML namespace suffixes;nullotherwise.
-
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 tonullfor no filtering.- Returns:
Setof 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 tonullfor no filtering.- Returns:
Setof 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.
-
namespaceToNamespaceSuffixBasename
public static java.lang.String namespaceToNamespaceSuffixBasename(java.lang.String aNamespace)
Convert an XML namespace to an XML namespace suffix baseename. 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". The namespace suffix basename removes the version from the namespace suffix, so "secDNS-1.1" becomes "secDNS" and "sync-1.0" becomes "sync".
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 or namespace suffix will be returned unmodified.- Parameters:
aNamespace- XML namespace to convert to an XML namespace suffix basename.- Returns:
- XML namespace suffix basename if format is supported; unmodified XML namespace otherwise.
-
-