org.apache.directory.shared.ldap.schema
Class AbstractSyntax

java.lang.Object
  extended byorg.apache.directory.shared.ldap.schema.AbstractSchemaObject
      extended byorg.apache.directory.shared.ldap.schema.AbstractSyntax
All Implemented Interfaces:
SchemaObject, Syntax

public abstract class AbstractSyntax
extends AbstractSchemaObject
implements Syntax

An abstract Syntax class.

Version:
$Rev: 379008 $
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.schema.AbstractSchemaObject
description, isObsolete, names, oid
 
Constructor Summary
protected AbstractSyntax(java.lang.String oid)
          Creates a Syntax object using a unique OID.
protected AbstractSyntax(java.lang.String oid, boolean isHumanReadible)
          Creates a Syntax object using a unique OID.
protected AbstractSyntax(java.lang.String oid, java.lang.String description)
          Creates a Syntax object using a unique OID.
protected AbstractSyntax(java.lang.String oid, java.lang.String description, boolean isHumanReadible)
          Creates a Syntax object using a unique OID.
 
Method Summary
 boolean equals(java.lang.Object obj)
          If the object implements Syntax and has the same OID as this Syntax then they are equal.
 int hashCode()
          Based on the hashCode of the oid property.
 boolean isHumanReadible()
          Gets whether or not the Syntax is human readible.
protected  void setHumanReadible(boolean isHumanReadible)
          Sets the human readible flag value.
 
Methods inherited from class org.apache.directory.shared.ldap.schema.AbstractSchemaObject
getDescription, getName, getNames, getOid, isObsolete, setDescription, setNames, setObsolete, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.directory.shared.ldap.schema.Syntax
getSyntaxChecker
 
Methods inherited from interface org.apache.directory.shared.ldap.schema.SchemaObject
getDescription, getName, getNames, getOid, isObsolete
 

Constructor Detail

AbstractSyntax

protected AbstractSyntax(java.lang.String oid)
Creates a Syntax object using a unique OID.

Parameters:
oid - the OID for this Syntax

AbstractSyntax

protected AbstractSyntax(java.lang.String oid,
                         boolean isHumanReadible)
Creates a Syntax object using a unique OID.

Parameters:
oid - the OID for this Syntax
isHumanReadible - whether or not Syntax is human readible

AbstractSyntax

protected AbstractSyntax(java.lang.String oid,
                         java.lang.String description)
Creates a Syntax object using a unique OID.

Parameters:
oid - the OID for this Syntax
description - the description for this Syntax

AbstractSyntax

protected AbstractSyntax(java.lang.String oid,
                         java.lang.String description,
                         boolean isHumanReadible)
Creates a Syntax object using a unique OID.

Parameters:
oid - the OID for this Syntax
isHumanReadible - whether or not Syntax is human readible
description - the description for this Syntax
Method Detail

isHumanReadible

public final boolean isHumanReadible()
Description copied from interface: Syntax
Gets whether or not the Syntax is human readible.

Specified by:
isHumanReadible in interface Syntax
Returns:
true if the syntax can be interpretted by humans, false otherwise
See Also:
Syntax.isHumanReadible()

setHumanReadible

protected void setHumanReadible(boolean isHumanReadible)
Sets the human readible flag value.

Parameters:
isHumanReadible - the human readible flag value to set

hashCode

public int hashCode()
Based on the hashCode of the oid property.

Overrides:
hashCode in class AbstractSchemaObject
Returns:
the hashCode of the oid String

equals

public boolean equals(java.lang.Object obj)
If the object implements Syntax and has the same OID as this Syntax then they are equal.

Overrides:
equals in class AbstractSchemaObject
Parameters:
obj - the object to test for equality
Returns:
true if obj is a Syntax and OID's match


Copyright © 2003-2006 . All Rights Reserved.