当前位置: 首页>>代码示例>>Java>>正文


Java LdifReader.next方法代码示例

本文整理汇总了Java中org.apache.directory.api.ldap.model.ldif.LdifReader.next方法的典型用法代码示例。如果您正苦于以下问题:Java LdifReader.next方法的具体用法?Java LdifReader.next怎么用?Java LdifReader.next使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.directory.api.ldap.model.ldif.LdifReader的用法示例。


在下文中一共展示了LdifReader.next方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadDitStructureRules

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadDitStructureRules( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> ditStructureRuleList = new ArrayList<>();

    if ( schemas == null )
    {
        return ditStructureRuleList;
    }

    for ( Schema schema : schemas )
    {
        File ditStructureRulesDirectory = new File( getSchemaDirectory( schema ),
            SchemaConstants.DIT_STRUCTURE_RULES_PATH );

        if ( !ditStructureRulesDirectory.exists() )
        {
            return ditStructureRuleList;
        }

        File[] ditStructureRuleFiles = ditStructureRulesDirectory.listFiles( ldifFilter );

        if ( ditStructureRuleFiles != null )
        {
            for ( File ldifFile : ditStructureRuleFiles )
            {
                LdifReader reader = new LdifReader( ldifFile );
                LdifEntry entry = reader.next();
                reader.close();

                ditStructureRuleList.add( entry.getEntry() );
            }
        }
    }

    return ditStructureRuleList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:41,代码来源:LdifSchemaLoader.java

示例2: loadSyntaxCheckers

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadSyntaxCheckers( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> syntaxCheckerList = new ArrayList<>();

    if ( schemas == null )
    {
        return syntaxCheckerList;
    }

    for ( Schema schema : schemas )
    {
        String start = getSchemaDirectoryString( schema )
            + SchemaConstants.SYNTAX_CHECKERS_PATH + "/" + "m-oid=";
        String end = "." + LDIF_EXT;

        for ( String resourcePath : RESOURCE_MAP.keySet() )
        {
            if ( resourcePath.startsWith( start ) && resourcePath.endsWith( end ) )
            {
                URL resource = getResource( resourcePath, "syntaxChecker LDIF file" );
                LdifReader reader = new LdifReader( resource.openStream() );
                LdifEntry entry = reader.next();
                reader.close();

                syntaxCheckerList.add( entry.getEntry() );
            }
        }
    }

    return syntaxCheckerList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:36,代码来源:JarLdifSchemaLoader.java

示例3: doInit

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * Partition initialization - loads schema entries from the files on classpath.
 *
 * @see org.apache.directory.server.core.partition.impl.avl.AvlPartition#doInit()
 */
@Override
protected void doInit() throws InvalidNameException, Exception {
    if (initialized)
        return;

    LOG.debug("Initializing schema partition " + getId());
    suffixDn.apply(schemaManager);
    super.doInit();

    // load schema
    final Map<String, Boolean> resMap = ResourceMap.getResources(Pattern.compile("schema[/\\Q\\\\E]ou=schema.*"));
    for (String resourcePath : new TreeSet<>(resMap.keySet())) {
        if (resourcePath.endsWith(".ldif")) {
            URL resource = DefaultSchemaLdifExtractor.getUniqueResource(resourcePath, "Schema LDIF file");
            LdifReader reader = new LdifReader(resource.openStream());
            LdifEntry ldifEntry = reader.next();
            reader.close();

            Entry entry = new DefaultEntry(schemaManager, ldifEntry.getEntry());
            // add mandatory attributes
            if (entry.get(SchemaConstants.ENTRY_CSN_AT) == null) {
                entry.add(SchemaConstants.ENTRY_CSN_AT, defaultCSNFactory.newInstance().toString());
            }
            if (entry.get(SchemaConstants.ENTRY_UUID_AT) == null) {
                entry.add(SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString());
            }
            AddOperationContext addContext = new AddOperationContext(null, entry);
            super.add(addContext);
        }
    }
}
 
开发者ID:kawasima,项目名称:bouncr,代码行数:37,代码来源:InMemorySchemaPartition.java

示例4: loadMatchingRules

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadMatchingRules( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> matchingRuleList = new ArrayList<>();

    if ( schemas == null )
    {
        return matchingRuleList;
    }

    for ( Schema schema : schemas )
    {
        String start = getSchemaDirectoryString( schema )
            + SchemaConstants.MATCHING_RULES_PATH + "/" + "m-oid=";
        String end = "." + LDIF_EXT;

        for ( String resourcePath : RESOURCE_MAP.keySet() )
        {
            if ( resourcePath.startsWith( start ) && resourcePath.endsWith( end ) )
            {
                URL resource = getResource( resourcePath, "matchingRules LDIF file" );
                LdifReader reader = new LdifReader( resource.openStream() );
                LdifEntry entry = reader.next();
                reader.close();

                matchingRuleList.add( entry.getEntry() );
            }
        }
    }

    return matchingRuleList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:36,代码来源:JarLdifSchemaLoader.java

示例5: loadDitContentRules

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadDitContentRules( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> ditContentRuleList = new ArrayList<>();

    if ( schemas == null )
    {
        return ditContentRuleList;
    }

    for ( Schema schema : schemas )
    {
        File ditContentRulesDirectory = new File( getSchemaDirectory( schema ),
            SchemaConstants.DIT_CONTENT_RULES_PATH );

        if ( !ditContentRulesDirectory.exists() )
        {
            return ditContentRuleList;
        }

        File[] ditContentRuleFiles = ditContentRulesDirectory.listFiles( ldifFilter );

        if ( ditContentRuleFiles != null )
        {
            for ( File ldifFile : ditContentRuleFiles )
            {
                LdifReader reader = new LdifReader( ldifFile );
                LdifEntry entry = reader.next();
                reader.close();

                ditContentRuleList.add( entry.getEntry() );
            }
        }
    }

    return ditContentRuleList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:41,代码来源:LdifSchemaLoader.java

示例6: loadAttributeTypes

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadAttributeTypes( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> attributeTypeList = new ArrayList<>();

    if ( schemas == null )
    {
        return attributeTypeList;
    }

    for ( Schema schema : schemas )
    {
        // check that the attributeTypes directory exists for the schema
        String start = getSchemaDirectoryString( schema )
            + SchemaConstants.ATTRIBUTE_TYPES_PATH + "/" + "m-oid=";
        String end = "." + LDIF_EXT;

        // get list of attributeType LDIF schema files in attributeTypes
        for ( String resourcePath : RESOURCE_MAP.keySet() )
        {
            if ( resourcePath.startsWith( start ) && resourcePath.endsWith( end ) )
            {
                URL resource = getResource( resourcePath, "attributeType LDIF file" );
                LdifReader reader = new LdifReader( resource.openStream() );
                LdifEntry entry = reader.next();
                reader.close();

                attributeTypeList.add( entry.getEntry() );
            }
        }
    }

    return attributeTypeList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:38,代码来源:JarLdifSchemaLoader.java

示例7: loadMatchingRuleUses

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadMatchingRuleUses( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> matchingRuleUseList = new ArrayList<>();

    if ( schemas == null )
    {
        return matchingRuleUseList;
    }

    for ( Schema schema : schemas )
    {
        String start = getSchemaDirectoryString( schema )
            + SchemaConstants.MATCHING_RULE_USE_PATH + "/" + "m-oid=";
        String end = "." + LDIF_EXT;

        for ( String resourcePath : RESOURCE_MAP.keySet() )
        {
            if ( resourcePath.startsWith( start ) && resourcePath.endsWith( end ) )
            {
                URL resource = getResource( resourcePath, "matchingRuleUse LDIF file" );
                LdifReader reader = new LdifReader( resource.openStream() );
                LdifEntry entry = reader.next();
                reader.close();

                matchingRuleUseList.add( entry.getEntry() );
            }
        }
    }

    return matchingRuleUseList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:36,代码来源:JarLdifSchemaLoader.java

示例8: loadNameForms

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadNameForms( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> nameFormList = new ArrayList<>();

    if ( schemas == null )
    {
        return nameFormList;
    }

    for ( Schema schema : schemas )
    {
        String start = getSchemaDirectoryString( schema )
            + SchemaConstants.NAME_FORMS_PATH + "/" + "m-oid=";
        String end = "." + LDIF_EXT;

        for ( String resourcePath : RESOURCE_MAP.keySet() )
        {
            if ( resourcePath.startsWith( start ) && resourcePath.endsWith( end ) )
            {
                URL resource = getResource( resourcePath, "nameForm LDIF file" );
                LdifReader reader = new LdifReader( resource.openStream() );
                LdifEntry entry = reader.next();
                reader.close();

                nameFormList.add( entry.getEntry() );
            }
        }
    }

    return nameFormList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:36,代码来源:JarLdifSchemaLoader.java

示例9: loadDitContentRules

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadDitContentRules( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> ditContentRulesList = new ArrayList<>();

    if ( schemas == null )
    {
        return ditContentRulesList;
    }

    for ( Schema schema : schemas )
    {
        String start = getSchemaDirectoryString( schema )
            + SchemaConstants.DIT_CONTENT_RULES_PATH + "/" + "m-oid=";
        String end = "." + LDIF_EXT;

        for ( String resourcePath : RESOURCE_MAP.keySet() )
        {
            if ( resourcePath.startsWith( start ) && resourcePath.endsWith( end ) )
            {
                URL resource = getResource( resourcePath, "ditContentRule LDIF file" );
                LdifReader reader = new LdifReader( resource.openStream() );
                LdifEntry entry = reader.next();
                reader.close();

                ditContentRulesList.add( entry.getEntry() );
            }
        }
    }

    return ditContentRulesList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:36,代码来源:JarLdifSchemaLoader.java

示例10: loadDitStructureRules

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadDitStructureRules( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> ditStructureRuleList = new ArrayList<>();

    if ( schemas == null )
    {
        return ditStructureRuleList;
    }

    for ( Schema schema : schemas )
    {
        String start = getSchemaDirectoryString( schema )
            + SchemaConstants.DIT_STRUCTURE_RULES_PATH + "/" + "m-oid=";
        String end = "." + LDIF_EXT;

        for ( String resourcePath : RESOURCE_MAP.keySet() )
        {
            if ( resourcePath.startsWith( start ) && resourcePath.endsWith( end ) )
            {
                URL resource = getResource( resourcePath, "ditStructureRule LDIF file" );
                LdifReader reader = new LdifReader( resource.openStream() );
                LdifEntry entry = reader.next();
                reader.close();

                ditStructureRuleList.add( entry.getEntry() );
            }
        }
    }

    return ditStructureRuleList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:36,代码来源:JarLdifSchemaLoader.java

示例11: loadObjectClasses

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadObjectClasses( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> objectClassList = new ArrayList<>();

    if ( schemas == null )
    {
        return objectClassList;
    }

    for ( Schema schema : schemas )
    {
        // get objectClasses directory, check if exists, return if not
        String start = getSchemaDirectoryString( schema )
            + SchemaConstants.OBJECT_CLASSES_PATH + "/" + "m-oid=";
        String end = "." + LDIF_EXT;

        for ( String resourcePath : RESOURCE_MAP.keySet() )
        {
            if ( resourcePath.startsWith( start ) && resourcePath.endsWith( end ) )
            {
                URL resource = getResource( resourcePath, "objectClass LDIF file" );
                LdifReader reader = new LdifReader( resource.openStream() );
                LdifEntry entry = reader.next();
                reader.close();

                objectClassList.add( entry.getEntry() );
            }
        }
    }

    return objectClassList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:37,代码来源:JarLdifSchemaLoader.java

示例12: loadObjectClasses

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadObjectClasses( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> objectClassList = new ArrayList<>();

    if ( schemas == null )
    {
        return objectClassList;
    }

    for ( Schema schema : schemas )
    {
        // get objectClasses directory, check if exists, return if not
        File objectClassesDirectory = new File( getSchemaDirectory( schema ), SchemaConstants.OBJECT_CLASSES_PATH );

        if ( !objectClassesDirectory.exists() )
        {
            return objectClassList;
        }

        // get list of objectClass LDIF files from directory and load
        File[] objectClassFiles = objectClassesDirectory.listFiles( ldifFilter );

        if ( objectClassFiles != null )
        {
            for ( File ldifFile : objectClassFiles )
            {
                LdifReader reader = new LdifReader( ldifFile );
                LdifEntry entry = reader.next();
                reader.close();

                objectClassList.add( entry.getEntry() );
            }
        }
    }

    return objectClassList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:42,代码来源:LdifSchemaLoader.java

示例13: loadSyntaxCheckers

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadSyntaxCheckers( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> syntaxCheckerList = new ArrayList<>();

    if ( schemas == null )
    {
        return syntaxCheckerList;
    }

    for ( Schema schema : schemas )
    {
        File syntaxCheckersDirectory = new File( getSchemaDirectory( schema ), SchemaConstants.SYNTAX_CHECKERS_PATH );

        if ( !syntaxCheckersDirectory.exists() )
        {
            return syntaxCheckerList;
        }

        File[] syntaxCheckerFiles = syntaxCheckersDirectory.listFiles( ldifFilter );

        if ( syntaxCheckerFiles != null )
        {
            for ( File ldifFile : syntaxCheckerFiles )
            {
                LdifReader reader = new LdifReader( ldifFile );
                LdifEntry entry = reader.next();
                reader.close();

                syntaxCheckerList.add( entry.getEntry() );
            }
        }
    }

    return syntaxCheckerList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:40,代码来源:LdifSchemaLoader.java

示例14: loadNormalizers

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadNormalizers( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> normalizerList = new ArrayList<>();

    if ( schemas == null )
    {
        return normalizerList;
    }

    for ( Schema schema : schemas )
    {
        File normalizersDirectory = new File( getSchemaDirectory( schema ), SchemaConstants.NORMALIZERS_PATH );

        if ( !normalizersDirectory.exists() )
        {
            return normalizerList;
        }

        File[] normalizerFiles = normalizersDirectory.listFiles( ldifFilter );

        if ( normalizerFiles != null )
        {
            for ( File ldifFile : normalizerFiles )
            {
                LdifReader reader = new LdifReader( ldifFile );
                LdifEntry entry = reader.next();
                reader.close();

                normalizerList.add( entry.getEntry() );
            }
        }
    }

    return normalizerList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:40,代码来源:LdifSchemaLoader.java

示例15: loadMatchingRules

import org.apache.directory.api.ldap.model.ldif.LdifReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public List<Entry> loadMatchingRules( Schema... schemas ) throws LdapException, IOException
{
    List<Entry> matchingRuleList = new ArrayList<>();

    if ( schemas == null )
    {
        return matchingRuleList;
    }

    for ( Schema schema : schemas )
    {
        File matchingRulesDirectory = new File( getSchemaDirectory( schema ), SchemaConstants.MATCHING_RULES_PATH );

        if ( !matchingRulesDirectory.exists() )
        {
            return matchingRuleList;
        }

        File[] matchingRuleFiles = matchingRulesDirectory.listFiles( ldifFilter );

        if ( matchingRuleFiles != null )
        {
            for ( File ldifFile : matchingRuleFiles )
            {
                LdifReader reader = new LdifReader( ldifFile );
                LdifEntry entry = reader.next();
                reader.close();

                matchingRuleList.add( entry.getEntry() );
            }
        }
    }

    return matchingRuleList;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:40,代码来源:LdifSchemaLoader.java


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