Java Code Examples for com.sun.xml.internal.xsom.XSTerm#isModelGroup()
The following examples show how to use
com.sun.xml.internal.xsom.XSTerm#isModelGroup() .
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: DefaultParticleBinder.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void particle( XSParticle p ) { if(getLocalPropCustomization(p)!=null || builder.getLocalDomCustomization(p)!=null) { // if a property customization is specfied, // check that value and turn around. check(p); mark(p); return; } XSTerm t = p.getTerm(); if(p.isRepeated() && (t.isModelGroup() || t.isModelGroupDecl())) { // a repeated model group gets its own property mark(p); return; } if(forcedProps.contains(p)) { // this particle must become a property mark(p); return; } outerParticle = p; t.visit(this); }
Example 2
Source File: DefaultParticleBinder.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public void particle( XSParticle p ) { if(getLocalPropCustomization(p)!=null || builder.getLocalDomCustomization(p)!=null) { // if a property customization is specfied, // check that value and turn around. check(p); mark(p); return; } XSTerm t = p.getTerm(); if(p.isRepeated() && (t.isModelGroup() || t.isModelGroupDecl())) { // a repeated model group gets its own property mark(p); return; } if(forcedProps.contains(p)) { // this particle must become a property mark(p); return; } outerParticle = p; t.visit(this); }
Example 3
Source File: DefaultParticleBinder.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public void particle( XSParticle p ) { if(getLocalPropCustomization(p)!=null || builder.getLocalDomCustomization(p)!=null) { // if a property customization is specfied, // check that value and turn around. check(p); mark(p); return; } XSTerm t = p.getTerm(); if(p.isRepeated() && (t.isModelGroup() || t.isModelGroupDecl())) { // a repeated model group gets its own property mark(p); return; } if(forcedProps.contains(p)) { // this particle must become a property mark(p); return; } outerParticle = p; t.visit(this); }
Example 4
Source File: DefaultParticleBinder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public void particle( XSParticle p ) { if(getLocalPropCustomization(p)!=null || builder.getLocalDomCustomization(p)!=null) { // if a property customization is specfied, // check that value and turn around. check(p); mark(p); return; } XSTerm t = p.getTerm(); if(p.isRepeated() && (t.isModelGroup() || t.isModelGroupDecl())) { // a repeated model group gets its own property mark(p); return; } if(forcedProps.contains(p)) { // this particle must become a property mark(p); return; } outerParticle = p; t.visit(this); }
Example 5
Source File: DefaultParticleBinder.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void particle( XSParticle p ) { if(getLocalPropCustomization(p)!=null || builder.getLocalDomCustomization(p)!=null) { // if a property customization is specfied, // check that value and turn around. check(p); mark(p); return; } XSTerm t = p.getTerm(); if(p.isRepeated() && (t.isModelGroup() || t.isModelGroupDecl())) { // a repeated model group gets its own property mark(p); return; } if(forcedProps.contains(p)) { // this particle must become a property mark(p); return; } outerParticle = p; t.visit(this); }
Example 6
Source File: DefaultParticleBinder.java From hottub with GNU General Public License v2.0 | 5 votes |
public void particle( XSParticle p ) { if(getLocalPropCustomization(p)!=null || builder.getLocalDomCustomization(p)!=null) { // if a property customization is specfied, // check that value and turn around. check(p); mark(p); return; } XSTerm t = p.getTerm(); if(p.isRepeated() && (t.isModelGroup() || t.isModelGroupDecl())) { // a repeated model group gets its own property mark(p); return; } if(forcedProps.contains(p)) { // this particle must become a property mark(p); return; } outerParticle = p; t.visit(this); }
Example 7
Source File: DefaultParticleBinder.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void particle( XSParticle p ) { if(getLocalPropCustomization(p)!=null || builder.getLocalDomCustomization(p)!=null) { // if a property customization is specfied, // check that value and turn around. check(p); mark(p); return; } XSTerm t = p.getTerm(); if(p.isRepeated() && (t.isModelGroup() || t.isModelGroupDecl())) { // a repeated model group gets its own property mark(p); return; } if(forcedProps.contains(p)) { // this particle must become a property mark(p); return; } outerParticle = p; t.visit(this); }
Example 8
Source File: DefaultParticleBinder.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void particle( XSParticle p ) { if(getLocalPropCustomization(p)!=null || builder.getLocalDomCustomization(p)!=null) { // if a property customization is specfied, // check that value and turn around. check(p); mark(p); return; } XSTerm t = p.getTerm(); if(p.isRepeated() && (t.isModelGroup() || t.isModelGroupDecl())) { // a repeated model group gets its own property mark(p); return; } if(forcedProps.contains(p)) { // this particle must become a property mark(p); return; } outerParticle = p; t.visit(this); }
Example 9
Source File: ParticleBinder.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Computes the label of a given particle. * Usually, the getLabel method should be used instead. */ protected final String computeLabel( XSParticle p ) { // if the particle carries a customization, use that value. // since we are binding content models, it's always non-constant properties. BIProperty cust = getLocalPropCustomization(p); if(cust!=null && cust.getPropertyName(false)!=null) return cust.getPropertyName(false); // no explicit property name is given. Compute one. XSTerm t = p.getTerm(); // // first, check if a term is going to be a class, if so, use that name. // ClassItem ci = owner.selector.select(t); // if(ci!=null) { // return makeJavaName(ci.getTypeAsDefined().name()); // } // if it fails, compute the default name according to the spec. if(t.isElementDecl()) // for element, take the element name. return makeJavaName(p,t.asElementDecl().getName()); if(t.isModelGroupDecl()) // for named model groups, take that name return makeJavaName(p,t.asModelGroupDecl().getName()); if(t.isWildcard()) // the spec says it will map to "any" by default. return makeJavaName(p,"Any"); if(t.isModelGroup()) { try { return getSpecDefaultName(t.asModelGroup(),p.isRepeated()); } catch( ParseException e ) { // unable to generate a name. getErrorReporter().error(t.getLocator(), Messages.ERR_UNABLE_TO_GENERATE_NAME_FROM_MODELGROUP); return "undefined"; // recover from error by assuming something } } // there are only four types of XSTerm. throw new AssertionError(); }
Example 10
Source File: ParticleBinder.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Computes the label of a given particle. * Usually, the getLabel method should be used instead. */ protected final String computeLabel( XSParticle p ) { // if the particle carries a customization, use that value. // since we are binding content models, it's always non-constant properties. BIProperty cust = getLocalPropCustomization(p); if(cust!=null && cust.getPropertyName(false)!=null) return cust.getPropertyName(false); // no explicit property name is given. Compute one. XSTerm t = p.getTerm(); // // first, check if a term is going to be a class, if so, use that name. // ClassItem ci = owner.selector.select(t); // if(ci!=null) { // return makeJavaName(ci.getTypeAsDefined().name()); // } // if it fails, compute the default name according to the spec. if(t.isElementDecl()) // for element, take the element name. return makeJavaName(p,t.asElementDecl().getName()); if(t.isModelGroupDecl()) // for named model groups, take that name return makeJavaName(p,t.asModelGroupDecl().getName()); if(t.isWildcard()) // the spec says it will map to "any" by default. return makeJavaName(p,"Any"); if(t.isModelGroup()) { try { return getSpecDefaultName(t.asModelGroup(),p.isRepeated()); } catch( ParseException e ) { // unable to generate a name. getErrorReporter().error(t.getLocator(), Messages.ERR_UNABLE_TO_GENERATE_NAME_FROM_MODELGROUP); return "undefined"; // recover from error by assuming something } } // there are only four types of XSTerm. throw new AssertionError(); }
Example 11
Source File: ParticleBinder.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * Computes the label of a given particle. * Usually, the getLabel method should be used instead. */ protected final String computeLabel( XSParticle p ) { // if the particle carries a customization, use that value. // since we are binding content models, it's always non-constant properties. BIProperty cust = getLocalPropCustomization(p); if(cust!=null && cust.getPropertyName(false)!=null) return cust.getPropertyName(false); // no explicit property name is given. Compute one. XSTerm t = p.getTerm(); // // first, check if a term is going to be a class, if so, use that name. // ClassItem ci = owner.selector.select(t); // if(ci!=null) { // return makeJavaName(ci.getTypeAsDefined().name()); // } // if it fails, compute the default name according to the spec. if(t.isElementDecl()) // for element, take the element name. return makeJavaName(p,t.asElementDecl().getName()); if(t.isModelGroupDecl()) // for named model groups, take that name return makeJavaName(p,t.asModelGroupDecl().getName()); if(t.isWildcard()) // the spec says it will map to "any" by default. return makeJavaName(p,"Any"); if(t.isModelGroup()) { try { return getSpecDefaultName(t.asModelGroup(),p.isRepeated()); } catch( ParseException e ) { // unable to generate a name. getErrorReporter().error(t.getLocator(), Messages.ERR_UNABLE_TO_GENERATE_NAME_FROM_MODELGROUP); return "undefined"; // recover from error by assuming something } } // there are only four types of XSTerm. throw new AssertionError(); }
Example 12
Source File: ParticleBinder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Computes the label of a given particle. * Usually, the getLabel method should be used instead. */ protected final String computeLabel( XSParticle p ) { // if the particle carries a customization, use that value. // since we are binding content models, it's always non-constant properties. BIProperty cust = getLocalPropCustomization(p); if(cust!=null && cust.getPropertyName(false)!=null) return cust.getPropertyName(false); // no explicit property name is given. Compute one. XSTerm t = p.getTerm(); // // first, check if a term is going to be a class, if so, use that name. // ClassItem ci = owner.selector.select(t); // if(ci!=null) { // return makeJavaName(ci.getTypeAsDefined().name()); // } // if it fails, compute the default name according to the spec. if(t.isElementDecl()) // for element, take the element name. return makeJavaName(p,t.asElementDecl().getName()); if(t.isModelGroupDecl()) // for named model groups, take that name return makeJavaName(p,t.asModelGroupDecl().getName()); if(t.isWildcard()) // the spec says it will map to "any" by default. return makeJavaName(p,"Any"); if(t.isModelGroup()) { try { return getSpecDefaultName(t.asModelGroup(),p.isRepeated()); } catch( ParseException e ) { // unable to generate a name. getErrorReporter().error(t.getLocator(), Messages.ERR_UNABLE_TO_GENERATE_NAME_FROM_MODELGROUP); return "undefined"; // recover from error by assuming something } } // there are only four types of XSTerm. throw new AssertionError(); }
Example 13
Source File: ParticleBinder.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Computes the label of a given particle. * Usually, the getLabel method should be used instead. */ protected final String computeLabel( XSParticle p ) { // if the particle carries a customization, use that value. // since we are binding content models, it's always non-constant properties. BIProperty cust = getLocalPropCustomization(p); if(cust!=null && cust.getPropertyName(false)!=null) return cust.getPropertyName(false); // no explicit property name is given. Compute one. XSTerm t = p.getTerm(); // // first, check if a term is going to be a class, if so, use that name. // ClassItem ci = owner.selector.select(t); // if(ci!=null) { // return makeJavaName(ci.getTypeAsDefined().name()); // } // if it fails, compute the default name according to the spec. if(t.isElementDecl()) // for element, take the element name. return makeJavaName(p,t.asElementDecl().getName()); if(t.isModelGroupDecl()) // for named model groups, take that name return makeJavaName(p,t.asModelGroupDecl().getName()); if(t.isWildcard()) // the spec says it will map to "any" by default. return makeJavaName(p,"Any"); if(t.isModelGroup()) { try { return getSpecDefaultName(t.asModelGroup(),p.isRepeated()); } catch( ParseException e ) { // unable to generate a name. getErrorReporter().error(t.getLocator(), Messages.ERR_UNABLE_TO_GENERATE_NAME_FROM_MODELGROUP); return "undefined"; // recover from error by assuming something } } // there are only four types of XSTerm. throw new AssertionError(); }
Example 14
Source File: ParticleBinder.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * Computes the label of a given particle. * Usually, the getLabel method should be used instead. */ protected final String computeLabel( XSParticle p ) { // if the particle carries a customization, use that value. // since we are binding content models, it's always non-constant properties. BIProperty cust = getLocalPropCustomization(p); if(cust!=null && cust.getPropertyName(false)!=null) return cust.getPropertyName(false); // no explicit property name is given. Compute one. XSTerm t = p.getTerm(); // // first, check if a term is going to be a class, if so, use that name. // ClassItem ci = owner.selector.select(t); // if(ci!=null) { // return makeJavaName(ci.getTypeAsDefined().name()); // } // if it fails, compute the default name according to the spec. if(t.isElementDecl()) // for element, take the element name. return makeJavaName(p,t.asElementDecl().getName()); if(t.isModelGroupDecl()) // for named model groups, take that name return makeJavaName(p,t.asModelGroupDecl().getName()); if(t.isWildcard()) // the spec says it will map to "any" by default. return makeJavaName(p,"Any"); if(t.isModelGroup()) { try { return getSpecDefaultName(t.asModelGroup(),p.isRepeated()); } catch( ParseException e ) { // unable to generate a name. getErrorReporter().error(t.getLocator(), Messages.ERR_UNABLE_TO_GENERATE_NAME_FROM_MODELGROUP); return "undefined"; // recover from error by assuming something } } // there are only four types of XSTerm. throw new AssertionError(); }
Example 15
Source File: ParticleBinder.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Computes the label of a given particle. * Usually, the getLabel method should be used instead. */ protected final String computeLabel( XSParticle p ) { // if the particle carries a customization, use that value. // since we are binding content models, it's always non-constant properties. BIProperty cust = getLocalPropCustomization(p); if(cust!=null && cust.getPropertyName(false)!=null) return cust.getPropertyName(false); // no explicit property name is given. Compute one. XSTerm t = p.getTerm(); // // first, check if a term is going to be a class, if so, use that name. // ClassItem ci = owner.selector.select(t); // if(ci!=null) { // return makeJavaName(ci.getTypeAsDefined().name()); // } // if it fails, compute the default name according to the spec. if(t.isElementDecl()) // for element, take the element name. return makeJavaName(p,t.asElementDecl().getName()); if(t.isModelGroupDecl()) // for named model groups, take that name return makeJavaName(p,t.asModelGroupDecl().getName()); if(t.isWildcard()) // the spec says it will map to "any" by default. return makeJavaName(p,"Any"); if(t.isModelGroup()) { try { return getSpecDefaultName(t.asModelGroup(),p.isRepeated()); } catch( ParseException e ) { // unable to generate a name. getErrorReporter().error(t.getLocator(), Messages.ERR_UNABLE_TO_GENERATE_NAME_FROM_MODELGROUP); return "undefined"; // recover from error by assuming something } } // there are only four types of XSTerm. throw new AssertionError(); }
Example 16
Source File: ParticleBinder.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Computes the label of a given particle. * Usually, the getLabel method should be used instead. */ protected final String computeLabel( XSParticle p ) { // if the particle carries a customization, use that value. // since we are binding content models, it's always non-constant properties. BIProperty cust = getLocalPropCustomization(p); if(cust!=null && cust.getPropertyName(false)!=null) return cust.getPropertyName(false); // no explicit property name is given. Compute one. XSTerm t = p.getTerm(); // // first, check if a term is going to be a class, if so, use that name. // ClassItem ci = owner.selector.select(t); // if(ci!=null) { // return makeJavaName(ci.getTypeAsDefined().name()); // } // if it fails, compute the default name according to the spec. if(t.isElementDecl()) // for element, take the element name. return makeJavaName(p,t.asElementDecl().getName()); if(t.isModelGroupDecl()) // for named model groups, take that name return makeJavaName(p,t.asModelGroupDecl().getName()); if(t.isWildcard()) // the spec says it will map to "any" by default. return makeJavaName(p,"Any"); if(t.isModelGroup()) { try { return getSpecDefaultName(t.asModelGroup(),p.isRepeated()); } catch( ParseException e ) { // unable to generate a name. getErrorReporter().error(t.getLocator(), Messages.ERR_UNABLE_TO_GENERATE_NAME_FROM_MODELGROUP); return "undefined"; // recover from error by assuming something } } // there are only four types of XSTerm. throw new AssertionError(); }