info.sswap.impl.empire.model
Class RDFCSVWriter.NameMapper
java.lang.Object
info.sswap.impl.empire.model.RDFCSVWriter.NameMapper
- Enclosing class:
- RDFCSVWriter
protected class RDFCSVWriter.NameMapper
- extends java.lang.Object
Map names via re-writing rules:
* blank nodes get mapped to simpler names; e.g., _:b1, _:b2, etc.
* terms belonging to reserved namespaces get qnames; e.g., owl:Class
Field Summary |
(package private) int |
bnodeCounter
|
(package private) java.util.HashMap<com.hp.hpl.jena.rdf.model.RDFNode,java.lang.String> |
bnodeMap
|
(package private) java.lang.String |
bnodePrefix
|
(package private) com.hp.hpl.jena.shared.PrefixMapping |
prefixMapping
|
Method Summary |
private java.lang.String |
asReservedQName(com.hp.hpl.jena.rdf.model.Resource resource)
If the resource belongs to a reserved namespace, return it's QName;
otherwise return its toString() representation. |
(package private) java.lang.String |
asString(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
Return a string representation of the RDFNode according
to internal re-write rules. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
prefixMapping
com.hp.hpl.jena.shared.PrefixMapping prefixMapping
bnodeMap
java.util.HashMap<com.hp.hpl.jena.rdf.model.RDFNode,java.lang.String> bnodeMap
bnodeCounter
int bnodeCounter
bnodePrefix
final java.lang.String bnodePrefix
- See Also:
- Constant Field Values
RDFCSVWriter.NameMapper
RDFCSVWriter.NameMapper(com.hp.hpl.jena.shared.PrefixMapping prefixMapping)
asString
java.lang.String asString(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
- Return a string representation of the RDFNode according
to internal re-write rules.
- Parameters:
rdfNode
- node to extract string representation
- Returns:
- string representation
asReservedQName
private java.lang.String asReservedQName(com.hp.hpl.jena.rdf.model.Resource resource)
- If the resource belongs to a reserved namespace, return it's QName;
otherwise return its toString() representation.
- Parameters:
resource
-
- Returns:
- string representation
Copyright (c) 2011, iPlant Collaborative, University of Arizona, Cold Spring Harbor Laboratories, University of Texas at Austin.