Class DrillXSDSchemaUtils
java.lang.Object
org.apache.drill.exec.store.xml.xsd.DrillXSDSchemaUtils
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.google.common.collect.ImmutableMap<String, TypeProtos.MinorType> This map maps the data types defined by the XSD definition to Drill data types.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic TypeProtos.MinorTypegetDrillDataType(String xmlType) Returns aTypeProtos.MinorTypeof the corresponding XML Data Type.static TupleMetadatagetSchema(InputStream inputStream) Returns aTupleMetadataof the schema from an XSD file from an InputStream.static TupleMetadataThis function is only used for testing, but accepts a XSD file as input rather than aInputStream
- 
Field Details- 
XML_TYPE_MAPPINGSpublic static final com.google.common.collect.ImmutableMap<String,TypeProtos.MinorType> XML_TYPE_MAPPINGSThis map maps the data types defined by the XSD definition to Drill data types.
 
- 
- 
Constructor Details- 
DrillXSDSchemaUtilspublic DrillXSDSchemaUtils()
 
- 
- 
Method Details- 
getSchemaThis function is only used for testing, but accepts a XSD file as input rather than aInputStream- Parameters:
- filename- A- Stringcontaining an XSD file.
- Returns:
- A TupleMetadatacontaining a Drill representation of the XSD schema.
- Throws:
- IOException- If anything goes wrong or the file is not found.
 
- 
getSchemaReturns aTupleMetadataof the schema from an XSD file from an InputStream.- Parameters:
- inputStream- A- InputStreamcontaining an XSD file.
- Returns:
- A TupleMetadataof the schema from the XSD file.
 
- 
getDrillDataTypeReturns aTypeProtos.MinorTypeof the corresponding XML Data Type. Defaults to VARCHAR if unknown- Parameters:
- xmlType- A String of the XML Data Type
- Returns:
- A TypeProtos.MinorTypeof the Drill data type.
 
 
-