Package com.evolveum.midpoint.prism.xml
Class XsdTypeMapper
- java.lang.Object
-
- com.evolveum.midpoint.prism.xml.XsdTypeMapper
-
public class XsdTypeMapper extends Object
Maintains mapping of XSD types (qnames) and Java types (classes)- Author:
- Radovan Semancik
-
-
Field Summary
Fields Modifier and Type Field Description static String
BOOLEAN_XML_VALUE_FALSE
static String
BOOLEAN_XML_VALUE_TRUE
-
Constructor Summary
Constructors Constructor Description XsdTypeMapper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static QName
determineQNameWithNs(QName xsdType)
static QName
getJavaToXsdMapping(Class<?> type)
static Class<?>
getTypeFromClass(Class<?> clazz)
Returns the class in the type mapping.static <T> Class<T>
getXsdToJavaMapping(QName xsdType)
static boolean
isMatchingMultiplicity(int number, int min, int max)
static Integer
multiplicityToInteger(String string)
static String
multiplicityToString(Integer integer)
static <T> @Nullable Class<T>
toJavaType(@NotNull QName xsdType)
static <T> @Nullable Class<T>
toJavaTypeIfKnown(@NotNull QName xsdType)
static <T> Class<T>
toJavaTypeIfKnownExt(@NotNull QName xsdType)
static @NotNull QName
toXsdType(Class javaClass)
-
-
-
Field Detail
-
BOOLEAN_XML_VALUE_TRUE
public static final String BOOLEAN_XML_VALUE_TRUE
- See Also:
- Constant Field Values
-
BOOLEAN_XML_VALUE_FALSE
public static final String BOOLEAN_XML_VALUE_FALSE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTypeFromClass
public static Class<?> getTypeFromClass(Class<?> clazz)
Returns the class in the type mapping. The class supplied by the caller may be a subclass of what we have in the map. This returns the class that in the mapping.
-
toJavaType
@Nullable public static <T> @Nullable Class<T> toJavaType(@NotNull @NotNull QName xsdType)
-
toJavaTypeIfKnown
@Nullable public static <T> @Nullable Class<T> toJavaTypeIfKnown(@NotNull @NotNull QName xsdType)
-
toJavaTypeIfKnownExt
public static <T> Class<T> toJavaTypeIfKnownExt(@NotNull @NotNull QName xsdType)
-
isMatchingMultiplicity
public static boolean isMatchingMultiplicity(int number, int min, int max)
-
-