Package info.aduna.xml

Examples of info.aduna.xml.SimpleSAXParser


   *         If IO problems during parsing.
   */
  public Collection<TransactionOperation> parse(InputStream in)
    throws SAXException, IOException
  {
    SimpleSAXParser saxParser = new SimpleSAXParser();
    TransactionSAXParser handler = new TransactionSAXParser();
    saxParser.setListener(handler);
    saxParser.parse(in);
    return handler.getTxn();
  }
View Full Code Here


   *         If IO problems during parsing.
   */
  public Collection<TransactionOperation> parse(Reader in)
    throws SAXException, IOException
  {
    SimpleSAXParser saxParser = new SimpleSAXParser();
    TransactionSAXParser handler = new TransactionSAXParser();
    saxParser.setListener(handler);
    saxParser.parse(in);
    return handler.getTxn();
  }
View Full Code Here

    throws IOException, RDFParseException, RDFHandlerException
  {
    try {
      rdfHandler.startRDF();

      SimpleSAXParser saxParser = new SimpleSAXParser();
      saxParser.setPreserveWhitespace(true);
      saxParser.setListener(new TriXSAXHandler());

      if (inputStreamOrReader instanceof InputStream) {
        saxParser.parse((InputStream)inputStreamOrReader);
      }
      else {
        saxParser.parse((Reader)inputStreamOrReader);
      }

      rdfHandler.endRDF();
    }
    catch (SAXException e) {
View Full Code Here

  public void parse(InputStream in)
    throws IOException, QueryResultParseException, TupleQueryResultHandlerException
  {
    try {
      SimpleSAXParser simpleSAXParser = new SimpleSAXParser(XMLReaderFactory.createXMLReader());

      simpleSAXParser.setListener(new SPARQLResultsParser());

      simpleSAXParser.parse(in);
    }
    catch (SAXException e) {
      Exception wrappedExc = e.getException();

      if (wrappedExc instanceof QueryResultParseException) {
View Full Code Here

    throws IOException, RDFParseException, RDFHandlerException
  {
    try {
      rdfHandler.startRDF();

      SimpleSAXParser saxParser = new SimpleSAXParser();
      saxParser.setPreserveWhitespace(true);
      saxParser.setListener(new TriXSAXHandler());

      if (inputStreamOrReader instanceof InputStream) {
        saxParser.parse((InputStream)inputStreamOrReader);
      }
      else {
        saxParser.parse((Reader)inputStreamOrReader);
      }

      rdfHandler.endRDF();
    }
    catch (SAXException e) {
View Full Code Here

   *         If IO problems during parsing.
   */
  public Collection<TransactionOperation> parse(InputStream in)
    throws SAXException, IOException
  {
    SimpleSAXParser saxParser = new SimpleSAXParser();
    TransactionSAXParser handler = new TransactionSAXParser();
    saxParser.setListener(handler);
    saxParser.parse(in);
    return handler.getTxn();
  }
View Full Code Here

   *         If IO problems during parsing.
   */
  public Collection<TransactionOperation> parse(Reader in)
    throws SAXException, IOException
  {
    SimpleSAXParser saxParser = new SimpleSAXParser();
    TransactionSAXParser handler = new TransactionSAXParser();
    saxParser.setListener(handler);
    saxParser.parse(in);
    return handler.getTxn();
  }
View Full Code Here

  public void parse(InputStream in)
    throws IOException, QueryResultParseException, TupleQueryResultHandlerException
  {
    try {
      SimpleSAXParser simpleSAXParser = new SimpleSAXParser(XMLReaderFactory.createXMLReader());

      simpleSAXParser.setListener(new SPARQLResultsParser());

      simpleSAXParser.parse(in);
    }
    catch (SAXException e) {
      Exception wrappedExc = e.getException();

      if (wrappedExc instanceof QueryResultParseException) {
View Full Code Here

    throws IOException, QueryResultParseException
  {
    try {
      SPARQLBooleanParser valueParser = new SPARQLBooleanParser();

      SimpleSAXParser simpleSAXParser = new SimpleSAXParser(XMLReaderFactory.createXMLReader());
      simpleSAXParser.setListener(valueParser);
      simpleSAXParser.parse(in);

      return valueParser.getValue();
    }
    catch (SAXException e) {
      Exception wrappedExc = e.getException();
View Full Code Here

TOP

Related Classes of info.aduna.xml.SimpleSAXParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.