Esempio n. 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);
  }
Esempio n. 2
0
 private RDFResource getParameterType(OWLIndividual msgMap) {
   OWLIndividual param = getOwlsParameter(msgMap);
   return OWLUtils.getParameterType(param, okb);
 }