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

java.lang.Object
  extended by org.apache.directory.shared.ldap.schema.AbstractSchemaObject
      extended by org.apache.directory.shared.ldap.schema.AbstractSyntax
All Implemented Interfaces:
java.io.Serializable, SchemaObject, Syntax

public abstract class AbstractSyntax
extends AbstractSchemaObject
implements Syntax

An abstract Syntax class.

Version:
$Rev: 664290 $
Author:
Apache Directory Project
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.schema.AbstractSchemaObject
description, isObsolete, names, oid, schema
 
Constructor Summary
protected AbstractSyntax(java.lang.String oid)
          Creates a Syntax object using a unique OID.
protected AbstractSyntax(java.lang.String oid, boolean isHumanReadable)
          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 isHumanReadable)
          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 isHumanReadable()
          Gets whether or not the Syntax is human readable.
protected  void setHumanReadable(boolean isHumanReadable)
          Sets the human readable flag value.
 
Methods inherited from class org.apache.directory.shared.ldap.schema.AbstractSchemaObject
getDescription, getName, getNamesRef, getOid, getSchema, isObsolete, setDescription, setNames, setObsolete, setSchema, 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, getNamesRef, getOid, getSchema, isObsolete, setSchema
 

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 isHumanReadable)
Creates a Syntax object using a unique OID.

Parameters:
oid - the OID for this Syntax
isHumanReadable - whether or not Syntax is human readable

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 isHumanReadable)
Creates a Syntax object using a unique OID.

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

isHumanReadable

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

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

setHumanReadable

protected void setHumanReadable(boolean isHumanReadable)
Sets the human readable flag value.

Parameters:
isHumanReadable - the human readable 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-2011 Apache Software Foundation. All Rights Reserved.