public static void main(String[] args) {

    AbstractParserFactory parserFactory = ParserFactoryProducer.getFactory("NYCFactory");
    XMLParser parser = parserFactory.getParserInstance("NYCORDER");
    String msg = "";
    msg = parser.parse();
    System.out.println(msg);

    System.out.println("************************************");

    parserFactory = ParserFactoryProducer.getFactory("LondonFactory");
    parser = parserFactory.getParserInstance("LondonFEEDBACK");
    msg = parser.parse();
    System.out.println(msg);
  }
예제 #2
0
  public static void main(String[] args) {

    PersonDAO_MySQL person = new PersonDAO_MySQL();
    //        person.insertDB(new PersonModel(0, "jag", "ru"));
    //        person.deleteDB(2);
    //        person.updateDB(new PersonModel(3, "jag101", "ru"));
    //        System.out.println(person.selectDB());

    Utils utils = new Utils(person.selectDB());
    System.out.println("===== CSV =====");
    //        utils.printCSV();
    //        utils.saveCSV();

    System.out.println("===== XML =====");
    //        utils.printXML();
    //        utils.saveXML();

    System.out.println("===== JSON =====");
    //       utils.printJSON();
    //       utils.saveJSON();

    ArrayList<PersonModel> arrayListPerson = new ArrayList<PersonModel>();
    //        JSONParser Parser = new JSONParser();
    //        System.out.println(Parser.parse());

    //        CSVParser parser = new CSVParser();
    //        System.out.println(parser.parse());

    XMLParser parser = new XMLParser();
    System.out.println(parser.parse());
  }
예제 #3
0
 @Test
 public void test() {
   try {
     parser.parse();
     Println.print(parser.getRatingScenarios());
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
예제 #4
0
 public static void load(
     Resolver loader,
     String file,
     SimpleDirectedGraph<GraphClass, Inclusion> graph,
     Vector problems) {
   ISGCIReader gcr = new ISGCIReader(graph, problems);
   XMLParser xml = new XMLParser(loader.openInputSource(file), gcr, loader.getEntityResolver());
   xml.parse();
   date = gcr.getDate();
   nodecount = gcr.getNodeCount();
   edgecount = gcr.getEdgeCount();
   relations = gcr.getRelations();
 }