public class OWLXMLWriter extends Object
Constructor | Description |
---|---|
OWLXMLWriter(Writer writer,
OWLOntology ontology) |
Modifier and Type | Method | 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(@Nonnull Writer writer, @Nullable 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 writeCardinalityAttribute(int cardinality)
cardinality
- cardinalitypublic void writeFacetAttribute(OWLFacet facet)
facet
- facetpublic void writeAnnotationURIAttribute(URI uri)
uri
- uriCopyright © 2018 The University of Manchester. All rights reserved.