Interface SchemaXmlParser
- All Known Subinterfaces:
LegacySchemaXmlParser
- All Known Implementing Classes:
LegacySchemaXmlParser.LegacyParser,SchemaXmlParser.StandardParser
public interface SchemaXmlParser
Interface for parsing XML schema Elements.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classContract: copies element, does not change it. -
Method Summary
Modifier and TypeMethodDescriptiongetMergeCodecName(String mergeFormat) getOptionalBoolean(org.jdom2.Element element, String attributeName) Get an attribute, throwing a SchemaException if it is not a valid boolean.static OptionalIntgetOptionalInteger(org.jdom2.Element element, String attributeName) Get an attribute, throwing a SchemaException if it is not a valid integer.static StringgetOptionalString(org.jdom2.Element element, String attributeName, String defaultValue) Get an attribute, returning a default value if not set.static StringgetRequiredAttribute(org.jdom2.Element element, String attributeName) Get an attribute, throwing a SchemaException if it is not set.static intgetRequiredInteger(org.jdom2.Element element, String attributeName) Get an integer attribute, throwing a SchemaException if it is not set.validate(boolean lenientValidation) Validate the XML in the element, throw an exception if any errors are found.
-
Method Details
-
getRequiredAttribute
@NotNull static String getRequiredAttribute(@NotNull org.jdom2.Element element, @NotNull String attributeName) Get an attribute, throwing a SchemaException if it is not set.- Parameters:
element- the Element containing attributesattributeName- name of the attribute to fetch- Returns:
- the String value of the attribute
- Throws:
SchemaException- if the attribute is not set
-
getRequiredInteger
Get an integer attribute, throwing a SchemaException if it is not set.- Parameters:
element- the Element containing attributesattributeName- name of the attribute to fetch- Returns:
- the integer value of the attribute
- Throws:
SchemaException- if the attribute is not set
-
getOptionalString
@NotNull static String getOptionalString(@NotNull org.jdom2.Element element, @NotNull String attributeName, @NotNull String defaultValue) Get an attribute, returning a default value if not set.- Parameters:
element- the Element containing attributesattributeName- name of the attribute to fetchdefaultValue- the value to return if the attribute is not present- Returns:
- the String value of the attribute
-
getOptionalBoolean
@NotNull static Optional<Boolean> getOptionalBoolean(@NotNull org.jdom2.Element element, @NotNull String attributeName) Get an attribute, throwing a SchemaException if it is not a valid boolean.- Parameters:
element- the Element containing attributesattributeName- name of the attribute to fetch- Returns:
- the value of the attribute, or empty
- Throws:
SchemaException- if the attribute is not a valid boolean
-
getOptionalInteger
@NotNull static OptionalInt getOptionalInteger(@NotNull org.jdom2.Element element, @NotNull String attributeName) Get an attribute, throwing a SchemaException if it is not a valid integer.- Parameters:
element- the Element containing attributesattributeName- name of the attribute to fetch- Returns:
- the value of the attribute, or empty
- Throws:
SchemaException- if the attribute is not a valid boolean
-
getNamespace
-
getTableName
-
getDefaultMergeFormat
- Throws:
SchemaValidationException
-
getMergeCodecName
- Throws:
SchemaValidationException
-
getStorageType
-
getPartitionKeyFormula
-
getLoggers
-
getV2Loggers
-
getListeners
-
getLoggerListeners
-
getImportSources
-
getValidator
-
validate
@NotNull List<SchemaValidationException> validate(boolean lenientValidation) throws SchemaValidationException Validate the XML in the element, throw an exception if any errors are found.- Parameters:
lenientValidation- if true, ClassNotFoundExceptions will be ignored when validating- Returns:
- SchemaValidationExceptions list of exceptions that were ignored because lenientValidation==true
- Throws:
SchemaValidationException- if any errors are found validating
-
getDataIndexSets
-
getExtendedStorage
-
getInputTableStateSpec
-