com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BindInfo Java Examples
The following examples show how to use
com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BindInfo.
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: BGMBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** 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); }
Example #2
Source File: SCDBasedBindingSet.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Applies the additional binding customizations. */ public void apply(XSSchemaSet schema, ErrorReceiver errorReceiver) { if(topLevel!=null) { this.errorReceiver = errorReceiver; Unmarshaller u = BindInfo.getCustomizationUnmarshaller(); this.unmarshaller = u.getUnmarshallerHandler(); ValidatorHandler v = BindInfo.bindingFileSchema.newValidator(); v.setErrorHandler(errorReceiver); loader = new ForkContentHandler(v,unmarshaller); topLevel.applyAll(schema.getSchemas()); this.loader = null; this.unmarshaller = null; this.errorReceiver = null; } }
Example #3
Source File: BGMBuilder.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** 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); }
Example #4
Source File: SCDBasedBindingSet.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Applies the additional binding customizations. */ public void apply(XSSchemaSet schema, ErrorReceiver errorReceiver) { if(topLevel!=null) { this.errorReceiver = errorReceiver; Unmarshaller u = BindInfo.getCustomizationUnmarshaller(); this.unmarshaller = u.getUnmarshallerHandler(); ValidatorHandler v = BindInfo.bindingFileSchema.newValidator(); v.setErrorHandler(errorReceiver); loader = new ForkContentHandler(v,unmarshaller); topLevel.applyAll(schema.getSchemas()); this.loader = null; this.unmarshaller = null; this.errorReceiver = null; } }
Example #5
Source File: BGMBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** 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); }
Example #6
Source File: SCDBasedBindingSet.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Applies the additional binding customizations. */ public void apply(XSSchemaSet schema, ErrorReceiver errorReceiver) { if(topLevel!=null) { this.errorReceiver = errorReceiver; Unmarshaller u = BindInfo.getCustomizationUnmarshaller(); this.unmarshaller = u.getUnmarshallerHandler(); ValidatorHandler v = BindInfo.bindingFileSchema.newValidator(); v.setErrorHandler(errorReceiver); loader = new ForkContentHandler(v,unmarshaller); topLevel.applyAll(schema.getSchemas()); this.loader = null; this.unmarshaller = null; this.errorReceiver = null; } }
Example #7
Source File: BGMBuilder.java From hottub with GNU General Public License v2.0 | 6 votes |
/** 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); }
Example #8
Source File: SCDBasedBindingSet.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Applies the additional binding customizations. */ public void apply(XSSchemaSet schema, ErrorReceiver errorReceiver) { if(topLevel!=null) { this.errorReceiver = errorReceiver; Unmarshaller u = BindInfo.getCustomizationUnmarshaller(); this.unmarshaller = u.getUnmarshallerHandler(); ValidatorHandler v = BindInfo.bindingFileSchema.newValidator(); v.setErrorHandler(errorReceiver); loader = new ForkContentHandler(v,unmarshaller); topLevel.applyAll(schema.getSchemas()); this.loader = null; this.unmarshaller = null; this.errorReceiver = null; } }
Example #9
Source File: BGMBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** 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); }
Example #10
Source File: SCDBasedBindingSet.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Applies the additional binding customizations. */ public void apply(XSSchemaSet schema, ErrorReceiver errorReceiver) { if(topLevel!=null) { this.errorReceiver = errorReceiver; Unmarshaller u = BindInfo.getCustomizationUnmarshaller(); this.unmarshaller = u.getUnmarshallerHandler(); ValidatorHandler v = BindInfo.bindingFileSchema.newValidator(); v.setErrorHandler(errorReceiver); loader = new ForkContentHandler(v,unmarshaller); topLevel.applyAll(schema.getSchemas()); this.loader = null; this.unmarshaller = null; this.errorReceiver = null; } }
Example #11
Source File: BGMBuilder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** 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); }
Example #12
Source File: SCDBasedBindingSet.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Applies the additional binding customizations. */ public void apply(XSSchemaSet schema, ErrorReceiver errorReceiver) { if(topLevel!=null) { this.errorReceiver = errorReceiver; Unmarshaller u = BindInfo.getCustomizationUnmarshaller(); this.unmarshaller = u.getUnmarshallerHandler(); ValidatorHandler v = BindInfo.bindingFileSchema.newValidator(); v.setErrorHandler(errorReceiver); loader = new ForkContentHandler(v,unmarshaller); topLevel.applyAll(schema.getSchemas()); this.loader = null; this.unmarshaller = null; this.errorReceiver = null; } }
Example #13
Source File: BGMBuilder.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** 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); }
Example #14
Source File: SCDBasedBindingSet.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Applies the additional binding customizations. */ public void apply(XSSchemaSet schema, ErrorReceiver errorReceiver) { if(topLevel!=null) { this.errorReceiver = errorReceiver; Unmarshaller u = BindInfo.getCustomizationUnmarshaller(); this.unmarshaller = u.getUnmarshallerHandler(); ValidatorHandler v = BindInfo.bindingFileSchema.newValidator(); v.setErrorHandler(errorReceiver); loader = new ForkContentHandler(v,unmarshaller); topLevel.applyAll(schema.getSchemas()); this.loader = null; this.unmarshaller = null; this.errorReceiver = null; } }
Example #15
Source File: BGMBuilder.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** 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); }
Example #16
Source File: SCDBasedBindingSet.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Applies the additional binding customizations. */ public void apply(XSSchemaSet schema, ErrorReceiver errorReceiver) { if(topLevel!=null) { this.errorReceiver = errorReceiver; Unmarshaller u = BindInfo.getCustomizationUnmarshaller(); this.unmarshaller = u.getUnmarshallerHandler(); ValidatorHandler v = BindInfo.bindingFileSchema.newValidator(); v.setErrorHandler(errorReceiver); loader = new ForkContentHandler(v,unmarshaller); topLevel.applyAll(schema.getSchemas()); this.loader = null; this.unmarshaller = null; this.errorReceiver = null; } }
Example #17
Source File: SimpleTypeBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Detect "javaType" customizations placed directly on simple types, rather * than being enclosed by "property" and "baseType" customizations (see * sec 6.8.1 of the spec). * * Report an error if any exist. */ private void detectJavaTypeCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIConversion conv = info.get(BIConversion.class); if( conv != null ) { // ack this conversion to prevent further error messages conv.markAsAcknowledged(); // report the error getErrorReporter().error( conv.getLocation(), Messages.ERR_UNNESTED_JAVATYPE_CUSTOMIZATION_ON_SIMPLETYPE ); } }
Example #18
Source File: SimpleTypeBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Detect "javaType" customizations placed directly on simple types, rather * than being enclosed by "property" and "baseType" customizations (see * sec 6.8.1 of the spec). * * Report an error if any exist. */ private void detectJavaTypeCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIConversion conv = info.get(BIConversion.class); if( conv != null ) { // ack this conversion to prevent further error messages conv.markAsAcknowledged(); // report the error getErrorReporter().error( conv.getLocation(), Messages.ERR_UNNESTED_JAVATYPE_CUSTOMIZATION_ON_SIMPLETYPE ); } }
Example #19
Source File: SimpleTypeBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Returns a javaType customization specified to the referer, if present. * @return can be null. */ private BIConversion getRefererCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIProperty prop = info.get(BIProperty.class); if(prop==null) return null; return prop.getConv(); }
Example #20
Source File: SimpleTypeBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Detect "javaType" customizations placed directly on simple types, rather * than being enclosed by "property" and "baseType" customizations (see * sec 6.8.1 of the spec). * * Report an error if any exist. */ private void detectJavaTypeCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIConversion conv = info.get(BIConversion.class); if( conv != null ) { // ack this conversion to prevent further error messages conv.markAsAcknowledged(); // report the error getErrorReporter().error( conv.getLocation(), Messages.ERR_UNNESTED_JAVATYPE_CUSTOMIZATION_ON_SIMPLETYPE ); } }
Example #21
Source File: SimpleTypeBuilder.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Detect "javaType" customizations placed directly on simple types, rather * than being enclosed by "property" and "baseType" customizations (see * sec 6.8.1 of the spec). * * Report an error if any exist. */ private void detectJavaTypeCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIConversion conv = info.get(BIConversion.class); if( conv != null ) { // ack this conversion to prevent further error messages conv.markAsAcknowledged(); // report the error getErrorReporter().error( conv.getLocation(), Messages.ERR_UNNESTED_JAVATYPE_CUSTOMIZATION_ON_SIMPLETYPE ); } }
Example #22
Source File: SimpleTypeBuilder.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Returns a javaType customization specified to the referer, if present. * @return can be null. */ private BIConversion getRefererCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIProperty prop = info.get(BIProperty.class); if(prop==null) return null; return prop.getConv(); }
Example #23
Source File: SimpleTypeBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Returns a javaType customization specified to the referer, if present. * @return can be null. */ private BIConversion getRefererCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIProperty prop = info.get(BIProperty.class); if(prop==null) return null; return prop.getConv(); }
Example #24
Source File: SimpleTypeBuilder.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Returns a javaType customization specified to the referer, if present. * @return can be null. */ private BIConversion getRefererCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIProperty prop = info.get(BIProperty.class); if(prop==null) return null; return prop.getConv(); }
Example #25
Source File: SimpleTypeBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Returns a javaType customization specified to the referer, if present. * @return can be null. */ private BIConversion getRefererCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIProperty prop = info.get(BIProperty.class); if(prop==null) return null; return prop.getConv(); }
Example #26
Source File: SimpleTypeBuilder.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Returns a javaType customization specified to the referer, if present. * @return can be null. */ private BIConversion getRefererCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIProperty prop = info.get(BIProperty.class); if(prop==null) return null; return prop.getConv(); }
Example #27
Source File: SimpleTypeBuilder.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Detect "javaType" customizations placed directly on simple types, rather * than being enclosed by "property" and "baseType" customizations (see * sec 6.8.1 of the spec). * * Report an error if any exist. */ private void detectJavaTypeCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIConversion conv = info.get(BIConversion.class); if( conv != null ) { // ack this conversion to prevent further error messages conv.markAsAcknowledged(); // report the error getErrorReporter().error( conv.getLocation(), Messages.ERR_UNNESTED_JAVATYPE_CUSTOMIZATION_ON_SIMPLETYPE ); } }
Example #28
Source File: SimpleTypeBuilder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Detect "javaType" customizations placed directly on simple types, rather * than being enclosed by "property" and "baseType" customizations (see * sec 6.8.1 of the spec). * * Report an error if any exist. */ private void detectJavaTypeCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIConversion conv = info.get(BIConversion.class); if( conv != null ) { // ack this conversion to prevent further error messages conv.markAsAcknowledged(); // report the error getErrorReporter().error( conv.getLocation(), Messages.ERR_UNNESTED_JAVATYPE_CUSTOMIZATION_ON_SIMPLETYPE ); } }
Example #29
Source File: SimpleTypeBuilder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Returns a javaType customization specified to the referer, if present. * @return can be null. */ private BIConversion getRefererCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIProperty prop = info.get(BIProperty.class); if(prop==null) return null; return prop.getConv(); }
Example #30
Source File: SimpleTypeBuilder.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Detect "javaType" customizations placed directly on simple types, rather * than being enclosed by "property" and "baseType" customizations (see * sec 6.8.1 of the spec). * * Report an error if any exist. */ private void detectJavaTypeCustomization() { BindInfo info = builder.getBindInfo(getReferer()); BIConversion conv = info.get(BIConversion.class); if( conv != null ) { // ack this conversion to prevent further error messages conv.markAsAcknowledged(); // report the error getErrorReporter().error( conv.getLocation(), Messages.ERR_UNNESTED_JAVATYPE_CUSTOMIZATION_ON_SIMPLETYPE ); } }