Java Code Examples for com.sun.xml.internal.xsom.XSType#asComplexType()
The following examples show how to use
com.sun.xml.internal.xsom.XSType#asComplexType() .
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: Util.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Implements * <code>Validation Rule: Schema-Validity Assessment (Element) 1.2.1.2.4</code> */ private static boolean isSubstitutable( XSType _base, XSType derived ) { // too ugly to the point that it's almost unbearable. // I mean, it's not even transitive. Thus we end up calling this method // for each candidate if( _base.isComplexType() ) { XSComplexType base = _base.asComplexType(); for( ; base!=derived; derived=derived.getBaseType() ) { if( base.isSubstitutionProhibited( derived.getDerivationMethod() ) ) return false; // Type Derivation OK (Complex)-1 } return true; } else { // simple type don't have any @block return true; } }
Example 2
Source File: Util.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Implements * <code>Validation Rule: Schema-Validity Assessment (Element) 1.2.1.2.4</code> */ private static boolean isSubstitutable( XSType _base, XSType derived ) { // too ugly to the point that it's almost unbearable. // I mean, it's not even transitive. Thus we end up calling this method // for each candidate if( _base.isComplexType() ) { XSComplexType base = _base.asComplexType(); for( ; base!=derived; derived=derived.getBaseType() ) { if( base.isSubstitutionProhibited( derived.getDerivationMethod() ) ) return false; // Type Derivation OK (Complex)-1 } return true; } else { // simple type don't have any @block return true; } }
Example 3
Source File: ComplexTypeImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public XSAttributeUse getAttributeUse( String nsURI, String localName ) { UName name = new UName(nsURI,localName); if(prohibitedAtts.contains(name)) return null; XSAttributeUse o = attributes.get(name); if(o==null) { Iterator itr = iterateAttGroups(); while(itr.hasNext() && o==null) o = ((XSAttGroupDecl)itr.next()).getAttributeUse(nsURI,localName); } if(o==null) { XSType base = getBaseType(); if(base.asComplexType()!=null) o = base.asComplexType().getAttributeUse(nsURI,localName); } return o; }
Example 4
Source File: Util.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Implements * <code>Validation Rule: Schema-Validity Assessment (Element) 1.2.1.2.4</code> */ private static boolean isSubstitutable( XSType _base, XSType derived ) { // too ugly to the point that it's almost unbearable. // I mean, it's not even transitive. Thus we end up calling this method // for each candidate if( _base.isComplexType() ) { XSComplexType base = _base.asComplexType(); for( ; base!=derived; derived=derived.getBaseType() ) { if( base.isSubstitutionProhibited( derived.getDerivationMethod() ) ) return false; // Type Derivation OK (Complex)-1 } return true; } else { // simple type don't have any @block return true; } }
Example 5
Source File: ComplexTypeImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public XSAttributeUse getAttributeUse( String nsURI, String localName ) { UName name = new UName(nsURI,localName); if(prohibitedAtts.contains(name)) return null; XSAttributeUse o = attributes.get(name); if(o==null) { Iterator itr = iterateAttGroups(); while(itr.hasNext() && o==null) o = ((XSAttGroupDecl)itr.next()).getAttributeUse(nsURI,localName); } if(o==null) { XSType base = getBaseType(); if(base.asComplexType()!=null) o = base.asComplexType().getAttributeUse(nsURI,localName); } return o; }
Example 6
Source File: Util.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Implements * <code>Validation Rule: Schema-Validity Assessment (Element) 1.2.1.2.4</code> */ private static boolean isSubstitutable( XSType _base, XSType derived ) { // too ugly to the point that it's almost unbearable. // I mean, it's not even transitive. Thus we end up calling this method // for each candidate if( _base.isComplexType() ) { XSComplexType base = _base.asComplexType(); for( ; base!=derived; derived=derived.getBaseType() ) { if( base.isSubstitutionProhibited( derived.getDerivationMethod() ) ) return false; // Type Derivation OK (Complex)-1 } return true; } else { // simple type don't have any @block return true; } }
Example 7
Source File: Util.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Implements * <code>Validation Rule: Schema-Validity Assessment (Element) 1.2.1.2.4</code> */ private static boolean isSubstitutable( XSType _base, XSType derived ) { // too ugly to the point that it's almost unbearable. // I mean, it's not even transitive. Thus we end up calling this method // for each candidate if( _base.isComplexType() ) { XSComplexType base = _base.asComplexType(); for( ; base!=derived; derived=derived.getBaseType() ) { if( base.isSubstitutionProhibited( derived.getDerivationMethod() ) ) return false; // Type Derivation OK (Complex)-1 } return true; } else { // simple type don't have any @block return true; } }
Example 8
Source File: ComplexTypeImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public XSAttributeUse getAttributeUse( String nsURI, String localName ) { UName name = new UName(nsURI,localName); if(prohibitedAtts.contains(name)) return null; XSAttributeUse o = attributes.get(name); if(o==null) { Iterator itr = iterateAttGroups(); while(itr.hasNext() && o==null) o = ((XSAttGroupDecl)itr.next()).getAttributeUse(nsURI,localName); } if(o==null) { XSType base = getBaseType(); if(base.asComplexType()!=null) o = base.asComplexType().getAttributeUse(nsURI,localName); } return o; }
Example 9
Source File: Util.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Implements * <code>Validation Rule: Schema-Validity Assessment (Element) 1.2.1.2.4</code> */ private static boolean isSubstitutable( XSType _base, XSType derived ) { // too ugly to the point that it's almost unbearable. // I mean, it's not even transitive. Thus we end up calling this method // for each candidate if( _base.isComplexType() ) { XSComplexType base = _base.asComplexType(); for( ; base!=derived; derived=derived.getBaseType() ) { if( base.isSubstitutionProhibited( derived.getDerivationMethod() ) ) return false; // Type Derivation OK (Complex)-1 } return true; } else { // simple type don't have any @block return true; } }
Example 10
Source File: ComplexTypeImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public XSWildcard getAttributeWildcard() { WildcardImpl complete = localAttWildcard; Iterator itr = iterateAttGroups(); while( itr.hasNext() ) { WildcardImpl w = (WildcardImpl)((XSAttGroupDecl)itr.next()).getAttributeWildcard(); if(w==null) continue; if(complete==null) complete = w; else // TODO: the spec says it's intersection, // but I think it has to be union. complete = complete.union(ownerDocument,w); } if( getDerivationMethod()==RESTRICTION ) return complete; WildcardImpl base=null; XSType baseType = getBaseType(); if(baseType.asComplexType()!=null) base = (WildcardImpl)baseType.asComplexType().getAttributeWildcard(); if(complete==null) return base; if(base==null) return complete; return complete.union(ownerDocument,base); }
Example 11
Source File: ComplexTypeImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public XSWildcard getAttributeWildcard() { WildcardImpl complete = localAttWildcard; Iterator itr = iterateAttGroups(); while( itr.hasNext() ) { WildcardImpl w = (WildcardImpl)((XSAttGroupDecl)itr.next()).getAttributeWildcard(); if(w==null) continue; if(complete==null) complete = w; else // TODO: the spec says it's intersection, // but I think it has to be union. complete = complete.union(ownerDocument,w); } if( getDerivationMethod()==RESTRICTION ) return complete; WildcardImpl base=null; XSType baseType = getBaseType(); if(baseType.asComplexType()!=null) base = (WildcardImpl)baseType.asComplexType().getAttributeWildcard(); if(complete==null) return base; if(base==null) return complete; return complete.union(ownerDocument,base); }
Example 12
Source File: BaseContentRef.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public XSContentType getContentType() { XSType t = baseType.getType(); if(t.asComplexType()!=null) return t.asComplexType().getContentType(); else return t.asSimpleType(); }
Example 13
Source File: ComplexTypeImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public XSWildcard getAttributeWildcard() { WildcardImpl complete = localAttWildcard; Iterator itr = iterateAttGroups(); while( itr.hasNext() ) { WildcardImpl w = (WildcardImpl)((XSAttGroupDecl)itr.next()).getAttributeWildcard(); if(w==null) continue; if(complete==null) complete = w; else // TODO: the spec says it's intersection, // but I think it has to be union. complete = complete.union(ownerDocument,w); } if( getDerivationMethod()==RESTRICTION ) return complete; WildcardImpl base=null; XSType baseType = getBaseType(); if(baseType.asComplexType()!=null) base = (WildcardImpl)baseType.asComplexType().getAttributeWildcard(); if(complete==null) return base; if(base==null) return complete; return complete.union(ownerDocument,base); }
Example 14
Source File: BaseContentRef.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public XSContentType getContentType() { XSType t = baseType.getType(); if(t.asComplexType()!=null) return t.asComplexType().getContentType(); else return t.asSimpleType(); }
Example 15
Source File: BaseContentRef.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public XSContentType getContentType() { XSType t = baseType.getType(); if(t.asComplexType()!=null) return t.asComplexType().getContentType(); else return t.asSimpleType(); }
Example 16
Source File: ComplexTypeImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
public XSWildcard getAttributeWildcard() { WildcardImpl complete = localAttWildcard; Iterator itr = iterateAttGroups(); while( itr.hasNext() ) { WildcardImpl w = (WildcardImpl)((XSAttGroupDecl)itr.next()).getAttributeWildcard(); if(w==null) continue; if(complete==null) complete = w; else // TODO: the spec says it's intersection, // but I think it has to be union. complete = complete.union(ownerDocument,w); } if( getDerivationMethod()==RESTRICTION ) return complete; WildcardImpl base=null; XSType baseType = getBaseType(); if(baseType.asComplexType()!=null) base = (WildcardImpl)baseType.asComplexType().getAttributeWildcard(); if(complete==null) return base; if(base==null) return complete; return complete.union(ownerDocument,base); }
Example 17
Source File: ComplexTypeImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public XSWildcard getAttributeWildcard() { WildcardImpl complete = localAttWildcard; Iterator itr = iterateAttGroups(); while( itr.hasNext() ) { WildcardImpl w = (WildcardImpl)((XSAttGroupDecl)itr.next()).getAttributeWildcard(); if(w==null) continue; if(complete==null) complete = w; else // TODO: the spec says it's intersection, // but I think it has to be union. complete = complete.union(ownerDocument,w); } if( getDerivationMethod()==RESTRICTION ) return complete; WildcardImpl base=null; XSType baseType = getBaseType(); if(baseType.asComplexType()!=null) base = (WildcardImpl)baseType.asComplexType().getAttributeWildcard(); if(complete==null) return base; if(base==null) return complete; return complete.union(ownerDocument,base); }
Example 18
Source File: ComplexTypeImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public XSWildcard getAttributeWildcard() { WildcardImpl complete = localAttWildcard; Iterator itr = iterateAttGroups(); while( itr.hasNext() ) { WildcardImpl w = (WildcardImpl)((XSAttGroupDecl)itr.next()).getAttributeWildcard(); if(w==null) continue; if(complete==null) complete = w; else // TODO: the spec says it's intersection, // but I think it has to be union. complete = complete.union(ownerDocument,w); } if( getDerivationMethod()==RESTRICTION ) return complete; WildcardImpl base=null; XSType baseType = getBaseType(); if(baseType.asComplexType()!=null) base = (WildcardImpl)baseType.asComplexType().getAttributeWildcard(); if(complete==null) return base; if(base==null) return complete; return complete.union(ownerDocument,base); }
Example 19
Source File: BaseContentRef.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public XSContentType getContentType() { XSType t = baseType.getType(); if(t.asComplexType()!=null) return t.asComplexType().getContentType(); else return t.asSimpleType(); }
Example 20
Source File: BaseContentRef.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public XSContentType getContentType() { XSType t = baseType.getType(); if(t.asComplexType()!=null) return t.asComplexType().getContentType(); else return t.asSimpleType(); }