private String processType(XSType type, String elementName, XSSchemaSet sset) { if (type instanceof XSComplexType) { return processComplexType(type.asComplexType(), elementName, sset); } else { return processSimpleType(type.asSimpleType(), elementName); } }
public XSContentType getContentType() { XSType t = baseType.getType(); if(t.asComplexType()!=null) return t.asComplexType().getContentType(); else return t.asSimpleType(); }
public XSContentType getContentType() { XSType t = baseType.getType(); if(t.asComplexType()!=null) return t.asComplexType().getContentType(); else return t.asSimpleType(); }
/** * Describe/convert to model the details of the XSD type provided * PRE-CONDITION:<ul> * <li> The type was declared, i.e. the corresponding UML class has * been assigned to the class * </ul> * @param type * @param intoClass is the non-null UML class to describe the XSD type into */ private Classifier defineType(XSType type, Classifier intoClass) { LOGGER.log( Level.FINE, "Define type: {0}", type); if ( type.isComplexType() ) { processComplexType( type.asComplexType(), intoClass ); } else { processSimpleType( type.asSimpleType(), intoClass ); } return intoClass; }
public XSContentType getContentType() { XSType t = baseType.getType(); if(t.asComplexType()!=null) return t.asComplexType().getContentType(); else return t.asSimpleType(); }
public XSContentType getContentType() { XSType t = baseType.getType(); if(t.asComplexType()!=null) return t.asComplexType().getContentType(); else return t.asSimpleType(); }
public XSContentType getContentType() { XSType t = baseType.getType(); if(t.asComplexType()!=null) return t.asComplexType().getContentType(); else return t.asSimpleType(); }
private <T> Collection<? extends DisplayableValue<T>> parseEnumAllowedValues(QName typeName, ComplexTypeDefinition ctd, XSType xsType) { if (xsType.isSimpleType()) { if (xsType.asSimpleType().isRestriction()) { XSRestrictionSimpleType restriction = xsType.asSimpleType().asRestriction(); List<XSFacet> enumerations = restriction.getDeclaredFacets(XSFacet.FACET_ENUMERATION); List<DisplayableValueImpl<T>> enumValues = new ArrayList<>(
private void processTermElement(JFieldVar fieldVar, XSElementDecl element, List<FacetCustomization> customizations) { XSType elementType = element.getType(); if (elementType.isComplexType()) { validAnnotate(fieldVar); if (!element.isNillable()) notNullAnnotate(fieldVar); if (elementType.getBaseType().isSimpleType()) processSimpleType(elementType.getBaseType().asSimpleType(), fieldVar, customizations); } else processSimpleType(elementType.asSimpleType(), fieldVar, customizations); }
public void build(XSComplexType ct) { assert ct.getDerivationMethod()==XSType.EXTENSION; // base type is a simple type XSSimpleType baseType = ct.getBaseType().asSimpleType(); // determine the binding of this complex type. builder.recordBindingMode(ct,ComplexTypeBindingMode.NORMAL); simpleTypeBuilder.refererStack.push(ct); TypeUse use = simpleTypeBuilder.build(baseType); simpleTypeBuilder.refererStack.pop(); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p = prop.createValueProperty("Value",false,baseType,use, BGMBuilder.getName(baseType)); selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }
public void build(XSComplexType ct) { assert ct.getDerivationMethod()==XSType.EXTENSION; // base type is a simple type XSSimpleType baseType = ct.getBaseType().asSimpleType(); // determine the binding of this complex type. builder.recordBindingMode(ct,ComplexTypeBindingMode.NORMAL); simpleTypeBuilder.refererStack.push(ct); TypeUse use = simpleTypeBuilder.build(baseType); simpleTypeBuilder.refererStack.pop(); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p = prop.createValueProperty("Value",false,baseType,use, BGMBuilder.getName(baseType)); selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }
public void build(XSComplexType ct) { assert ct.getDerivationMethod()==XSType.EXTENSION; // base type is a simple type XSSimpleType baseType = ct.getBaseType().asSimpleType(); // determine the binding of this complex type. builder.recordBindingMode(ct,ComplexTypeBindingMode.NORMAL); simpleTypeBuilder.refererStack.push(ct); TypeUse use = simpleTypeBuilder.build(baseType); simpleTypeBuilder.refererStack.pop(); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p = prop.createValueProperty("Value",false,baseType,use, BGMBuilder.getName(baseType)); selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }
public void build(XSComplexType ct) { assert ct.getDerivationMethod()==XSType.EXTENSION; // base type is a simple type XSSimpleType baseType = ct.getBaseType().asSimpleType(); // determine the binding of this complex type. builder.recordBindingMode(ct,ComplexTypeBindingMode.NORMAL); simpleTypeBuilder.refererStack.push(ct); TypeUse use = simpleTypeBuilder.build(baseType); simpleTypeBuilder.refererStack.pop(); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p = prop.createValueProperty("Value",false,baseType,use, BGMBuilder.getName(baseType)); selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }
private void processTermElement(XSParticle particle, JFieldVar fieldVar, XSElementDecl element, List<FacetCustomization> customizations) { final int minOccurs = getOccursValue("minOccurs", particle); XSType elementType = element.getType(); if (elementType.isComplexType()) { validAnnotate(fieldVar); if (!element.isNillable() && minOccurs > 0) { notNullAnnotate(fieldVar); } if (elementType.getBaseType().isSimpleType()) { processSimpleType(particle, elementType.getBaseType().asSimpleType(), fieldVar, customizations); } } else { processSimpleType(particle, elementType.asSimpleType(), fieldVar, customizations); } }
public void build(XSComplexType ct) { assert ct.getDerivationMethod()==XSType.EXTENSION; // base type is a simple type XSSimpleType baseType = ct.getBaseType().asSimpleType(); // determine the binding of this complex type. builder.recordBindingMode(ct,ComplexTypeBindingMode.NORMAL); simpleTypeBuilder.refererStack.push(ct); TypeUse use = simpleTypeBuilder.build(baseType); simpleTypeBuilder.refererStack.pop(); BIProperty prop = BIProperty.getCustomization(ct); CPropertyInfo p = prop.createValueProperty("Value",false,baseType,use, BGMBuilder.getName(baseType)); selector.getCurrentBean().addProperty(p); // adds attributes and we are through. green.attContainer(ct); }
private void convertElement(String mainURI, XSElementDecl element, OntClass parent) { XSType elementType = element.getType(); String URI = getURI(mainURI, element); OntClass elementClass = null; if (element.isGlobal()) { if (elementType.isSimpleType()) { elementClass = convertSimpleType(mainURI, elementType.asSimpleType(), URI); } else if (elementType.isComplexType()) { elementClass = convertComplexType(mainURI, elementType.asComplexType(), URI); } } XSElementDecl subs = element.getSubstAffiliation(); if (subs != null && elementClass != null) { OntClass subsClass = ontology.createClass(getURI(mainURI, subs)); LOGGER.debug("Adding superclass: {}", subsClass); subsClass.addSubClass(elementClass); } } // mainURI is schema-specific
xs = xs.getBaseType().asSimpleType(); if (xs != null) { baseTypeName = xs.getName();
private void interpretElement(XSElementDecl el, XSSchemaSet sset) { XSComplexType cType; XSSimpleType xs; if (el.getType() instanceof XSComplexType && el.getType() != sset.getAnyType()) { cType = (XSComplexType) el.getType(); processComplexType(cType, el.getName(), sset); } else if (el.getType() instanceof XSSimpleType && el.getType() != sset.getAnySimpleType()) { xs = el.getType().asSimpleType(); processSimpleType(xs, el.getName()); } }
facets.initFacets(restriction); XSSimpleType baseType = restriction.getBaseType().asSimpleType(); String baseURI = getURI(mainURI, baseType);
addSimpleType(element.getName(), element.getType().asSimpleType(), parseContext, ElementType.ELEMENT);