Class SchemaHelpers

java.lang.Object
io.deephaven.enterprise.schema.impl.SchemaHelpers

@InternalUseOnly public final class SchemaHelpers extends Object
Helpers intended to assist in various conversions related to Schema and SchemaService
  • Method Details

    • createSchemaFromXml

      @NotNull @InternalUseOnly public static @NotNull Schema createSchemaFromXml(@NotNull @NotNull io.deephaven.shadow.enterprise.org.jdom2.Element rootElement) throws io.deephaven.shadow.enterprise.org.jdom2.JDOMException, IOException
      Constructs a Schema from an XML Element
      Parameters:
      rootElement - a root XML Element representation of a Schema
      Returns:
      a Schema instance
      Throws:
      io.deephaven.shadow.enterprise.org.jdom2.JDOMException - when errors occur in parsing
      IOException - when an I/O error prevents a document from being fully parsed
    • createSchemaFromXml

      @NotNull @InternalUseOnly public static @NotNull Schema createSchemaFromXml(@NotNull @NotNull String schemaString) throws io.deephaven.shadow.enterprise.org.jdom2.JDOMException, IOException
      Constructs a Schema from an XML String
      Parameters:
      schemaString - a valid XML representation of a Schema
      Returns:
      a Schema instance
      Throws:
      io.deephaven.shadow.enterprise.org.jdom2.JDOMException - when errors occur in parsing
      IOException - when an I/O error prevents a document from being fully parsed
    • createSchemaFromXml

      @NotNull @InternalUseOnly public static @NotNull Schema createSchemaFromXml(@NotNull @NotNull Path schemaPath) throws io.deephaven.shadow.enterprise.org.jdom2.JDOMException, IOException
      Constructs a Schema from a file containing an XML String
      Parameters:
      schemaPath - path to the XML file
      Returns:
      a Schema instance
      Throws:
      io.deephaven.shadow.enterprise.org.jdom2.JDOMException - when errors occur in parsing
      IOException - when an I/O error prevents a document from being fully parsed
    • asSchemaXml

      @NotNull @InternalUseOnly public static @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.xml.SchemaXml asSchemaXml(@NotNull @NotNull Schema schema)
      Attempts to convert a Core+ Schema to a Legacy SchemaXml instance
      Parameters:
      schema - a Schema instance which we will attempt to convert to a Legacy SchemaXml instance
      Returns:
      a Legacy SchemaXml instance
    • asLegacyService

      @NotNull @InternalUseOnly public static io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.SchemaService asLegacyService(@NotNull @NotNull SchemaService schemaService)
      Attempts to convert a SchemaService instance to its underlying Legacy SchemaService instance. Calls to this method suggest that we may need to add things to the SchemaService interface or that we have not converted some class to be aware of the Core+ SchemaService
      Parameters:
      schemaService - a SchemaService which has an underlying Legacy SchemaService
      Returns:
      a Legacy SchemaService instance