// The MIT License
//
// Copyright (c) 2004 Evren Sirin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
package examples;
/**
* A simple to GUI to create OWL-S files from WSDL descriptions.
*
* @author Evren Sirin
*/
"WSDL Parameter", "WSDL Type",
"OWL-S Name", "OWL Type", "XSLT"};
};
public WSDL2OWLS() {
browseButton.addActionListener(this);
urls.addActionListener(this);
new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if (e.getValueIsAdjusting()) return;
doSelect();
}
}
);
advancedButton.addActionListener(this);
new JComponent[] {
new JLabel("Service Name"),
new JLabel("Text description"),
new JLabel("Logical URI"),
// advancedButton,
},
new JComponent[] {
// new JLabel("")
}
);
textDescription.setLineWrap(true);
textDescription.setWrapStyleWord(true);
new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if (e.getValueIsAdjusting()) return;
removeNSButton.setEnabled(true);
}
}
);
addNSButton.addActionListener(this);
removeNSButton.addActionListener(this);
generateButton.setEnabled(false);
generateButton.addActionListener(this);
closeButton.addActionListener(this);
updateNS();
}
doBrowse();
doLoad();
showAdvanced();
addNS();
removeNS();
doGenerate();
else
}
doLoad();
}
int labelWidth = 100;
return label;
}
public void addNS() {
public void actionPerformed(ActionEvent e) {
w.dispose();
}
});
info.setResizable(false);
//info.show();
info.setVisible(true);
updateNS();
}
public void removeNS() {
if(row == -1) {
null,
"Please first select an entry, then click remove!",
"Error",
return;
}
updateNS();
}
GridBagConstraints c = new GridBagConstraints();
for (int i = 0; i < numLabels; i++) {
if(i == numLabels - 1)
c.weightx = 1.0;
c.weighty = 1.0;
}
return textControlsPane;
}
void doLoad() {
try {
}
catch(final Exception e) {
public void run() {
null,
"Error",
}
});
}
}
void doBrowse() {
//In response to a button click:
return;
null,
"Error",
}
else {
try {
} catch (MalformedURLException e) {
null,
"Error",
}
}
}
void doSelect() {
// fileNameField.setText("");
generateButton.setEnabled(false);
}
else {
// fileNameField.setText(op.getName() + ".owl");
else
generateButton.setEnabled(true);
}
updateNS();
}
void prepareAdvanced() {
prefixButton.setSelected(true);
new JComponent[] {prefixText}));
new JLabel("Profile"),
new JLabel("Process"),
new JLabel("Grounding"),
},
advanced.setResizable(false);
}
void showAdvanced() {
//advanced.show();
advanced.setVisible(true);
}
: p.getType();
// By default use owl:Thing as param type
//row[4] = "None";
}
}
void doGenerate() {
name +
".owl";
return;
int option =
null,
"Do you want to replace it?",
"Save File",
return;
}
try {
} catch(IllegalArgumentException e) {
this,
e.getMessage(),
"Error",
return;
} catch(URISyntaxException e) {
this,
e.getMessage(),
"Error",
return;
}
}
try {
} catch(IllegalArgumentException e) {
this,
e.getMessage(),
"Error",
return;
} catch(URISyntaxException e) {
this,
e.getMessage(),
"Error",
return;
}
}
try {
} catch(Exception e) {
e.printStackTrace();
null,
"Cannot create OWL-S file!",
"Error",
return;
}
boolean valid = false;
try {
if( valid ) {
}
}
if(!valid)
null,
"Error",
else {
null,
"Success",
}
}
void updateNS() {
while(i.hasNext()) {
}
}
//test.show();
test.setVisible(true);
}
}