public LuceneRepositoryContentRecord convert( Document document ) throws ParseException { BytecodeRecord record = new BytecodeRecord(); record.setRepositoryId( document.get( LuceneDocumentMaker.REPOSITORY_ID ) ); // Artifact Reference String groupId = document.get( ArtifactKeys.GROUPID ); String artifactId = document.get( ArtifactKeys.ARTIFACTID ); String version = document.get( ArtifactKeys.VERSION ); String classifier = document.get( ArtifactKeys.CLASSIFIER ); String type = document.get( ArtifactKeys.TYPE ); ArchivaArtifact artifact = new ArchivaArtifact( groupId, artifactId, version, classifier, type ); record.setArtifact( artifact ); // Bytecode Specifics JavaArtifactHelper.getJavaDetails( record.getArtifact() ).setJdk( document.get( BytecodeKeys.JDK ) ); record.setClasses( getList( document, BytecodeKeys.CLASSES ) ); record.setMethods( getList( document, BytecodeKeys.METHODS ) ); record.setFiles( getList( document, BytecodeKeys.FILES ) ); return record; }