Ejemplo n.º 1
0
 public Unbrailler(String tableId) {
   inFactory = XMLInputFactory.newInstance();
   inFactory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE);
   inFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.TRUE);
   inFactory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.TRUE);
   inFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.TRUE);
   TableCatalog tc = TableCatalog.newInstance();
   for (FactoryProperties t : tc.list()) {
     System.out.println(t.getIdentifier());
   }
   Table t = tc.get(tableId);
   this.bc = t.newBrailleConverter();
 }
Ejemplo n.º 2
0
  /**
   * @param args
   * @throws XMLStreamException
   * @throws IOException
   */
  public static void main(String[] args) throws XMLStreamException, IOException {
    if (args.length < 2) {
      System.out.println("Expected two arguments, path to input file and table identifier.");
      for (FactoryProperties t : TableCatalog.newInstance().list()) {
        System.out.println(t.getIdentifier());
      }
      System.exit(-1);
    }
    File input = new File(args[0]);

    Unbrailler ub = new Unbrailler(args[1]);

    ub.run(input);
  }