Interface NIFParser

All Known Implementing Classes:
AbstractNIFParser, TurtleNIFParser

public interface NIFParser
This interface defines a NIFParser - a class that should parse NIF data from a given source and create a list of Document instances from this data.
Author:
Michael Röder (roeder@informatik.uni-leipzig.de)
  • Method Details

    • parseNIF

      List<Document> parseNIF(String nifString)
      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 Document instances found in the given NIF
    • parseNIF

      List<Document> parseNIF(Reader reader)
      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 a Reader since the InputStream is not relying on a specific encoding.

      Parameters:
      reader - a Reader from which the NIF data is read
      Returns:
      a list of Document instances found in the given NIF
    • parseNIF

      List<Document> parseNIF(InputStream is)
      Parses the NIF data read from the given InputStream and returns the list of documents that could be found.
      Parameters:
      is - an InputStream from which the NIF data is read
      Returns:
      a list of Document instances found in the given NIF
    • parseNIF

      List<Document> parseNIF(String nifString, org.apache.jena.rdf.model.Model model)
      Like parseNIF(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 Document instances.

      Parameters:
      nifString - a String containing the NIF data
      model - a model which is used to store the NIF data
      Returns:
      a list of Document instances found in the given NIF
    • parseNIF

      List<Document> parseNIF(Reader reader, org.apache.jena.rdf.model.Model model)
      Like parseNIF(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 a Reader since the InputStream is 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 Document instances.

      Parameters:
      reader - a Reader from which the NIF data is read
      model - a model which is used to store the NIF data
      Returns:
      a list of Document instances found in the given NIF
    • parseNIF

      List<Document> parseNIF(InputStream is, org.apache.jena.rdf.model.Model model)
      Like parseNIF(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 Document instances.

      Parameters:
      is - an InputStream from which the NIF data is read
      model - a model which is used to store the NIF data
      Returns:
      a list of Document instances 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 the DocumentListParser used by this parser.
      Returns:
      the DocumentListParser used by this parser
    • setDocumentListParser

      void setDocumentListParser(DocumentListParser listParser)
      Sets the DocumentListParser used by this parser.
      Parameters:
      listParser - the DocumentListParser used by this parser