public class AttributeValidations extends Object
| Modifier | Constructor | Description |
|---|---|---|
private |
AttributeValidations() |
| Modifier and Type | Method | Description |
|---|---|---|
private static String |
attributeMissingMessage(String elementName,
String attributeName) |
|
static <T extends XsdEnum> |
belongsToEnum(XsdEnum<T> instance,
String value) |
Verifies if a given value is present in a given
Enum type. |
(package private) static String |
getBlockDefaultValue(XsdAbstractElement parent) |
Obtains the default value of the
XsdSchema.blockDefault attribute by iterating in the element tree by
going from XsdAbstractElement.parent to XsdAbstractElement.parent until reaching the top level
element. |
(package private) static String |
getFinalDefaultValue(XsdAbstractElement parent) |
Obtains the default value of the
XsdSchema.finalDefault attribute by iterating in the element tree by
going from XsdAbstractElement.parent to XsdAbstractElement.parent until reaching the top level
element. |
(package private) static String |
getFormDefaultValue(XsdAbstractElement parent) |
Obtains the default value of the
XsdSchema.attributeFormDefault attribute by iterating in the element tree
by going from XsdAbstractElement.parent to XsdAbstractElement.parent until reaching the top level
element. |
(package private) static String |
maxOccursValidation(String elementName,
String value) |
Checks if the maxOccurs attribute is unbounded or an
Integer value. |
static Boolean |
validateBoolean(String value) |
|
private static Double |
validateDouble(String elementName,
String attributeName,
String value) |
|
(package private) static Integer |
validateNonNegativeInteger(String elementName,
String attributeName,
String value) |
Validates if a given String is a non negative
Integer. |
private static Integer |
validatePositiveInteger(String elementName,
String attributeName,
String value) |
Validates if a given String is a positive
Integer. |
static Double |
validateRequiredDouble(String elementName,
String attributeName,
String value) |
|
static Integer |
validateRequiredNonNegativeInteger(String elementName,
String attributeName,
String value) |
Validates if a given String is a non negative
Integer. |
static Integer |
validateRequiredPositiveInteger(String elementName,
String attributeName,
String value) |
Validates if a given String is a positive
Integer. |
public static <T extends XsdEnum> T belongsToEnum(XsdEnum<T> instance, String value)
Enum type.T - The concrete type of the Enum type.instance - An instance of the concrete Enum type that is expected to contain the value received.value - The value that is expected to be present in the received Enum type.Enum type that represents value in the respective Enum.static String maxOccursValidation(String elementName, String value)
Integer value.value - The possible maxOccurs value.elementName - The name of the element containing the maxOccurs attribute.static Integer validateNonNegativeInteger(String elementName, String attributeName, String value)
public static Integer validateRequiredNonNegativeInteger(String elementName, String attributeName, String value)
private static Integer validatePositiveInteger(String elementName, String attributeName, String value)
public static Integer validateRequiredPositiveInteger(String elementName, String attributeName, String value)
private static Double validateDouble(String elementName, String attributeName, String value)
public static Double validateRequiredDouble(String elementName, String attributeName, String value)
static String getFormDefaultValue(XsdAbstractElement parent)
XsdSchema.attributeFormDefault attribute by iterating in the element tree
by going from XsdAbstractElement.parent to XsdAbstractElement.parent until reaching the top level
element.parent - The parent of the element requesting the default form value.static String getFinalDefaultValue(XsdAbstractElement parent)
XsdSchema.finalDefault attribute by iterating in the element tree by
going from XsdAbstractElement.parent to XsdAbstractElement.parent until reaching the top level
element.parent - The parent of the element requesting the default final value.static String getBlockDefaultValue(XsdAbstractElement parent)
XsdSchema.blockDefault attribute by iterating in the element tree by
going from XsdAbstractElement.parent to XsdAbstractElement.parent until reaching the top level
element.parent - The parent of the element requesting the default block value.Copyright © 2018. All rights reserved.