public class OWLXMLWriter extends Object
Constructor and Description |
---|
OWLXMLWriter(Writer writer,
OWLOntology ontology) |
Modifier and Type | Method and Description |
---|---|
void |
endDocument() |
Map<String,String> |
getIRIPrefixMap() |
String |
getIRIString(IRI iri)
Gets an IRI attribute value for a full IRI.
|
XMLWriterNamespaceManager |
getNamespaceManager() |
void |
startDocument(OWLOntology ontology) |
void |
writeAnnotationURIAttribute(URI uri) |
void |
writeCardinalityAttribute(int cardinality) |
void |
writeDatatypeAttribute(OWLDatatype datatype)
Writes a datatype attributed (used on Literal elements).
|
void |
writeEndElement()
write end element
|
void |
writeFacetAttribute(OWLFacet facet) |
void |
writeIRIAttribute(IRI iri) |
void |
writeIRIElement(IRI iri)
Writes an IRI element for a given IRI.
|
void |
writeLangAttribute(String lang) |
void |
writeNodeIDAttribute(NodeID nodeID) |
void |
writePrefix(String prefixName,
String iri)
A convenience method to write a prefix.
|
void |
writeStartElement(OWLXMLVocabulary name) |
void |
writeTextContent(String text) |
public OWLXMLWriter(Writer writer, OWLOntology ontology)
writer
- writerontology
- ontologypublic XMLWriterNamespaceManager getNamespaceManager()
public void writePrefix(String prefixName, String iri) throws IOException
prefixName
- The name of the prefix (e.g. owl: is the prefix name for the OWL
prefix)iri
- The prefix iriIOException
- io errorpublic String getIRIString(IRI iri)
iri
- The IRIpublic void startDocument(OWLOntology ontology) throws OWLRendererException
ontology
- ontologyOWLRendererException
- renderer errorpublic void endDocument()
public void writeStartElement(OWLXMLVocabulary name)
name
- namepublic void writeEndElement()
public void writeDatatypeAttribute(OWLDatatype datatype)
datatype
- The datatypepublic void writeNodeIDAttribute(NodeID nodeID)
nodeID
- nodeIDpublic void writeIRIAttribute(IRI iri)
iri
- iripublic void writeIRIElement(IRI iri)
iri
- The IRI to be written as an element. If the IRI can be abbreviated
then an AbbreviatedIRI element will be writtenpublic void writeLangAttribute(String lang)
lang
- langpublic void writeCardinalityAttribute(int cardinality)
cardinality
- cardinalitypublic void writeTextContent(String text)
text
- textpublic void writeFacetAttribute(OWLFacet facet)
facet
- facetpublic void writeAnnotationURIAttribute(URI uri)
uri
- uriCopyright © 2017 The University of Manchester. All Rights Reserved.