|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjlibs.xml.Namespaces
public class Namespaces
This class most commonly used namespaces and their common prefixes.
This class contains constants to many standard namespaces which we use in our daily projects.
import static jlibs.xml.Namespaces.*; System.out.println(It can also suggest standard prefixes used for those namespaces.URI_SOAP); System.out.println(URI_WSDL);
import static jlibs.xml.Namespaces.*; String prefix = Namespaces.suggestPrefix(URI_WSDL); System.out.println(prefix); // prints "wsdl"
getSuggested() returns Properties object where key is URI and value is suggested prefix.
NOTE:
The naming convention that should be followed for an uri is:
String URI_<suggestedPrefixInUppercase> = "<namespaceURI>";
| Field Summary | |
|---|---|
static String |
URI_BPWS
|
static String |
URI_HTTP
WSDL namespace for WSDL HTTP GET & POST binding |
static String |
URI_MIME
WSDL namespace for WSDL MIME binding |
static String |
URI_PLINK
|
static String |
URI_SOAP
WSDL namespace for WSDL SOAP 1.1 binding |
static String |
URI_SOAP12
WSDL namespace for WSDL SOAP 1.2 binding |
static String |
URI_SOAP12ENC
Encoding namespace as defined by SOAP 1.2 |
static String |
URI_SOAP12ENV
Envelope namespace as defined by SOAP 1.2 |
static String |
URI_SOAPENC
Encoding namespace as defined by SOAP 1.1 |
static String |
URI_SOAPENV
Envelope namespace as defined by SOAP 1.1 |
static String |
URI_WSDL
WSDL namespace for WSDL framework |
static String |
URI_XHTML
|
static String |
URI_XML
The official XML Namespace name URI |
static String |
URI_XMLNS
Namespace URI used by the official XML attribute used for specifying XML Namespace declarations "xmlns" |
static String |
URI_XPATH
|
static String |
URI_XSD
Schema namespace as defined by XSD |
static String |
URI_XSI
Instance namespace as defined by XSD |
static String |
URI_XSL
Namespace used by XSL Documents |
| Constructor Summary | |
|---|---|
Namespaces()
|
|
| Method Summary | |
|---|---|
static Properties |
getSuggested()
returns Properties object where key is URI and value is suggested prefix. |
static String |
suggestPrefix(String uri)
Returns suggested prefix fore the given uri. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String URI_XML
public static final String URI_XMLNS
"xmlns"
public static final String URI_XSD
public static final String URI_XSI
public static final String URI_XSL
public static final String URI_BPWS
public static final String URI_XHTML
public static final String URI_XPATH
public static final String URI_PLINK
public static final String URI_WSDL
public static final String URI_HTTP
public static final String URI_MIME
public static final String URI_SOAP
public static final String URI_SOAP12
public static final String URI_SOAPENV
public static final String URI_SOAP12ENV
public static final String URI_SOAPENC
public static final String URI_SOAP12ENC
| Constructor Detail |
|---|
public Namespaces()
| Method Detail |
|---|
public static String suggestPrefix(String uri)
uri.
uri - namespace uri
uri is null or empty.
If the uri is one of the constants
defined in this class, then it returns commonly
used prefix. Otherwise it returns null.public static Properties getSuggested()
Properties object where key is URI and value is suggested prefix.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||