use of com.dexels.navajo.document.saximpl.qdxml.QDParser in project navajo by Dexels.
the class BaseNavajoFactoryImpl method createNavajo.
@Override
public Navajo createNavajo(InputStream stream) {
try {
QDParser parser = new QDParser();
SaxHandler sax = new SaxHandler(parser);
try (Reader isr = new InputStreamReader(stream, StandardCharsets.UTF_8)) {
parser.parse(sax, isr);
}
return sax.getNavajo();
} catch (Exception e) {
throw NavajoFactory.getInstance().createNavajoException(e);
}
}
use of com.dexels.navajo.document.saximpl.qdxml.QDParser in project navajo by Dexels.
the class BaseNavajoFactoryImpl method createNavajo.
@Override
public Navajo createNavajo(Reader r) {
try {
QDParser parser = new QDParser();
SaxHandler sax = new SaxHandler(parser);
parser.parse(sax, r);
return sax.getNavajo();
} catch (Exception e) {
throw NavajoFactory.getInstance().createNavajoException(e);
}
}
use of com.dexels.navajo.document.saximpl.qdxml.QDParser in project navajo by Dexels.
the class BaseNavajoFactoryImpl method createNavaScript.
@Override
public Navascript createNavaScript(FileInputStream fis, MapDefinitionInterrogator mapDefinitionInterrogator) {
try {
QDParser parser = new QDParser();
NavascriptSaxHandler sax = new NavascriptSaxHandler(parser);
sax.setMapChecker(mapDefinitionInterrogator);
try (Reader isr = new InputStreamReader(fis, StandardCharsets.UTF_8)) {
parser.parse(sax, isr);
}
NavascriptTag nt = (NavascriptTag) sax.getNavascript();
nt.setMapChecker(mapDefinitionInterrogator);
return nt;
} catch (Exception e) {
throw NavajoFactory.getInstance().createNavajoException(e);
}
}
use of com.dexels.navajo.document.saximpl.qdxml.QDParser in project navajo by Dexels.
the class BaseNavajoFactoryImpl method createNavaScript.
@Override
public Navascript createNavaScript(java.io.InputStream stream) {
try {
QDParser parser = new QDParser();
NavascriptSaxHandler sax = new NavascriptSaxHandler(parser);
try (Reader isr = new InputStreamReader(stream, StandardCharsets.UTF_8)) {
parser.parse(sax, isr);
}
return sax.getNavascript();
} catch (Exception e) {
throw NavajoFactory.getInstance().createNavajoException(e);
}
}
Aggregations