public XJCCMElementInfoOrigin(CElementInfo source) { super(source); component = source.getSchemaComponent() != null ? source .getSchemaComponent() : source.getProperty() .getSchemaComponent(); }
public XJCCMElementTypeRefOrigin(CElementPropertyInfo source, CTypeRef typeRef) { super(source, typeRef); final XSComponent schemaComponent = source.getSchemaComponent(); if (schemaComponent != null) { final FindXSElementDeclVisitor visitor = new FindXSElementDeclVisitor( typeRef.getTagName()); schemaComponent.visit(visitor); this.component = visitor.getElementDecl(); } else { this.component = null; } }
/** * Processes an xsd element. * <p> * Example: * <xsd:element name="someCollection" minOccurs="1" maxOccurs="unbounded"/> */ private void processElement(CElementPropertyInfo propertyInfo, ClassOutline co, List<FacetCustomization> customizations) { XSParticle particle = (XSParticle) propertyInfo.getSchemaComponent(); JFieldVar fieldVar = co.implClass.fields().get(propertyInfo.getName(false)); processMinMaxOccurs(particle, fieldVar); XSTerm term = particle.getTerm(); if (term instanceof XSElementDecl) { processTermElement(particle, fieldVar, (XSElementDecl) term, customizations); // When a complex type resides inside another complex type and thus gets lazily loaded or processed. } else if (term instanceof DelayedRef.Element) { processTermElement(particle, fieldVar, ((DelayedRef.Element) term).get(), customizations); } }
/** * Processes an xsd element. * <p> * Example: * <xsd:element name="someCollection" minOccurs="1" maxOccurs="unbounded"/> */ private void processElement(CElementPropertyInfo propertyInfo, ClassOutline co, List<FacetCustomization> customizations) { XSParticle particle = (XSParticle) propertyInfo.getSchemaComponent(); JFieldVar fieldVar = co.implClass.fields().get(propertyInfo.getName(false)); processMinMaxOccurs(particle, fieldVar); XSTerm term = particle.getTerm(); if (term instanceof XSElementDecl) processTermElement(fieldVar, (XSElementDecl) term, customizations); // When a complex type resides inside another complex type and thus gets lazily loaded or processed. else if (term instanceof DelayedRef.Element) processTermElement(fieldVar, ((DelayedRef.Element) term).get(), customizations); }
public CPropertyInfo onElement( CElementPropertyInfo propertyInfo) { final CElementPropertyInfo elementPropertyInfo = new CElementPropertyInfo( propertyInfo.getName(true), propertyInfo.isCollection() ? CollectionMode.REPEATED_ELEMENT : CollectionMode.NOT_REPEATED, propertyInfo.id(), propertyInfo .getExpectedMimeType(), propertyInfo.getSchemaComponent(), new CCustomizations(), (Locator) null, false); elementPropertyInfo.getTypes().addAll( context.getGetTypes().getTypes(context, propertyInfo)); return elementPropertyInfo; }
public CPropertyInfo onElement( CElementPropertyInfo propertyInfo) { final CElementPropertyInfo elementPropertyInfo = new CElementPropertyInfo( propertyInfo.getName(true), propertyInfo.isCollection() ? CollectionMode.REPEATED_ELEMENT : CollectionMode.NOT_REPEATED, propertyInfo.id(), propertyInfo .getExpectedMimeType(), propertyInfo.getSchemaComponent(), new CCustomizations(), (Locator) null, false); elementPropertyInfo.getTypes().addAll( context.getGetTypes().getTypes(context, propertyInfo)); return elementPropertyInfo; }
CollectionMode.NOT_REPEATED, ID.NONE, propertyInfo .getExpectedMimeType(), propertyInfo .getSchemaComponent(), new CCustomizations(CustomizationUtils .getCustomizations(propertyInfo)), propertyInfo
CollectionMode.NOT_REPEATED, ID.NONE, propertyInfo .getExpectedMimeType(), propertyInfo .getSchemaComponent(), new CCustomizations(CustomizationUtils .getCustomizations(propertyInfo)), propertyInfo
"Item", CollectionMode.NOT_REPEATED, ID.NONE, wrappedPropertyInfo.getExpectedMimeType(), wrappedPropertyInfo .getSchemaComponent(), new CCustomizations( CustomizationUtils .getCustomizations(wrappedPropertyInfo)),
"Item", CollectionMode.NOT_REPEATED, ID.NONE, wrappedPropertyInfo.getExpectedMimeType(), wrappedPropertyInfo .getSchemaComponent(), new CCustomizations( CustomizationUtils .getCustomizations(wrappedPropertyInfo)),
"Item", CollectionMode.NOT_REPEATED, wrappedPropertyInfo.id(), wrappedPropertyInfo.getExpectedMimeType(), wrappedPropertyInfo.getSchemaComponent(), new CCustomizations( CustomizationUtils .getCustomizations(wrappedPropertyInfo)),
"Item", CollectionMode.NOT_REPEATED, wrappedPropertyInfo.id(), wrappedPropertyInfo.getExpectedMimeType(), wrappedPropertyInfo.getSchemaComponent(), new CCustomizations( CustomizationUtils .getCustomizations(wrappedPropertyInfo)),
XSComponent schemaComponent = property.getSchemaComponent(); ParticleImpl particle = (ParticleImpl) schemaComponent;