Package com.illumon.iris.db.schema.xml
Class SchemaXmlFactory
java.lang.Object
com.illumon.iris.db.schema.xml.SchemaXmlFactory
The public entry point into this package.
Little else is directly visible outside this package.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaXmlgetImmutableXml(SchemaXml schema, boolean alreadyDetached) Factory method that allows the implementation class to stay private.static MutableSchemagetMutableSchema(TableDefinition definition, NamespaceSet namespaceSet) Create aMutableSchemaimplementation from the given table definition, in the specified namespace set.static MutableSchemagetMutableSchema(TableDefinition definition, NamespaceSet namespaceSet, boolean useNanosecondTimePrecision) Create aMutableSchemaimplementation from the given table definition, in the specified namespace set.static MutableSchemagetMutableSchema(org.jdom2.Element element) Create aMutableSchemaimplementation from the given XML Element.static com.illumon.iris.db.schema.xml.CopyTableSchemaXmlgetXmlCopySchema(CopyTableSchema schema) Create aSchemaXmlimplementation from the given XML Element.static com.illumon.iris.db.schema.xml.CopyTableSchemaXmlgetXmlCopySchema(org.jdom2.Element element, SchemaXml sourceSchema) Create aSchemaXmlimplementation from the given XML Element.static SchemaXmlgetXmlSchema(TableDefinition definition, NamespaceSet namespaceSet) Create aSchemaXmlimplementation from the given table definition, in the specified namespace set.static SchemaXmlgetXmlSchema(String xmlString) Create aSchemaXmlimplementation from the given XML String.static SchemaXmlgetXmlSchema(org.jdom2.Element element) Create aSchemaXmlimplementation from the given XML Element, using a NO_VERSION SchemaVersion.static SchemaXmlgetXmlSchema(org.jdom2.Element element, SchemaVersion version) Create aSchemaXmlimplementation from the given XML Element.
-
Constructor Details
-
SchemaXmlFactory
public SchemaXmlFactory()
-
-
Method Details
-
getMutableSchema
public static MutableSchema getMutableSchema(@NotNull org.jdom2.Element element) throws SchemaValidationException Create aMutableSchemaimplementation from the given XML Element.- Parameters:
element- the source element- Returns:
- a new object implementing
MutableSchema - Throws:
SchemaValidationException- if any errors parsing the element
-
getXmlSchema
public static SchemaXml getXmlSchema(@NotNull org.jdom2.Element element, @NotNull SchemaVersion version) throws SchemaValidationException Create aSchemaXmlimplementation from the given XML Element.- Parameters:
element- the source elementversion- version info for this schema- Returns:
- a new object implementing
SchemaXml - Throws:
SchemaValidationException- if any errors parsing the element
-
getXmlSchema
public static SchemaXml getXmlSchema(@NotNull org.jdom2.Element element) throws SchemaValidationException Create aSchemaXmlimplementation from the given XML Element, using a NO_VERSION SchemaVersion.- Parameters:
element- the source element- Returns:
- a new object implementing
SchemaXml - Throws:
SchemaValidationException- if any errors parsing the element
-
getXmlSchema
Create aSchemaXmlimplementation from the given XML String.- Parameters:
xmlString- the XML schema as a String- Returns:
- a new object implementing
SchemaXml - Throws:
SchemaValidationException- if any errors parsing the element
-
getXmlCopySchema
public static com.illumon.iris.db.schema.xml.CopyTableSchemaXml getXmlCopySchema(@NotNull CopyTableSchema schema) throws SchemaValidationException Create aSchemaXmlimplementation from the given XML Element.- Parameters:
schema- the CopyTable schema to convert- Returns:
- a new object implementing
SchemaXml - Throws:
SchemaValidationException- if any errors parsing the element
-
getXmlCopySchema
public static com.illumon.iris.db.schema.xml.CopyTableSchemaXml getXmlCopySchema(@NotNull org.jdom2.Element element, @NotNull SchemaXml sourceSchema) throws SchemaValidationException Create aSchemaXmlimplementation from the given XML Element.- Parameters:
element- the source element- Returns:
- a new object implementing
SchemaXml - Throws:
SchemaValidationException- if any errors parsing the element
-
getXmlSchema
public static SchemaXml getXmlSchema(@NotNull TableDefinition definition, @NotNull NamespaceSet namespaceSet) throws SchemaValidationException Create aSchemaXmlimplementation from the given table definition, in the specified namespace set.- Parameters:
definition- the source table definitionnamespaceSet- the namespace set for the new schema- Returns:
- a new object implementing
SchemaXml - Throws:
SchemaValidationException- if any errors parsing the element
-
getMutableSchema
public static MutableSchema getMutableSchema(@NotNull TableDefinition definition, @NotNull NamespaceSet namespaceSet) throws SchemaValidationException Create aMutableSchemaimplementation from the given table definition, in the specified namespace set.- Parameters:
definition- the source table definitionnamespaceSet- the namespace set for the new schema- Returns:
- a new object implementing
MutableSchema - Throws:
SchemaValidationException- if any errors parsing the element
-
getMutableSchema
public static MutableSchema getMutableSchema(@NotNull TableDefinition definition, @NotNull NamespaceSet namespaceSet, boolean useNanosecondTimePrecision) throws SchemaValidationException Create aMutableSchemaimplementation from the given table definition, in the specified namespace set.- Parameters:
definition- the source table definitionnamespaceSet- the namespace set for the new schemauseNanosecondTimePrecision- the namespace set for the new schema- Returns:
- a new object implementing
MutableSchema - Throws:
SchemaValidationException- if any errors parsing the element
-
getImmutableXml
Factory method that allows the implementation class to stay private.- Parameters:
schema- source schema to make immutablealreadyDetached- true indicates that the source schema is safe to use as-is- Returns:
- an immutable schema, per
Schema.getImmutable()rules.
-