Package org.xml.sax

Examples of org.xml.sax.SAXException


      catch (XmlBlasterException e) {
         throw new org.xmlBlaster.util.StopParseException(e);
      }
      catch (Throwable e) {
         XmlBlasterException ex = new XmlBlasterException(glob, ErrorCode.INTERNAL_UNKNOWN, ME, "ClusterNode parser failed", e);
         throw new SAXException("", ex);
      }

      log.warning("startElement: Ignoring unknown name=" + name + " character='" + character.toString() + "' inClusternode=" + inClusternode);
   }
View Full Code Here


    } else if (oTemporaryAddr!=null) {
      if (oTemporaryAddr.getTable()!=null)
      oCol = oTemporaryAddr.getTable().getColumnByName(local.toLowerCase());
      if (null!=oCol) {
        try { oTemporaryAddr.put(local, oBuffer.toString(), oCol.getSqlType()); }
        catch (FileNotFoundException fnf) { throw new SAXException(fnf.getMessage(), fnf); }
      }
      else
        oTemporaryAddr.put(local, oBuffer.toString());        
    } else if (oTemporaryLine!=null) {
      if (oTemporaryLine.getTable()!=null)
      oCol = oTemporaryLine.getTable().getColumnByName(local.toLowerCase());
      if (null!=oCol) {
        try { oTemporaryLine.put(local, oBuffer.toString(), oCol.getSqlType()); }
        catch (FileNotFoundException fnf) { throw new SAXException(fnf.getMessage(), fnf); }
      }
      else
        oTemporaryLine.put(local, oBuffer.toString());        
    } else if (local.equalsIgnoreCase("Properties")) {
      // Do nothing here 
View Full Code Here

         * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
         */
        public final void error(final SAXParseException exception)
            throws SAXException
        {
            throw new SAXException(this.getMessage(exception));
        }
View Full Code Here

         * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
         */
        public final void fatalError(final SAXParseException exception)
            throws SAXException
        {
            throw new SAXException(this.getMessage(exception));
        }
View Full Code Here

  private TransactionOperation createAddStatementOperation()
    throws SAXException
  {
    if (parsedValues.size() < 3) {
      throw new SAXException("At least three values required for AddStatementOperation, found: "
          + parsedValues.size());
    }

    try {
      Resource subject = (Resource)parsedValues.get(0);
      URI predicate = (URI)parsedValues.get(1);
      Value object = parsedValues.get(2);
      Resource[] contexts = createContexts(3);

      parsedValues.clear();

      if (subject == null || predicate == null || object == null) {
        throw new SAXException(
            "Subject, predicate and object cannot be null for an AddStatementOperation");
      }
      return new AddStatementOperation(subject, predicate, object, contexts);
    }
    catch (ClassCastException e) {
      throw new SAXException("Invalid argument(s) for AddStatementOperation", e);
    }
  }
View Full Code Here

  private TransactionOperation createRemoveStatementsOperation()
    throws SAXException
  {
    if (parsedValues.size() < 3) {
      throw new SAXException("At least three values required for RemoveStatementsOperation, found: "
          + parsedValues.size());
    }

    try {
      Resource subject = (Resource)parsedValues.get(0);
      URI predicate = (URI)parsedValues.get(1);
      Value object = parsedValues.get(2);
      Resource[] contexts = createContexts(3);

      parsedValues.clear();

      return new RemoveStatementsOperation(subject, predicate, object, contexts);
    }
    catch (ClassCastException e) {
      throw new SAXException("Invalid argument(s) for RemoveStatementsOperation", e);
    }
  }
View Full Code Here

      if (contextCandidate == null || contextCandidate instanceof Resource) {
        contexts.add((Resource)contextCandidate);
      }
      else {
        throw new SAXException("Invalid context value: " + contextCandidate.getClass());
      }
    }

    return contexts.toArray(new Resource[contexts.size()]);
  }
View Full Code Here

        else if (tagName.equals(CONTEXT_TAG)) {
          parsingContext = true;
        }
      }
      catch (RDFParseException e) {
        throw new SAXException(e);
      }
    }
View Full Code Here

        else if (tagName.equals(CONTEXT_TAG)) {
          currentContext = null;
        }
      }
      catch (RDFParseException e) {
        throw new SAXException(e);
      }
      catch (RDFHandlerException e) {
        throw new SAXException(e);
      }
    }
View Full Code Here

      }

      rdfParser.getRDFHandler().handleNamespace(prefix, uri);
    }
    catch (RDFParseException e) {
      throw new SAXException(e);
    }
    catch (RDFHandlerException e) {
      throw new SAXException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.xml.sax.SAXException

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.