Java Code Examples for com.sun.xml.bind.v2.model.core.ID#NONE
The following examples show how to use
com.sun.xml.bind.v2.model.core.ID#NONE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CExternalLeafInfo.java From hyperjaxb3 with BSD 2-Clause "Simplified" License | 4 votes |
public ID idUse() { return ID.NONE; }
Example 2
Source File: WrapSingleHeteroReference.java From hyperjaxb3 with BSD 2-Clause "Simplified" License | 4 votes |
protected Collection<CPropertyInfo> createElementProperties( ProcessModel context, final CReferencePropertyInfo propertyInfo) { Set<CElement> elements = context.getGetTypes().getElements(context, propertyInfo); final Collection<CPropertyInfo> properties = new ArrayList<CPropertyInfo>( elements.size()); for (CElement element : elements) { final CElementPropertyInfo itemPropertyInfo = new CElementPropertyInfo( propertyInfo.getName(true) + ((CClassInfo) propertyInfo.parent()).model .getNameConverter().toPropertyName( element.getElementName() .getLocalPart()), CollectionMode.NOT_REPEATED, ID.NONE, propertyInfo.getExpectedMimeType(), propertyInfo.getSchemaComponent(), new CCustomizations(CustomizationUtils .getCustomizations(propertyInfo)), propertyInfo.getLocator(), false); if (element instanceof CElementInfo) { final CElementInfo elementInfo = (CElementInfo) element; if (!elementInfo.getSubstitutionMembers().isEmpty()) { logger.error("[" + ((CClassInfo) propertyInfo.parent()).getName() + "." + propertyInfo.getName(true) + "] is a single hetero reference containing element [" + elementInfo.getSqueezedName() + "] which is a substitution group head. See issue #95."); } else { itemPropertyInfo.getTypes().addAll( context.getGetTypes().getTypes(context, ((CElementInfo) element).getProperty())); itemPropertyInfo.realization = new FieldRenderer() { public FieldOutline generate( ClassOutlineImpl classOutline, CPropertyInfo p) { SingleWrappingReferenceElementInfoField field = new SingleWrappingReferenceElementInfoField( classOutline, p, propertyInfo, elementInfo); field.generateAccessors(); return field; } }; Customizations.markGenerated(itemPropertyInfo); properties.add(itemPropertyInfo); } } else if (element instanceof CClassInfo) { final CClassInfo classInfo = (CClassInfo) element; final QName elementName = classInfo.getElementName(); final QName typeName = classInfo.getTypeName(); final CTypeRef typeRef = new CTypeRef(classInfo, elementName, typeName, false, null); itemPropertyInfo.realization = new FieldRenderer() { public FieldOutline generate(ClassOutlineImpl classOutline, CPropertyInfo p) { SingleWrappingClassInfoField field = new SingleWrappingClassInfoField( classOutline, p, propertyInfo, classInfo); field.generateAccessors(); return field; } }; itemPropertyInfo.getTypes().add(typeRef); Customizations.markGenerated(itemPropertyInfo); properties.add(itemPropertyInfo); } else if (element instanceof CClassRef) { final CClassRef classRef = (CClassRef) element; logger.error("CClassRef elements are not supported yet."); logger.error("[" + ((CClassInfo) propertyInfo.parent()).getName() + "." + propertyInfo.getName(true) + "] is a single hetero reference containing unsupported CClassRef element [" + classRef.fullName() + "]. See issue #94."); } } return properties; }
Example 3
Source File: WrapSingleHeteroElement.java From hyperjaxb3 with BSD 2-Clause "Simplified" License | 4 votes |
protected Collection<CPropertyInfo> createTypeProperties( final ProcessModel context, final CElementPropertyInfo propertyInfo) { final Collection<? extends CTypeRef> types = context.getGetTypes().getTypes(context, propertyInfo); // Set<CElement> elements = propertyInfo.getElements(); final Collection<CPropertyInfo> properties = new ArrayList<CPropertyInfo>( types.size()); for (final CTypeRef type : types) { final CElementPropertyInfo itemPropertyInfo = new CElementPropertyInfo( propertyInfo.getName(true) + ((CClassInfo) propertyInfo.parent()).model .getNameConverter().toPropertyName( type.getTagName().getLocalPart()), CollectionMode.NOT_REPEATED, ID.NONE, propertyInfo .getExpectedMimeType(), propertyInfo .getSchemaComponent(), new CCustomizations(CustomizationUtils .getCustomizations(propertyInfo)), propertyInfo .getLocator(), false); itemPropertyInfo.getTypes().add(type); itemPropertyInfo.realization = new FieldRenderer() { public FieldOutline generate(ClassOutlineImpl classOutline, CPropertyInfo p) { final SingleWrappingElementField field = new SingleWrappingElementField( classOutline, p, propertyInfo, type); field.generateAccessors(); return field; } }; Customizations.markGenerated(itemPropertyInfo); properties.add(itemPropertyInfo); Collection<CPropertyInfo> newProperties = context .getProcessPropertyInfos().process(context, itemPropertyInfo); if (newProperties != null) { properties.addAll(newProperties); } } return properties; }