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 com.hp.hpl.jena.rdf.model.Model |
getDefaultModel() |
String |
getHttpContentType() |
protected void |
infereTypes(com.hp.hpl.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,
com.hp.hpl.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,
com.hp.hpl.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,
com.hp.hpl.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 com.hp.hpl.jena.rdf.model.Model |
parseNIFModel(InputStream is,
com.hp.hpl.jena.rdf.model.Model nifModel) |
protected abstract com.hp.hpl.jena.rdf.model.Model |
parseNIFModel(Reader reader,
com.hp.hpl.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)
NIFParser
public List<Document> parseNIF(String nifString, com.hp.hpl.jena.rdf.model.Model model)
NIFParser
NIFParser.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
public List<Document> parseNIF(Reader reader, com.hp.hpl.jena.rdf.model.Model nifModel)
NIFParser
NIFParser.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 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 com.hp.hpl.jena.rdf.model.Model parseNIFModel(Reader reader, com.hp.hpl.jena.rdf.model.Model nifModel)
public List<Document> parseNIF(InputStream is)
NIFParser
parseNIF
in interface NIFParser
is
- an InputStream
from which the NIF data is readDocument
instances found in the given NIFpublic List<Document> parseNIF(InputStream is, com.hp.hpl.jena.rdf.model.Model nifModel)
NIFParser
NIFParser.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 NIFParser
is
- 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 com.hp.hpl.jena.rdf.model.Model parseNIFModel(InputStream is, com.hp.hpl.jena.rdf.model.Model nifModel)
public String getHttpContentType()
getHttpContentType
in interface NIFParser
protected void infereTypes(com.hp.hpl.jena.rdf.model.Model nifModel)
protected com.hp.hpl.jena.rdf.model.Model getDefaultModel()
Copyright © 2016. All rights reserved.