Record Class XmlMap

java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.content.XmlMap

public record XmlMap(int id, String name, String rootElement, String schemaId, String schema, List<XmlMapBinding> bindings) extends Record
An XML map definition (read-only) from a workbook's xl/xmlMaps.xml: the map's id, name, the XML root element it is anchored on, the referenced schema id, the XSD schema text, and the cell bindings (which table columns bind to which XPath).

XML maps bind worksheet cells to an XML schema for XML import/export. The definitions are preserved byte-exact on save.

  • Constructor Details

    • XmlMap

      public XmlMap(int id, String name, String rootElement, String schemaId, String schema, List<XmlMapBinding> bindings)
      Creates an instance of a XmlMap record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      rootElement - the value for the rootElement record component
      schemaId - the value for the schemaId record component
      schema - the value for the schema record component
      bindings - the value for the bindings record component
  • Method Details

    • fromMap

      public static XmlMap fromMap(Map<String,Object> m)
      Builds an XmlMap from a decoded JSON object.
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • id

      public int id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • rootElement

      public String rootElement()
      Returns the value of the rootElement record component.
      Returns:
      the value of the rootElement record component
    • schemaId

      public String schemaId()
      Returns the value of the schemaId record component.
      Returns:
      the value of the schemaId record component
    • schema

      public String schema()
      Returns the value of the schema record component.
      Returns:
      the value of the schema record component
    • bindings

      public List<XmlMapBinding> bindings()
      Returns the value of the bindings record component.
      Returns:
      the value of the bindings record component