private void appendArtifactTypeClassifierString( StringBuffer sb ) { sb.append( model.getArtifactId() ); sb.append( ":" ); sb.append( getType() ); if ( hasClassifier() ) { sb.append( ":" ); sb.append( getClassifier() ); } }
public String getPrimaryKey() { StringBuffer id = new StringBuffer(); id.append( artifact.getGroupId() ).append( ":" ); id.append( artifact.getArtifactId() ).append( ":" ); id.append( artifact.getVersion() ); if ( artifact.getClassifier() != null ) { id.append( ":" ).append( artifact.getClassifier() ); } id.append( ":" ).append( artifact.getType() ); return id.toString(); }
public String getPrimaryKey() { StringBuffer id = new StringBuffer(); id.append( artifact.getGroupId() ).append( ":" ); id.append( artifact.getArtifactId() ).append( ":" ); id.append( artifact.getVersion() ); if ( artifact.getClassifier() != null ) { id.append( ":" ).append( artifact.getClassifier() ); } id.append( ":" ).append( artifact.getType() ); return id.toString(); }
public void processArchivaArtifact( ArchivaArtifact artifact ) throws ConsumerException if ( !StringUtils.equals( "pom", artifact.getType() ) )
public void processArchivaArtifact( ArchivaArtifact artifact ) throws ConsumerException if ( !StringUtils.equals( "pom", artifact.getType() ) )
public void processArchivaArtifact( ArchivaArtifact artifact ) throws ConsumerException if ( !StringUtils.equals( "pom", artifact.getType() ) )
public Document convert( LuceneRepositoryContentRecord record ) { if ( !( record instanceof HashcodesRecord ) ) { throw new ClassCastException( "Unable to convert type " + record.getClass().getName() + " to " + HashcodesRecord.class.getName() + "." ); } HashcodesRecord hashcodes = (HashcodesRecord) record; LuceneDocumentMaker doc = new LuceneDocumentMaker( hashcodes ); // Artifact Reference doc.addFieldTokenized( ArtifactKeys.GROUPID, hashcodes.getArtifact().getGroupId() ); doc.addFieldExact( ArtifactKeys.GROUPID_EXACT, hashcodes.getArtifact().getGroupId() ); doc.addFieldTokenized( ArtifactKeys.ARTIFACTID, hashcodes.getArtifact().getArtifactId() ); doc.addFieldExact( ArtifactKeys.ARTIFACTID_EXACT, hashcodes.getArtifact().getArtifactId() ); doc.addFieldTokenized( ArtifactKeys.VERSION, hashcodes.getArtifact().getVersion() ); doc.addFieldExact( ArtifactKeys.VERSION_EXACT, hashcodes.getArtifact().getVersion() ); doc.addFieldTokenized( ArtifactKeys.TYPE, hashcodes.getArtifact().getType() ); doc.addFieldUntokenized( ArtifactKeys.CLASSIFIER, hashcodes.getArtifact().getClassifier() ); // Hashcode Specifics doc.addFieldUntokenized( HashcodesKeys.MD5, hashcodes.getArtifact().getModel().getChecksumMD5() ); doc.addFieldUntokenized( HashcodesKeys.SHA1, hashcodes.getArtifact().getModel().getChecksumSHA1() ); return doc.getDocument(); }
public Document convert( LuceneRepositoryContentRecord record ) { if ( !( record instanceof FileContentRecord ) ) { throw new ClassCastException( "Unable to convert type " + record.getClass().getName() + " to " + FileContentRecord.class.getName() + "." ); } FileContentRecord filecontent = (FileContentRecord) record; LuceneDocumentMaker doc = new LuceneDocumentMaker( filecontent ); if( filecontent.getArtifact() != null ) { // Artifact Reference doc.addFieldTokenized( ArtifactKeys.GROUPID, filecontent.getArtifact().getGroupId() ); doc.addFieldExact( ArtifactKeys.GROUPID_EXACT, filecontent.getArtifact().getGroupId() ); doc.addFieldTokenized( ArtifactKeys.ARTIFACTID, filecontent.getArtifact().getArtifactId() ); doc.addFieldExact( ArtifactKeys.ARTIFACTID_EXACT, filecontent.getArtifact().getArtifactId() ); doc.addFieldTokenized( ArtifactKeys.VERSION, filecontent.getArtifact().getVersion() ); doc.addFieldExact( ArtifactKeys.VERSION_EXACT, filecontent.getArtifact().getVersion() ); doc.addFieldTokenized( ArtifactKeys.TYPE, filecontent.getArtifact().getType() ); doc.addFieldUntokenized( ArtifactKeys.CLASSIFIER, filecontent.getArtifact().getClassifier() ); } doc.addFieldTokenized( FileContentKeys.FILENAME, filecontent.getFilename() ); doc.addFieldTokenized( FileContentKeys.CONTENT, filecontent.getContents() ); return doc.getDocument(); }
public Document convert( LuceneRepositoryContentRecord record ) { if ( !( record instanceof BytecodeRecord ) ) { throw new ClassCastException( "Unable to convert type " + record.getClass().getName() + " to " + BytecodeRecord.class.getName() + "." ); } BytecodeRecord bytecode = (BytecodeRecord) record; LuceneDocumentMaker doc = new LuceneDocumentMaker( bytecode ); // Artifact Reference doc.addFieldTokenized( ArtifactKeys.GROUPID, bytecode.getArtifact().getGroupId() ); doc.addFieldExact( ArtifactKeys.GROUPID_EXACT, bytecode.getArtifact().getGroupId() ); doc.addFieldTokenized( ArtifactKeys.ARTIFACTID, bytecode.getArtifact().getArtifactId() ); doc.addFieldExact( ArtifactKeys.ARTIFACTID_EXACT, bytecode.getArtifact().getArtifactId() ); doc.addFieldTokenized( ArtifactKeys.VERSION, bytecode.getArtifact().getVersion() ); doc.addFieldExact( ArtifactKeys.VERSION_EXACT, bytecode.getArtifact().getVersion() ); doc.addFieldTokenized( ArtifactKeys.TYPE, bytecode.getArtifact().getType() ); doc.addFieldUntokenized( ArtifactKeys.CLASSIFIER, bytecode.getArtifact().getClassifier() ); // Bytecode Specifics doc.addFieldExact( BytecodeKeys.JDK, JavaArtifactHelper.getJavaDetails( bytecode.getArtifact() ).getJdk() ); doc.addFieldTokenized( BytecodeKeys.CLASSES, bytecode.getClasses() ); doc.addFieldTokenized( BytecodeKeys.METHODS, bytecode.getMethods() ); doc.addFieldTokenized( BytecodeKeys.FILES, bytecode.getFiles() ); return doc.getDocument(); }
public void processArchivaArtifact( ArchivaArtifact artifact ) throws ConsumerException if ( !StringUtils.equals( "pom", artifact.getType() ) )