Search in sources :

Example 6 with RefComparator

use of org.opennms.features.topology.api.topo.RefComparator in project opennms by OpenNMS.

the class LinkdHopCriteria method getVertices.

@Override
public Set<VertexRef> getVertices() {
    Integer id = Integer.valueOf(m_nodeId);
    OnmsNode node = m_nodeDao.get(id);
    Set<VertexRef> vertices = new TreeSet<VertexRef>(new RefComparator());
    if (node != null) {
        String label = node.getLabel();
        vertices.add(new DefaultVertexRef("nodes", m_nodeId, label));
    }
    return vertices;
}
Also used : OnmsNode(org.opennms.netmgt.model.OnmsNode) DefaultVertexRef(org.opennms.features.topology.api.topo.DefaultVertexRef) TreeSet(java.util.TreeSet) DefaultVertexRef(org.opennms.features.topology.api.topo.DefaultVertexRef) VertexRef(org.opennms.features.topology.api.topo.VertexRef) RefComparator(org.opennms.features.topology.api.topo.RefComparator)

Aggregations

RefComparator (org.opennms.features.topology.api.topo.RefComparator)6 VertexRef (org.opennms.features.topology.api.topo.VertexRef)5 TreeSet (java.util.TreeSet)4 DefaultVertexRef (org.opennms.features.topology.api.topo.DefaultVertexRef)4 OnmsNode (org.opennms.netmgt.model.OnmsNode)3 Edge (org.opennms.features.topology.api.topo.Edge)2 HashSet (java.util.HashSet)1 Set (java.util.Set)1 TreeMap (java.util.TreeMap)1 CriteriaBuilder (org.opennms.core.criteria.CriteriaBuilder)1 CollapsibleCriteria (org.opennms.features.topology.api.topo.CollapsibleCriteria)1 Vertex (org.opennms.features.topology.api.topo.Vertex)1 OnmsAlarm (org.opennms.netmgt.model.OnmsAlarm)1 OnmsIpInterface (org.opennms.netmgt.model.OnmsIpInterface)1