public abstract class AbstractNIFParser extends Object implements NIFParser
| Modifier and Type | Field and Description |
|---|---|
private String |
httpContentType |
private static org.slf4j.Logger |
LOGGER |
private DocumentListParser |
parser |
private static String |
TYPE_INFERENCE_RULES |
| Constructor and Description |
|---|
AbstractNIFParser(String httpContentType) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.jena.rdf.model.Model |
getDefaultModel() |
String |
getHttpContentType()
This method should return the HTTP content type string for the data that
can be handled by this reader.
|
protected void |
infereTypes(org.apache.jena.rdf.model.Model nifModel) |
List<Document> |
parseNIF(InputStream is)
Parses the NIF data read from the given InputStream and returns the list
of documents that could be found.
|
List<Document> |
parseNIF(InputStream is,
org.apache.jena.rdf.model.Model nifModel)
Like
NIFParser.parseNIF(InputStream), this method parses the NIF data
inside the given String and returns the list of documents that could be
found. |
List<Document> |
parseNIF(Reader reader)
Parses the NIF data read from the given Reader and returns the list of
documents that could be found.
|
List<Document> |
parseNIF(Reader reader,
org.apache.jena.rdf.model.Model nifModel)
Like
NIFParser.parseNIF(Reader), this method parses the NIF data inside
the given String and returns the list of documents that could be found. |
List<Document> |
parseNIF(String nifString)
Parses the NIF data inside the given String and returns the list of
documents that could be found.
|
List<Document> |
parseNIF(String nifString,
org.apache.jena.rdf.model.Model model)
Like
NIFParser.parseNIF(String), this method parses the NIF data inside
the given String and returns the list of documents that could be found. |
protected abstract org.apache.jena.rdf.model.Model |
parseNIFModel(InputStream is,
org.apache.jena.rdf.model.Model nifModel) |
protected abstract org.apache.jena.rdf.model.Model |
parseNIFModel(Reader reader,
org.apache.jena.rdf.model.Model nifModel) |
private static final org.slf4j.Logger LOGGER
private static final String TYPE_INFERENCE_RULES
private String httpContentType
private DocumentListParser parser
public AbstractNIFParser(String httpContentType)
public List<Document> parseNIF(String nifString)
NIFParserpublic List<Document> parseNIF(String nifString, org.apache.jena.rdf.model.Model model)
NIFParserNIFParser.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.
public List<Document> parseNIF(Reader reader)
NIFParser
Note that following the recommendations of the Jena framework we
highly recommend to use NIFParser.parseNIF(InputStream) instead of using a
Reader since the InputStream is not relying on a specific
encoding.
public List<Document> parseNIF(Reader reader, org.apache.jena.rdf.model.Model nifModel)
NIFParserNIFParser.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 NIFParser.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.
protected abstract org.apache.jena.rdf.model.Model parseNIFModel(Reader reader, org.apache.jena.rdf.model.Model nifModel)
public List<Document> parseNIF(InputStream is)
NIFParserparseNIF in interface NIFParseris - an InputStream from which the NIF data is readDocument instances found in the given NIFpublic List<Document> parseNIF(InputStream is, org.apache.jena.rdf.model.Model nifModel)
NIFParserNIFParser.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.
parseNIF in interface NIFParseris - an InputStream from which the NIF data is readnifModel - a model which is used to store the NIF dataDocument instances found in the given NIFprotected abstract org.apache.jena.rdf.model.Model parseNIFModel(InputStream is, org.apache.jena.rdf.model.Model nifModel)
public String getHttpContentType()
NIFParsergetHttpContentType in interface NIFParserprotected void infereTypes(org.apache.jena.rdf.model.Model nifModel)
protected org.apache.jena.rdf.model.Model getDefaultModel()
Copyright © 2016. All rights reserved.