JarManifestService jarManifestService = new JarManifestService(event.getGraphContext()); technologyTagService.addTagToFileModel(manifestFile, TECH_TAG, TECH_TAG_LEVEL); JarManifestModel jarManifest = jarManifestService.addTypeToModel(manifestFile); jarManifest.setArchive(payload);
/** * Gets all {@link JarManifestModel}s associated with this archive. */ public Iterable<JarManifestModel> getManifestsByArchive(ArchiveModel archiveModel) { GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(archiveModel.getElement()); pipeline.out(JarManifestModel.ARCHIVE); return new FramedVertexIterable<>(getGraphContext().getFramed(), pipeline.toList(), JarManifestModel.class); } }
return; JarManifestService service = new JarManifestService(context); Iterable<JarManifestModel> manifests = service.getManifestsByArchive(archiveModel);
return; JarManifestService service = new JarManifestService(context); Iterable<JarManifestModel> manifests = service.getManifestsByArchive(archiveModel);
JarManifestService jarManifestService = new JarManifestService(event.getGraphContext()); technologyTagService.addTagToFileModel(manifestFile, TECH_TAG, TECH_TAG_LEVEL); JarManifestModel jarManifest = jarManifestService.addTypeToModel(manifestFile); GraphService<HasManifestFilesModel> hasManifestFilesModelService = new GraphService<>(event.getGraphContext(), HasManifestFilesModel.class); hasManifestFilesModelService.addTypeToModel(archive).addManifestModel(jarManifest);
/** * Gets all {@link JarManifestModel}s associated with this archive. */ public Iterable<JarManifestModel> getManifestsByArchive(ArchiveModel archiveModel) { GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(archiveModel.getElement()); pipeline.out(JarManifestModel.ARCHIVE); return new FramedVertexIterable<>(getGraphContext().getFramed(), pipeline.toList(), JarManifestModel.class); } }
JarManifestService jarManifestService = new JarManifestService(event.getGraphContext()); technologyTagService.addTagToFileModel(manifestFile, TECH_TAG, TECH_TAG_LEVEL); JarManifestModel jarManifest = jarManifestService.addTypeToModel(manifestFile); GraphService<HasManifestFilesModel> hasManifestFilesModelService = new GraphService<>(event.getGraphContext(), HasManifestFilesModel.class); hasManifestFilesModelService.addTypeToModel(archive).addManifestModel(jarManifest);