KlabUrn urn = new KlabUrn(layerName);
throws KlabException { KlabUrn kurn = new KlabUrn(urn);
/** * Return the URL on which we should call the {@link API#GET_RESOURCE} service to * retrieve the passed URN. * * @param urn * @return a valid URL string, or null. */ public static String getNodeURLForUrn(String urn) { KlabUrn kurn = new KlabUrn(urn); if (KLAB.ENGINE.getNetwork() instanceof INodeNetwork && kurn.getNodeName().equals(KLAB.ENGINE.getName())) { return ((INodeNetwork) KLAB.ENGINE.getNetwork()).getUrl(); } /* * The call goes to the node in the URN; we authenticate with the auth token of * the node this goes to if coming from a node, or the token of the primary engine * if it comes from an engine, which should have negotiated access with all nodes * at API.CONNECT. */ INode node = KLAB.ENGINE.getNetwork().getNode(kurn.getNodeName()); if (node == null) { return null; } return node.getUrl(); }
KlabUrn kurn = new KlabUrn(urn); File nodeFile = new File(topDirectory + File.separator + ".node"); try {
KlabUrn kurn = new KlabUrn(urn); String ret = null;