| | |
| | | */ |
| | | package org.forgerock.opendj.ldap.schema; |
| | | |
| | | import static org.forgerock.opendj.ldap.schema.SchemaConstants.TOP_OBJECTCLASS_OID; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | import java.util.HashSet; |
| | |
| | | |
| | | import static java.util.Arrays.*; |
| | | import static java.util.Collections.*; |
| | | |
| | | import static org.forgerock.opendj.ldap.schema.ObjectClassType.*; |
| | | import static org.forgerock.opendj.ldap.schema.SchemaConstants.*; |
| | | import static org.forgerock.opendj.ldap.schema.SchemaUtils.*; |
| | | |
| | | import static com.forgerock.opendj.ldap.CoreMessages.*; |
| | | |
| | | /** |
| | |
| | | |
| | | superiorClasses.add(superiorClass); |
| | | } |
| | | } else if (superiorClasses.isEmpty() && getObjectClassType() == ObjectClassType.STRUCTURAL) { |
| | | // default superior to top |
| | | superiorClasses = new HashSet<>(1); |
| | | superiorClasses.add(schema.getObjectClass(TOP_OBJECTCLASS_OID)); |
| | | derivesTop = true; |
| | | } |
| | | |
| | | if (!derivesTop) { |
| | | derivesTop = isDescendantOf(schema.getObjectClass("2.5.6.0")); |
| | | derivesTop = isDescendantOf(schema.getObjectClass(TOP_OBJECTCLASS_OID)); |
| | | } |
| | | |
| | | // Structural classes must have the "top" objectclass somewhere |