use of org.apache.jena.shared.ConfigException in project jena by apache.
the class OntModelImpl method initSyntaxCheckerClass.
// Internal implementation methods
//////////////////////////////////
private static void initSyntaxCheckerClass() {
if (owlSyntaxCheckerClass == null) {
try {
owlSyntaxCheckerClass = Class.forName(owlSyntaxCheckerClassName);
owlSyntaxCheckerClass.newInstance();
} catch (Exception e) {
throw new ConfigException("owlsyntax.jar must be on the classpath.", e);
}
}
}
use of org.apache.jena.shared.ConfigException in project jena by apache.
the class RDFReaderFImpl method setBaseReaderClassName.
/**
* Use RIOT to add custom RDF parsers. See
* {@code RDFParserRegistry.registerLang}
*
* @deprecated Register with RIOT.
*/
@Deprecated
public static String setBaseReaderClassName(String lang, String className) {
if (rewiredAlternative != null)
Log.error(RDFReaderFImpl.class, "Rewired RDFReaderFImpl - configuration changes have no effect on reading");
String oldClassName = currentEntry(lang);
try {
@SuppressWarnings("unchecked") Class<? extends RDFReader> newClass = (Class<? extends RDFReader>) Class.forName(className, false, Thread.currentThread().getContextClassLoader());
custom.put(lang, newClass);
return oldClassName;
} catch (ClassNotFoundException e) {
throw new ConfigException("Reader not found on classpath", e);
} catch (Exception e) {
throw new JenaException(e);
}
}
use of org.apache.jena.shared.ConfigException in project jena by apache.
the class RDFWriterFImpl method setBaseWriterClassName.
/**
* Use RIOT to add custom RDF parsers. See
* {@code RDFWriterRegistry.registerLang}
*
* @deprecated Register with RIOT.
*/
@Deprecated
public static String setBaseWriterClassName(String lang, String className) {
if (rewiredAlternative != null)
Log.error(RDFWriterFImpl.class, "Rewired RDFWriterFImpl2 - configuration changes have no effect on writing");
String oldClassName = currentEntry(lang);
try {
@SuppressWarnings("unchecked") Class<? extends RDFWriter> newClass = (Class<? extends RDFWriter>) Class.forName(className, false, Thread.currentThread().getContextClassLoader());
custom.put(lang, newClass);
return oldClassName;
} catch (ClassNotFoundException e) {
throw new ConfigException("Reader not found on classpath", e);
} catch (Exception e) {
throw new JenaException(e);
}
}
Aggregations