|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.bind.marshaller.NamespacePrefixMapper
org.gedcomx.rt.GedcomNamespaceManager
public class GedcomNamespaceManager
A nice namespace prefix mapper that can be used to make XML and JSON output as pretty as it can be.
| Constructor Summary | |
|---|---|
GedcomNamespaceManager()
|
|
GedcomNamespaceManager(Class<?> rootClass)
|
|
GedcomNamespaceManager(Map<String,String> overrides)
|
|
GedcomNamespaceManager(Map<String,String> overrides,
String defaultns)
|
|
GedcomNamespaceManager(String defaultns)
|
|
| Method Summary | |
|---|---|
static QName |
findWrapperNameForJsonName(String jsonName)
Get the wrapper name for the specified json name. |
static String |
getJsonName(Class<?> type)
Get the JSON name for the specified type. |
static String |
getJsonNameForWrapperName(QName wrapperName)
Get the json wrapper name for the specified XML element name. |
static Class<?> |
getKnownJsonType(String jsonName)
Get the known type for the given JSON name. |
static Map<String,String> |
getKnownPrefixes()
The known set of namespace-to-prefix mappings. |
static Class<?> |
getKnownTypeById(String typeId)
Get the known type for the given data type. |
String |
getPreferredPrefix(String namespaceUri,
String suggestion,
boolean requirePrefix)
|
static String |
getRuntimeVersion(String namespace)
Get the version of the runtime java library that defines the model for the given namespace. |
static String |
getTypeIdName(Class<?> type)
Get the id for the specified type. |
static Class<?> |
getWrappedTypeForJsonName(String jsonName)
Get the type of the wrapped object for the specified json name. |
protected static void |
init(ClassLoader loader)
|
static String |
nameFromQName(String namespaceUri,
String localPart)
|
static void |
registerKnownJsonType(Class<?> type)
Register a known JSON type. |
| Methods inherited from class com.sun.xml.bind.marshaller.NamespacePrefixMapper |
|---|
getContextualNamespaceDecls, getPreDeclaredNamespaceUris, getPreDeclaredNamespaceUris2 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GedcomNamespaceManager(Class<?> rootClass)
public GedcomNamespaceManager(Map<String,String> overrides,
String defaultns)
public GedcomNamespaceManager(String defaultns)
public GedcomNamespaceManager(Map<String,String> overrides)
public GedcomNamespaceManager()
| Method Detail |
|---|
public static Map<String,String> getKnownPrefixes()
protected static void init(ClassLoader loader)
public static String nameFromQName(String namespaceUri,
String localPart)
public String getPreferredPrefix(String namespaceUri,
String suggestion,
boolean requirePrefix)
getPreferredPrefix in class com.sun.xml.bind.marshaller.NamespacePrefixMapperpublic static String getJsonNameForWrapperName(QName wrapperName)
wrapperName - The identifier for the wrapper name.
public static QName findWrapperNameForJsonName(String jsonName)
jsonName - The json name.
public static Class<?> getWrappedTypeForJsonName(String jsonName)
jsonName - The json name.
public static void registerKnownJsonType(Class<?> type)
type - the type to register.public static String getJsonName(Class<?> type)
type - The type.
public static String getTypeIdName(Class<?> type)
type - The type.
public static Class<?> getKnownJsonType(String jsonName)
jsonName - The json name.
public static Class<?> getKnownTypeById(String typeId)
typeId - The type id.
public static String getRuntimeVersion(String namespace)
namespace - The model namespace.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||