Class XMLWriterImpl

java.lang.Object
org.semanticweb.owlapi.rdf.rdfxml.renderer.XMLWriterImpl
All Implemented Interfaces:
XMLWriter

public class XMLWriterImpl extends Object implements XMLWriter
Developed as part of the CO-ODE project http://www.co-ode.org .
Since:
2.0.0
Author:
Matthew Horridge, The University Of Manchester, Medical Informatics Group
  • Constructor Details

  • Method Details

    • getDefaultNamespace

      public String getDefaultNamespace()
      Returns:
      default namespace
    • getXMLBase

      public String getXMLBase()
      Specified by:
      getXMLBase in interface XMLWriter
      Returns:
      the XML base
    • getNamespacePrefixes

      public XMLWriterNamespaceManager getNamespacePrefixes()
      Description copied from interface: XMLWriter
      Gets the Writer's namespace manager.
      Specified by:
      getNamespacePrefixes in interface XMLWriter
      Returns:
      The namespace manager.
    • setEncoding

      public void setEncoding(String encoding)
      Description copied from interface: XMLWriter
      Sets the encoding for the document that the RDF writer produces. The default encoding is UTF-8.
      Specified by:
      setEncoding in interface XMLWriter
      Parameters:
      encoding - The encoding.
    • setWrapAttributes

      public void setWrapAttributes(boolean b)
      Description copied from interface: XMLWriter
      Causes the current element's attributes to be wrapped in the output.
      Specified by:
      setWrapAttributes in interface XMLWriter
      Parameters:
      b - If true then the attributes will be wrapped if they are long. If false then no attribute wrapping will occur.
    • writeStartElement

      public void writeStartElement(IRI name)
      Description copied from interface: XMLWriter
      Writes the start of an element.
      Specified by:
      writeStartElement in interface XMLWriter
      Parameters:
      name - The tag name of the element to be written. This must be a valid QName. @throws IllegalElementNameException if the specified name is not a valid QName
    • writeEndElement

      public void writeEndElement()
      Description copied from interface: XMLWriter
      Writes the closing tag of the last element to be started.
      Specified by:
      writeEndElement in interface XMLWriter
    • writeAttribute

      public void writeAttribute(String attr, String val)
      Description copied from interface: XMLWriter
      Writes an attribute of the last element to be started (that has not been closed). Note: if the attribute is an iri, use writeAttribute(IRI, String
      Specified by:
      writeAttribute in interface XMLWriter
      Parameters:
      attr - The name of the attribute
      val - The value of the attribute
    • writeAttribute

      public void writeAttribute(IRI attr, String val)
      Description copied from interface: XMLWriter
      Writes an attribute of the last element to be started (that has not been closed).
      Specified by:
      writeAttribute in interface XMLWriter
      Parameters:
      attr - The name of the attribute
      val - The value of the attribute
    • writeTextContent

      public void writeTextContent(String text)
      Description copied from interface: XMLWriter
      Writes a text element.
      Specified by:
      writeTextContent in interface XMLWriter
      Parameters:
      text - The text to be written
    • writeComment

      public void writeComment(String commentText)
      Specified by:
      writeComment in interface XMLWriter
      Parameters:
      commentText - comment text
    • startDocument

      public void startDocument(IRI rootElement)
      Description copied from interface: XMLWriter
      Starts writing the document. The root element will contain the namespace declarations and xml:base attribute.
      Specified by:
      startDocument in interface XMLWriter
      Parameters:
      rootElement - The iri of the root element.
    • endDocument

      public void endDocument()
      Description copied from interface: XMLWriter
      Causes all open elements, including the document root element, to be closed.
      Specified by:
      endDocument in interface XMLWriter