示例#1
0
  /**
   * This interface method is called to set all the fieldValues of this object of <code>InPort
   * </code>, using the specified XML string.
   *
   * @param port The new fieldValues value
   * @exception FioranoException if an error occurs while parsing the XMLString
   * @since Tifosi2.0
   */
  public void setFieldValues(Element port) throws FioranoException {
    //        Document doc = XMLUtils.getDOMDocumentFromXML(xmlString);
    //        Element port = doc.getDocumentElement();

    if (port != null) {
      m_bIsSyncRequestType = XMLDmiUtil.getAttributeAsBoolean(port, "isSyncRequestType");

      NodeList children = port.getChildNodes();
      Node child = null;

      for (int i = 0; children != null && i < children.getLength(); ++i) {
        child = children.item(i);

        String nodeName = child.getNodeName();

        if (nodeName.equalsIgnoreCase("Name")) {
          m_strPortName = XMLUtils.getNodeValueAsString(child).toUpperCase();
        }

        if (nodeName.equalsIgnoreCase("Description")) {
          m_strDscription = XMLUtils.getNodeValueAsString(child);
        }

        if (nodeName.equalsIgnoreCase("XSD")) {
          m_strXSD = XMLUtils.getNodeValueAsString(child);
        }

        if (nodeName.equalsIgnoreCase("JavaClass")) {
          m_strJavaClass = XMLUtils.getNodeValueAsString(child);
        }

        if (nodeName.equalsIgnoreCase("Param")) {
          Param paramDmi = new Param();

          paramDmi.setFieldValues((Element) child);
          addParam(paramDmi);
        }
      }
    }
    validate();
  }