/** * Sets the owner schema component and a reference to BGMBuilder. * This method is called from the BGMBuilder before * any BIDeclaration inside it is used. */ public void setOwner( BGMBuilder _builder, XSComponent _owner ) { this.owner = _owner; this.builder = _builder; for (BIDeclaration d : decls) d.onSetOwner(); } public XSComponent getOwner() { return owner; }
/** Adds a new declaration. */ public void addDecl( BIDeclaration decl ) { if(decl==null) throw new IllegalArgumentException(); decl.setParent(this); decls.add(decl); }
private void check(BIDeclaration decl, XSComponent c) { if( !decl.isAcknowledged() ) { getErrorReporter().error( decl.getLocation(), Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION, decl.getName().getLocalPart() ); getErrorReporter().error( c.getLocator(), Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION); // mark it as acknowledged to avoid // duplicated error messages. decl.markAsAcknowledged(); } for (BIDeclaration d : decl.getChildren()) check(d,c); }
/** Reports an error if there are more than one jaxb:schemaBindings customization. */ private void checkMultipleSchemaBindings( XSSchema schema ) { ArrayList<Locator> locations = new ArrayList<Locator>(); BindInfo bi = getBindInfo(schema); for( BIDeclaration bid : bi ) { if( bid.getName()==BISchemaBinding.NAME ) locations.add( bid.getLocation() ); } if(locations.size()<=1) return; // OK // error getErrorReporter().error( locations.get(0), Messages.ERR_MULTIPLE_SCHEMA_BINDINGS, schema.getTargetNamespace() ); for( int i=1; i<locations.size(); i++ ) getErrorReporter().error( (Locator)locations.get(i), Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION); }
private static BIDeclaration hasAnnotation(XSAnnotation annotation, QName qname) { if (annotation == null) { return null; } Object object = annotation.getAnnotation(); if (!(object instanceof BindInfo)) { return null; } BindInfo info = (BindInfo) object; BIDeclaration[] declarations = info.getDecls(); if (declarations == null) { return null; } for (BIDeclaration declaration : declarations) { if (qname.equals(declaration.getName())) { return declaration; } } return null; }
private void check(BIDeclaration decl, XSComponent c) { if( !decl.isAcknowledged() ) { getErrorReporter().error( decl.getLocation(), Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION, decl.getName().getLocalPart() ); getErrorReporter().error( c.getLocator(), Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION); // mark it as acknowledged to avoid // duplicated error messages. decl.markAsAcknowledged(); } for (BIDeclaration d : decl.getChildren()) check(d,c); }
/** Reports an error if there are more than one jaxb:schemaBindings customization. */ private void checkMultipleSchemaBindings( XSSchema schema ) { ArrayList<Locator> locations = new ArrayList<Locator>(); BindInfo bi = getBindInfo(schema); for( BIDeclaration bid : bi ) { if( bid.getName()==BISchemaBinding.NAME ) locations.add( bid.getLocation() ); } if(locations.size()<=1) return; // OK // error getErrorReporter().error( locations.get(0), Messages.ERR_MULTIPLE_SCHEMA_BINDINGS, schema.getTargetNamespace() ); for( int i=1; i<locations.size(); i++ ) getErrorReporter().error( (Locator)locations.get(i), Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION); }
private void check(BIDeclaration decl, XSComponent c) { if( !decl.isAcknowledged() ) { getErrorReporter().error( decl.getLocation(), Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION, decl.getName().getLocalPart() ); getErrorReporter().error( c.getLocator(), Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION); // mark it as acknowledged to avoid // duplicated error messages. decl.markAsAcknowledged(); } for (BIDeclaration d : decl.getChildren()) check(d,c); }
/** Reports an error if there are more than one jaxb:schemaBindings customization. */ private void checkMultipleSchemaBindings( XSSchema schema ) { ArrayList<Locator> locations = new ArrayList<Locator>(); BindInfo bi = getBindInfo(schema); for( BIDeclaration bid : bi ) { if( bid.getName()==BISchemaBinding.NAME ) locations.add( bid.getLocation() ); } if(locations.size()<=1) return; // OK // error getErrorReporter().error( locations.get(0), Messages.ERR_MULTIPLE_SCHEMA_BINDINGS, schema.getTargetNamespace() ); for( int i=1; i<locations.size(); i++ ) getErrorReporter().error( (Locator)locations.get(i), Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION); }
/** Adds a new declaration. */ public void addDecl( BIDeclaration decl ) { if(decl==null) throw new IllegalArgumentException(); decl.setParent(this); decls.add(decl); }
/** * Sets the owner schema component and a reference to BGMBuilder. * This method is called from the BGMBuilder before * any BIDeclaration inside it is used. */ public void setOwner( BGMBuilder _builder, XSComponent _owner ) { this.owner = _owner; this.builder = _builder; for (BIDeclaration d : decls) d.onSetOwner(); } public XSComponent getOwner() { return owner; }
private void check(BIDeclaration decl, XSComponent c) { if( !decl.isAcknowledged() ) { getErrorReporter().error( decl.getLocation(), Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION, decl.getName().getLocalPart() ); getErrorReporter().error( c.getLocator(), Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION); // mark it as acknowledged to avoid // duplicated error messages. decl.markAsAcknowledged(); } for (BIDeclaration d : decl.getChildren()) check(d,c); }
/** Reports an error if there are more than one jaxb:schemaBindings customization. */ private void checkMultipleSchemaBindings( XSSchema schema ) { ArrayList<Locator> locations = new ArrayList<Locator>(); BindInfo bi = getBindInfo(schema); for( BIDeclaration bid : bi ) { if( bid.getName()==BISchemaBinding.NAME ) locations.add( bid.getLocation() ); } if(locations.size()<=1) return; // OK // error getErrorReporter().error( locations.get(0), Messages.ERR_MULTIPLE_SCHEMA_BINDINGS, schema.getTargetNamespace() ); for( int i=1; i<locations.size(); i++ ) getErrorReporter().error( (Locator)locations.get(i), Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION); }
/** Adds a new declaration. */ public void addDecl( BIDeclaration decl ) { if(decl==null) throw new IllegalArgumentException(); decl.setParent(this); decls.add(decl); }
/** * Sets the owner schema component and a reference to BGMBuilder. * This method is called from the BGMBuilder before * any BIDeclaration inside it is used. */ public void setOwner( BGMBuilder _builder, XSComponent _owner ) { this.owner = _owner; this.builder = _builder; for (BIDeclaration d : decls) d.onSetOwner(); } public XSComponent getOwner() { return owner; }
private void check(BIDeclaration decl, XSComponent c) { if( !decl.isAcknowledged() ) { getErrorReporter().error( decl.getLocation(), Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION, decl.getName().getLocalPart() ); getErrorReporter().error( c.getLocator(), Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION); // mark it as acknowledged to avoid // duplicated error messages. decl.markAsAcknowledged(); } for (BIDeclaration d : decl.getChildren()) check(d,c); }
/** Reports an error if there are more than one jaxb:schemaBindings customization. */ private void checkMultipleSchemaBindings( XSSchema schema ) { ArrayList<Locator> locations = new ArrayList<Locator>(); BindInfo bi = getBindInfo(schema); for( BIDeclaration bid : bi ) { if( bid.getName()==BISchemaBinding.NAME ) locations.add( bid.getLocation() ); } if(locations.size()<=1) return; // OK // error getErrorReporter().error( locations.get(0), Messages.ERR_MULTIPLE_SCHEMA_BINDINGS, schema.getTargetNamespace() ); for( int i=1; i<locations.size(); i++ ) getErrorReporter().error( (Locator)locations.get(i), Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION); }
/** Adds a new declaration. */ public void addDecl( BIDeclaration decl ) { if(decl==null) throw new IllegalArgumentException(); decl.setParent(this); decls.add(decl); }
/** * Sets the owner schema component and a reference to BGMBuilder. * This method is called from the BGMBuilder before * any BIDeclaration inside it is used. */ public void setOwner( BGMBuilder _builder, XSComponent _owner ) { this.owner = _owner; this.builder = _builder; for (BIDeclaration d : decls) d.onSetOwner(); } public XSComponent getOwner() { return owner; }
/** Adds a new declaration. */ public void addDecl( BIDeclaration decl ) { if(decl==null) throw new IllegalArgumentException(); decl.setParent(this); decls.add(decl); }