MutableItemDefinition definition; if (isPropertyContainer(xsElementDecl) || isObjectDefinition(xsType)) { ComplexTypeDefinition complexTypeDefinition = findComplexTypeDefinition(typeQName); if (complexTypeDefinition == null) {
@SuppressWarnings({ "rawtypes", "unchecked" }) private MutablePrismContainerDefinition<?> createPropertyContainerDefinition(XSType xsType, XSElementDecl elementDecl, ComplexTypeDefinition complexTypeDefinition, XSAnnotation annotation, XSParticle elementParticle, boolean topLevel) throws SchemaException { QName elementName = new QName(elementDecl.getTargetNamespace(), elementDecl.getName()); MutablePrismContainerDefinition<?> pcd; SchemaDefinitionFactory definitionFactory = getDefinitionFactory(); Class compileTimeClass = null; if (getSchemaRegistry() != null && complexTypeDefinition != null) { compileTimeClass = getSchemaRegistry().determineCompileTimeClass(complexTypeDefinition.getTypeName()); } if (isObjectDefinition(xsType)) { pcd = definitionFactory.createObjectDefinition(elementName, complexTypeDefinition, prismContext, compileTimeClass); // Multiplicity is fixed to a single-value here pcd.setMinOccurs(1); pcd.setMaxOccurs(1); } else { pcd = definitionFactory.createContainerDefinition(elementName, complexTypeDefinition, prismContext, compileTimeClass); setMultiplicity(pcd, elementParticle, elementDecl.getAnnotation(), topLevel); } markRuntime(pcd); parseItemDefinitionAnnotations(pcd, annotation); parseItemDefinitionAnnotations(pcd, elementDecl.getAnnotation()); if (elementParticle != null) { parseItemDefinitionAnnotations(pcd, elementParticle.getAnnotation()); } return pcd; }
particleInherited); } else if (isObjectDefinition(xsType)) {
if (isObjectDefinition(complexType)) { ctd.setObjectMarker(true);