Пример #1
0
  /**
   * Indicates whether the specified attribute should be included in the entries read from the LDIF.
   *
   * @param attributeType The attribute type for which to make the determination.
   * @return <CODE>true</CODE> if the specified attribute should be included in the entries read
   *     from the LDIF, or <CODE>false</CODE> if not.
   */
  public boolean includeAttribute(AttributeType attributeType) {
    if (!excludeAttributes.isEmpty() && excludeAttributes.contains(attributeType)) {
      return false;
    }

    if ((excludeAllOpAttrs && attributeType.isOperational())
        || (excludeAllUserAttrs && !attributeType.isOperational())) {
      return false;
    }

    if ((includeAllUserAttrs && !attributeType.isOperational())
        || (includeAllOpAttrs && attributeType.isOperational())) {
      return true;
    }

    if (!includeAttributes.isEmpty()) {
      return includeAttributes.contains(attributeType);
    } else if ((includeAllUserAttrs && attributeType.isOperational())
        || (includeAllOpAttrs && !attributeType.isOperational())) {
      return false;
    }
    return true;
  }