Skip navigation links

Oracle Virtual Directory Java API Reference
11g Release 1 (11.1.1)

E10688-03


com.octetstring.vde.syntax
Class DistinguishedName

java.lang.Object
  extended by com.octetstring.vde.syntax.Syntax
      extended by com.octetstring.vde.syntax.DirectoryString
          extended by com.octetstring.vde.syntax.DistinguishedName

All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DirectoryString>

public class DistinguishedName
extends DirectoryString

Class representing a Directory String syntax (case insensitive string)

Author:
Octet String, Inc.
See Also:
Serialized Form

Field Summary
static DistinguishedName EMPTY_DN
           

 

Constructor Summary
DistinguishedName()
          Create an empty distinguished name
DistinguishedName(byte[] bytes)
          Create a directory string from the given byte array.
DistinguishedName(byte[] bytes, int hashCode)
          Create a directory string from the given byte array, but skip the computation of the hashCode.
DistinguishedName(DirectoryString dn)
           
DistinguishedName(java.util.List<javax.naming.ldap.Rdn> rdnComponents)
           
DistinguishedName(java.lang.String data)
          Create a new directory string from the given String.

 

Method Summary
 DistinguishedName concat(DistinguishedName baseDN)
          This method creates a new DN that is a descendant of this DN, using the specified DN as a relative base DN.
 boolean equals(java.lang.Object obj)
          Determine if this Distinguished Name equals another.
 java.lang.String escapeSlashes()
           
 int getNumberOfRDNs()
           
 DistinguishedName getParent()
           
 java.lang.String getRDN()
           
 javax.naming.ldap.Rdn getRDN(int position)
           
 DistinguishedName getRelativeDN(DistinguishedName baseDN)
           
 byte[] getValue()
          Get this directory string as a byte array.
 int indexOf(DirectoryString indexString)
          Find the first occurance of the index string in this directory string.
 boolean isAncestorOf(DistinguishedName dn)
          This method determines whether this DN is an ancestor of the specified DN.
 boolean isDescendantOf(DistinguishedName dn)
          This method determines whether this DN is a descendant of the specified DN.
 boolean isEmptyDN()
           
static boolean isValidDN(java.lang.String dn)
           
 java.lang.String normalize()
          Retrieves a normalized string representation of this DN.
 void setDirectoryString(java.lang.String directoryString)
          Sets the value of this distinguished name using a string.
 void setValue(byte[] value)
          Sets the value of this directory string from an array of bytes
static DistinguishedName toDNSyntax(DirectoryString dn)
           
 javax.naming.Name toName()
           

 

Methods inherited from class com.octetstring.vde.syntax.DirectoryString
clone, compareTo, compareTo, endsWith, endsWith, equals, getBytes, getDirectoryBytes, getDirectoryChars, getDirectoryString, hashCode, indexOf, length, reverse, setDirectoryBytes, setValue, startsWith, startsWith, substring, toString, validate

 

Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

EMPTY_DN

public static final DistinguishedName EMPTY_DN

Constructor Detail

DistinguishedName

public DistinguishedName()
Create an empty distinguished name

DistinguishedName

public DistinguishedName(java.util.List<javax.naming.ldap.Rdn> rdnComponents)

DistinguishedName

public DistinguishedName(DirectoryString dn)
                  throws InvalidDNException
Throws:
InvalidDNException

DistinguishedName

public DistinguishedName(byte[] bytes)
                  throws InvalidDNException
Create a directory string from the given byte array.
Parameters:
bytes - a byte[] value
Throws:
InvalidDNException

DistinguishedName

public DistinguishedName(byte[] bytes,
                         int hashCode)
                  throws InvalidDNException
Create a directory string from the given byte array, but skip the computation of the hashCode.
Parameters:
bytes - a byte[] value
hashCode - an int value
Throws:
InvalidDNException

DistinguishedName

public DistinguishedName(java.lang.String data)
Create a new directory string from the given String.
Parameters:
data - a String value

Method Detail

getRDN

public java.lang.String getRDN()

getRDN

public javax.naming.ldap.Rdn getRDN(int position)

toName

public javax.naming.Name toName()

getParent

public DistinguishedName getParent()

isDescendantOf

public boolean isDescendantOf(DistinguishedName dn)
This method determines whether this DN is a descendant of the specified DN.

isAncestorOf

public boolean isAncestorOf(DistinguishedName dn)
This method determines whether this DN is an ancestor of the specified DN.

concat

public DistinguishedName concat(DistinguishedName baseDN)
This method creates a new DN that is a descendant of this DN, using the specified DN as a relative base DN.
Parameters:
baseDN - The relative base DN to concatenate onto this DN.

getRelativeDN

public DistinguishedName getRelativeDN(DistinguishedName baseDN)

getNumberOfRDNs

public int getNumberOfRDNs()

isEmptyDN

public boolean isEmptyDN()

normalize

public java.lang.String normalize()
Retrieves a normalized string representation of this DN.
Overrides:
normalize in class DirectoryString
Returns:
A normalized string representation of this DN.

equals

public boolean equals(java.lang.Object obj)
Determine if this Distinguished Name equals another.
Overrides:
equals in class DirectoryString
Parameters:
obj - an Object value
Returns:
a boolean value

indexOf

public int indexOf(DirectoryString indexString)
Find the first occurance of the index string in this directory string.
Overrides:
indexOf in class DirectoryString
Parameters:
indexString - a DirectoryString value
Returns:
an int value

setDirectoryString

public void setDirectoryString(java.lang.String directoryString)
Sets the value of this distinguished name using a string.
Overrides:
setDirectoryString in class DirectoryString
Parameters:
directoryString - a String value

setValue

public void setValue(byte[] value)
Sets the value of this directory string from an array of bytes
Overrides:
setValue in class DirectoryString
Parameters:
value - a byte[] value

getValue

public byte[] getValue()
Description copied from class: DirectoryString
Get this directory string as a byte array.
Overrides:
getValue in class DirectoryString
Returns:
a byte[] value

escapeSlashes

public java.lang.String escapeSlashes()

toDNSyntax

public static DistinguishedName toDNSyntax(DirectoryString dn)
                                    throws InvalidDNException
Throws:
InvalidDNException

isValidDN

public static boolean isValidDN(java.lang.String dn)

Skip navigation links

Oracle Virtual Directory Java API Reference
11g Release 1 (11.1.1)

E10688-03


Copyright © 2000-2010 Oracle and/or its affiliates. All Rights Reserved.