/** * Generate any inner classes of this class. * * @param verbose Flag * @param builder class source file builder */ protected void generateInner(boolean verbose, SourceBuilder builder) { for (int i = 0; i < m_inners.size(); i++) { ((ClassHolder)m_inners.get(i)).generate(verbose, builder); } }
/** * Recursively check that each schema customization has been matched to a schema. A warning is generated for any * customization without a matching schema. * * @param vctx */ public void checkSchemas(ValidationContext vctx) { // check for unique match to schema customization for (int i = 0; i < getChildren().size(); i++) { SchemaRootBase child = (SchemaRootBase)getChildren().get(i); if (child instanceof SchemaCustom) { SchemaCustom custom = (SchemaCustom)child; if (custom.getSchema() == null) { StringBuffer buff = new StringBuffer("No schema loaded for customization"); if (custom.getName() != null) { buff.append(" with name "); buff.append(custom.getName()); } else if (custom.getNamespace() != null) { buff.append(" with namespace "); buff.append(custom.getNamespace()); } vctx.addWarning(buff.toString(), custom); } } else if (child instanceof SchemasetCustom) { ((SchemasetCustom)child).checkSchemas(vctx); } } }
Object child = childs.get(i); if (child instanceof SchemaCustom) { String name = ((SchemaCustom)child).getName();
/** * Validate and finalize customization information. This override of the base class implementation also invokes the * same method on any nested schemasets in order to make sure that the type substitution map and active facets mask * will be available for use by nested schemas. * * @param vctx validation context * @return <code>true</code> if valid, <code>false</code> if not */ public boolean validate(ValidationContext vctx) { boolean valid = super.validate(vctx); if (valid) { LazyList children = getChildren(); for (int i = 0; i < children.size(); i++) { Object child = children.get(i); if (child instanceof SchemasetCustom) { if (!((SchemasetCustom)child).validate(vctx)) { valid = false; } } } } return valid; }
SchemaRootBase child = (SchemaRootBase)getChildren().get(i); if (child instanceof SchemaCustom && ((SchemaCustom)child).checkMatch(name, schema)) { if (custom == null) {
ComponentCustom custom = (ComponentCustom)getChildren().get(i); SchemaPath path = custom.buildPath(vctx); if (path != null) {
/** * Recursively add all inner enumeration classes as formats to a <mapping> definition. This is used to create the * <format> elements for all nested enumerations, which need to be direct children of the <mapping> element * for the top-level class. * * @param mapping Mapping */ private void addInnerFormats(MappingElementBase mapping) { for (int i = 0; i < m_inners.size(); i++) { ClassHolder inner = (ClassHolder)m_inners.get(i); if (inner.isSimpleValue()) { FormatElement format = new FormatElement(); format.setTypeName(inner.getBindingName()); ((EnumerationClassHolder)inner).setBinding(format); mapping.addTopChild(format); } else { ((StructureClassHolder)inner).addInnerFormats(mapping); } } }
ComponentCustom child = (ComponentCustom)childs.get(i); SchemaPath path = child.buildPath(vctx); if (path != null) {
String name = schema.getResolver().getName(); for (int i = 0; i < childs.size(); i++) { Object child = childs.get(i); if (child instanceof SchemasetCustom) { SchemasetCustom schemaset = (SchemasetCustom)child;
String name = schema.getResolver().getName(); for (int i = 0; i < childs.size(); i++) { Object child = childs.get(i); if (child instanceof SchemasetCustom) { SchemasetCustom schemaset = (SchemasetCustom)child;