in SdmxDataParser/src/main/java/org/sdmxsource/sdmx/dataparser/transform/impl/BaseSchemaGenerator.java [352:511]
protected String determineSchemaType(TEXT_TYPE textType) {
String attrType;
switch (textType) {
case ALPHA:
attrType = "common:AlphaType";
break;
case ATTACHMENT_CONSTRAINT_REFERENCE:
attrType = "common:AttachmentConstraintReferenceType";
break;
case ALPHA_NUMERIC:
attrType = "common:AlphaNumericType";
break;
case BASIC_TIME_PERIOD:
attrType = "common:BasicTimePeriodType";
break;
case BIG_INTEGER:
attrType = "xs:integer";
break;
case BOOLEAN:
attrType = "xs:boolean";
break;
case COUNT:
attrType = "xs:integer";
break;
case DATA_SET_REFERENCE:
attrType = "common:DataSetReferenceType";
break;
case DATE:
attrType = "xs:date";
break;
case DATE_TIME:
attrType = "xs:dateTime";
break;
case DAY:
attrType = "xs:g*";
break;
case DECIMAL:
attrType = "xs:decimal";
break;
case DOUBLE:
attrType = "xs:double";
break;
case DURATION:
attrType = "xs:duration";
break;
case EXCLUSIVE_VALUE_RANGE:
attrType = "xs:decimal";
break;
case FLOAT:
attrType = "xs:float";
break;
case GREGORIAN_DAY:
attrType = "xs:date";
break;
case GREGORIAN_TIME_PERIOD:
attrType = "common:GregorianTimePeriodType";
break;
case GREGORIAN_YEAR:
attrType = "xs:gYear";
break;
case GREGORIAN_YEAR_MONTH:
attrType = "xs:gYearMonth";
break;
case IDENTIFIABLE_REFERENCE:
// TODO
attrType = "????";
break;
case INCLUSIVE_VALUE_RANGE:
attrType = "xs:decimal";
break;
case INCREMENTAL:
attrType = "xs:decimal";
break;
case INTEGER:
attrType = "xs:int";
break;
case KEY_VALUES:
attrType = "common:DataKeyType";
break;
case LONG:
attrType = "xs:long";
break;
case MONTH:
attrType = "xs:g*";
break;
case MONTH_DAY:
attrType = "xs:g*";
break;
case NUMERIC:
attrType = "common:NumericType";
break;
case OBSERVATIONAL_TIME_PERIOD:
if (targetSchemaVersion == SDMX_SCHEMA.VERSION_TWO_POINT_ONE) {
attrType = "common:ObservationalTimePeriodType";
} else {
attrType = "common:TimePeriodType";
}
break;
case REPORTING_DAY:
attrType = "common:ReportingDayType";
break;
case REPORTING_MONTH:
attrType = "common:ReportingMonthType";
break;
case REPORTING_QUARTER:
attrType = "common:ReportingQuarterType";
break;
case REPORTING_SEMESTER:
attrType = "common:ReportingSemesterType";
break;
case REPORTING_TIME_PERIOD:
attrType = "common:ReportingTimePeriodType";
break;
case REPORTING_TRIMESTER:
attrType = "common:ReportingTrimesterType";
break;
case REPORTING_WEEK:
attrType = "common:ReportingWeekType";
break;
case REPORTING_YEAR:
attrType = "common:ReportingYearType";
break;
case SHORT:
attrType = "xs:short";
break;
case STANDARD_TIME_PERIOD:
attrType = "common:StandardTimePeriodType";
break;
case STRING:
attrType = "xs:string";
break;
case TIME:
attrType = "time";
break;
case TIMESPAN:
attrType = "xs:duration";
break;
case TIMES_RANGE:
attrType = "common:TimeRangeType";
break;
case TIME_PERIOD:
attrType = "common:TimePeriodRangeType";
break;
case URI:
attrType = "xs:anyURI";
break;
case XHTML:
attrType = "common:StructuredText";
break;
case YEAR:
attrType = "xsd:g*";
break;
case YEAR_MONTH:
attrType = "xsd:g*";
break;
default:
attrType = "xs:string";
}
return attrType;
}