public MeasuredValueList getMeasuredValueListRest(
      MeasureDescriptor md, MeasuredValueFilter filter) throws MonitorException {

    // Find the data to create the URL
    String url;

    nodedirectory nd =
        db.get(
            nodedirectory.class,
            md.getMeasurementTypeId().substring(0, md.getMeasurementTypeId().indexOf(".measure")));

    VEEReplica rep;

    if (nd == null
        || (nd.getTipo() != nodedirectory.TYPE_REPLICA && nd.getTipo() != nodedirectory.TYPE_NIC))
      return new MeasuredValueList(md);

    String path;

    if (nd.getTipo() == nodedirectory.TYPE_REPLICA) {
      path = URICreation.getURIVEEReplica(md.getMeasurementTypeId());
      rep = db.get(VEEReplica.class, nd.getInternalNodeId());
    } else if (nd.getTipo() == nodedirectory.TYPE_NIC) {
      path = URICreation.getURIHwItem(md.getMeasurementTypeId());
      path = translateNetInfrastructureId(path, nd.getFqnString());
      rep =
          db.get(
              VEEReplica.class,
              nd.getFqnString().substring(0, md.getMeasurementTypeId().indexOf(".network")));
    } else {
      return new MeasuredValueList(md);
    }

    if (rep.getDeployedOn() == null) return new MeasuredValueList(md);
    else {
      url =
          "http://"
              + rep.getDeployedOn().getHost()
              + ":"
              + rep.getDeployedOn().getPort()
              + path
              + URICreation.MONITOR
              + "/"
              + md.getName()
              + URICreation.VALUES;

      // Get the measures
      return restClient.getReplicaMeasure(url, filter, md);
    }
  }