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

java.lang.Object
  extended by org.openanzo.common.ldap.container.map.BasicEntrySet
All Implemented Interfaces:
EntrySet

public class BasicEntrySet
extends java.lang.Object
implements EntrySet

Simple implementation of EntrySet. Features: Supports the BlankNode extension bindings. Creates URI's for DNs by appending the most specific name in the DN as a URI fragment to a provided URI prefix.

Author:
Joe Betz

Constructor Summary
BasicEntrySet(BlankNodeIndex blankNodeIndex, java.net.URI uriPrefix, java.lang.String rdn, javax.naming.ldap.LdapName orgDn)
          Create a EntrySet for the all nodes one level below the provided DN.
BasicEntrySet(BlankNodeIndex blankNodeIndex, java.net.URI uriPrefix, java.lang.String rdn, javax.naming.ldap.LdapName orgDn, int scope, boolean appendSuffix)
          Create a EntrySet.
BasicEntrySet(BlankNodeIndex blankNodeIndex, java.net.URI uriPrefix, java.lang.String rdn, javax.naming.ldap.LdapName orgDn, javax.naming.directory.SearchControls searchControls, java.lang.String filter)
           
 
Method Summary
 java.lang.String getFilter()
          Gets the LDAP filter to be used to constrain which entries are part of this set.
 javax.naming.Name getRootDn()
          Gets the Root DN of the entry set.
 javax.naming.directory.SearchControls getSearchControls()
          Gets the search controls to use for this entry set.
 RDFTerm toSubject(java.lang.String dn, AttributeBinding binding, java.lang.String value)
          Returns a RDF resource representing the entry.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicEntrySet

public BasicEntrySet(BlankNodeIndex blankNodeIndex,
                     java.net.URI uriPrefix,
                     java.lang.String rdn,
                     javax.naming.ldap.LdapName orgDn)
Create a EntrySet for the all nodes one level below the provided DN.

Parameters:
rdn - DN of the node relative the the orginization's DN.
orgDn - organization's DN.

BasicEntrySet

public BasicEntrySet(BlankNodeIndex blankNodeIndex,
                     java.net.URI uriPrefix,
                     java.lang.String rdn,
                     javax.naming.ldap.LdapName orgDn,
                     int scope,
                     boolean appendSuffix)
Create a EntrySet.

Parameters:
rdn - DN of the node relative the the orginization's DN.
orgDn - organization's DN.
scope - Use SearchControls enum. Specify to scope to use for selecting entries for the set.

BasicEntrySet

public BasicEntrySet(BlankNodeIndex blankNodeIndex,
                     java.net.URI uriPrefix,
                     java.lang.String rdn,
                     javax.naming.ldap.LdapName orgDn,
                     javax.naming.directory.SearchControls searchControls,
                     java.lang.String filter)
Method Detail

getRootDn

public javax.naming.Name getRootDn()
Description copied from interface: EntrySet
Gets the Root DN of the entry set.

Specified by:
getRootDn in interface EntrySet
Returns:
The Root DN of the entry set.

getSearchControls

public javax.naming.directory.SearchControls getSearchControls()
Description copied from interface: EntrySet
Gets the search controls to use for this entry set.

Specified by:
getSearchControls in interface EntrySet
Returns:
Search controls to use. Contains scope property.

getFilter

public java.lang.String getFilter()
Description copied from interface: EntrySet
Gets the LDAP filter to be used to constrain which entries are part of this set. See DirContext.search(Name, String, Object[], SearchControls) for details regarding LDAP filter syntax.

Specified by:
getFilter in interface EntrySet
Returns:
the LDAP filter.

toSubject

public RDFTerm toSubject(java.lang.String dn,
                         AttributeBinding binding,
                         java.lang.String value)
Description copied from interface: EntrySet
Returns a RDF resource representing the entry. See also LdapMapping.toDistinguishedName(TriplePatternComponent)

Specified by:
toSubject in interface EntrySet
Parameters:
dn - The LDAP dn representing the entry.
binding - The attribute for the RDF statement the returned value will be part of.
value - The attribute value for the RDF statement the returned value will be part of.
Returns:
An RDF resource.


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