• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java DefaultSchemaManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager的典型用法代码示例。如果您正苦于以下问题:Java DefaultSchemaManager类的具体用法?Java DefaultSchemaManager怎么用?Java DefaultSchemaManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DefaultSchemaManager类属于org.apache.directory.api.ldap.schema.manager.impl包,在下文中一共展示了DefaultSchemaManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setup

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * Initialize OIDs maps for normalization
 */
@BeforeClass
public static void setup() throws Exception
{
    schemaManager = new DefaultSchemaManager();
    cn = schemaManager.getAttributeType( "cn" );
    dc = schemaManager.getAttributeType( "dc" );
    userCertificate = schemaManager.getAttributeType( "userCertificate" );

    bv1 = new Value( userCertificate, DATA );
    bv2 = new Value( userCertificate, Strings.EMPTY_BYTES );
    bv3 = new Value( userCertificate, ( byte[] ) null );
    bv1n = new Value( userCertificate, DATA );
    bv2n = new Value( userCertificate, Strings.EMPTY_BYTES );
    bv3n = new Value( userCertificate, ( byte[] ) null );
    sv1 = new Value( cn, "test" );
    sv2 = new Value( dc, "" );
    sv3 = new Value( dc, ( String ) null );
    sv1n = new Value( cn, "test" );
    sv2n = new Value( dc, "" );
    sv3n = new Value( dc, ( String ) null );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:25,代码来源:SchemaAwareValueSerializationTest.java


示例2: init

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * Initialization
 */
@BeforeClass
public static void init() throws Exception
{
    JarLdifSchemaLoader loader = new JarLdifSchemaLoader();
    schemaManager = new DefaultSchemaManager( loader );

    schemaManager.loadAllEnabled();

    parser = new SubtreeSpecificationParser( schemaManager );

    topOC = schemaManager.lookupObjectClassRegistry( "top" );
    aliasOC = schemaManager.lookupObjectClassRegistry( "alias" );
    countryOC = schemaManager.lookupObjectClassRegistry( "country" );
    personOC = schemaManager.lookupObjectClassRegistry( "person" );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:19,代码来源:SubtreeSpecificationParserTest.java


示例3: testLoadSystem

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "system" schema amone
 */
@Test
public void testLoadSystem() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    assertTrue( schemaManager.load( "system" ) );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 38, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 35, schemaManager.getComparatorRegistry().size() );
    assertEquals( 35, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 35, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 9, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 59, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 59, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 141, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 1, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:25,代码来源:SchemaManagerLoadTest.java


示例4: testLoadApache

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "apache" schema, which depends on "system" and "core"
 */
@Test
public void testLoadApache() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    assertTrue( schemaManager.load( "system" ) );
    assertTrue( schemaManager.load( "core" ) );
    assertTrue( schemaManager.load( "apache" ) );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 148, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 44, schemaManager.getComparatorRegistry().size() );
    assertEquals( 50, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 43, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 53, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 62, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 73, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 324, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 3, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "apache" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:29,代码来源:SchemaManagerLoadTest.java


示例5: testLoadApacheMeta

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "apacheMeta" schema, which depends on "system"
 */
@Test
public void testLoadApacheMeta() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    assertTrue( schemaManager.load( "system" ) );
    assertTrue( schemaManager.load( "apacheMeta" ) );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 71, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 40, schemaManager.getComparatorRegistry().size() );
    assertEquals( 40, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 40, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 22, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 63, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 64, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 197, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 2, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "apachemeta" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:27,代码来源:SchemaManagerLoadTest.java


示例6: testLoadJava

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "java" schema, which depends on "system" and "core"
 */
@Test
public void testLoadJava() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    assertTrue( schemaManager.load( "system" ) );
    assertTrue( schemaManager.load( "core" ) );
    assertTrue( schemaManager.load( "Java" ) );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 99, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 36, schemaManager.getComparatorRegistry().size() );
    assertEquals( 42, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 35, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 41, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 59, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 66, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 248, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 3, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "Java" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:29,代码来源:SchemaManagerLoadTest.java


示例7: testLoadOther

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "other" schema, which depends on "system", "core",
 * "apache" and "apacheMeta". As we don't have any cross dependencies
 * with any of this other schemas, we can only load core and system
 */
@Test
public void testLoadOther() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    assertTrue( schemaManager.load( "system" ) );
    assertTrue( schemaManager.load( "core" ) );
    assertTrue( schemaManager.load( "other" ) );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 92, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 36, schemaManager.getComparatorRegistry().size() );
    assertEquals( 42, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 35, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 36, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 59, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 66, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 236, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 3, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "other" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:31,代码来源:SchemaManagerLoadTest.java


示例8: testLoadCosine

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "cosine" schema, which depends on "system" and "core"
 */
@Test
public void testLoadCosine() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    assertTrue( schemaManager.load( "system" ) );
    assertTrue( schemaManager.load( "core" ) );
    assertTrue( schemaManager.load( "cosine" ) );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 133, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 36, schemaManager.getComparatorRegistry().size() );
    assertEquals( 42, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 35, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 49, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 59, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 66, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 290, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 3, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "cosine" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:29,代码来源:SchemaManagerLoadTest.java


示例9: testLoadCollective

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "Collective" schema, which depends on "system" and "core"
 */
@Test
public void testLoadCollective() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    assertTrue( schemaManager.load( "system" ) );
    assertTrue( schemaManager.load( "core" ) );
    assertTrue( schemaManager.load( "Collective" ) );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 105, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 36, schemaManager.getComparatorRegistry().size() );
    assertEquals( 42, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 35, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 36, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 59, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 66, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 249, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 3, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "collective" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:29,代码来源:SchemaManagerLoadTest.java


示例10: testLoadKrb5Kdc

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "Krb5Kdc" schema, which depends on "system" and "core"
 */
@Test
public void testLoadKrb5Kdc() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    assertTrue( schemaManager.load( "system" ) );
    assertTrue( schemaManager.load( "core" ) );
    assertTrue( schemaManager.load( "Krb5Kdc" ) );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 107, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 36, schemaManager.getComparatorRegistry().size() );
    assertEquals( 42, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 35, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 39, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 59, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 66, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 254, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 3, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "Krb5Kdc" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:29,代码来源:SchemaManagerLoadTest.java


示例11: testLoadCoreAndInetOrgPerson

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "InetOrgPerson" and "core" schema, which depends on "system" and "cosine"
 */
@Test
public void testLoadCoreAndInetOrgPerson() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    assertTrue( schemaManager.load( "system" ) );
    assertTrue( schemaManager.load( "core", "cosine", "InetOrgPerson" ) );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 142, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 36, schemaManager.getComparatorRegistry().size() );
    assertEquals( 42, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 35, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 50, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 59, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 66, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 300, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 4, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "cosine" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "InetOrgPerson" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:29,代码来源:SchemaManagerLoadTest.java


示例12: loadNewSchema

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * Test that we can load a new schema
 */
@Test
public void loadNewSchema() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    Schema dummy = new DefaultSchema( loader, "dummy" );

    assertTrue( schemaManager.load( dummy ) );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 0, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 0, schemaManager.getComparatorRegistry().size() );
    assertEquals( 0, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 0, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 0, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 0, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 0, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 0, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 1, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "dummy" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:27,代码来源:SchemaManagerLoadTest.java


示例13: loadNewSchemaBadDependencies

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * Test that we can't load a new schema with bad dependencies
 */
@Test
public void loadNewSchemaBadDependencies() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    Schema dummy = new DefaultSchema( loader, "dummy" );
    dummy.addDependencies( "bad" );

    assertFalse( schemaManager.load( dummy ) );

    assertFalse( schemaManager.getErrors().isEmpty() );
    assertEquals( 0, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 0, schemaManager.getComparatorRegistry().size() );
    assertEquals( 0, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 0, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 0, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 0, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 0, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 0, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 0, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNull( schemaManager.getRegistries().getLoadedSchema( "dummy" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:28,代码来源:SchemaManagerLoadTest.java


示例14: testLoadSystem

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "system" schema
 */
@Test
public void testLoadSystem() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    schemaManager.loadWithDeps( "system" );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 38, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 35, schemaManager.getComparatorRegistry().size() );
    assertEquals( 35, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 35, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 9, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 59, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 59, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 141, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 1, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:25,代码来源:SchemaManagerLoadWithDepsTest.java


示例15: testLoadCore

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "core" schema, which depends on "system"
 */
@Test
public void testLoadCore() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    schemaManager.loadWithDeps( "core" );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 92, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 36, schemaManager.getComparatorRegistry().size() );
    assertEquals( 42, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 35, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 36, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 59, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 66, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 236, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 2, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:26,代码来源:SchemaManagerLoadWithDepsTest.java


示例16: testLoadApache

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "apache" schema, which depends on "system" and "core"
 */
@Test
public void testLoadApache() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    schemaManager.loadWithDeps( "apache" );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 148, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 44, schemaManager.getComparatorRegistry().size() );
    assertEquals( 50, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 43, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 53, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 62, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 73, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 324, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 3, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "apache" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:27,代码来源:SchemaManagerLoadWithDepsTest.java


示例17: testLoadApacheMeta

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "apacheMeta" schema, which depends on "system"
 */
@Test
public void testLoadApacheMeta() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    schemaManager.loadWithDeps( "apacheMeta" );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 71, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 40, schemaManager.getComparatorRegistry().size() );
    assertEquals( 40, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 40, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 22, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 63, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 64, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 197, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 2, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "apachemeta" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:26,代码来源:SchemaManagerLoadWithDepsTest.java


示例18: testLoadJava

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "java" schema, which depends on "system" and "core"
 */
@Test
public void testLoadJava() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    schemaManager.loadWithDeps( "Java" );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 99, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 36, schemaManager.getComparatorRegistry().size() );
    assertEquals( 42, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 35, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 41, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 59, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 66, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 248, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 3, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "Java" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:27,代码来源:SchemaManagerLoadWithDepsTest.java


示例19: testLoadOther

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "other" schema, which depends on "system", "core",
 * "apache" and "apacheMeta"
 */
@Test
public void testLoadOther() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader );

    schemaManager.loadWithDeps( "other" );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 181, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 49, schemaManager.getComparatorRegistry().size() );
    assertEquals( 55, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 48, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 66, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 66, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 78, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 380, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 5, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "apache" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "apacheMeta" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "other" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:30,代码来源:SchemaManagerLoadWithDepsTest.java


示例20: testLoadCosine

import org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager; //导入依赖的package包/类
/**
 * test loading the "cosine" schema, which depends on "system" and "core"
 */
@Test
public void testLoadCosine() throws Exception
{
    LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
    SchemaManager schemaManager = new DefaultSchemaManager( loader.getAllSchemas() );

    schemaManager.loadWithDeps( "cosine" );

    assertTrue( schemaManager.getErrors().isEmpty() );
    assertEquals( 133, schemaManager.getAttributeTypeRegistry().size() );
    assertEquals( 36, schemaManager.getComparatorRegistry().size() );
    assertEquals( 42, schemaManager.getMatchingRuleRegistry().size() );
    assertEquals( 35, schemaManager.getNormalizerRegistry().size() );
    assertEquals( 49, schemaManager.getObjectClassRegistry().size() );
    assertEquals( 59, schemaManager.getSyntaxCheckerRegistry().size() );
    assertEquals( 66, schemaManager.getLdapSyntaxRegistry().size() );
    assertEquals( 290, schemaManager.getGlobalOidRegistry().size() );

    assertEquals( 3, schemaManager.getRegistries().getLoadedSchemas().size() );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
    assertNotNull( schemaManager.getRegistries().getLoadedSchema( "cosine" ) );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:27,代码来源:SchemaManagerLoadWithDepsTest.java



注:本文中的org.apache.directory.api.ldap.schema.manager.impl.DefaultSchemaManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SwedishAnalyzer类代码示例发布时间:2022-05-22
下一篇:
Java AWSLogs类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap