Example #1
0
  protected void setupGUI() {
    super.setupGUI();
    JPanel typesPanel = ComponentFactory.createPanel();
    typesPanel.setLayout(new BoxLayout(typesPanel, BoxLayout.Y_AXIS));

    JPanel targetWsdlTypePanel = new JPanel(new BorderLayout());
    JLabel targetWsdlTypeLabel = ComponentFactory.createLabel("Target WSDL type");
    JTextArea targetWsdlTypeArea = ComponentFactory.createTextArea();
    targetWsdlTypeArea.setEditable(false);
    JScrollPane targetWsdlTypePane = ComponentFactory.createScrollPane(targetWsdlTypeArea);
    targetWsdlTypePanel.add(targetWsdlTypeLabel, BorderLayout.NORTH);
    targetWsdlTypePanel.add(targetWsdlTypePane, BorderLayout.CENTER);

    targetWsdlTypeArea.setText(getXMLSchemaText(wsdlInputMessagePart));

    JPanel sourceOWLTypesPanel = new JPanel(new BorderLayout());
    JLabel sourceOWLTypesLabel = ComponentFactory.createLabel("Source OWL Types");
    JTextArea sourceOWLTypesArea = ComponentFactory.createTextArea();
    sourceOWLTypesArea.setEditable(false);
    JScrollPane sourceOWLTypesPane = ComponentFactory.createScrollPane(sourceOWLTypesArea);
    sourceOWLTypesPanel.add(sourceOWLTypesLabel, BorderLayout.NORTH);
    sourceOWLTypesPanel.add(sourceOWLTypesPane, BorderLayout.CENTER);

    Collection owlParams = generateParameterList();
    OWLIndividual owlParam = null;
    String owlText = "";
    OWLNamedClass LocalCls = okb.getOWLNamedClass("process:Local");
    OWLNamedClass InputCls = okb.getOWLNamedClass("process:Input");
    for (Iterator it = owlParams.iterator(); it.hasNext(); ) {
      owlParam = (OWLIndividual) it.next();
      if (owlParam.hasRDFType(LocalCls, true)) {
        owlText +=
            "Local: "
                + owlParam.getName()
                + " with type: "
                + OWLUtils.getParameterType(owlParam, okb).getName()
                + "\n";
      } else if (owlParam.hasRDFType(InputCls, true)) {
        owlText +=
            "Input: "
                + owlParam.getName()
                + " with type: "
                + OWLUtils.getParameterType(owlParam, okb).getName();
      }
    }
    sourceOWLTypesArea.setText(owlText);

    typesPanel.add(targetWsdlTypePanel);
    typesPanel.add(sourceOWLTypesPanel);
    tabs.add("Type Information", typesPanel);
  }
Example #2
0
  protected void setupGUI() {
    super.setupGUI();
    JPanel typesPanel = ComponentFactory.createPanel();
    typesPanel.setLayout(new BorderLayout());

    JPanel targetOWLTypePanel = new JPanel(new BorderLayout());
    JLabel targetOWLTypeLabel = ComponentFactory.createLabel("Target OWL Type: ");
    JTextField targetOWLTypeField = ComponentFactory.createTextField();
    targetOWLTypeField.setEditable(false);
    targetOWLTypePanel.add(targetOWLTypeLabel, BorderLayout.WEST);
    targetOWLTypePanel.add(targetOWLTypeField, BorderLayout.CENTER);

    targetOWLTypeField.setText(getParameterType(m_owlInst).getName());

    JPanel sourceWsdlTypesPanel = new JPanel(new BorderLayout());
    JLabel sourceWsdlTypesLabel = ComponentFactory.createLabel("Source WSDL types");
    JTextArea sourceWsdlTypesArea = ComponentFactory.createTextArea();
    sourceWsdlTypesArea.setEditable(false);
    JScrollPane sourceWsdlTypesPane = ComponentFactory.createScrollPane(sourceWsdlTypesArea);
    sourceWsdlTypesPanel.add(sourceWsdlTypesLabel, BorderLayout.NORTH);
    sourceWsdlTypesPanel.add(sourceWsdlTypesPane, BorderLayout.CENTER);

    Collection wsdlMessageParts = wsdlOutputMessage.getParts().values();
    Part msgPart = null;
    String wsdlText = "";
    for (Iterator it = wsdlMessageParts.iterator(); it.hasNext(); ) {
      msgPart = (Part) it.next();
      wsdlText +=
          "WSDL Output Message Part: "
              + msgPart.getName()
              + " with type:\n\n "
              + getXMLSchemaText(msgPart)
              + "\n\n";
    }
    sourceWsdlTypesArea.setText(wsdlText);

    typesPanel.add(targetOWLTypePanel, BorderLayout.NORTH);
    typesPanel.add(sourceWsdlTypesPanel, BorderLayout.CENTER);
    tabs.add("Type Information", typesPanel);
  }