public class NamespaceBeanLikeMapImpl extends Object implements NamespaceBeanLikeMap, Serializable
Constructor and Description |
---|
NamespaceBeanLikeMapImpl() |
Modifier and Type | Method and Description |
---|---|
void |
backup()
Create a backup of all namespaces at this point.
|
Map<String,Object> |
getBeanLikeMap(Map<String,String> namespaceToPrefixMap)
Gets the bean-like map given the set
of prefixes to use for the various
namespaces.
|
Map<String,Map<String,Object>> |
getNamespaceBeanLikeMap()
Gets a raw copy of the bean-like map.
|
Map<QName,Object> |
getQNameMap()
Gets a map from QName to value.
|
Object |
getValue(String namespace,
String key)
Gets the value for key based on the namespace.
|
boolean |
isSet(String namespace,
String key)
Determines if the value for key based on namespace
has been explicitly set.
|
void |
restoreBackup(boolean drop)
Either drop the backup data or restore the
current data to the backup.
|
void |
setValue(String namespace,
String key,
Object value)
Sets the value for key based on the namespace.
|
void |
shallowCopy(NamespaceBeanLikeMap copyFrom,
ModelImpl copyModel,
boolean copyReferences)
Does a shallow copy from another namespace bean-like map to this one
|
String |
toString() |
public Object getValue(String namespace, String key)
NamespaceBeanLikeMap
getValue
in interface NamespaceBeanLikeMap
namespace
- if null or the empty string the
default namespace will be usedkey
- the non-null keyNamespaceBeanLikeMap.isSet(String, String)
to determine if a value has been setpublic void setValue(String namespace, String key, Object value)
NamespaceBeanLikeMap
setValue
in interface NamespaceBeanLikeMap
namespace
- if null or the empty string the
default namespace will be usedkey
- the non-null keyvalue
- The value to set this key to (may be null)public boolean isSet(String namespace, String key)
NamespaceBeanLikeMap
isSet
in interface NamespaceBeanLikeMap
namespace
- if null or the empty string the
default namespace will be usedkey
- the non-null keypublic void backup()
NamespaceBeanLikeMap
backup
in interface NamespaceBeanLikeMap
public void restoreBackup(boolean drop)
NamespaceBeanLikeMap
restoreBackup
in interface NamespaceBeanLikeMap
drop
- if true the backup should be
dropped, if false the current data should
be made the same as the backuppublic Map<String,Object> getBeanLikeMap(Map<String,String> namespaceToPrefixMap)
NamespaceBeanLikeMap
getBeanLikeMap
in interface NamespaceBeanLikeMap
namespaceToPrefixMap
- A map from namespace
to the prefix that should be put on the keys for
the namespacepublic void shallowCopy(NamespaceBeanLikeMap copyFrom, ModelImpl copyModel, boolean copyReferences)
NamespaceBeanLikeMap
shallowCopy
in interface NamespaceBeanLikeMap
copyFrom
- The other namesapce bean-like map to copycopyModel
- The model to use to determine what fields to copycopyReferences
- true if references should also be copiedpublic Map<String,Map<String,Object>> getNamespaceBeanLikeMap()
NamespaceBeanLikeMap
getNamespaceBeanLikeMap
in interface NamespaceBeanLikeMap
public Map<QName,Object> getQNameMap()
NamespaceBeanLikeMap
getQNameMap
in interface NamespaceBeanLikeMap
Copyright © 2009–2023 Oracle Corporation. All rights reserved.