org.openanzo.common.ldap.container.map
Class BlankNodeIndex

java.lang.Object
  extended by org.openanzo.common.ldap.container.map.BlankNodeIndex

public class BlankNodeIndex
extends java.lang.Object

Keeps track of blank nodes during query execution. The blank nodes are indexed by two multi-value keys: Key to blank node from information about statements...

Also provides reverse lookup so a Ldap DN can be found for a given blank node.

Author:
Joe Betz

Field Summary
 java.util.Map<org.openanzo.common.ldap.container.map.BlankNodeIndex.AttributeNodeKey,org.openanzo.common.ldap.container.map.BlankNodeIndex.BlankNodeKey> attributeNodeBindings
           
 org.apache.commons.collections15.BidiMap<org.openanzo.common.ldap.container.map.BlankNodeIndex.BlankNodeKey,BlankNodeManager.BlankNode> blankNodeBindings
           
 BlankNodeManager manager
           
 
Constructor Summary
BlankNodeIndex()
           
 
Method Summary
 java.lang.String getDn(BlankNodeManager.BlankNode blankNode)
          Returns the Ldap DN this blank node extends from, or null if the blank node is not set.
 BlankNodeManager.BlankNode getOrCreateBlankNode(java.lang.String dn, AttributeBinding binding)
          Gets the blank node corresponding to the provided Ldap DN and attribute binding.
 BlankNodeManager.BlankNode getOrCreateBlankNode(java.lang.String dn, java.net.URI uri)
          Gets the blank node corresponding to the provided Ldap DN and predicate URI connecting the root object to the blank node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blankNodeBindings

public final org.apache.commons.collections15.BidiMap<org.openanzo.common.ldap.container.map.BlankNodeIndex.BlankNodeKey,BlankNodeManager.BlankNode> blankNodeBindings

attributeNodeBindings

public final java.util.Map<org.openanzo.common.ldap.container.map.BlankNodeIndex.AttributeNodeKey,org.openanzo.common.ldap.container.map.BlankNodeIndex.BlankNodeKey> attributeNodeBindings

manager

public BlankNodeManager manager
Constructor Detail

BlankNodeIndex

public BlankNodeIndex()
Method Detail

getOrCreateBlankNode

public BlankNodeManager.BlankNode getOrCreateBlankNode(java.lang.String dn,
                                                       AttributeBinding binding)
Gets the blank node corresponding to the provided Ldap DN and attribute binding. If the blank node does not yet exist, create a new one and return it.

Parameters:
dn - Ldap DN
binding - attribute binding
Returns:
a blank node

getDn

public java.lang.String getDn(BlankNodeManager.BlankNode blankNode)
Returns the Ldap DN this blank node extends from, or null if the blank node is not set.

Parameters:
blankNode -
Returns:
Ldap DN

getOrCreateBlankNode

public BlankNodeManager.BlankNode getOrCreateBlankNode(java.lang.String dn,
                                                       java.net.URI uri)
Gets the blank node corresponding to the provided Ldap DN and predicate URI connecting the root object to the blank node. If the blank node does not yet exist, create a new one and return it.

Parameters:
dn - Ldap DN
uri - URI
Returns:
a blank node


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.