public class Parser extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
NAMESPACE
The Constant NAMESPACE.
|
static String |
TERM
The Constant TERM.
|
static String |
URI
The Constant URI.
|
| Constructor and Description |
|---|
Parser(com.hp.hpl.jena.rdf.model.Model model)
Instantiates a new parser.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
fullURIMap(Map<String,String> data_map)
Method to rewrite the category keys into full URIs in case they are
originally only XML QNames.
|
Map<String,String> |
getPropertyValues(String subjectURI,
String propertyURI)
Gets the property values.
|
Map<String,String> |
getPropertyValues(String subjectURI,
String propertyURI,
Boolean fullId)
Gets the property values.
|
Map<String,String> |
getPropertyValues(String subjectURI,
String propertyURI,
String language,
Boolean fullId)
Gets the property values.
|
Map<String,String> |
parseURI(String uri)
This method is a bit of a hack to repair URI's (incorrectly) abbreviated
as QNames in the specified RDF model.
|
Map<String,String> |
subjectsOfType(String typeURI)
Subjects of type.
|
public static final String NAMESPACE
public static final String URI
public static final String TERM
public Parser(com.hp.hpl.jena.rdf.model.Model model)
model - is the Jena Model representation of a specified RDF documentpublic Map<String,String> subjectsOfType(String typeURI) throws RDFParserException
typeURI - of the RDF.type desired forRDFParserException - if model is not initializedpublic Map<String,String> getPropertyValues(String subjectURI, String propertyURI) throws RDFParserException
subjectURI - the subject uripropertyURI - the property uriRDFParserException - if model is not initializedpublic Map<String,String> getPropertyValues(String subjectURI, String propertyURI, Boolean fullId) throws RDFParserException
subjectURI - - target Subject Resource for querypropertyURI - - target Predicate (Property) for queryfullId - - set True if full Object lexical form or URI should be
returned, otherwise, just the ontology termRDFParserException - if model is not initializedpublic Map<String,String> getPropertyValues(String subjectURI, String propertyURI, String language, Boolean fullId) throws RDFParserException
subjectURI - the subject uripropertyURI - the property urilanguage - the languagefullId - - set True if full Object lexical form or URI should be
returned, otherwise, just the ontology termRDFParserException - if model is not initializedpublic Map<String,String> parseURI(String uri) throws RDFParserException
uri - the uriRDFParserException - if model is not initialized or if unknown
QName encounteredpublic Map<String,String> fullURIMap(Map<String,String> data_map) throws RDFParserException
data_map - the data_mapRDFParserException - the RDF parser exceptionCopyright © 2016. All rights reserved.