/** * Indicates whether or not the passed in {@link ArchiveModel} is a child or other descendant of the current archive. */ default boolean containsArchive(ArchiveModel archiveModel) { if (this.getElement().equals(archiveModel.getElement())) return true; else if (archiveModel.getParentArchive() != null) return containsArchive(archiveModel.getParentArchive()); else return false; } }
/** * Indicates whether or not the passed in {@link ArchiveModel} is a child or other descendant of the current archive. */ default boolean containsArchive(ArchiveModel archiveModel) { if (this.getElement().equals(archiveModel.getElement())) return true; else if (archiveModel.getParentArchive() != null) return containsArchive(archiveModel.getParentArchive()); else return false; } }
/** * 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); } }
/** * 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); } }