Interface NIFParser
- All Known Implementing Classes:
AbstractNIFParser,TurtleNIFParser
Document instances from this
data.- Author:
- Michael Röder (roeder@informatik.uni-leipzig.de)
-
Method Summary
Modifier and TypeMethodDescriptionReturns theDocumentListParserused by this parser.This method should return the HTTP content type string for the data that can be handled by this reader.parseNIF(InputStream is)Parses the NIF data read from the given InputStream and returns the list of documents that could be found.parseNIF(InputStream is, org.apache.jena.rdf.model.Model model)LikeparseNIF(InputStream), this method parses the NIF data inside the given String and returns the list of documents that could be found.Parses the NIF data read from the given Reader and returns the list of documents that could be found.LikeparseNIF(Reader), this method parses the NIF data inside the given String and returns the list of documents that could be found.Parses the NIF data inside the given String and returns the list of documents that could be found.LikeparseNIF(String), this method parses the NIF data inside the given String and returns the list of documents that could be found.voidsetDocumentListParser(DocumentListParser listParser)Sets theDocumentListParserused by this parser.
-
Method Details
-
parseNIF
Parses the NIF data inside the given String and returns the list of documents that could be found.- Parameters:
nifString- a String containing the NIF data- Returns:
- a list of
Documentinstances found in the given NIF
-
parseNIF
Parses the NIF data read from the given Reader and returns the list of documents that could be found.Note that following the recommendations of the Jena framework we highly recommend to use
parseNIF(InputStream)instead of using aReadersince theInputStreamis not relying on a specific encoding. -
parseNIF
Parses the NIF data read from the given InputStream and returns the list of documents that could be found.- Parameters:
is- anInputStreamfrom which the NIF data is read- Returns:
- a list of
Documentinstances found in the given NIF
-
parseNIF
LikeparseNIF(String), this method parses the NIF data inside the given String and returns the list of documents that could be found. But it uses the given model to store this information.Note that the parser will use and change the data that is already inside the given model.
The aim of this method is to take a reference to a model (that might be empty) and store all additional information that has been read but could not be added to the created
Documentinstances.- Parameters:
nifString- a String containing the NIF datamodel- a model which is used to store the NIF data- Returns:
- a list of
Documentinstances found in the given NIF
-
parseNIF
LikeparseNIF(Reader), this method parses the NIF data inside the given String and returns the list of documents that could be found. But it uses the given model to store this information.Note that following the recommendations of the Jena framework we highly recommend to use
parseNIF(InputStream, Model)instead of using aReadersince theInputStreamis not relying on a specific encoding.Note that the parser will use and change the data that is already inside the given model.
The aim of this method is to take a reference to a model (that might be empty) and store all additional information that has been read but could not be added to the created
Documentinstances. -
parseNIF
LikeparseNIF(InputStream), this method parses the NIF data inside the given String and returns the list of documents that could be found. But it uses the given model to store this information.Note that the parser will use and change the data that is already inside the given model.
The aim of this method is to take a reference to a model (that might be empty) and store all additional information that has been read but could not be added to the created
Documentinstances.- Parameters:
is- anInputStreamfrom which the NIF data is readmodel- a model which is used to store the NIF data- Returns:
- a list of
Documentinstances found in the given NIF
-
getHttpContentType
String getHttpContentType()This method should return the HTTP content type string for the data that can be handled by this reader.- Returns:
- the HTTP content type string
-
getDocumentListParser
DocumentListParser getDocumentListParser()Returns theDocumentListParserused by this parser.- Returns:
- the
DocumentListParserused by this parser
-
setDocumentListParser
Sets theDocumentListParserused by this parser.- Parameters:
listParser- theDocumentListParserused by this parser
-