@Override public boolean containsVertexId(VertexRef id, Criteria... criteria) { return getVertex(id, criteria) != null; }
@Override public void clearVertices() { List<? extends Vertex> all = getVertices(); removeVertices(all); fireVerticesRemoved(all); }
@Override public final void addVertexListener(VertexListener vertexListener) { m_vertexProvider.addVertexListener(vertexListener); }
public void setVertices(List<Vertex> vertices) { clearVertices(); addVertices(vertices); fireVertexSetChanged(); }
public void add(Collection<Vertex> vertices) { addVertices(vertices); fireVerticesAdded(vertices); }
@Override public final List<Vertex> getVertices(Collection<? extends VertexRef> references, Criteria... criteria) { return m_vertexProvider.getVertices(references, criteria); }
public ApplicationTopologyProvider(ApplicationDao applicationDao) { super(new SimpleVertexProvider(TOPOLOGY_NAMESPACE), new SimpleEdgeProvider(TOPOLOGY_NAMESPACE)); this.applicationDao = applicationDao; LOG.debug("Creating a new {} with namespace {}", getClass().getSimpleName(), TOPOLOGY_NAMESPACE); }
@Override public boolean setParent(VertexRef child, VertexRef parent) { if (child.equals(parent)) return false; // Set the parent value on the vertex object getVertex(child).setParent(parent); // Add a parent mapping if (parent == null) { m_parents.remove(child); } else { m_parents.put(child, parent); } // Remove the child from any existing m_children mappings for (Set<VertexRef> vertex : m_children.values()) { vertex.remove(child); } boolean retval = false; if (parent == null) { retval = true; } else { // Add the child to m_children under the new parent Set<VertexRef> children = m_children.get(parent); if (children == null) { children = new TreeSet<VertexRef>(); m_children.put(parent, children); } retval = children.add(child); } fireVertexSetChanged(); return retval; }
public void add(Vertex...vertices) { add(Arrays.asList(vertices)); }
@Override public boolean containsVertexId(String id) { return m_vertexProvider.containsVertexId(id); }
/** * @deprecated You should search by the namespace and ID tuple instead */ @Override public boolean containsVertexId(String id) { return containsVertexId(new DefaultVertexRef(getNamespace(), id)); }
/** * @deprecated You should search by the namespace and ID tuple instead */ @Override public boolean containsVertexId(String id) { return containsVertexId(new DefaultVertexRef(getVertexNamespace(), id)); }
@Override public final boolean contributesTo(String namespace) { return m_vertexProvider.contributesTo(namespace); }
@Override public final void clearVertices() { m_vertexProvider.clearVertices(); }
public void setVertices(List<Vertex> vertices) { clearVertices(); addVertices(vertices); fireVertexSetChanged(); }
@Override public final List<Vertex> getVertices(Criteria... criteria) { return m_vertexProvider.getVertices(criteria); }
public ApplicationTopologyProvider(ApplicationDao applicationDao) { super(new SimpleVertexProvider(TOPOLOGY_NAMESPACE), new SimpleEdgeProvider(TOPOLOGY_NAMESPACE)); this.applicationDao = applicationDao; LOG.debug("Creating a new {} with namespace {}", getClass().getSimpleName(), TOPOLOGY_NAMESPACE); }
@Override public boolean setParent(VertexRef child, VertexRef parent) { if (child.equals(parent)) return false; // Set the parent value on the vertex object getVertex(child).setParent(parent); // Add a parent mapping if (parent == null) { m_parents.remove(child); } else { m_parents.put(child, parent); } // Remove the child from any existing m_children mappings for (Set<VertexRef> vertex : m_children.values()) { vertex.remove(child); } boolean retval = false; if (parent == null) { retval = true; } else { // Add the child to m_children under the new parent Set<VertexRef> children = m_children.get(parent); if (children == null) { children = new TreeSet<VertexRef>(); m_children.put(parent, children); } retval = children.add(child); } fireVertexSetChanged(); return retval; }
public void add(Collection<Vertex> vertices) { addVertices(vertices); fireVerticesAdded(vertices); }
public void add(Vertex...vertices) { add(Arrays.asList(vertices)); }