Java Code Examples for com.sun.xml.internal.xsom.XSTerm#isElementDecl()
The following examples show how to use
com.sun.xml.internal.xsom.XSTerm#isElementDecl() .
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 TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Gets the {@link BIDom} object that applies to the given particle. */ protected final BIDom getLocalDomCustomization( XSParticle p ) { if (p == null) { return null; } BIDom dom = getBindInfo(p).get(BIDom.class); if(dom!=null) return dom; // if not, the term might have one. dom = getBindInfo(p.getTerm()).get(BIDom.class); if(dom!=null) return dom; XSTerm t = p.getTerm(); // type could also have one, in case of the dom customization if(t.isElementDecl()) return getBindInfo(t.asElementDecl().getType()).get(BIDom.class); // similarly the model group in a model group definition may have one. if(t.isModelGroupDecl()) return getBindInfo(t.asModelGroupDecl().getModelGroup()).get(BIDom.class); return null; }
Example 2
Source File: BGMBuilder.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Gets the {@link BIDom} object that applies to the given particle. */ protected final BIDom getLocalDomCustomization( XSParticle p ) { if (p == null) { return null; } BIDom dom = getBindInfo(p).get(BIDom.class); if(dom!=null) return dom; // if not, the term might have one. dom = getBindInfo(p.getTerm()).get(BIDom.class); if(dom!=null) return dom; XSTerm t = p.getTerm(); // type could also have one, in case of the dom customization if(t.isElementDecl()) return getBindInfo(t.asElementDecl().getType()).get(BIDom.class); // similarly the model group in a model group definition may have one. if(t.isModelGroupDecl()) return getBindInfo(t.asModelGroupDecl().getModelGroup()).get(BIDom.class); return null; }
Example 3
Source File: BGMBuilder.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Gets the {@link BIDom} object that applies to the given particle. */ protected final BIDom getLocalDomCustomization( XSParticle p ) { if (p == null) { return null; } BIDom dom = getBindInfo(p).get(BIDom.class); if(dom!=null) return dom; // if not, the term might have one. dom = getBindInfo(p.getTerm()).get(BIDom.class); if(dom!=null) return dom; XSTerm t = p.getTerm(); // type could also have one, in case of the dom customization if(t.isElementDecl()) return getBindInfo(t.asElementDecl().getType()).get(BIDom.class); // similarly the model group in a model group definition may have one. if(t.isModelGroupDecl()) return getBindInfo(t.asModelGroupDecl().getModelGroup()).get(BIDom.class); return null; }
Example 4
Source File: BGMBuilder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Gets the {@link BIDom} object that applies to the given particle. */ protected final BIDom getLocalDomCustomization( XSParticle p ) { if (p == null) { return null; } BIDom dom = getBindInfo(p).get(BIDom.class); if(dom!=null) return dom; // if not, the term might have one. dom = getBindInfo(p.getTerm()).get(BIDom.class); if(dom!=null) return dom; XSTerm t = p.getTerm(); // type could also have one, in case of the dom customization if(t.isElementDecl()) return getBindInfo(t.asElementDecl().getType()).get(BIDom.class); // similarly the model group in a model group definition may have one. if(t.isModelGroupDecl()) return getBindInfo(t.asModelGroupDecl().getModelGroup()).get(BIDom.class); return null; }
Example 5
Source File: BGMBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Gets the {@link BIDom} object that applies to the given particle. */ protected final BIDom getLocalDomCustomization( XSParticle p ) { if (p == null) { return null; } BIDom dom = getBindInfo(p).get(BIDom.class); if(dom!=null) return dom; // if not, the term might have one. dom = getBindInfo(p.getTerm()).get(BIDom.class); if(dom!=null) return dom; XSTerm t = p.getTerm(); // type could also have one, in case of the dom customization if(t.isElementDecl()) return getBindInfo(t.asElementDecl().getType()).get(BIDom.class); // similarly the model group in a model group definition may have one. if(t.isModelGroupDecl()) return getBindInfo(t.asModelGroupDecl().getModelGroup()).get(BIDom.class); return null; }
Example 6
Source File: BGMBuilder.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Gets the {@link BIDom} object that applies to the given particle. */ protected final BIDom getLocalDomCustomization( XSParticle p ) { if (p == null) { return null; } BIDom dom = getBindInfo(p).get(BIDom.class); if(dom!=null) return dom; // if not, the term might have one. dom = getBindInfo(p.getTerm()).get(BIDom.class); if(dom!=null) return dom; XSTerm t = p.getTerm(); // type could also have one, in case of the dom customization if(t.isElementDecl()) return getBindInfo(t.asElementDecl().getType()).get(BIDom.class); // similarly the model group in a model group definition may have one. if(t.isModelGroupDecl()) return getBindInfo(t.asModelGroupDecl().getModelGroup()).get(BIDom.class); return null; }
Example 7
Source File: BGMBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Gets the {@link BIDom} object that applies to the given particle. */ protected final BIDom getLocalDomCustomization( XSParticle p ) { if (p == null) { return null; } BIDom dom = getBindInfo(p).get(BIDom.class); if(dom!=null) return dom; // if not, the term might have one. dom = getBindInfo(p.getTerm()).get(BIDom.class); if(dom!=null) return dom; XSTerm t = p.getTerm(); // type could also have one, in case of the dom customization if(t.isElementDecl()) return getBindInfo(t.asElementDecl().getType()).get(BIDom.class); // similarly the model group in a model group definition may have one. if(t.isModelGroupDecl()) return getBindInfo(t.asModelGroupDecl().getModelGroup()).get(BIDom.class); return null; }
Example 8
Source File: BGMBuilder.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Gets the {@link BIDom} object that applies to the given particle. */ protected final BIDom getLocalDomCustomization( XSParticle p ) { if (p == null) { return null; } BIDom dom = getBindInfo(p).get(BIDom.class); if(dom!=null) return dom; // if not, the term might have one. dom = getBindInfo(p.getTerm()).get(BIDom.class); if(dom!=null) return dom; XSTerm t = p.getTerm(); // type could also have one, in case of the dom customization if(t.isElementDecl()) return getBindInfo(t.asElementDecl().getType()).get(BIDom.class); // similarly the model group in a model group definition may have one. if(t.isModelGroupDecl()) return getBindInfo(t.asModelGroupDecl().getModelGroup()).get(BIDom.class); return null; }
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(); }