Class Utils
java.lang.Object
org.eclipse.lemminx.customservice.synapse.schemagen.xsd.Utils
The Utils class provides utility methods and constants for JSON Schema generation from XML Schema.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetTypeName(org.apache.xerces.xs.XSSimpleTypeDefinition simpleType) Retrieves the type name from the given XML Schema simple type definition.static booleanisElementArray(org.apache.xerces.xs.XSParticle elementStructure) Determines if the given element structure represents an array.static StringmapXsdTypeToJsonType(String xsdType) Maps an XML Schema data type to a JSON Schema data type.
-
Field Details
-
ROOT
- See Also:
-
ATTRIBUTE_PREFIX
- See Also:
-
ENUM
- See Also:
-
ONE_OF
- See Also:
-
ID
- See Also:
-
TYPE
- See Also:
-
PROPERTIES
- See Also:
-
REQUIRED
- See Also:
-
ITEMS
- See Also:
-
ARRAY
- See Also:
-
TITLE
- See Also:
-
OBJECT
- See Also:
-
ARRAY_FIRST_ELEMENT_IDENTIFIER
- See Also:
-
ELEMENT_VALUE
- See Also:
-
ID_VALUE_SEPERATOR
- See Also:
-
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
mapXsdTypeToJsonType
Maps an XML Schema data type to a JSON Schema data type.- Parameters:
xsdType- the XML Schema data type- Returns:
- the corresponding JSON Schema data type
-
isElementArray
public static boolean isElementArray(org.apache.xerces.xs.XSParticle elementStructure) Determines if the given element structure represents an array.- Parameters:
elementStructure- the element structure to check- Returns:
- true if the element structure represents an array, false otherwise
-
getTypeName
Retrieves the type name from the given XML Schema simple type definition.- Parameters:
simpleType- the XML Schema simple type definition- Returns:
- the type name
-