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

java.lang.Object
  extended by org.openanzo.common.ldap.container.map.BasicLdapMapping
All Implemented Interfaces:
LdapMapping
Direct Known Subclasses:
FoafLdapMapping, VCardLdapMapping

public abstract class BasicLdapMapping
extends java.lang.Object
implements LdapMapping

Support for some basic ldap to rdf mapping rules:

Author:
Joe Betz

Constructor Summary
BasicLdapMapping(javax.naming.ldap.LdapName orgDn, java.net.URI uri, java.net.URI graphUri)
           
 
Method Summary
 AttributeBinding createBinding(BasicEntrySet entrySet, java.lang.String attribute, java.net.URI uri, ValueTransform valueBinding)
           
 java.util.Set<java.lang.String> getAllAttributes(java.net.URI uri)
          Gets all the attributes mapped to the given URI.
 java.util.List<? extends AttributeBinding> getAttributeBinding(java.lang.String attribute, java.lang.String dn)
          Gets the attribute bindings for the given attribute and entry set identified by the given Ldap DN.
 BlankNodeIndex getBlankNodeIndex()
           
 EntrySet getEntrySet(java.lang.String dn)
          Gets the entry set for the provided DN.
 java.util.List<EntrySet> getEntrySets()
          Gets the entry sets the mapping uses.
 java.net.URI getGraphUri()
          Gets the named graph uri for this mapping.
 javax.naming.Name toDistinguishedName(TriplePatternComponent term)
          Map an RDF term or blank node to an Ldap DN, or, if term is ambiguous or matches multiple results return null.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicLdapMapping

public BasicLdapMapping(javax.naming.ldap.LdapName orgDn,
                        java.net.URI uri,
                        java.net.URI graphUri)
Method Detail

getBlankNodeIndex

public BlankNodeIndex getBlankNodeIndex()
Specified by:
getBlankNodeIndex in interface LdapMapping

getGraphUri

public java.net.URI getGraphUri()
Description copied from interface: LdapMapping
Gets the named graph uri for this mapping.

Specified by:
getGraphUri in interface LdapMapping
Returns:
Graph URI.

getEntrySets

public java.util.List<EntrySet> getEntrySets()
Description copied from interface: LdapMapping
Gets the entry sets the mapping uses.

Specified by:
getEntrySets in interface LdapMapping
Returns:
List of entry sets used by mapping.

getAllAttributes

public java.util.Set<java.lang.String> getAllAttributes(java.net.URI uri)
Description copied from interface: LdapMapping
Gets all the attributes mapped to the given URI.

Specified by:
getAllAttributes in interface LdapMapping
Parameters:
uri - URI to map.
Returns:
all attributes mapped to given URI

getAttributeBinding

public java.util.List<? extends AttributeBinding> getAttributeBinding(java.lang.String attribute,
                                                                      java.lang.String dn)
Description copied from interface: LdapMapping
Gets the attribute bindings for the given attribute and entry set identified by the given Ldap DN.

Specified by:
getAttributeBinding in interface LdapMapping
Parameters:
attribute - Attribute to find bindings for.
dn - Ldap DN
Returns:
Bindings that map the attribute to uris and mapping rules

toDistinguishedName

public javax.naming.Name toDistinguishedName(TriplePatternComponent term)
Description copied from interface: LdapMapping
Map an RDF term or blank node to an Ldap DN, or, if term is ambiguous or matches multiple results return null. This must map all values returned by EntrySet.toSubject(String, AttributeBinding, String) back to the DNs provided as input. I.e. it must be inversely functional.

Specified by:
toDistinguishedName in interface LdapMapping
Parameters:
term - RDF term or blank node to map to Ldap DN.
Returns:
Ldap DN.

getEntrySet

public EntrySet getEntrySet(java.lang.String dn)
Description copied from interface: LdapMapping
Gets the entry set for the provided DN.

Specified by:
getEntrySet in interface LdapMapping
Parameters:
dn - LDAP DN.
Returns:
entry set

createBinding

public AttributeBinding createBinding(BasicEntrySet entrySet,
                                      java.lang.String attribute,
                                      java.net.URI uri,
                                      ValueTransform valueBinding)


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