org.apache.jena.riot.system.ErrorHandlerFactory Java Examples

The following examples show how to use org.apache.jena.riot.system.ErrorHandlerFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ParserProfileTurtleStarExtImplTest.java    From RDFstarTools with Apache License 2.0 5 votes vote down vote up
public ParserProfileTurtleStarExtImplTest() {
	super( new ParserProfileTurtleStarExtImpl(RiotLib.factoryRDF(),
			 ErrorHandlerFactory.errorHandlerStd,
                IRIResolver.create(),
                getPrefixMap(),
                RIOT.getContext().copy(),
                true,
                false) );
}
 
Example #2
Source File: ParserProfileTurtleStarWrapperImplTest.java    From RDFstarTools with Apache License 2.0 5 votes vote down vote up
static protected ParserProfileTurtleStar createParserProfileTurtleStar() {
	ParserProfileStd wrappedProfile = new ParserProfileStd(RiotLib.factoryRDF(), 
               ErrorHandlerFactory.errorHandlerStd,
               IRIResolver.create(),
               getPrefixMap(),
               RIOT.getContext().copy(),
               true,
               false);

	return new ParserProfileTurtleStarWrapperImpl(wrappedProfile);		
}
 
Example #3
Source File: CombineManifest.java    From incubator-taverna-language with Apache License 2.0 5 votes vote down vote up
private static Model parseRDF(Path metadata) throws IOException {
	Model model = createDefaultModel();
	try (InputStream in = newInputStream(metadata)) {
		RDFParser.create()
				.base(fakeFileURI(metadata))
				.lang(Lang.RDFXML)
				.source(in)
				// TAVERNA-1044 avoid bailing out on broken XML
				.errorHandler(ErrorHandlerFactory.errorHandlerWarn)
				.parse(model.getGraph());
	}
	//System.out.println("Parsed:");
	//model.write(System.out, "turtle");
	return model;
}