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 SchemaXml
getImmutableXml
(SchemaXml schema, boolean alreadyDetached) Factory method that allows the implementation class to stay private.static MutableSchema
getMutableSchema
(TableDefinition definition, NamespaceSet namespaceSet) Create aMutableSchema
implementation from the given table definition, in the specified namespace set.static MutableSchema
getMutableSchema
(TableDefinition definition, NamespaceSet namespaceSet, boolean useNanosecondTimePrecision) Create aMutableSchema
implementation from the given table definition, in the specified namespace set.static MutableSchema
getMutableSchema
(org.jdom2.Element element) Create aMutableSchema
implementation from the given XML Element.static com.illumon.iris.db.schema.xml.CopyTableSchemaXml
getXmlCopySchema
(CopyTableSchema schema) Create aSchemaXml
implementation from the given XML Element.static com.illumon.iris.db.schema.xml.CopyTableSchemaXml
getXmlCopySchema
(org.jdom2.Element element, SchemaXml sourceSchema) Create aSchemaXml
implementation from the given XML Element.static SchemaXml
getXmlSchema
(TableDefinition definition, NamespaceSet namespaceSet) Create aSchemaXml
implementation from the given table definition, in the specified namespace set.static SchemaXml
getXmlSchema
(String xmlString) Create aSchemaXml
implementation from the given XML String.static SchemaXml
getXmlSchema
(org.jdom2.Element element) Create aSchemaXml
implementation from the given XML Element, using a NO_VERSION SchemaVersion.static SchemaXml
getXmlSchema
(org.jdom2.Element element, SchemaVersion version) Create aSchemaXml
implementation 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 aMutableSchema
implementation 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 aSchemaXml
implementation 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 aSchemaXml
implementation 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 aSchemaXml
implementation 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 aSchemaXml
implementation 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 aSchemaXml
implementation 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 aSchemaXml
implementation 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 aMutableSchema
implementation 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 aMutableSchema
implementation 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.
-