org.jbind.xml.instance.builder
Class KeyStore

java.lang.Object
  extended byorg.jbind.xml.instance.builder.KeyStore
All Implemented Interfaces:
IKeyStore

public class KeyStore
extends java.lang.Object
implements IKeyStore


Constructor Summary
KeyStore()
           
 
Method Summary
 void addKeys(IRef aRef, java.util.Collection aKeys)
          Adds a collection of keys to an index.
 boolean contains(IRef aRef, IKey aKey)
          Checks if a key is contained in the key store.
 java.util.Map getAmbiguousKeySets()
          Gets the map of ambiguous key sets contained in this key store.
 java.util.Map getKeySets()
          Gets the map of key sets contained in this key store.
 boolean isAmbiguous(IRef aRef, IKey aKey)
          Checks if a key is ambiguous in the key store.
 void merge(IKeyStore anElementKeys)
          Merge keys from a child into this key store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyStore

public KeyStore()
Method Detail

getKeySets

public java.util.Map getKeySets()
Description copied from interface: IKeyStore
Gets the map of key sets contained in this key store. The map maps references of indices to sets of keys. The sets do not contain ambiguous keys.

Specified by:
getKeySets in interface IKeyStore
Returns:
(optional).

getAmbiguousKeySets

public java.util.Map getAmbiguousKeySets()
Description copied from interface: IKeyStore
Gets the map of ambiguous key sets contained in this key store. The map maps references of indices to sets of keys. Ambigous keys can occur when the keys of two key stores are merged. This is not an error as long as the key is not referred by a keyref constraint.

Specified by:
getAmbiguousKeySets in interface IKeyStore
Returns:
(optional).

merge

public void merge(IKeyStore anElementKeys)
Description copied from interface: IKeyStore
Merge keys from a child into this key store.

Specified by:
merge in interface IKeyStore
Parameters:
anElementKeys - (required).

addKeys

public void addKeys(IRef aRef,
                    java.util.Collection aKeys)
Description copied from interface: IKeyStore
Adds a collection of keys to an index.

Specified by:
addKeys in interface IKeyStore
Parameters:
aRef - (required). An index reference.
aKeys - (required).

contains

public boolean contains(IRef aRef,
                        IKey aKey)
Description copied from interface: IKeyStore
Checks if a key is contained in the key store.

Specified by:
contains in interface IKeyStore
Parameters:
aRef - (required). An index referenced.
aKey - (required).
Returns:
Returns true iff the key is contained in the key store (and not ambiguous).

isAmbiguous

public boolean isAmbiguous(IRef aRef,
                           IKey aKey)
Description copied from interface: IKeyStore
Checks if a key is ambiguous in the key store.

Specified by:
isAmbiguous in interface IKeyStore
Parameters:
aRef - (required). An index referenced.
aKey - (required).
Returns:
Returns true iff the key is ambiguous, i.e. was added several times to the store.