Class RDFParser
java.lang.Object
fr.inria.rules.integraal.io.rdf.RDFParser
- All Implemented Interfaces:
Parser<Object>, CloseableIterator<Object>, Closeable, AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a parser for a file and infers its RDF format.Creates a parser for a file using the supplied RDF format.RDFParser(File file, org.eclipse.rdf4j.rio.RDFFormat format, RDFTranslationMode mode) Creates a parser for a file using the supplied translation mode.Creates a parser from an existing reader.RDFParser(Reader reader, org.eclipse.rdf4j.rio.RDFFormat format, org.eclipse.rdf4j.rio.ParserConfig parserConfig, RDFTranslationMode mode) Creates a parser from a reader with explicit parser configuration.Creates a parser for the RDF file at the supplied path. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Parser
parse, streamParsedObjects
-
Constructor Details
-
RDFParser
Creates a parser for a file using the supplied RDF format.- Parameters:
file- file to read fromformat- RDFFormat of the file- Throws:
FileNotFoundException- iff the given file is not found
-
RDFParser
Creates a parser for the RDF file at the supplied path.- Parameters:
filepath- to RDF file to read from- Throws:
FileNotFoundException- iff the given file is not found
-
RDFParser
Creates a parser for a file and infers its RDF format.- Parameters:
file- file to read from- Throws:
FileNotFoundException- iff the given file is not found
-
RDFParser
public RDFParser(File file, org.eclipse.rdf4j.rio.RDFFormat format, RDFTranslationMode mode) throws FileNotFoundException Creates a parser for a file using the supplied translation mode.- Parameters:
file- file to read fromformat- RDFFormat of the filemode- Method to translate triples into atoms- Throws:
FileNotFoundException- iff the given file is not found
-
RDFParser
Creates a parser from an existing reader.- Parameters:
reader- reader to read fromformat- RDFFormat of the data
-
RDFParser
public RDFParser(Reader reader, org.eclipse.rdf4j.rio.RDFFormat format, org.eclipse.rdf4j.rio.ParserConfig parserConfig, RDFTranslationMode mode) Creates a parser from a reader with explicit parser configuration.- Parameters:
reader- reader to read fromformat- RDFFormat of the dataparserConfig- configuration of the parsermode- Method to translate triples into atoms
-
-
Method Details
-
hasNext
public boolean hasNext()Description copied from interface:CloseableIteratorIndicates whether another element can be read from the iterator. -
next
Description copied from interface:CloseableIteratorReturns the next element from the iterator. -
close
public void close()Description copied from interface:CloseableIteratorCloses the iterator and releases its resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceCloseableIterator<Object>
-