/** * Creates appropriate instance of PropertyContainerDefinition. It may be * PropertyContainerDefinition itself or one of its subclasses * (ResourceObjectDefinition). This method also takes care of parsing all * the annotations and similar fancy stuff. * * We need to pass createResourceObject flag explicitly here. Because even * if we are in resource schema, we want PropertyContainers inside * ResourceObjects, not ResourceObjects inside ResouceObjects. */ private PrismContainerDefinition<?> createPropertyContainerDefinition(XSType xsType, XSParticle elementParticle, ComplexTypeDefinition complexTypeDefinition, XSAnnotation annotation, boolean topLevel) throws SchemaException { XSTerm elementTerm = elementParticle.getTerm(); XSElementDecl elementDecl = elementTerm.asElementDecl(); PrismContainerDefinition<?> pcd = createPropertyContainerDefinition(xsType, elementDecl, complexTypeDefinition, annotation, elementParticle, topLevel); return pcd; }
ComplexTypeDefinition ctd = findComplexTypeDefinition(typeQName); return createPropertyContainerDefinition(xsType, xsElementDecl, ctd, annotation, null, true); }); } else { definition = createPropertyContainerDefinition( xsType, xsElementDecl, complexTypeDefinition, annotation, null, true);
if (isPropertyContainer(elementDecl)) { XSAnnotation containerAnnotation = xsType.getAnnotation(); PrismContainerDefinition<?> containerDefinition = createPropertyContainerDefinition( xsType, p, null, containerAnnotation, false); containerDefinition.toMutable().setInherited(particleInherited); PrismContainerDefinition<?> containerDefinition = createPropertyContainerDefinition( xsType, p, complexTypeDefinition, containerAnnotation, false);