/** * Check if the value is stored into an instance of the given * AttributeType, or one of its ascendant. * * For instance, if the Value is associated with a CommonName, * checking for Name will match. * * @param attributeType The AttributeType we are looking at * @return <code>true</code> if the value is associated with the given * attributeType or one of its ascendant */ public boolean instanceOf( AttributeType attributeType ) throws LdapException { if ( ( attributeType != null ) && this.attributeType.equals( attributeType ) ) { if ( this.attributeType.equals( attributeType ) ) { return true; } return this.attributeType.isDescendantOf( attributeType ); } return false; }
/** * Checks to see if this AttributeType is the descendant of another * attributeType. * * @param ancestor the perspective ancestor to check * @return true if this AttributeType truly descends from the ancestor */ public boolean isDescendantOf( AttributeType ancestor ) { if ( ( ancestor == null ) || equals( ancestor ) ) { return false; } return isAncestorOrEqual( ancestor, this ); }
/** * Checks to see if this AttributeType is the ancestor of another * attributeType. * * @param descendant the perspective descendant to check * @return true if the descendant is truly a derived from this AttributeType */ public boolean isAncestorOf( AttributeType descendant ) { if ( ( descendant == null ) || this.equals( descendant ) ) { return false; } return isAncestorOrEqual( this, descendant ); }
/** * Recursive method which checks to see if a descendant is really an ancestor or if the two * are equal. * * @param ancestor the possible ancestor of the descendant * @param descendant the possible descendant of the ancestor * @return true if the ancestor equals the descendant or if the descendant is really * a subtype of the ancestor. otherwise false */ private boolean isAncestorOrEqual( AttributeType ancestor, AttributeType descendant ) { if ( ( ancestor == null ) || ( descendant == null ) ) { return false; } if ( ancestor.equals( descendant ) ) { return true; } return isAncestorOrEqual( ancestor, descendant.getSuperior() ); }
if ( !((EntryAttribute)attribute).getAttributeType().equals( OBJECT_CLASS_AT ) )
if ( attributeType.equals( OBJECT_CLASS_AT ) )
if ( !attributeType.equals( other.getAttributeType() ) )
if ( !((EntryAttribute)objectClass).getAttributeType().equals( OBJECT_CLASS_AT ) )
if ( !tempAT.equals( attributeType ) )
if ( attributeType.equals( OBJECT_CLASS_AT ) )
public void apply( AttributeType attributeType ) { if ( this.attributeType != null ) { if ( !attributeType.equals( this.attributeType ) ) { throw new IllegalArgumentException( I18n.err( I18n.ERR_04476, attributeType.getName(), this.attributeType.getName() ) ); } else { return; } } this.attributeType = attributeType; try { normalize(); } catch ( LdapException ne ) { String message = I18n.err( I18n.ERR_04447, ne.getLocalizedMessage() ); LOG.info( message ); normalized = false; } }
if ( !tempAT.equals( attributeType ) )
if ( !attributeType.equals( other.attributeType ) )
else if ( !attr0.getAttributeType().equals( attr1.getAttributeType() ) )
if ( !attributeType.equals( stringValue.getAttributeType() ) )
if ( !attributeType.equals( other.attributeType ) )
if ( !superior.equals( that.superior ) )