Package org.openrdf.rio

Examples of org.openrdf.rio.RDFParseException


     * @throws IOException
     */
    private void assertChar(BufferedReader br, char c) throws IOException, RDFParseException {
        final char read = readChar(br);
        if(read != c) {
            throw new RDFParseException(
                    String.format("Unexpected char '%s', expected '%s'", read, c),
                    row, col
            );
        }
    }
View Full Code Here


        } catch (Exception e) {
            if(super.stopAtFirstError()) {
                if(e instanceof RDFParseException)
                    throw (RDFParseException) e;
                else
                    throw new RDFParseException(e, row, col);
            } else { // Remove rest of broken line and report error.
                consumeBrokenLine(br);
                reportError(e.getMessage(), row, col);
                return true;
            }
View Full Code Here

        if ( dh.equals(DatatypeHandling.VERIFY) ) {
            if( ! XMLDatatypeUtil.isBuiltInDatatype(datatype)){
                return value;
            }
            if( ! XMLDatatypeUtil.isValidValue(value, datatype) ) {
                throw new RDFParseException(
                        String.format("Illegal literal value '%s' with datatype %s", value, datatype.stringValue() ),
                        row, col
                );
            }
            return value;
View Full Code Here

      }
      if (mode == EvaluationMode.DEMO) {
        this.enableOrDisableButtons(queryOrRif);
      }
    } else if (e instanceof RDFParseException) {
      final RDFParseException rdfpe = (RDFParseException) e;
      this.displayDataErrorMessage(rdfpe.getMessage(), false);

      // get precise line and column...
      final int line = rdfpe.getLineNumber();
      int column = rdfpe.getColumnNumber();

      if (column == -1) {
        column = 1;
      }
View Full Code Here

     * @throws IOException
     */
    private void assertChar(BufferedReader br, char c) throws IOException, RDFParseException {
        final char read = readChar(br);
        if(read != c) {
            throw new RDFParseException(
                    String.format("Unexpected char '%s', expected '%s'", read, c),
                    row, col
            );
        }
    }
View Full Code Here

        } catch (Exception e) {
            if(super.stopAtFirstError()) {
                if(e instanceof RDFParseException)
                    throw (RDFParseException) e;
                else
                    throw new RDFParseException(e, row, col);
            } else { // Remove rest of broken line and report error.
                consumeBrokenLine(br);
                reportError(e.getMessage(), row, col);
                return true;
            }
View Full Code Here

        if ( dh.equals(DatatypeHandling.VERIFY) ) {
            if( ! XMLDatatypeUtil.isBuiltInDatatype(datatype)){
                return value;
            }
            if( ! XMLDatatypeUtil.isValidValue(value, datatype) ) {
                throw new RDFParseException(
                        String.format("Illegal literal value '%s' with datatype %s", value, datatype.stringValue() ),
                        row, col
                );
            }
            return value;
View Full Code Here

  }

  protected void throwEOFException()
    throws RDFParseException
  {
    throw new RDFParseException("Unexpected end of file");
  }
View Full Code Here

    if (errListener != null) {
      errListener.error(msg, lineNo, columnNo);
    }

    if (stopAtFirstError) {
      throw new RDFParseException(msg, lineNo, columnNo);
    }
  }
View Full Code Here

  {
    if (errListener != null) {
      errListener.fatalError(msg, lineNo, columnNo);
    }

    throw new RDFParseException(msg, lineNo, columnNo);
  }
View Full Code Here

TOP

Related Classes of org.openrdf.rio.RDFParseException

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.