Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.smi.protegex.owl.writer.xml
Class DefaultXMLWriter

    java.lang.Object
      edu.stanford.smi.protegex.owl.writer.xml.DefaultXMLWriter

All Implemented Interfaces:
  XMLWriter

    public class DefaultXMLWriter

extends Object
implements XMLWriter

User: matthewhorridge
The Univeristy Of Manchester
Medical Informatics Group
Date: Mar 22, 2005

matthew.horridge@cs.man.ac.uk
www.cs.man.ac.uk/~horridgm

Nested Class Summary
`class` | `DefaultXMLWriter.XMLElement`

Constructor Summary
`DefaultXMLWriter(Writer writer, XMLWriterNamespaceManager xmlWriterNamespaceManager)`
`DefaultXMLWriter(Writer writer, XMLWriterNamespaceManager xmlWriterNamespaceManager, String xmlBase)`

Method Summary
`void` | `endDocument()` Causes all open elements, including the document root element, to be closed.
`String` | `getDefaultNamespace()` Gets the default namespace that the rdfwriter uses.
`XMLWriterNamespaceManager` | `getNamespacePrefixes()` Gets the rdfwriter's namespace manager.
`String` | `getXMLBase()`
`void` | `setEncoding(String encoding)` Sets the encoding for the document that the rdfwriter produces.
`void` | `setWrapAttributes(boolean b)` Causes the current element's attributes to be wrapped in the output.
`void` | `startDocument(String rootElementName)` Starts writing the document.
`void` | `writeAttribute(String attr, String val)` Writes an attribute of the last element to be started (that has not been closed).
`void` | `writeEndElement()` Writes the closing tag of the last element to be started.
`void` | `writeStartElement(String name)` Writes the start of an element
`void` | `writeTextContent(String text)` Writes a text element

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultXMLWriter

    public DefaultXMLWriter(Writer writer,
                            XMLWriterNamespaceManager xmlWriterNamespaceManager)

### DefaultXMLWriter

    public DefaultXMLWriter(Writer writer,
                            XMLWriterNamespaceManager xmlWriterNamespaceManager,
                            String xmlBase)

Method Detail

### getDefaultNamespace

    public String getDefaultNamespace()

  Description copied from interface: `XMLWriter`
  Gets the default namespace that the rdfwriter uses.

  Specified by:
    `getDefaultNamespace` in interface `XMLWriter`

### getXMLBase

    public String getXMLBase()

  Specified by:
    `getXMLBase` in interface `XMLWriter`

### getNamespacePrefixes

    public XMLWriterNamespaceManager getNamespacePrefixes()

  Description copied from interface: `XMLWriter`
  Gets the rdfwriter's namespace manager.

  Specified by:
    `getNamespacePrefixes` in interface `XMLWriter`

### setEncoding

    public void setEncoding(String encoding)

  Description copied from interface: `XMLWriter`
  Sets the encoding for the document that the rdfwriter 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`

### writeStartElement

    public void writeStartElement(String name)
                           throws IOException

  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.
  Throws:
    `IOException`

### writeEndElement

    public void writeEndElement()
                         throws IOException

  Description copied from interface: `XMLWriter`
  Writes the closing tag of the last element to be started.

  Specified by:
    `writeEndElement` in interface `XMLWriter`
  Throws:
    `IOException`

### 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).

  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

### startDocument

    public void startDocument(String rootElementName)
                       throws IOException

  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:
    `rootElementName` - The name of the root element.
  Throws:
    `IOException`

### endDocument

    public void endDocument()
                     throws IOException

  Description copied from interface: `XMLWriter`
  Causes all open elements, including the document root element, to be closed.

  Specified by:
    `endDocument` in interface `XMLWriter`
  Throws:
    `IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug report or feature request
Copyright (c) 1998-2009 Stanford University.