public short getBuiltInKind() { return xsSimple.getBuiltInKind(); }
public short getBuiltInKind() { return simpleTypeDefinition.getBuiltInKind(); }
private Schema.Type getPrimitiveType(XSSimpleTypeDefinition type) { Schema.Type avroType = primitives.get(type.getBuiltInKind()); return avroType == null ? Schema.Type.STRING : avroType; }
switch ( xsdTypeDef.getBuiltInKind() ) {
private short getXercesXSDTypeCodeFor$value(XSTypeDefinition elementType) { if (Constants.NS_XMLSCHEMA.equals(elementType.getNamespace())) { short typeCode = -100; // dummy initializer boolean isxsd11Type = false; // the below 'if else' clauses are written to process few special cases handling few of schema types within PsychoPath XPath engine final String elementTypeName = elementType.getName(); if ("dayTimeDuration".equals(elementTypeName)) { typeCode = PsychoPathTypeHelper.DAYTIMEDURATION_DT; isxsd11Type = true; } else if ("yearMonthDuration".equals(elementTypeName)) { typeCode = PsychoPathTypeHelper.YEARMONTHDURATION_DT; isxsd11Type = true; } return (isxsd11Type) ? typeCode : ((XSSimpleTypeDefinition) elementType).getBuiltInKind(); } else { return getXercesXSDTypeCodeFor$value(elementType.getBaseType()); } } // getXercesXSDTypeCodeFor$value
public void setXDMTypedValueOf$valueForSTVarietyList(Element rootNodeOfAssertTree, String listStrValue, XSSimpleTypeDefinition itemType, boolean isTypeDerivedFromList, DynamicContext xpath2DynamicContext) throws Exception { if (itemType.getVariety() == XSSimpleTypeDefinition.VARIETY_UNION) { // itemType of xs:list has variety 'union' List xdmItemList = new ArrayList(); XSObjectList memberTypes = itemType.getMemberTypes(); // tokenize the list value by a sequence of white spaces StringTokenizer values = new StringTokenizer(listStrValue, " \n\t\r"); while (values.hasMoreTokens()) { String itemValue = values.nextToken(); XSSimpleTypeDefinition listItemTypeForUnion = getActualXDMItemTypeForSTVarietyUnion(memberTypes, itemValue); xdmItemList.add(SchemaTypeValueFactory.newSchemaTypeValue(listItemTypeForUnion.getBuiltInKind(), itemValue)); } xpath2DynamicContext.set_variable(new org.eclipse.wst.xml.xpath2.processor.internal.types.QName("value"), XS11TypeHelper.getXPath2ResultSequence(xdmItemList)); } else { setXDMTypedValueOf$value(rootNodeOfAssertTree, listStrValue, itemType, null, isTypeDerivedFromList, xpath2DynamicContext); } } // setXDMTypedValueOf$valueForSTVarietyList
public static String generateSampleValue(GeneratorConfig config, XSSimpleTypeDefinition simpleType, String hint, Map<String, Integer> counters) { if (simpleType.getBuiltInKind() == XSConstants.LIST_DT) { XSSimpleTypeDefinition itemType = simpleType.getItemType();
String itemValue = listStrTokens.nextToken(); if (listOrUnionType.getItemType() != null) { xdmItemList.add(SchemaTypeValueFactory.newSchemaTypeValue((listOrUnionType.getItemType()).getBuiltInKind(), itemValue)); xdmItemList.add(SchemaTypeValueFactory.newSchemaTypeValue(listOrUnionType.getBuiltInKind(), itemValue));
String itemValue = values.nextToken(); XSSimpleTypeDefinition listItemTypeForUnion = getActualXDMItemTypeForSTVarietyUnion(memberTypes, itemValue); xdmItemList.add(SchemaTypeValueFactory.newSchemaTypeValue(listItemTypeForUnion.getBuiltInKind(), itemValue)); xdmItemList.add(SchemaTypeValueFactory.newSchemaTypeValue(listItemType.getBuiltInKind(), itemValue));