/** * Removes the provided tag from the provided {@link FileModel}. If a {@link TechnologyTagModel} cannot be found with the provided name, then this * operation will do nothing. */ public void removeTagFromFileModel(FileModel fileModel, String tagName) { Traversable<Vertex, Vertex> q = getGraphContext().getQuery(TechnologyTagModel.class) .traverse(g -> g.has(TechnologyTagModel.NAME, tagName)); TechnologyTagModel technologyTag = super.getUnique(q.getRawTraversal()); if (technologyTag != null) technologyTag.removeFileModel(fileModel); }
/** * Removes the provided tag from the provided {@link FileModel}. If a {@link TechnologyTagModel} cannot be found with the provided name, then this * operation will do nothing. */ public void removeTagFromFileModel(FileModel fileModel, String tagName) { Traversable<Vertex, Vertex> q = getGraphContext().getQuery(TechnologyTagModel.class) .traverse(g -> g.has(TechnologyTagModel.NAME, tagName)); TechnologyTagModel technologyTag = super.getUnique(q.getRawTraversal()); if (technologyTag != null) technologyTag.removeFileModel(fileModel); }