/** * Convenience methods for creating RDFParser objects. This method uses the registry returned by * {@link RDFParserRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate parser. * * @throws UnsupportedRDFormatException * If no parser is available for the specified RDF format. */ public static RDFParser createParser(RDFFormat format) throws UnsupportedRDFormatException { RDFParserFactory factory = RDFParserRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getParser(); }
/** * Convenience methods for creating RDFParser objects. This method uses the registry returned by * {@link RDFParserRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate parser. * * @throws UnsupportedRDFormatException * If no parser is available for the specified RDF format. */ public static RDFParser createParser(RDFFormat format) throws UnsupportedRDFormatException { RDFParserFactory factory = RDFParserRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getParser(); }
/** * Convenience methods for creating RDFParser objects. This method uses the registry returned by * {@link RDFParserRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate parser. * * @throws UnsupportedRDFormatException * If no parser is available for the specified RDF format. */ public static RDFParser createParser(RDFFormat format) throws UnsupportedRDFormatException { RDFParserFactory factory = RDFParserRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getParser(); }