Author: akarasulu
Date: Sat Jan 17 11:33:59 2004
New Revision: 6185
Added:
incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/DITContentRule.java
(contents, props changed)
- copied, changed from rev 6184, incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ContentRule.java
Removed:
incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ContentRule.java
Modified:
incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/DescriptionUtils.java
Log:
Changing class name and cleaning up docs.
Copied: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/DITContentRule.java
(from rev 6184, incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ContentRule.java)
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/ContentRule.java
(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/DITContentRule.java
Sat Jan 17 11:33:59 2004
@@ -132,51 +132,51 @@
* @see <a href=
* "http://www.ietf.org/internet-drafts/draft-ietf-ldapbis-models-09.txt">
* ldapbis [MODELS]</a>
- * @see DescriptionUtils#getDescription(ContentRule)
+ * @see DescriptionUtils#getDescription(DITContentRule)
* @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
* @author $Author$
* @version $Rev$
*/
-public interface ContentRule
+public interface DITContentRule
{
/**
- * Gets a description of this ContentRule.
+ * Gets a description of this DITContentRule.
*
* @return a description
*/
String getDescription() ;
/**
- * Gets a short descriptive name for the ContentRule.
+ * Gets a short descriptive name for the DITContentRule.
*
* @return a short name.
*/
String getName() ;
/**
- * Gets the oid for this ContentRule.
+ * Gets the oid for this DITContentRule.
*
* @return the object identifier
*/
String getOid() ;
/**
- * Gets whether or not this ContentRule is obsolete.
+ * Gets whether or not this DITContentRule is obsolete.
*
* @return true if obsolete, false if not.
*/
boolean isObsolete() ;
/**
- * Gets the STRUCTURAL ObjectClass this ContentRule specifies attributes
+ * Gets the STRUCTURAL ObjectClass this DITContentRule specifies attributes
* for.
*
- * @return the ObjectClass this ContentRule specifies attributes for
+ * @return the ObjectClass this DITContentRule specifies attributes for
*/
ObjectClass getObjectClass() ;
/**
- * Gets all the AUXILLARY ObjectClasses this ContentRule specifies for the
+ * Gets all the AUXILLARY ObjectClasses this DITContentRule specifies for the
* given STRUCTURAL objectClass.
*
* @return the extra AUXILLARY ObjectClasses
@@ -185,14 +185,14 @@
/**
* Gets all the AttributeTypes of the "must" attribute names this
- * ContentRule specifies for the given STRUCTURAL objectClass.
+ * DITContentRule specifies for the given STRUCTURAL objectClass.
*
* @return the AttributeTypes of attributes that must be included in entries
*/
AttributeType[] getMustNames() ;
/**
- * Gets all the AttributeTypes of the "may" attribute names this ContentRule
+ * Gets all the AttributeTypes of the "may" attribute names this DITContentRule
* specifies for the given STRUCTURAL objectClass.
*
* @return the AttributeTypes of attributes that may be included in entries
@@ -200,7 +200,7 @@
AttributeType[] getMayNames() ;
/**
- * Gets all the AttributeTypes of the "not" attribute names this ContentRule
+ * Gets all the AttributeTypes of the "not" attribute names this DITContentRule
* specifies for the given STRUCTURAL objectClass.
*
* @return the AttributeTypes of attributes that are excluded in entries
Modified: incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/DescriptionUtils.java
==============================================================================
--- incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/DescriptionUtils.java
(original)
+++ incubator/directory/ldap/trunk/eve/backend/schema/common/api/src/java/org/apache/eve/schema/DescriptionUtils.java
Sat Jan 17 11:33:59 2004
@@ -51,8 +51,18 @@
/**
- * Utility class used to generate schema object specifications.
- *
+ * Utility class used to generate schema object specifications. Descriptions
+ * can be generated for the following objects:
+ * <ul>
+ * <li><a href="./AttributeType.html">AttributeType</a></li>
+ * <li><a href="./DITContentRule.html">DITContentRule</a></li>
+ * <li><a href="./MatchingRule.html">MatchingRule</a></li>
+ * <li><a href="./MatchingRuleUse.html">MatchingRuleUse</a></li>
+ * <li><a href="./NameForm.html">NameForm</a></li>
+ * <li><a href="./ObjectClass.html">ObjectClass</a></li>
+ * <li><a href="./StructureRule.html">StructureRule</a></li>
+ * <li><a href="./Syntax.html">Syntax</a></li>
+ * </ul>
* @author <a href="mailto:akarasulu@apache.org">Alex Karasulu</a>
* @author $Author$
* @version $Rev$
@@ -61,7 +71,9 @@
{
/**
* Generates the description using the AttributeTypeDescription as defined
- * by the syntax: 1.3.6.1.4.1.1466.115.121.1.3.
+ * by the syntax: 1.3.6.1.4.1.1466.115.121.1.3. Only the right hand side
+ * of the description starting at the openning parenthesis is generated:
+ * that is 'AttributeTypeDescription = ' is not generated.
* <pre>
* AttributeTypeDescription = "(" whsp
* numericoid whsp ; AttributeType identifier
@@ -79,79 +91,92 @@
* [ "USAGE" whsp AttributeUsage ] ; default userApplications
* whsp ")"
* </pre>
- * @param a_type the attributeType to generate a description for
+ * @param an_attributeType the attributeType to generate a description for
* @return the AttributeTypeDescription Syntax for the attributeType in a
* pretty formated string
*/
- public static String getDescription( AttributeType a_type )
+ public static String getDescription( AttributeType an_attributeType )
{
StringBuffer l_buf = new StringBuffer( "( " ) ;
- l_buf.append( a_type.getOid() ).append( '\n' ) ;
+ l_buf.append( an_attributeType.getOid() ) ;
+ l_buf.append( '\n' ) ;
l_buf.append( "NAME " ) ;
- l_buf.append( a_type.getName() ).append( '\n' ) ;
+ l_buf.append( an_attributeType.getName() ) ;
+ l_buf.append( '\n' ) ;
- if ( a_type.getDescription() != null )
+ if ( an_attributeType.getDescription() != null )
{
l_buf.append( "DESC " ) ;
- l_buf.append( a_type.getDescription() ).append( '\n' ) ;
+ l_buf.append( an_attributeType.getDescription() ) ;
+ l_buf.append( '\n' ) ;
}
- if ( a_type.isObsolete() )
+ if ( an_attributeType.isObsolete() )
{
- l_buf.append( "OBSOLETE" ).append( '\n' ) ;
+ l_buf.append( "OBSOLETE" ) ;
+ l_buf.append( '\n' ) ;
}
- l_buf.append( a_type.getSuperior().getOid() ) ;
+ l_buf.append( an_attributeType.getSuperior().getOid() ) ;
- if ( a_type.getEquality() != null )
+ if ( an_attributeType.getEquality() != null )
{
l_buf.append( "EQUALITY " ) ;
- l_buf.append( a_type.getEquality().getOid() ).append( '\n' ) ;
+ l_buf.append( an_attributeType.getEquality().getOid() ) ;
+ l_buf.append( '\n' ) ;
}
- if ( a_type.getOrdering() != null )
+ if ( an_attributeType.getOrdering() != null )
{
l_buf.append( "ORDERING " ) ;
- l_buf.append( a_type.getOrdering().getOid() ).append( '\n' ) ;
+ l_buf.append( an_attributeType.getOrdering().getOid() ) ;
+ l_buf.append( '\n' ) ;
}
- if ( a_type.getSubstr() != null )
+ if ( an_attributeType.getSubstr() != null )
{
l_buf.append( "SUBSTR " ) ;
- l_buf.append( a_type.getSubstr().getOid() ).append( '\n' ) ;
+ l_buf.append( an_attributeType.getSubstr().getOid() ) ;
+ l_buf.append( '\n' ) ;
}
l_buf.append( "SYNTAX " ) ;
- l_buf.append( a_type.getSyntax().getOid() ).append( '\n' ) ;
+ l_buf.append( an_attributeType.getSyntax().getOid() ) ;
+ l_buf.append( '\n' ) ;
- if ( a_type.isSingleValue() )
+ if ( an_attributeType.isSingleValue() )
{
- l_buf.append( "SINGLE-VALUE" ).append( '\n' ) ;
+ l_buf.append( "SINGLE-VALUE" ) ;
+ l_buf.append( '\n' ) ;
}
- if ( a_type.isCollective() )
+ if ( an_attributeType.isCollective() )
{
- l_buf.append( "COLLECTIVE" ).append( '\n' ) ;
+ l_buf.append( "COLLECTIVE" ) ;
+ l_buf.append( '\n' ) ;
}
- if ( a_type.isCanUserModify() )
+ if ( an_attributeType.isCanUserModify() )
{
- l_buf.append( "NO-USER-MODIFICATION" ).append( '\n' ) ;
+ l_buf.append( "NO-USER-MODIFICATION" ) ;
+ l_buf.append( '\n' ) ;
}
l_buf.append( "USAGE " ) ;
- l_buf.append( a_type.getUsage().getName() ).append( " ) " ) ;
+ l_buf.append( an_attributeType.getUsage().getName() ) ;
+ l_buf.append( " ) " ) ;
return l_buf.toString() ;
}
/**
- * Generates the DITContentRuleDescription for a ContentRule as defined by
- * the syntax: 1.3.6.1.4.1.1466.115.121.1.16.
+ * Generates the DITContentRuleDescription for a DITContentRule as defined by
+ * the syntax: 1.3.6.1.4.1.1466.115.121.1.16. Only the right hand side
+ * of the description starting at the openning parenthesis is generated:
+ * that is 'DITContentRuleDescription = ' is not generated.
* <pre>
- *
* DITContentRuleDescription = "("
* numericoid ; Structural ObjectClass identifier
* [ "NAME" qdescrs ]
@@ -167,7 +192,7 @@
* @return the specification according to the DITContentRuleDescription
* syntax
*/
- public static String getDescription( ContentRule a_crule )
+ public static String getDescription( DITContentRule a_crule )
{
StringBuffer l_buf = new StringBuffer( "( " ) ;
l_buf.append( a_crule.getOid() ).append( '\n' ) ;
@@ -273,6 +298,22 @@
l_buf.append( "SYNTAX " ).append( a_mrule.getSyntax().getOid() ) ;
l_buf.append( " ) " ) ;
return l_buf.toString() ;
+ }
+
+
+ /**
+ * @todo implement and document me
+ *
+ * @param a_mruleUse
+ * @return
+ */
+ public static String getDescription( MatchingRuleUse a_mruleUse )
+ {
+ StringBuffer l_buf = new StringBuffer( "( " ) ;
+
+ throw new UnsupportedOperationException() ;
+
+ //return l_buf.toString() ;
}
|