public void simpleType(XSSimpleType type) { SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class); stb.refererStack.push(type); // referer is itself createSimpleTypeProperty(type,"Value"); stb.refererStack.pop(); }
public void simpleType(XSSimpleType type) { SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class); stb.refererStack.push(type); // referer is itself createSimpleTypeProperty(type,"Value"); stb.refererStack.pop(); }
private TypeUse bindAttDecl(XSAttributeDecl decl) { SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class); stb.refererStack.push( decl ); try { return stb.build(decl.getType()); } finally { stb.refererStack.pop(); } }
public void elementDecl(XSElementDecl e) { SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class); stb.refererStack.push(e); // referer is element builder.ying(e.getType(),e); stb.refererStack.pop(); }
public void onSetOwner() { super.onSetOwner(); if(!Ring.get(Model.class).options.pluginURIs.contains(element.getNamespaceURI())) markAsAcknowledged(); }
private void _build() { // do the binding buildContents(); getClassSelector().executeTasks(); // additional error check // Reports unused customizations to the user as errors. Ring.get(UnusedCustomizationChecker.class).run(); Ring.get(ModelChecker.class).check(); for( Plugin ma : activePlugins ) ma.postProcessModel(model, Ring.get(ErrorReceiver.class)); }
/** * Find all types that refer to the given complex type. */ public Set<XSComponent> getReferer(XSType c) { if(refFinder==null) { refFinder = new RefererFinder(); refFinder.schemaSet(Ring.get(XSSchemaSet.class)); } return refFinder.getReferer(c); }
/** * If the given component has {@link BIInlineBinaryData} customization, * reflect that to the specified property. */ public static void handle(XSComponent source, CPropertyInfo prop) { BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class); if(inline!=null) { prop.inlineBinaryData = true; inline.markAsAcknowledged(); } }
JDefinedClass getClazz(ClassType t) { if (clazz != null) return clazz; try { JCodeModel codeModel = Ring.get(JCodeModel.class); clazz = codeModel._class(name, t); clazz.hide(); return clazz; } catch (JClassAlreadyExistsException e) { return e.getExistingClass(); } } }
/** * If the given component has {@link BIInlineBinaryData} customization, * reflect that to the specified property. */ public static void handle(XSComponent source, CPropertyInfo prop) { BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class); if(inline!=null) { prop.inlineBinaryData = true; inline.markAsAcknowledged(); } }
JDefinedClass getClazz(ClassType t) { if (clazz != null) return clazz; try { JCodeModel codeModel = Ring.get(JCodeModel.class); clazz = codeModel._class(name, t); clazz.hide(); return clazz; } catch (JClassAlreadyExistsException e) { return e.getExistingClass(); } } }
/** * If the given component has {@link BIInlineBinaryData} customization, * reflect that to the specified property. */ public static void handle(XSComponent source, CPropertyInfo prop) { BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class); if(inline!=null) { prop.inlineBinaryData = true; inline.markAsAcknowledged(); } }
/** * If the given component has {@link BIInlineBinaryData} customization, * reflect that to the specified property. */ public static void handle(XSComponent source, CPropertyInfo prop) { BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class); if(inline!=null) { prop.inlineBinaryData = true; inline.markAsAcknowledged(); } }
/** * Find all types that refer to the given complex type. */ public Set<XSComponent> getReferer(XSType c) { if(refFinder==null) { refFinder = new RefererFinder(); refFinder.schemaSet(Ring.get(XSSchemaSet.class)); } return refFinder.getReferer(c); }
/** * Find all types that refer to the given complex type. */ public Set<XSComponent> getReferer(XSType c) { if(refFinder==null) { refFinder = new RefererFinder(); refFinder.schemaSet(Ring.get(XSSchemaSet.class)); } return refFinder.getReferer(c); }
public ClassSelector() { classBinder = new Abstractifier(new DefaultClassBinder()); Ring.add(ClassBinder.class,classBinder); classScopes.push(null); // so that the getClassFactory method returns null XSComplexType anyType = Ring.get(XSSchemaSet.class).getComplexType(WellKnownNamespace.XML_SCHEMA,"anyType"); bindMap.put(anyType,new Binding(anyType,CBuiltinLeafInfo.ANYTYPE)); }
protected final void createSimpleTypeProperty(XSSimpleType type,String propName) { BIProperty prop = BIProperty.getCustomization(type); SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class); // since we are building the simple type here, use buildDef CPropertyInfo p = prop.createValueProperty(propName,false,type,stb.buildDef(type),BGMBuilder.getName(type)); getCurrentBean().addProperty(p); }
public TypeUse getTypeUse(XSSimpleType owner) { if(typeUse!=null) return typeUse; JCodeModel cm = getCodeModel(); if(inMemoryType==null) inMemoryType = TypeUtil.getType(cm,type,Ring.get(ErrorReceiver.class),getLocation()); JDefinedClass adapter = generateAdapter(parseMethodFor(owner),printMethodFor(owner),owner); // XmlJavaType customization always converts between string and an user-defined type. typeUse = TypeUseFactory.adapt(CBuiltinLeafInfo.STRING,new CAdapter(adapter)); return typeUse; }