public List<Element> getUsageForms() { return DOMUtils.findAllElementsByTagNameNS(getUsage(), Tool.TOOL_SPEC_PUBLIC_ID, "form"); }
Element usage = toolspec.getUsage();
Element usage = toolspec.getUsage();
public List<Element> getUsageForms() { return DOMUtils.findAllElementsByTagNameNS(getUsage(), Tool.TOOL_SPEC_PUBLIC_ID, "form"); }
/** * Arguments can have streamref attributes which associate them with a * stream. Tools usually request streams and rely on them being ready. If an * argument is given a streamref, then the container constructs a stream * from the argument value. This would usually be a simple FileInputStream * or FileOutputStream. The mechanics of this are left for the container to * sort out, but that is the reason why this getter method exists. */ public String getStreamRefName(String streamId) { if (getUsage() != null) { List<Element> elemList = DOMUtils.findAllElementsByTagNameNS(getUsage(), Tool.TOOL_SPEC_PUBLIC_ID, "associatedArgument"); for (Element elem : elemList) { if (elem.getAttribute("streamref").equals(streamId)) { return ((Element)elem.getParentNode()).getAttribute("id"); } } elemList = DOMUtils.findAllElementsByTagNameNS(getUsage(), Tool.TOOL_SPEC_PUBLIC_ID, "argument"); for (Element elem : elemList) { if (elem.getAttribute("streamref").equals(streamId)) { return elem.getAttribute("id"); } } } return null; }
/** * Arguments can have streamref attributes which associate them with a * stream. Tools usually request streams and rely on them being ready. If an * argument is given a streamref, then the container constructs a stream * from the argument value. This would usually be a simple FileInputStream * or FileOutputStream. The mechanics of this are left for the container to * sort out, but that is the reason why this getter method exists. */ public String getStreamRefName(String streamId) { if (getUsage() != null) { List<Element> elemList = DOMUtils.findAllElementsByTagNameNS(getUsage(), Tool.TOOL_SPEC_PUBLIC_ID, "associatedArgument"); for (Element elem : elemList) { if (elem.getAttribute("streamref").equals(streamId)) { return ((Element)elem.getParentNode()).getAttribute("id"); } } elemList = DOMUtils.findAllElementsByTagNameNS(getUsage(), Tool.TOOL_SPEC_PUBLIC_ID, "argument"); for (Element elem : elemList) { if (elem.getAttribute("streamref").equals(streamId)) { return elem.getAttribute("id"); } } } return null; }