/** * Reports a fatal error to the registered ParseErrorListener, if any, and * throws a <tt>ParseException</tt> afterwards. This method simply calls * {@link #reportFatalError(String,long,long)} supplying <tt>-1</tt> for the * line- and column number. */ protected void reportFatalError(String msg) throws RDFParseException { RDFParserHelper.reportFatalError(msg, getParseErrorListener()); }
/** * Reports a fatal error with associated line- and column number to the * registered ParseErrorListener, if any, and throws a * <tt>ParseException</tt> afterwards. */ protected void reportFatalError(String msg, long lineNo, long columnNo) throws RDFParseException { RDFParserHelper.reportFatalError(msg, lineNo, columnNo, getParseErrorListener()); }
/** * Reports a fatal error to the registered ParseErrorListener, if any, and * throws a <tt>ParseException</tt> afterwards. An exception is made for the * case where the supplied exception is a {@link RDFParseException}; in that * case the supplied exception is not wrapped in another ParseException and * the error message is not reported to the ParseErrorListener, assuming that * it has already been reported when the original ParseException was thrown. * <p> * This method simply calls {@link #reportFatalError(Exception,long,long)} * supplying <tt>-1</tt> for the line- and column number. */ protected void reportFatalError(Exception e) throws RDFParseException { RDFParserHelper.reportFatalError(e, getParseErrorListener()); }
/** * Reports a fatal error with associated line- and column number to the * registered ParseErrorListener, if any, and throws a * <tt>ParseException</tt> wrapped the supplied exception afterwards. An * exception is made for the case where the supplied exception is a * {@link RDFParseException}; in that case the supplied exception is not * wrapped in another ParseException and the error message is not reported to * the ParseErrorListener, assuming that it has already been reported when * the original ParseException was thrown. */ protected void reportFatalError(Exception e, long lineNo, long columnNo) throws RDFParseException { RDFParserHelper.reportFatalError(e, lineNo, columnNo, getParseErrorListener()); }
/** * Creates a {@link Literal} object with the supplied parameters. */ protected Literal createLiteral(String label, String lang, IRI datatype) throws RDFParseException { return RDFParserHelper.createLiteral(label, lang, datatype, getParserConfig(), getParseErrorListener(), valueFactory); }
/** * Creates a {@link Literal} object with the supplied parameters, using the * lineNo and columnNo to enhance error messages or exceptions that may be * generated during the creation of the literal. * * @since 2.7.4 * @see org.openrdf.rio.helpers.RDFParserHelper#createLiteral(String, String, * IRI, ParserConfig, ParseErrorListener, ValueFactory, long, long) */ protected Literal createLiteral(String label, String lang, IRI datatype, long lineNo, long columnNo) throws RDFParseException { return RDFParserHelper.createLiteral(label, lang, datatype, getParserConfig(), getParseErrorListener(), valueFactory, lineNo, columnNo); }
/** * Reports an error with associated line- and column number to the registered * ParseErrorListener, if the given setting has been set to true. * <p> * This method also throws an {@link RDFParseException} when the given * setting has been set to <tt>true</tt> and it is not a nonFatalError. * * @param msg * The message to use for * {@link ParseErrorListener#error(String, long, long)} and for * {@link RDFParseException#RDFParseException(String, long, long)}. * @param relevantSetting * The boolean setting that will be checked to determine if this is an * issue that we need to look at at all. If this setting is true, then * the error listener will receive the error, and if * {@link ParserConfig#isNonFatalError(RioSetting)} returns true an * exception will be thrown. * @throws RDFParseException * If {@link ParserConfig#get(RioSetting)} returns true, and * {@link ParserConfig#isNonFatalError(RioSetting)} returns true for * the given setting. */ protected void reportError(String msg, RioSetting<Boolean> relevantSetting) throws RDFParseException { RDFParserHelper.reportError(msg, relevantSetting, getParserConfig(), getParseErrorListener()); }