private IndexOp index(final ArtifactContext ac) throws IOException { if (ac != null && ac.getGav() != null) { final Document d = ac.createDocument(context); if (d != null) { context.getIndexWriter().addDocument(d); return IndexOp.ADDED; } } return IndexOp.NOOP; }
public void index( IndexingContext context, ArtifactContext ac ) throws IOException { // skip artifacts not obeying repository layout (whether m1 or m2) if ( ac != null && ac.getGav() != null ) { Document d = ac.createDocument( context ); if ( d != null ) { context.getIndexWriter().addDocument( d ); context.updateTimestamp(); } } }
public void index( IndexingContext context, ArtifactContext ac ) throws IOException { // skip artifacts not obeying repository layout (whether m1 or m2) if ( ac != null && ac.getGav() != null ) { Document d = ac.createDocument( context ); if ( d != null ) { context.getIndexWriter().addDocument( d ); context.updateTimestamp(); } } }
public void index( IndexingContext context, ArtifactContext ac ) throws IOException { // skip artifacts not obeying repository layout (whether m1 or m2) if ( ac != null && ac.getGav() != null ) { Document d = ac.createDocument( context ); if ( d != null ) { context.getIndexWriter().addDocument( d ); context.updateTimestamp(); } } }
@Override public void artifactDiscovered( final ArtifactContext ac ) { try { LOGGER.debug( "Adding artifact gav: {}; ctx id: {}; idx dir: {}", new String[]{ ac.getGav().toString(), context.getId(), context.getIndexDirectory().toString() } ); getIndexer().addArtifactsToIndex( asList( ac ), context ); totalFiles++; } catch ( IOException ex ) { LOGGER.error( "Artifact index error", ex ); } } }
private IndexOp update(final ArtifactContext ac) throws IOException { if (ac != null && ac.getGav() != null) { final Document d = ac.createDocument(context); if (d != null) { final Document old = getOldDocument(ac); if (old == null) { context.getIndexWriter().addDocument(d); return IndexOp.ADDED; } else if (!equals(d, old)) { context.getIndexWriter().updateDocument( new Term(ArtifactInfo.UINFO, ac.getArtifactInfo().getUinfo()), d); return IndexOp.UPDATED; } } } return IndexOp.NOOP; }
public void update( IndexingContext context, ArtifactContext ac ) throws IOException { if ( ac != null && ac.getGav() != null ) { Document d = ac.createDocument( context ); if ( d != null ) { Document old = getOldDocument( context, ac ); if ( !equals( d, old ) ) { IndexWriter w = context.getIndexWriter(); w.updateDocument( new Term( ArtifactInfo.UINFO, ac.getArtifactInfo().getUinfo() ), d ); updateGroups( context, ac ); context.updateTimestamp(); } } } }
public void update( IndexingContext context, ArtifactContext ac ) throws IOException { if ( ac != null && ac.getGav() != null ) { Document d = ac.createDocument( context ); if ( d != null ) { Document old = getOldDocument( context, ac ); if ( !equals( d, old ) ) { IndexWriter w = context.getIndexWriter(); w.updateDocument( new Term( ArtifactInfo.UINFO, ac.getArtifactInfo().getUinfo() ), d ); updateGroups( context, ac ); context.updateTimestamp(); } } } }
|| context.getGavCalculator().gavToPath(ac.getGav()).startsWith(contextPath)) { if (IndexOp.DELETED == remove(ac)) { deleted++;
public void update( IndexingContext context, ArtifactContext ac ) throws IOException { if ( ac != null && ac.getGav() != null ) { Document d = ac.createDocument( context ); if ( d != null ) { Document old = getOldDocument( context, ac ); if ( !equals( d, old ) ) { IndexWriter w = context.getIndexWriter(); w.updateDocument( new Term( ArtifactInfo.UINFO, ac.getArtifactInfo().getUinfo() ), d ); updateGroups( context, ac ); context.updateTimestamp(); } } } }
|| context.getGavCalculator().gavToPath( ac.getGav() ).startsWith( contextPath ) )
|| context.getGavCalculator().gavToPath( ac.getGav() ).startsWith( contextPath ) )
|| context.getGavCalculator().gavToPath( ac.getGav() ).startsWith( contextPath ) )
ai.setFileExtension( getExtension( artifact, ac.getGav() ) );
ai.setFileExtension( getExtension( artifact, ac.getGav() ) );
ai.setFileExtension( getExtension( artifact, ac.getGav() ) );