Class JacksonJSONSchema
- java.lang.Object
-
- org.wso2.carbon.mediator.datamapper.engine.core.schemas.JacksonJSONSchema
-
-
Constructor Summary
Constructors Constructor Description JacksonJSONSchema(InputStream inputSchema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getElementTypeByName(String elementName)
String
getElementTypeByName(List<SchemaElement> elementStack)
Method to get the element type specified in the schema by giving the element hierarchyString
getName()
Method for get defined name of the schemaMap<String,String>
getNamespaceMap()
String
getPrefixForNamespace(String url)
Map<String,String>
getPrefixMap()
Map<String,Object>
getSchemaItems(Map<String,Object> schema)
Map
getSchemaMap()
boolean
isChildElement(String elementName, String childElementName)
Method for check whether schema has a child element inside given elementboolean
isChildElement(List<SchemaElement> elementStack, String childElementName)
boolean
isCurrentArrayIsPrimitive()
-
-
-
Constructor Detail
-
JacksonJSONSchema
public JacksonJSONSchema(InputStream inputSchema) throws SchemaException
- Throws:
SchemaException
-
-
Method Detail
-
getName
public String getName() throws SchemaException
Description copied from interface:Schema
Method for get defined name of the schema- Specified by:
getName
in interfaceSchema
- Returns:
- Name of the schema as a String
- Throws:
SchemaException
-
getElementTypeByName
public String getElementTypeByName(List<SchemaElement> elementStack) throws InvalidPayloadException, SchemaException
Description copied from interface:Schema
Method to get the element type specified in the schema by giving the element hierarchy- Specified by:
getElementTypeByName
in interfaceSchema
- Returns:
- type of the element
- Throws:
InvalidPayloadException
SchemaException
-
getElementTypeByName
public String getElementTypeByName(String elementName) throws SchemaException
- Specified by:
getElementTypeByName
in interfaceSchema
- Throws:
SchemaException
-
isChildElement
public boolean isChildElement(String elementName, String childElementName)
Description copied from interface:Schema
Method for check whether schema has a child element inside given element- Specified by:
isChildElement
in interfaceSchema
- Returns:
-
isChildElement
public boolean isChildElement(List<SchemaElement> elementStack, String childElementName) throws InvalidPayloadException, SchemaException
- Specified by:
isChildElement
in interfaceSchema
- Throws:
InvalidPayloadException
SchemaException
-
getNamespaceMap
public Map<String,String> getNamespaceMap()
- Specified by:
getNamespaceMap
in interfaceSchema
-
getPrefixMap
public Map<String,String> getPrefixMap()
- Specified by:
getPrefixMap
in interfaceSchema
-
getPrefixForNamespace
public String getPrefixForNamespace(String url)
- Specified by:
getPrefixForNamespace
in interfaceSchema
-
isCurrentArrayIsPrimitive
public boolean isCurrentArrayIsPrimitive()
- Specified by:
isCurrentArrayIsPrimitive
in interfaceSchema
-
getSchemaMap
public Map getSchemaMap()
- Specified by:
getSchemaMap
in interfaceSchema
-
-