com.sun.tools.internal.xjc.model.Multiplicity Java Examples
The following examples show how to use
com.sun.tools.internal.xjc.model.Multiplicity.
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: MultiplicityCounter.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public Multiplicity modelGroup(XSModelGroup group) { boolean isChoice = group.getCompositor() == XSModelGroup.CHOICE; Multiplicity r = ZERO; for( XSParticle p : group.getChildren()) { Multiplicity m = particle(p); if(r==null) { r=m; continue; } if(isChoice) { r = Multiplicity.choice(r,m); } else { r = Multiplicity.group(r,m); } } return r; }
Example #2
Source File: MultiplicityCounter.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public Multiplicity modelGroup(XSModelGroup group) { boolean isChoice = group.getCompositor() == XSModelGroup.CHOICE; Multiplicity r = ZERO; for( XSParticle p : group.getChildren()) { Multiplicity m = particle(p); if(r==null) { r=m; continue; } if(isChoice) { r = Multiplicity.choice(r,m); } else { r = Multiplicity.group(r,m); } } return r; }
Example #3
Source File: MultiplicityCounter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public Multiplicity modelGroup(XSModelGroup group) { boolean isChoice = group.getCompositor() == XSModelGroup.CHOICE; Multiplicity r = ZERO; for( XSParticle p : group.getChildren()) { Multiplicity m = particle(p); if(r==null) { r=m; continue; } if(isChoice) { r = Multiplicity.choice(r,m); } else { r = Multiplicity.group(r,m); } } return r; }
Example #4
Source File: MultiplicityCounter.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public Multiplicity modelGroup(XSModelGroup group) { boolean isChoice = group.getCompositor() == XSModelGroup.CHOICE; Multiplicity r = ZERO; for( XSParticle p : group.getChildren()) { Multiplicity m = particle(p); if(r==null) { r=m; continue; } if(isChoice) { r = Multiplicity.choice(r,m); } else { r = Multiplicity.group(r,m); } } return r; }
Example #5
Source File: MultiplicityCounter.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public Multiplicity modelGroup(XSModelGroup group) { boolean isChoice = group.getCompositor() == XSModelGroup.CHOICE; Multiplicity r = ZERO; for( XSParticle p : group.getChildren()) { Multiplicity m = particle(p); if(r==null) { r=m; continue; } if(isChoice) { r = Multiplicity.choice(r,m); } else { r = Multiplicity.group(r,m); } } return r; }
Example #6
Source File: MultiplicityCounter.java From hottub with GNU General Public License v2.0 | 6 votes |
public Multiplicity modelGroup(XSModelGroup group) { boolean isChoice = group.getCompositor() == XSModelGroup.CHOICE; Multiplicity r = ZERO; for( XSParticle p : group.getChildren()) { Multiplicity m = particle(p); if(r==null) { r=m; continue; } if(isChoice) { r = Multiplicity.choice(r,m); } else { r = Multiplicity.group(r,m); } } return r; }
Example #7
Source File: MultiplicityCounter.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public Multiplicity modelGroup(XSModelGroup group) { boolean isChoice = group.getCompositor() == XSModelGroup.CHOICE; Multiplicity r = ZERO; for( XSParticle p : group.getChildren()) { Multiplicity m = particle(p); if(r==null) { r=m; continue; } if(isChoice) { r = Multiplicity.choice(r,m); } else { r = Multiplicity.group(r,m); } } return r; }
Example #8
Source File: MultiplicityCounter.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public Multiplicity modelGroup(XSModelGroup group) { boolean isChoice = group.getCompositor() == XSModelGroup.CHOICE; Multiplicity r = ZERO; for( XSParticle p : group.getChildren()) { Multiplicity m = particle(p); if(r==null) { r=m; continue; } if(isChoice) { r = Multiplicity.choice(r,m); } else { r = Multiplicity.group(r,m); } } return r; }
Example #9
Source File: RawTypeSetBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * @param optional * if this whole property is optional due to the * occurrence constraints on ancestors, set this to true. * this will prevent the primitive types to be generated. */ public static RawTypeSet build( XSParticle p, boolean optional ) { RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); rtsb.particle(p); Multiplicity mul = MultiplicityCounter.theInstance.particle(p); if(optional) mul = mul.makeOptional(); return new RawTypeSet(rtsb.refs,mul); }
Example #10
Source File: RawTypeSetBuilder.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * @param optional * if this whole property is optional due to the * occurrence constraints on ancestors, set this to true. * this will prevent the primitive types to be generated. */ public static RawTypeSet build( XSParticle p, boolean optional ) { RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); rtsb.particle(p); Multiplicity mul = MultiplicityCounter.theInstance.particle(p); if(optional) mul = mul.makeOptional(); return new RawTypeSet(rtsb.refs,mul); }
Example #11
Source File: RawTypeSetBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * @param optional * if this whole property is optional due to the * occurrence constraints on ancestors, set this to true. * this will prevent the primitive types to be generated. */ public static RawTypeSet build( XSParticle p, boolean optional ) { RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); rtsb.particle(p); Multiplicity mul = MultiplicityCounter.theInstance.particle(p); if(optional) mul = mul.makeOptional(); return new RawTypeSet(rtsb.refs,mul); }
Example #12
Source File: MultiplicityCounter.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public Multiplicity particle( XSParticle p ) { Multiplicity m = p.getTerm().apply(this); BigInteger max; if (m.max==null || (BigInteger.valueOf(XSParticle.UNBOUNDED).equals(p.getMaxOccurs()))) max=null; else max=p.getMaxOccurs(); return Multiplicity.multiply( m, Multiplicity.create(p.getMinOccurs(),max) ); }
Example #13
Source File: RawTypeSetBuilder.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * @param optional * if this whole property is optional due to the * occurrence constraints on ancestors, set this to true. * this will prevent the primitive types to be generated. */ public static RawTypeSet build( XSParticle p, boolean optional ) { RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); rtsb.particle(p); Multiplicity mul = MultiplicityCounter.theInstance.particle(p); if(optional) mul = mul.makeOptional(); return new RawTypeSet(rtsb.refs,mul); }
Example #14
Source File: MultiplicityCounter.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public Multiplicity particle( XSParticle p ) { Multiplicity m = p.getTerm().apply(this); BigInteger max; if (m.max==null || (BigInteger.valueOf(XSParticle.UNBOUNDED).equals(p.getMaxOccurs()))) max=null; else max=p.getMaxOccurs(); return Multiplicity.multiply( m, Multiplicity.create(p.getMinOccurs(),max) ); }
Example #15
Source File: MultiplicityCounter.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public Multiplicity particle( XSParticle p ) { Multiplicity m = p.getTerm().apply(this); BigInteger max; if (m.max==null || (BigInteger.valueOf(XSParticle.UNBOUNDED).equals(p.getMaxOccurs()))) max=null; else max=p.getMaxOccurs(); return Multiplicity.multiply( m, Multiplicity.create(p.getMinOccurs(),max) ); }
Example #16
Source File: RawTypeSetBuilder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * @param optional * if this whole property is optional due to the * occurrence constraints on ancestors, set this to true. * this will prevent the primitive types to be generated. */ public static RawTypeSet build( XSParticle p, boolean optional ) { RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); rtsb.particle(p); Multiplicity mul = MultiplicityCounter.theInstance.particle(p); if(optional) mul = mul.makeOptional(); return new RawTypeSet(rtsb.refs,mul); }
Example #17
Source File: MultiplicityCounter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public Multiplicity particle( XSParticle p ) { Multiplicity m = p.getTerm().apply(this); BigInteger max; if (m.max==null || (BigInteger.valueOf(XSParticle.UNBOUNDED).equals(p.getMaxOccurs()))) max=null; else max=p.getMaxOccurs(); return Multiplicity.multiply( m, Multiplicity.create(p.getMinOccurs(),max) ); }
Example #18
Source File: MultiplicityCounter.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public Multiplicity particle( XSParticle p ) { Multiplicity m = p.getTerm().apply(this); BigInteger max; if (m.max==null || (BigInteger.valueOf(XSParticle.UNBOUNDED).equals(p.getMaxOccurs()))) max=null; else max=p.getMaxOccurs(); return Multiplicity.multiply( m, Multiplicity.create(p.getMinOccurs(),max) ); }
Example #19
Source File: RawTypeSetBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * @param optional * if this whole property is optional due to the * occurrence constraints on ancestors, set this to true. * this will prevent the primitive types to be generated. */ public static RawTypeSet build( XSParticle p, boolean optional ) { RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); rtsb.particle(p); Multiplicity mul = MultiplicityCounter.theInstance.particle(p); if(optional) mul = mul.makeOptional(); return new RawTypeSet(rtsb.refs,mul); }
Example #20
Source File: RawTypeSetBuilder.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * @param optional * if this whole property is optional due to the * occurrence constraints on ancestors, set this to true. * this will prevent the primitive types to be generated. */ public static RawTypeSet build( XSParticle p, boolean optional ) { RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); rtsb.particle(p); Multiplicity mul = MultiplicityCounter.theInstance.particle(p); if(optional) mul = mul.makeOptional(); return new RawTypeSet(rtsb.refs,mul); }
Example #21
Source File: MultiplicityCounter.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public Multiplicity particle( XSParticle p ) { Multiplicity m = p.getTerm().apply(this); BigInteger max; if (m.max==null || (BigInteger.valueOf(XSParticle.UNBOUNDED).equals(p.getMaxOccurs()))) max=null; else max=p.getMaxOccurs(); return Multiplicity.multiply( m, Multiplicity.create(p.getMinOccurs(),max) ); }
Example #22
Source File: RawTypeSetBuilder.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * @param optional * if this whole property is optional due to the * occurrence constraints on ancestors, set this to true. * this will prevent the primitive types to be generated. */ public static RawTypeSet build( XSParticle p, boolean optional ) { RawTypeSetBuilder rtsb = new RawTypeSetBuilder(); rtsb.particle(p); Multiplicity mul = MultiplicityCounter.theInstance.particle(p); if(optional) mul = mul.makeOptional(); return new RawTypeSet(rtsb.refs,mul); }
Example #23
Source File: MultiplicityCounter.java From hottub with GNU General Public License v2.0 | 5 votes |
public Multiplicity particle( XSParticle p ) { Multiplicity m = p.getTerm().apply(this); BigInteger max; if (m.max==null || (BigInteger.valueOf(XSParticle.UNBOUNDED).equals(p.getMaxOccurs()))) max=null; else max=p.getMaxOccurs(); return Multiplicity.multiply( m, Multiplicity.create(p.getMinOccurs(),max) ); }
Example #24
Source File: MultiplicityCounter.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public Multiplicity particle( XSParticle p ) { Multiplicity m = p.getTerm().apply(this); BigInteger max; if (m.max==null || (BigInteger.valueOf(XSParticle.UNBOUNDED).equals(p.getMaxOccurs()))) max=null; else max=p.getMaxOccurs(); return Multiplicity.multiply( m, Multiplicity.create(p.getMinOccurs(),max) ); }
Example #25
Source File: RawTypeSet.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Should be called from one of the raw type set builders. */ public RawTypeSet( Set<Ref> refs, Multiplicity m ) { this.refs = refs; mul = m; canBeTypeRefs = canBeTypeRefs(); }
Example #26
Source File: RawTypeSetBuilder.java From hottub with GNU General Public License v2.0 | 4 votes |
public static RawTypeSet build( RELAXNGCompiler compiler, DPattern contentModel, Multiplicity mul ) { RawTypeSetBuilder builder = new RawTypeSetBuilder(compiler,mul); contentModel.accept(builder); return builder.create(); }
Example #27
Source File: RawTypeSetBuilder.java From hottub with GNU General Public License v2.0 | 4 votes |
public RawTypeSetBuilder(RELAXNGCompiler compiler,Multiplicity mul) { this.mul = mul; this.compiler = compiler; }
Example #28
Source File: RawTypeSetBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public static RawTypeSet build( RELAXNGCompiler compiler, DPattern contentModel, Multiplicity mul ) { RawTypeSetBuilder builder = new RawTypeSetBuilder(compiler,mul); contentModel.accept(builder); return builder.create(); }
Example #29
Source File: MultiplicityCounter.java From hottub with GNU General Public License v2.0 | 4 votes |
public Multiplicity elementDecl(XSElementDecl decl) { return ONE; }
Example #30
Source File: MultiplicityCounter.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public Multiplicity wildcard(XSWildcard wc) { return ONE; }