public class Namespaces
extends java.util.HashMap
Description: A HashMap of packageNames and namespaces with some helper methods
| Constructor and Description |
|---|
Namespaces()
Constructor Namespaces
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCreate(java.lang.String key)
Get the namespaace for the given package If there is no entry in the HashMap for
this namespace, create one.
|
java.lang.String |
getCreate(java.lang.String key,
java.lang.String prefix)
Get the namespaace for the given package If there is no entry in the HashMap for
this namespace, create one.
|
java.lang.String |
getCreatePrefix(java.lang.String namespace)
Get the prefix for the given namespace.
|
java.util.Iterator |
getNamespaces()
Get the list of namespaces currently registered
|
static java.lang.String |
getPackage(java.lang.String namespace)
Reverse the process.
|
static java.lang.String |
makeNamespace(java.lang.String clsName)
Make namespace from a fully qualified class name
use the default protocol for the namespace
|
static java.lang.String |
makeNamespace(java.lang.String clsName,
java.lang.String protocol)
Make namespace from a fully qualified class name
and the given protocol
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value,
java.lang.String prefix)
adds an entry to the packagename/namespace HashMap.
|
void |
putAll(java.util.Map map)
adds an entry to the packagename/namespace HashMap
for each of the entry in the map.
|
void |
putAllPrefix(java.util.Map map)
adds an entry to the namespace / prefix HashMap
for each of the entry in the map.
|
void |
putPrefix(java.lang.String namespace,
java.lang.String prefix)
put the gine namespace / prefix into the appropriate HashMap
|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, remove, size, valuespublic java.lang.String getCreate(java.lang.String key)
key - String representing packagenamepublic java.lang.String getCreate(java.lang.String key,
java.lang.String prefix)
key - String representing packagenameprefix - the prefix to use for the generated namespacepublic java.lang.Object put(java.lang.Object key,
java.lang.Object value,
java.lang.String prefix)
key - packageName Stringvalue - namespace valueprefix - the prefix to use for the given namespacepublic void putAll(java.util.Map map)
putAll in interface java.util.MapputAll in class java.util.HashMapmap - packageName/namespace mappublic java.lang.String getCreatePrefix(java.lang.String namespace)
namespace - namespacepublic void putPrefix(java.lang.String namespace,
java.lang.String prefix)
namespace - prefix - public void putAllPrefix(java.util.Map map)
map - packageName/namespace mappublic static java.lang.String makeNamespace(java.lang.String clsName)
clsName - fully qualified class namepublic static java.lang.String makeNamespace(java.lang.String clsName,
java.lang.String protocol)
clsName - fully qualified class nameprotocol - protocol Stringpublic static java.lang.String getPackage(java.lang.String namespace)
namespace - public java.util.Iterator getNamespaces()
Copyright ? 2005 Apache Web Services Project. All Rights Reserved.