コード例 #1
0
  @Override
  public VertexHopGraphProvider.VertexHopCriteria getDefaultCriteria() {
    final OnmsNode node = m_topologyDao.getDefaultFocusPoint();

    VertexHopGraphProvider.VertexHopCriteria criterion = null;

    if (node != null) {
      final Vertex defaultVertex = getVertex(node);
      if (defaultVertex != null) {
        criterion = new LinkdHopCriteria(node.getNodeId(), node.getLabel(), m_nodeDao);
      }
    }

    return criterion;
  }
コード例 #2
0
  @Override
  public VertexHopGraphProvider.VertexHopCriteria getDefaultCriteria() {
    final OnmsNode node = m_topologyDao.getDefaultFocusPoint();

    VertexHopGraphProvider.VertexHopCriteria criterion = null;

    if (node != null) {
      final Vertex defaultVertex = getVertex(TOPOLOGY_NAMESPACE_LINKD, node.getNodeId());
      if (defaultVertex != null) {
        VertexHopGraphProvider.FocusNodeHopCriteria hopCriteria =
            new VertexHopGraphProvider.FocusNodeHopCriteria();
        hopCriteria.add(defaultVertex);
        return hopCriteria;
      }
    }

    return criterion;
  }