// set common node properties from NDL
  private void setCommonNodeProperties(OrcaNode on, Resource nr) {
    // post boot script
    on.setPostBootScript(NdlCommons.getPostBootScript(nr));

    // management IP/port access
    on.setManagementAccess(NdlCommons.getNodeServices(nr));

    // state
    on.setState(NdlCommons.getResourceStateAsString(nr));

    if (on.getState() != null) {
      on.setIsResource();
    }

    // reservation notice
    on.setReservationNotice(NdlCommons.getResourceReservationNotice(nr));
    on.setReservationGuid(getGuidFromNotice(on.getReservationNotice()));

    // domain
    Resource domain = NdlCommons.getDomain(nr);
    if (domain != null) on.setDomain(RequestSaver.reverseLookupDomain(domain));

    // url
    on.setUrl(nr.getURI());

    // group (if any)
    String groupUrl = NdlCommons.getRequestGroupURLProperty(nr);
    // group URL same as my URL means I'm a single node
    if ((groupUrl != null) && groupUrl.equals(on.getUrl())) groupUrl = null;
    on.setGroup(groupUrl);

    // specific ce type
    Resource ceType = NdlCommons.getSpecificCE(nr);
    if (ceType != null) on.setNodeType(RequestSaver.reverseNodeTypeLookup(ceType));

    // substrate info if present
    if (NdlCommons.getEC2WorkerNodeId(nr) != null)
      on.setSubstrateInfo("worker", NdlCommons.getEC2WorkerNodeId(nr));
    if (NdlCommons.getEC2InstanceId(nr) != null)
      on.setSubstrateInfo("instance", NdlCommons.getEC2InstanceId(nr));
  }
  @Override
  public void ndlNode(Resource ce, OntModel om, Resource ceClass, List<Resource> interfaces) {

    // ignore request items
    // if (requestPhase)
    //	return;

    if (ce == null) return;

    // logger.debug("Node: " + ce);

    OrcaNode newNode;

    if (NdlCommons.isStitchingNodeInManifest(ce)) {
      // logger.debug("  is a stitching port");
      OrcaStitchPort sp = new OrcaStitchPort(getPrettyName(ce));
      // get the interface (first)
      if (interfaces.size() == 1) {
        sp.setLabel(NdlCommons.getLayerLabelLiteral(interfaces.get(0)));
        if (NdlCommons.getLinkTo(interfaces.get(0)) != null)
          sp.setPort(NdlCommons.getLinkTo(interfaces.get(0)).toString());
      }
      newNode = sp;
    } else if (NdlCommons.isNetworkStorage(ce)) {
      // logger.debug("  is a storage node");
      newNode = new OrcaStorageNode(getPrettyName(ce));
      newNode.setIsResource();
    } else if (NdlCommons.isMulticastDevice(ce)) {
      // logger.debug("  is a multicast root");
      newNode = new OrcaCrossconnect(getPrettyName(ce));
      newNode.setIsResource();
    } else {
      // logger.debug("  is a regular node");
      newNode = new OrcaNode(getPrettyName(ce));
    }

    for (Resource ii : interfaces)
      // logger.debug("  With interface " + ii);

      // set common properties
      setCommonNodeProperties(newNode, ce);

    // process interfaces
    for (Iterator<Resource> it = interfaces.iterator(); it.hasNext(); ) {
      Resource intR = it.next();
      // interfaceToNode.put(getTrueName(intR), newNode);
      // logger.debug("Remembering interface " + intR + " of node " + ce);
      addNodeToInterface(getTrueName(intR), newNode);
    }

    // disk image
    Resource di = NdlCommons.getDiskImage(ce);
    if (di != null) {
      try {
        // String imageURL = NdlCommons.getIndividualsImageURL(ce);
        // String imageHash = NdlCommons.getIndividualsImageHash(ce);
        // GUIRequestState.getInstance().addImage(new OrcaImage(di.getLocalName(),
        //		new URL(imageURL), imageHash), null);
        String imgName = di.getURI().replaceAll("http.+#", "").replace("+", " ");
        newNode.setImage(imgName);
      } catch (Exception e) {
        // FIXME: ?
        ;
      }
    }

    nodes.put(getTrueName(ce), newNode);

    // add nodes to the graph

    pg.addNodeLater(newNode);
    // are there nodes hanging off of it as elements? if so, link them in
    processDomainVmElements(ce, om, newNode);
  }