/** * Creates a new instance of the binder the user can use to tune * configuration before parsing the XSD. * * @return a new instance of the XsdBinder */ public static XsdBinder newInstance() { return new XsdBinder(); }
/** * @param schema schema binding the type should be added to * @param type type definition to be bound * @deprecated <i>This method is added temporary to get anonymous type binding working in JBossWS. * It will be removed when anonymous type binding in JBossWS is implemented properly. * No one else should use this method.</i> * * <p>This method binds a type definition and adds it as a global type to the passed in schema binding. */ public static void bindType(SchemaBinding schema, XSTypeDefinition type) { XsdBinder binder = new XsdBinder(schema); TypeBinding typeBinding = binder.bindType(type); schema.addType(typeBinding); }
public static SchemaBinding bind(XSModel model, SchemaBindingResolver resolver, boolean processAnnotations) { XsdBinder binder = new XsdBinder(); binder.setProcessAnnotations(processAnnotations); binder.setSchemaResolver(resolver); return binder.parse(model); }
/** * @param schema schema binding the type should be added to * @param element element declaration to be bound * @param minOccurs * @param maxOccurs * @param maxOccursUnbounded * @deprecated <i>This method is added temporary to get anonymous type binding working in JBossWS. * It will be removed when anonymous type binding in JBossWS is implemented properly. * No one else should use this method.</i> * * <p>This method binds an element declaration and adds it as a global element to the passed in schema binding. */ public static void bindElement(SchemaBinding schema, XSElementDeclaration element, int minOccurs, int maxOccurs, boolean maxOccursUnbounded) { XsdBinder binder = new XsdBinder(schema); ParticleBinding particle = binder.bindElement(element, minOccurs, maxOccurs, maxOccursUnbounded ); schema.addElementParticle(particle); }