Class SchemaHelpers
java.lang.Object
io.deephaven.enterprise.schema.impl.SchemaHelpers
Helpers intended to assist in various conversions related to
Schema and SchemaService-
Method Summary
Modifier and TypeMethodDescriptionstatic io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.SchemaServiceasLegacyService(@NotNull SchemaService schemaService) Attempts to convert aSchemaServiceinstance to its underlying Legacy SchemaService instance.static @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.schema.xml.SchemaXmlasSchemaXml(@NotNull Schema schema) Attempts to convert a Core+Schemato a Legacy SchemaXml instancestatic @NotNull SchemacreateSchemaFromXml(@NotNull io.deephaven.shadow.enterprise.org.jdom2.Element rootElement) Constructs aSchemafrom an XML Elementstatic @NotNull SchemacreateSchemaFromXml(@NotNull String schemaString) Constructs aSchemafrom an XML Stringstatic @NotNull SchemacreateSchemaFromXml(@NotNull Path schemaPath) Constructs aSchemafrom a file containing an XML String
-
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 aSchemafrom an XML Element- Parameters:
rootElement- a root XML Element representation of aSchema- Returns:
- a
Schemainstance - Throws:
io.deephaven.shadow.enterprise.org.jdom2.JDOMException- when errors occur in parsingIOException- 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 aSchemafrom an XML String- Parameters:
schemaString- a valid XML representation of aSchema- Returns:
- a
Schemainstance - Throws:
io.deephaven.shadow.enterprise.org.jdom2.JDOMException- when errors occur in parsingIOException- 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 aSchemafrom a file containing an XML String- Parameters:
schemaPath- path to the XML file- Returns:
- a
Schemainstance - Throws:
io.deephaven.shadow.enterprise.org.jdom2.JDOMException- when errors occur in parsingIOException- 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+Schemato a Legacy SchemaXml instance- Parameters:
schema- aSchemainstance 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 aSchemaServiceinstance to its underlying Legacy SchemaService instance. Calls to this method suggest that we may need to add things to theSchemaServiceinterface or that we have not converted some class to be aware of the Core+SchemaService- Parameters:
schemaService- aSchemaServicewhich has an underlying Legacy SchemaService- Returns:
- a Legacy SchemaService instance
-