Interface NamespaceBeanLikeMap
- All Known Implementing Classes:
NamespaceBeanLikeMapImpl
public interface NamespaceBeanLikeMap
- Author:
- jwells
-
Method Summary
Modifier and TypeMethodDescriptionvoidbackup()Create a backup of all namespaces at this point.getBeanLikeMap(Map<String, String> namespaceToPrefixMap) Gets the bean-like map given the set of prefixes to use for the various namespaces.Gets a raw copy of the bean-like map.Gets a map from QName to value.Gets the value for key based on the namespace.booleanDetermines if the value for key based on namespace has been explicitly set.voidrestoreBackup(boolean drop) Either drop the backup data or restore the current data to the backup.voidSets the value for key based on the namespace.voidshallowCopy(NamespaceBeanLikeMap copyFrom, ModelImpl model, boolean copyReferences) Does a shallow copy from another namespace bean-like map to this one
-
Method Details
-
getValue
Gets the value for key based on the namespace. Locking must be done by the caller- Parameters:
namespace- if null or the empty string the default namespace will be usedkey- the non-null key- Returns:
- The value if found (may be null) or
null if not set (use
isSet(String, String)to determine if a value has been set
-
setValue
Sets the value for key based on the namespace. Locking must be done by the caller- Parameters:
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)
-
isSet
Determines if the value for key based on namespace has been explicitly set. Locking must be done by the caller- Parameters:
nanmespace- if null or the empty string the default namespace will be usedkey- the non-null key- Returns:
- true if the value is explicitly set, false otherwise
-
backup
void backup()Create a backup of all namespaces at this point. Locking must be done by the caller -
restoreBackup
void restoreBackup(boolean drop) Either drop the backup data or restore the current data to the backup. Locking must be done by the caller- Parameters:
drop- if true the backup should be dropped, if false the current data should be made the same as the backup
-
getBeanLikeMap
Gets the bean-like map given the set of prefixes to use for the various namespaces. Note that if a namespace is not found in the map the values from that namespace will not be included in the returned map. Locking must be handled by the caller- Parameters:
namespaceToPrefixMap- A map from namespace to the prefix that should be put on the keys for the namespace- Returns:
- A map with the fully qualified bean-like names
-
getQNameMap
Gets a map from QName to value. Default namespace is not taken into account- Returns:
- A non-null map from QName to value
-
shallowCopy
Does a shallow copy from another namespace bean-like map to this one- Parameters:
copyFrom- The other namesapce bean-like map to copymodel- The model to use to determine what fields to copycopyReferences- true if references should also be copied
-
getNamespaceBeanLikeMap
Gets a raw copy of the bean-like map. The outer map has namespace keys (including one for default) and the inner map is the bean-like map for that namespace. The map returned is not a copy, so any changes to it will affect the underlying object (so don't change it)- Returns:
-