return Geo.geoContains(value); case "textContains": return Text.textContains(value); case "textContainsFuzzy": return Text.textContainsFuzzy(value);
/** * Return an {@link Iterable} containing all {@link TechnologyTagModel}s that are directly associated with the provided {@link ProjectModel}. */ public Iterable<TechnologyTagModel> findTechnologyTagsForProject(ProjectModelTraversal traversal) { Set<TechnologyTagModel> results = new TreeSet<>(new DefaultTechnologyTagComparator()); GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(traversal.getCanonicalProject().getElement()); pipeline.out(ProjectModel.PROJECT_MODEL_TO_FILE); pipeline.in(TechnologyTagModel.TECH_TAG_TO_FILE_MODEL).has(WindupVertexFrame.TYPE_PROP, Text.textContains(TechnologyTagModel.TYPE)); Iterable<TechnologyTagModel> modelIterable = new FramedVertexIterable<>(getGraphContext().getFramed(), pipeline.toList(), TechnologyTagModel.class); results.addAll(Iterators.asSet(modelIterable)); for (ProjectModelTraversal childTraversal : traversal.getChildren()) { results.addAll(Iterators.asSet(findTechnologyTagsForProject(childTraversal))); } return results; } }
/** * Return all {@link ClassificationModel} instances that are attached to the given {@link FileModel} instance. */ public Iterable<ClassificationModel> getClassifications(FileModel model) { GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(model.getElement()); pipeline.in(ClassificationModel.FILE_MODEL); pipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(ClassificationModel.TYPE)); return new FramedVertexIterable<>(getGraphContext().getFramed(), pipeline.toList(), ClassificationModel.class); }
/** * Gets all {@link InlineHintModel} instances that are directly associated with the given {@link FileModel} */ public Iterable<InlineHintModel> getHintsForFile(FileModel file) { GraphTraversal<Vertex, Vertex> inlineHintPipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(file.getElement()); inlineHintPipeline.in(FileReferenceModel.FILE_MODEL); inlineHintPipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(InlineHintModel.TYPE)); return new FramedVertexIterable<>(getGraphContext().getFramed(), inlineHintPipeline.toList(), InlineHintModel.class); }
public Iterable<VendorSpecificationExtensionModel> getVendorSpecificationExtensions(FileModel model) { GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(model.getElement()); pipeline.out(VendorSpecificationExtensionModel.REF); pipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(VendorSpecificationExtensionModel.TYPE)); return new FramedVertexIterable<>(getGraphContext().getFramed(), pipeline.toList(), VendorSpecificationExtensionModel.class); }
/** * Gets all {@link InlineHintModel} instances that are directly associated with the given {@link FileReferenceModel} */ public Iterable<InlineHintModel> getHintsForFileReference(FileReferenceModel reference) { GraphTraversal<Vertex, Vertex> inlineHintPipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(reference.getElement()); inlineHintPipeline.in(InlineHintModel.FILE_LOCATION_REFERENCE); inlineHintPipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(InlineHintModel.TYPE)); return new FramedVertexIterable<>(getGraphContext().getFramed(), inlineHintPipeline.toList(), InlineHintModel.class); }
private RMIServiceModel findByInterface(JavaClassModel rmiInterface) { GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(rmiInterface.getElement()); pipeline.in(RMIServiceModel.RMI_INTERFACE); pipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(RMIServiceModel.TYPE)); if (pipeline.hasNext()) { return frame(pipeline.next()); } else { return null; } } }
/** * Gets an {@link Iterable} of {@link }s for the given {@link ProjectModel}. */ public Iterable<HibernateEntityModel> findAllByApplication(ProjectModel application) { GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(application.getElement()); pipeline.in(HibernateEntityModel.APPLICATIONS); pipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(HibernateEntityModel.TYPE)); return new FramedVertexIterable<>(getGraphContext().getFramed(), pipeline.toList(), HibernateEntityModel.class); } }
public Iterable<VendorSpecificationExtensionModel> getVendorSpecificationExtensions(FileModel model) { GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(model.getElement()); pipeline.out(VendorSpecificationExtensionModel.REF); pipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(VendorSpecificationExtensionModel.TYPE)); return new FramedVertexIterable<>(getGraphContext().getFramed(), pipeline.toList(), VendorSpecificationExtensionModel.class); }
/** * Gets an {@link Iterable} of {@link }s for the given {@link ProjectModel}. */ public Iterable<HibernateEntityModel> findAllByApplication(ProjectModel application) { GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(application.getElement()); pipeline.in(HibernateEntityModel.APPLICATIONS); pipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(HibernateEntityModel.TYPE)); return new FramedVertexIterable<>(getGraphContext().getFramed(), pipeline.toList(), HibernateEntityModel.class); } }
/** * Return all {@link ClassificationModel} instances that are attached to the given {@link FileModel} instance. */ public Iterable<ClassificationModel> getClassifications(FileModel model) { GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(model.getElement()); pipeline.in(ClassificationModel.FILE_MODEL); pipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(ClassificationModel.TYPE)); return new FramedVertexIterable<>(getGraphContext().getFramed(), pipeline.toList(), ClassificationModel.class); }
private RMIServiceModel findByInterface(JavaClassModel rmiInterface) { GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(rmiInterface.getElement()); pipeline.in(RMIServiceModel.RMI_INTERFACE); pipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(RMIServiceModel.TYPE)); if (pipeline.hasNext()) { return frame(pipeline.next()); } else { return null; } } }
/** * Return all {@link ClassificationModel} instances that are attached to the given {@link FileModel} instance with a specific classification name. */ public Iterable<ClassificationModel> getClassificationByName(FileModel model, String classificationName) { GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(model.getElement()); pipeline.in(ClassificationModel.FILE_MODEL); pipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(ClassificationModel.TYPE)); pipeline.has(ClassificationModel.CLASSIFICATION, classificationName); return new FramedVertexIterable<>(getGraphContext().getFramed(), pipeline.toList(), ClassificationModel.class); }
/** * Gets all {@link InlineHintModel} instances that are directly associated with the given {@link FileReferenceModel} */ public Iterable<InlineHintModel> getHintsForFileReference(FileReferenceModel reference) { GraphTraversal<Vertex, Vertex> inlineHintPipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(reference.getElement()); inlineHintPipeline.in(InlineHintModel.FILE_LOCATION_REFERENCE); inlineHintPipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(InlineHintModel.TYPE)); return new FramedVertexIterable<>(getGraphContext().getFramed(), inlineHintPipeline.toList(), InlineHintModel.class); }
/** * Gets all {@link InlineHintModel} instances that are directly associated with the given {@link FileModel} */ public Iterable<InlineHintModel> getHintsForFile(FileModel file) { GraphTraversal<Vertex, Vertex> inlineHintPipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(file.getElement()); inlineHintPipeline.in(FileReferenceModel.FILE_MODEL); inlineHintPipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(InlineHintModel.TYPE)); return new FramedVertexIterable<>(getGraphContext().getFramed(), inlineHintPipeline.toList(), InlineHintModel.class); }
/** * Return all {@link ClassificationModel} instances that are attached to the given {@link FileModel} instance with a specific classification name. */ public Iterable<ClassificationModel> getClassificationByName(FileModel model, String classificationName) { GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(model.getElement()); pipeline.in(ClassificationModel.FILE_MODEL); pipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(ClassificationModel.TYPE)); pipeline.has(ClassificationModel.CLASSIFICATION, classificationName); return new FramedVertexIterable<>(getGraphContext().getFramed(), pipeline.toList(), ClassificationModel.class); }
/** * Returns the total effort points in all of the {@link InlineHintModel} instances associated with the provided {@link FileModel}. */ public int getMigrationEffortPoints(FileModel fileModel) { GraphTraversal<Vertex, Vertex> inlineHintPipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(fileModel.getElement()); inlineHintPipeline.in(InlineHintModel.FILE_MODEL); inlineHintPipeline.has(EffortReportModel.EFFORT, P.gt(0)); inlineHintPipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(InlineHintModel.TYPE)); int hintEffort = 0; for (Vertex v : inlineHintPipeline.toList()) { hintEffort += (Integer) v.property(InlineHintModel.EFFORT).value(); } return hintEffort; }
/** * Returns the total effort points in all of the {@link InlineHintModel} instances associated with the provided {@link FileModel}. */ public int getMigrationEffortPoints(FileModel fileModel) { GraphTraversal<Vertex, Vertex> inlineHintPipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(fileModel.getElement()); inlineHintPipeline.in(InlineHintModel.FILE_MODEL); inlineHintPipeline.has(EffortReportModel.EFFORT, P.gt(0)); inlineHintPipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(InlineHintModel.TYPE)); int hintEffort = 0; for (Vertex v : inlineHintPipeline.toList()) { hintEffort += (Integer) v.property(InlineHintModel.EFFORT).value(); } return hintEffort; }
/** * Returns the total effort points in all of the {@link ClassificationModel}s associated with the provided {@link FileModel}. */ public int getMigrationEffortPoints(FileModel fileModel) { GraphTraversal<Vertex, Vertex> classificationPipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(fileModel.getElement()); classificationPipeline.in(ClassificationModel.FILE_MODEL); classificationPipeline.has(EffortReportModel.EFFORT, P.gt(0)); classificationPipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(ClassificationModel.TYPE)); int classificationEffort = 0; for (Vertex v : classificationPipeline.toList()) { Property<Integer> migrationEffort = v.property(ClassificationModel.EFFORT); if (migrationEffort.isPresent()) { classificationEffort += migrationEffort.value(); } } return classificationEffort; }
/** * Returns the total effort points in all of the {@link ClassificationModel}s associated with the provided {@link FileModel}. */ public int getMigrationEffortPoints(FileModel fileModel) { GraphTraversal<Vertex, Vertex> classificationPipeline = new GraphTraversalSource(getGraphContext().getGraph()).V(fileModel.getElement()); classificationPipeline.in(ClassificationModel.FILE_MODEL); classificationPipeline.has(EffortReportModel.EFFORT, P.gt(0)); classificationPipeline.has(WindupVertexFrame.TYPE_PROP, Text.textContains(ClassificationModel.TYPE)); int classificationEffort = 0; for (Vertex v : classificationPipeline.toList()) { Property<Integer> migrationEffort = v.property(ClassificationModel.EFFORT); if (migrationEffort.isPresent()) { classificationEffort += migrationEffort.value(); } } return classificationEffort; }