Package com.stardog.stark.io
Interface RDFParser
- All Known Implementing Classes:
BinaryRDFParser,JSONLDParser,N3Parser,NQuadsParser,NTParser,RDFJSONParser,RDFXMLParser,SPARQLUpdateDataBlockParser,TrigParser,TrigParserWithRules,TurtleParser
@ThreadSafe
public interface RDFParser
An RDF Parser.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
- See Also:
- Implementation Requirements:
- Implementations of this interface should include a zero argument constructor so that they can be created
by the
ServiceLoader. They are also expected to be *stateless*. All state should be maintained in acontextobject which won't outlive theparse(InputStream, RDFHandler)call.
-
Method Summary
Modifier and TypeMethodDescriptionformat()The format this parser can parsedefault voidparse(InputStream theStream, RDFHandler theHandler) Parse the content using thedefault options.voidparse(InputStream theStream, RDFHandler theHandler, Options theOptions) Parse the content
-
Method Details
-
format
The format this parser can parse- Returns:
- the format
-
parse
default void parse(@Nonnull InputStream theStream, @Nonnull RDFHandler theHandler) throws IOException Parse the content using thedefault options.- Parameters:
theStream- the stream to read fromtheHandler- the handler to pass parse events to- Throws:
RDFHandlerException- if there was an error while handling the statementIOException- if there was an error while reading from the stream
-
parse
void parse(@Nonnull InputStream theStream, @Nonnull RDFHandler theHandler, @Nonnull Options theOptions) throws IOException Parse the content- Parameters:
theStream- the stream to read fromtheHandler- the handler to pass parse events totheOptions- the parsing options- Throws:
RDFHandlerException- if there was an error while handling the statementIOException- if there was an error while reading from the stream
-