class wortformen { static { try { System.loadLibrary( "convert" ); } catch( UnsatisfiedLinkError e ) { System.out.println("Could not load native code for user authentication." ); System.exit(1); } } //wort {{},{},{}},{{wort},{klasse},{hilfsverb}} public wortformen(String[][] wort){ final String name = "Flextion.xml"; try{ PrintWriter writer = new PrintWriter(name); writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); writer.println("<!DOCTYPE flexionen SYSTEM \"http://ariadne.coli.uni-bielefeld.de/dtd/inflection.dtd\">"); writer.println("<flexionen>"); for(int i = 0; i < wort.length; i++){ if(wort[i][2].equals("null")){ if(wort[i][1].equals("Nomen") || wort[i][1].equals("nomen")){ Nomen nomen = new Nomen(wort[i][0],writer); }if(wort[i][1].equals("Adjektiv") || wort[i][1].equals("adjektiv")){ Adjektive adjektive = new Adjektive(wort[i][0],writer); }if(wort[i][1].equals("Adverb") || wort[i][1].equals("adverb")){ Adverb adverb = new Adverb(wort[i][0],writer); }if(wort[i][1].equals("Artikel") || wort[i][1].equals("artikel")){ Adverb artikel = new Adverb(wort[i][0],writer); }/*if(wort[i][1].equals("Pronomen") || wort[i][1].equals("pronomen")){ Pronomen pronomen = new Pronomen(wort[i][0],writer); } */ }else{ if(wort[i][1].equals("Verb") || wort[i][1].equals("verb")){ Verb verb = new Verb(wort[i][0],wort[i][2],writer); } } } writer.println("</flexionen>"); writer.close(); }catch(Exception e){ System.err.println("Fehler"); } } public wortformen(){} static String[] ein = null; private native void convert(String[] ein); /** * @param args */ public static void main(String[] args) { ein = args; wortformen lwortformen = new wortformen(); lwortformen.convert(ein); try{ PrintWriter writer = new PrintWriter(ein[0]+".xml"); writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); writer.println("<!DOCTYPE flexionen SYSTEM \"http://ariadne.coli.uni-bielefeld.de/dtd/inflection.dtd\">"); writer.println("<flexionen>"); if(ein[1].equals("Verb") || ein[1].equals("verb")){ Verb verb = new Verb(ein[0],ein[2],writer); }if(ein[1].equals("Nomen") || ein[1].equals("nomen")){ Nomen nomen = new Nomen(ein[0],writer); }if(ein[1].equals("Adjektiv") || ein[1].equals("adjektiv")){ Adjektive adjektive = new Adjektive(ein[0],writer); }if(ein[1].equals("Adverb") || ein[1].equals("adverb")){ Adverb adverb = new Adverb(ein[0],writer); }if(ein[1].equals("Artikel") || ein[1].equals("artikel")){ Artikel artikel = new Artikel(ein[0],writer); }/*if(args[1].equals("Pronomen") || args[1].equals("pronomen")){ Pronomen pronomen = new Pronomen(args[0],writer); }*/ writer.println("</flexionen>"); writer.close(); }catch(Exception e){ System.err.println("Fehler"); } } }