mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
09.28.2009 06ec8c88556b02782c7b91a233de91eaf4a1439d
opends/src/guitools/org/opends/guitools/controlpanel/util/SchemaLoader.java
@@ -128,23 +128,7 @@
  public void readSchema() throws DirectoryException,
  ConfigException, InitializationException
  {
    schema = new Schema();
    for (MatchingRule mr : matchingRulesToKeep)
    {
      schema.registerMatchingRule(mr, true);
    }
    for (AttributeSyntax syntax : syntaxesToKeep)
    {
      schema.registerSyntax(syntax, true);
    }
    for (AttributeType attr : attributesToKeep)
    {
      schema.registerAttributeType(attr, true);
    }
    for (ObjectClass oc : objectclassesToKeep)
    {
      schema.registerObjectClass(oc, true);
    }
    schema = getBaseSchema();
    String[] fileNames = null;
    try
@@ -263,6 +247,35 @@
  }
  /**
   * Returns a basic version of the schema.  The schema is created and contains
   * enough definitions for the schema to be loaded.
   * @return a basic version of the schema.
   * @throws DirectoryException if there is an error registering the minimal
   * objectclasses.
   */
  protected Schema getBaseSchema() throws DirectoryException
  {
    Schema schema = new Schema();
    for (MatchingRule mr : matchingRulesToKeep)
    {
      schema.registerMatchingRule(mr, true);
    }
    for (AttributeSyntax syntax : syntaxesToKeep)
    {
      schema.registerSyntax(syntax, true);
    }
    for (AttributeType attr : attributesToKeep)
    {
      schema.registerAttributeType(attr, true);
    }
    for (ObjectClass oc : objectclassesToKeep)
    {
      schema.registerObjectClass(oc, true);
    }
    return schema;
  }
  /**
   * Returns the schema that was read.
   * @return the schema that was read.
   */