java.lang.Object
java.lang.Record
tools.jackson.dataformat.xml.ser.DTD
All Implemented Interfaces:
PrologDirective, XmlGeneratorWritable

public record DTD(String rootName, String systemId, String publicId, String internalSubset) extends Record implements PrologDirective
Value container to represent XML Document Type Declaration, to be written using XmlGeneratorInitializer.
Since:
3.2
  • Constructor Summary

    Constructors
    Constructor
    Description
    DTD(String rootName, String systemId, String publicId, String internalSubset)
    Creates an instance of a DTD record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the internalSubset record component.
    Returns the value of the publicId record component.
    Returns the value of the rootName record component.
    Returns the value of the systemId record component.
    final String
    Returns a string representation of this record class.
    void
    write(ToXmlGenerator xmlGen, org.codehaus.stax2.XMLStreamWriter2 xmlWriter)
    Method to call to actually write out the entity using given XMLStreamWriter2.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DTD

      public DTD(String rootName, String systemId, String publicId, String internalSubset)
      Creates an instance of a DTD record class.
      Parameters:
      rootName - the value for the rootName record component
      systemId - the value for the systemId record component
      publicId - the value for the publicId record component
      internalSubset - the value for the internalSubset record component
  • Method Details

    • write

      public void write(ToXmlGenerator xmlGen, org.codehaus.stax2.XMLStreamWriter2 xmlWriter) throws XMLStreamException
      Description copied from interface: XmlGeneratorWritable
      Method to call to actually write out the entity using given XMLStreamWriter2. ToXmlGenerator is only passed in case access to configuration was needed.
      Specified by:
      write in interface XmlGeneratorWritable
      Parameters:
      xmlGen - Generator that called this method: MUST NOT call its output methods, only to be used for configuration access
      xmlWriter - Writer to use for actual output of XML event
      Throws:
      XMLStreamException
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • rootName

      public String rootName()
      Returns the value of the rootName record component.
      Returns:
      the value of the rootName record component
    • systemId

      public String systemId()
      Returns the value of the systemId record component.
      Returns:
      the value of the systemId record component
    • publicId

      public String publicId()
      Returns the value of the publicId record component.
      Returns:
      the value of the publicId record component
    • internalSubset

      public String internalSubset()
      Returns the value of the internalSubset record component.
      Returns:
      the value of the internalSubset record component