String chosenEvent = eventCB.getSelectedItem().toString();
// creates an array list
List<Triple> triples = new ArrayList<Triple>();
Literal type;
// compare the chosenEvent with Strings of Events to know which event one wants to produce
if (chosenEvent == "AlarmEvent") {
type = LazyLiteral.getLiteral("<http://localhost/events/Alarm/AlarmEvent>");
} else if (chosenEvent == "CountEvent") {
type = LazyLiteral.getLiteral("<http://localhost/events/Count/CountEvent>");
} else if (chosenEvent == "MtGoxEvent") {
type = LazyLiteral.getLiteral("<http://localhost/events/MtGox/MtGoxEvent>");
} else if (chosenEvent == "SysMonEvent") {
type = LazyLiteral.getLiteral("<http://localhost/events/SysMon/SysMonEvent>");
} else if (chosenEvent == "TwitterSearchEvent") {
type = LazyLiteral.getLiteral("<http://localhost/events/TwitterSearch/TwitterSearchEvent>");
} else if (chosenEvent == "ButtonClickedEvent") {
type = LazyLiteral.getLiteral("<http://localhost/events/ButtonClicked/ButtonClickedEvent>");
} else if (chosenEvent == "BTDevicesEvent") {
type = LazyLiteral.getLiteral("<http://localhost/events/BTDevices/BTDevicesEvent>");
} else if (chosenEvent == "EbayAuctionEvent") {
type = LazyLiteral.getLiteral("<http://localhost/events/Ebay/EbayAuctionEvent>");
} else if (chosenEvent == "WeatherEvent") {
type = LazyLiteral.getLiteral("<http://localhost/events/Weather/WeatherEvent>");
} else if (chosenEvent == "MoonEvent") {
type = LazyLiteral.getLiteral("<http://localhost/events/Moon/MoonEvent>");
} else {
type = LazyLiteral.getLiteral(chosenEvent);
}
// add triples of the chosen event to triples
triples.add(new Triple(Literals.AnonymousLiteral.ANONYMOUS, Literals.RDF.TYPE, type));
/**
* Gets all components from the predicatePanel and checks the validity.
*/
for(Component component: predicatePanel.getComponents()){
if(component instanceof PredObjPanel){
PredObjPanel pop = (PredObjPanel) component;
Literal s = null;
Literal k = null;
// check if predicates in valid format
try {
s = this.getLiteral(pop.predTF.getText());
} catch (ParseException e1) {