default TagSetModel getTagModel() { try { return getTagModelNotNullSafe(); } catch (NoSuchElementException e) { return null; } }
default ProjectModel getProjectModel() { try { return getProjectModelNotNullSafe(); } catch (NoSuchElementException e) { return null; } }
@Override default List<FileModel> transformToFileModel() { return this.getFileModels(); } }
private ApplicationReportModel createAppDependencyGraphReport(GraphContext context) { ApplicationReportService applicationReportService = new ApplicationReportService(context); ApplicationReportModel report = applicationReportService.create(); report.setReportPriority(104); report.setReportIconClass("glyphicon glyphicon-tree-deciduous"); report.setTemplatePath(TEMPLATE); report.setTemplateType(TemplateType.FREEMARKER); report.setDisplayInApplicationReportIndex(Boolean.TRUE); return report; }
/** * Overrides GraphService.create() to create the object with some reasonable defaults */ public ApplicationReportModel create() { ApplicationReportModel applicationReportModel = super.create(); applicationReportModel.setDisplayInApplicationReportIndex(false); applicationReportModel.setMainApplicationReport(false); applicationReportModel.setReportPriority(Integer.MAX_VALUE); return applicationReportModel; }
public static Set<String> gatherReportFileTags(ReportFileModel reportFileModel) { Set<String> allTags = new HashSet<>(); for (ClassificationModel classificationModel : reportFileModel.getClassificationModels()) { for (String tag : classificationModel.getTags()) allTags.add(tag); } for (InlineHintModel inlineHintModel : reportFileModel.getInlineHints()) { for (String tag : inlineHintModel.getTags()) allTags.add(tag); } return allTags; } }
@Override public int compare(TechnologyTagModel o1, TechnologyTagModel o2) { TechnologyTagLevel level1 = o1.getLevel() != null ? o1.getLevel() : TechnologyTagLevel.INFORMATIONAL; TechnologyTagLevel level2 = o2.getLevel() != null ? o2.getLevel() : TechnologyTagLevel.INFORMATIONAL; int diff = level1.ordinal() - level2.ordinal(); if (diff == 0) { diff = o1.getName().compareTo(o2.getName()); } return diff; } }
public WindupVertexListModel<T> addAll(WindupVertexListModel<T> frame, Iterable<T> items) { for (T item : items) frame.addItem(item); return frame; }
/** * Gets the {@link Set} of tags associated with this vertex. */ default Set<String> getTags() { TagSetModel tagSetModel = getTagModel(); if (tagSetModel == null) return Collections.emptySet(); return tagSetModel.getTags(); }
@Override public int compare(ApplicationReportModel o1, ApplicationReportModel o2) { return o1.getReportPriority() - o2.getReportPriority(); } });
/** * Get the number of {@link ClassificationModel} instances attached to this {@link ReportFileModel} */ default long getClassificationCount() { return getClassificationModels().size(); } }
/** * Get the number of {@link InlineHintModel} instances attached to this {@link ReportFileModel} */ default long getInlineHintCount() { return getInlineHints().size(); }
public static Set<String> gatherReportFileTags(ReportFileModel reportFileModel) { Set<String> allTags = new HashSet<>(); for (ClassificationModel classificationModel : reportFileModel.getClassificationModels()) { for (String tag : classificationModel.getTags()) allTags.add(tag); } for (InlineHintModel inlineHintModel : reportFileModel.getInlineHints()) { for (String tag : inlineHintModel.getTags()) allTags.add(tag); } return allTags; } }
@Override public int compare(TechnologyTagModel o1, TechnologyTagModel o2) { TechnologyTagLevel level1 = o1.getLevel() != null ? o1.getLevel() : TechnologyTagLevel.INFORMATIONAL; TechnologyTagLevel level2 = o2.getLevel() != null ? o2.getLevel() : TechnologyTagLevel.INFORMATIONAL; int diff = level1.ordinal() - level2.ordinal(); if (diff == 0) { diff = o1.getName().compareTo(o2.getName()); } return diff; } }
@Override default List<FileModel> transformToFileModel() { return this.getFileModels(); } }
public WindupVertexListModel<T> addAll(WindupVertexListModel<T> frame, Iterable<T> items) { for (T item : items) frame.addItem(item); return frame; }
/** * Gets the {@link Set} of tags associated with this vertex. */ default Set<String> getTags() { TagSetModel tagSetModel = getTagModel(); if (tagSetModel == null) return Collections.emptySet(); return tagSetModel.getTags(); }
default TagSetModel getTagModel() { try { return getTagModelNotNullSafe(); } catch (NoSuchElementException e) { return null; } }
default ProjectModel getProjectModel() { try { return getProjectModelNotNullSafe(); } catch (NoSuchElementException e) { return null; } }
@Override public int compare(ApplicationReportModel o1, ApplicationReportModel o2) { return o1.getReportPriority() - o2.getReportPriority(); } });