Examples of RepositoryIndexRecord


Examples of org.apache.maven.archiva.indexer.record.RepositoryIndexRecord

    public void testAddRecordNoIndex()
        throws IOException, RepositoryIndexException
    {
        Artifact artifact = createArtifact( "test-jar" );

        RepositoryIndexRecord record = recordFactory.createRecord( artifact );
        index.indexRecords( Collections.singletonList( record ) );

        IndexReader reader = IndexReader.open( indexLocation );
        try
        {
View Full Code Here

Examples of org.apache.maven.archiva.indexer.record.RepositoryIndexRecord

    {
        createEmptyIndex();

        Artifact artifact = createArtifact( "test-jar" );

        RepositoryIndexRecord record = recordFactory.createRecord( artifact );
        index.indexRecords( Collections.singletonList( record ) );

        IndexReader reader = IndexReader.open( indexLocation );
        try
        {
View Full Code Here

Examples of org.apache.maven.archiva.indexer.record.RepositoryIndexRecord

    {
        createEmptyIndex();

        Artifact artifact = createArtifact( "test-jar" );

        RepositoryIndexRecord record = recordFactory.createRecord( artifact );
        index.indexRecords( Collections.singletonList( record ) );

        // Do it again
        record = recordFactory.createRecord( artifact );
        index.indexRecords( Collections.singletonList( record ) );
View Full Code Here

Examples of org.apache.maven.archiva.indexer.record.RepositoryIndexRecord

    {
        createEmptyIndex();

        Artifact artifact = createArtifact( "test-pom", "1.0", "pom" );

        RepositoryIndexRecord record = recordFactory.createRecord( artifact );
        index.indexRecords( Collections.singletonList( record ) );

        IndexReader reader = IndexReader.open( indexLocation );
        try
        {
View Full Code Here

Examples of org.apache.maven.archiva.indexer.record.RepositoryIndexRecord

    {
        createEmptyIndex();

        Artifact artifact = createArtifact( "test-plugin" );

        RepositoryIndexRecord record = recordFactory.createRecord( artifact );

        index.indexRecords( Collections.singletonList( record ) );

        IndexReader reader = IndexReader.open( indexLocation );
        try
View Full Code Here

Examples of org.apache.maven.archiva.indexer.record.RepositoryIndexRecord

    {
        createEmptyIndex();

        Artifact artifact = createArtifact( "test-jar" );

        RepositoryIndexRecord record = recordFactory.createRecord( artifact );
        index.indexRecords( Collections.singletonList( record ) );

        index.deleteRecords( Collections.singletonList( record ) );

        IndexReader reader = IndexReader.open( indexLocation );
View Full Code Here

Examples of org.apache.maven.archiva.indexer.record.RepositoryIndexRecord

    {
        createEmptyIndex();

        Artifact artifact = createArtifact( "test-jar" );

        RepositoryIndexRecord record = recordFactory.createRecord( artifact );

        index.deleteRecords( Collections.singletonList( record ) );

        IndexReader reader = IndexReader.open( indexLocation );
        try
View Full Code Here

Examples of org.apache.maven.archiva.indexer.record.RepositoryIndexRecord

    public void testDeleteRecordNoIndex()
        throws IOException, RepositoryIndexException
    {
        Artifact artifact = createArtifact( "test-jar" );

        RepositoryIndexRecord record = recordFactory.createRecord( artifact );
        index.deleteRecords( Collections.singleton( record ) );

        assertFalse( index.exists() );
    }
View Full Code Here

Examples of org.apache.maven.archiva.indexer.record.RepositoryIndexRecord

        try
        {
            for ( Iterator i = records.iterator(); i.hasNext(); )
            {
                RepositoryIndexRecord record = (RepositoryIndexRecord) i.next();

                if ( record != null )
                {
                    Document document = converter.convert( record );
                    document.add(
                        new Field( FLD_PK, record.getPrimaryKey(), Field.Store.NO, Field.Index.UN_TOKENIZED ) );

                    indexWriter.addDocument( document );
                }
            }
View Full Code Here

Examples of org.apache.maven.archiva.indexer.record.RepositoryIndexRecord

            {
                indexReader = IndexReader.open( indexLocation );

                for ( Iterator i = records.iterator(); i.hasNext(); )
                {
                    RepositoryIndexRecord record = (RepositoryIndexRecord) i.next();

                    if ( record != null )
                    {
                        Term term = new Term( FLD_PK, record.getPrimaryKey() );

                        indexReader.deleteDocuments( term );
                    }
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.