com.sun.xml.internal.xsom.XSDeclaration Java Examples
The following examples show how to use
com.sun.xml.internal.xsom.XSDeclaration.
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: NGCCRuntimeEx.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public static boolean ignorableDuplicateComponent(XSDeclaration c) { if(c.getTargetNamespace().equals(Const.schemaNamespace)) { if(c instanceof XSSimpleType) // hide artificial "double definitions" on simple types return true; if(c.isGlobal() && c.getName().equals("anyType")) return true; // ditto for anyType } return false; }
Example #2
Source File: NGCCRuntimeEx.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public static boolean ignorableDuplicateComponent(XSDeclaration c) { if(c.getTargetNamespace().equals(Const.schemaNamespace)) { if(c instanceof XSSimpleType) // hide artificial "double definitions" on simple types return true; if(c.isGlobal() && c.getName().equals("anyType")) return true; // ditto for anyType } return false; }
Example #3
Source File: DelayedRef.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * If this reference refers to the given declaration, * resolve the reference now. This is used to implement redefinition. */ public void redefine(XSDeclaration d) { if( !d.getTargetNamespace().equals(name.getNamespaceURI()) || !d.getName().equals(name.getName()) ) return; ref = d; manager = null; name = null; source = null; }
Example #4
Source File: NGCCRuntimeEx.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public static boolean ignorableDuplicateComponent(XSDeclaration c) { if(c.getTargetNamespace().equals(Const.schemaNamespace)) { if(c instanceof XSSimpleType) // hide artificial "double definitions" on simple types return true; if(c.isGlobal() && c.getName().equals("anyType")) return true; // ditto for anyType } return false; }
Example #5
Source File: DelayedRef.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * If this reference refers to the given declaration, * resolve the reference now. This is used to implement redefinition. */ public void redefine(XSDeclaration d) { if( !d.getTargetNamespace().equals(name.getNamespaceURI()) || !d.getName().equals(name.getName()) ) return; ref = d; manager = null; name = null; source = null; }
Example #6
Source File: NGCCRuntimeEx.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public static boolean ignorableDuplicateComponent(XSDeclaration c) { if(c.getTargetNamespace().equals(Const.schemaNamespace)) { if(c instanceof XSSimpleType) // hide artificial "double definitions" on simple types return true; if(c.isGlobal() && c.getName().equals("anyType")) return true; // ditto for anyType } return false; }
Example #7
Source File: DelayedRef.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * If this reference refers to the given declaration, * resolve the reference now. This is used to implement redefinition. */ public void redefine(XSDeclaration d) { if( !d.getTargetNamespace().equals(name.getNamespaceURI()) || !d.getName().equals(name.getName()) ) return; ref = d; manager = null; name = null; source = null; }
Example #8
Source File: DelayedRef.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * If this reference refers to the given declaration, * resolve the reference now. This is used to implement redefinition. */ public void redefine(XSDeclaration d) { if( !d.getTargetNamespace().equals(name.getNamespaceURI()) || !d.getName().equals(name.getName()) ) return; ref = d; manager = null; name = null; source = null; }
Example #9
Source File: NGCCRuntimeEx.java From hottub with GNU General Public License v2.0 | 5 votes |
public static boolean ignorableDuplicateComponent(XSDeclaration c) { if(c.getTargetNamespace().equals(Const.schemaNamespace)) { if(c instanceof XSSimpleType) // hide artificial "double definitions" on simple types return true; if(c.isGlobal() && c.getName().equals("anyType")) return true; // ditto for anyType } return false; }
Example #10
Source File: NGCCRuntimeEx.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public static boolean ignorableDuplicateComponent(XSDeclaration c) { if(c.getTargetNamespace().equals(Const.schemaNamespace)) { if(c instanceof XSSimpleType) // hide artificial "double definitions" on simple types return true; if(c.isGlobal() && c.getName().equals("anyType")) return true; // ditto for anyType } return false; }
Example #11
Source File: DelayedRef.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * If this reference refers to the given declaration, * resolve the reference now. This is used to implement redefinition. */ public void redefine(XSDeclaration d) { if( !d.getTargetNamespace().equals(name.getNamespaceURI()) || !d.getName().equals(name.getName()) ) return; ref = d; manager = null; name = null; source = null; }
Example #12
Source File: NGCCRuntimeEx.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public static boolean ignorableDuplicateComponent(XSDeclaration c) { if(c.getTargetNamespace().equals(Const.schemaNamespace)) { if(c instanceof XSSimpleType) // hide artificial "double definitions" on simple types return true; if(c.isGlobal() && c.getName().equals("anyType")) return true; // ditto for anyType } return false; }
Example #13
Source File: DelayedRef.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * If this reference refers to the given declaration, * resolve the reference now. This is used to implement redefinition. */ public void redefine(XSDeclaration d) { if( !d.getTargetNamespace().equals(name.getNamespaceURI()) || !d.getName().equals(name.getName()) ) return; ref = d; manager = null; name = null; source = null; }
Example #14
Source File: BGMBuilder.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * Returns the QName of the declaration. * @return null * if the declaration is anonymous. */ public static QName getName(XSDeclaration decl) { String local = decl.getName(); if(local==null) return null; return new QName(decl.getTargetNamespace(),local); }
Example #15
Source File: UName.java From hottub with GNU General Public License v2.0 | 4 votes |
public UName(XSDeclaration decl) { this(decl.getTargetNamespace(),decl.getName()); }
Example #16
Source File: NGCCRuntimeEx.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void checkDoubleDefError( XSDeclaration c ) throws SAXException { if(c==null || ignorableDuplicateComponent(c)) return; reportError( Messages.format(Messages.ERR_DOUBLE_DEFINITION,c.getName()) ); reportError( Messages.format(Messages.ERR_DOUBLE_DEFINITION_ORIGINAL), c.getLocator() ); }
Example #17
Source File: BGMBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Returns the QName of the declaration. * @return null * if the declaration is anonymous. */ public static QName getName(XSDeclaration decl) { String local = decl.getName(); if(local==null) return null; return new QName(decl.getTargetNamespace(),local); }
Example #18
Source File: UName.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public UName(XSDeclaration decl) { this(decl.getTargetNamespace(),decl.getName()); }
Example #19
Source File: Step.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
protected boolean match(XSDeclaration d) { return d.getName().equals(localName) && d.getTargetNamespace().equals(nsUri); }
Example #20
Source File: Step.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public Named(Axis<? extends XSDeclaration> axis, String nsUri, String localName) { super(axis); this.nsUri = nsUri; this.localName = localName; }
Example #21
Source File: Step.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public Named(Axis<? extends XSDeclaration> axis, UName n) { this(axis,n.getNamespaceURI(),n.getName()); }
Example #22
Source File: UName.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public UName(XSDeclaration decl) { this(decl.getTargetNamespace(),decl.getName()); }
Example #23
Source File: Step.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public Named(Axis<? extends XSDeclaration> axis, String nsUri, String localName) { super(axis); this.nsUri = nsUri; this.localName = localName; }
Example #24
Source File: AbstractExtendedComplexTypeBuilder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}. */ private NameClass getNameClass(XSDeclaration decl) { return new SimpleNameClass(new QName(decl.getTargetNamespace(), decl.getName())); }
Example #25
Source File: ClassSelector.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * The real meat of the "bindToType" code. * * @param cannotBeDelayed * if the binding of the body of the class cannot be defered * and needs to be done immediately. If the flag is false, * the binding of the body will be done later, to avoid * cyclic binding problem. * @param referer * The component that refers to <tt>sc</tt>. This can be null, * if figuring out the referer is too hard, in which case * the error message might be less user friendly. */ // TODO: consider getting rid of "cannotBeDelayed" CTypeInfo _bindToClass( @NotNull XSComponent sc, XSComponent referer, boolean cannotBeDelayed ) { // check if this class is already built. if(!bindMap.containsKey(sc)) { // craete a bind task // if this is a global declaration, make sure they will be generated // under a package. boolean isGlobal = false; if( sc instanceof XSDeclaration ) { isGlobal = ((XSDeclaration)sc).isGlobal(); if( isGlobal ) pushClassScope( new CClassInfoParent.Package( getPackage(((XSDeclaration)sc).getTargetNamespace())) ); } // otherwise check if this component should become a class. CElement bean = sc.apply(classBinder); if( isGlobal ) popClassScope(); if(bean==null) return null; // can this namespace generate a class? if (bean instanceof CClassInfo) { XSSchema os = sc.getOwnerSchema(); BISchemaBinding sb = builder.getBindInfo(os).get(BISchemaBinding.class); if(sb!=null && !sb.map) { // nope getErrorReporter().error(sc.getLocator(), Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS, sc.apply( new ComponentNameFunction() ) ); getErrorReporter().error(sb.getLocation(), Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE, os.getTargetNamespace() ); if(referer!=null) getErrorReporter().error(referer.getLocator(), Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER, referer.apply( new ComponentNameFunction() ) ); } } queueBuild( sc, bean ); } Binding bind = bindMap.get(sc); if( cannotBeDelayed ) bind.build(); return bind.bean; }
Example #26
Source File: BGMBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Returns the QName of the declaration. * @return null * if the declaration is anonymous. */ public static QName getName(XSDeclaration decl) { String local = decl.getName(); if(local==null) return null; return new QName(decl.getTargetNamespace(),local); }
Example #27
Source File: BGMBuilder.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Returns the QName of the declaration. * @return null * if the declaration is anonymous. */ public static QName getName(XSDeclaration decl) { String local = decl.getName(); if(local==null) return null; return new QName(decl.getTargetNamespace(),local); }
Example #28
Source File: BGMBuilder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Returns the QName of the declaration. * @return null * if the declaration is anonymous. */ public static QName getName(XSDeclaration decl) { String local = decl.getName(); if(local==null) return null; return new QName(decl.getTargetNamespace(),local); }
Example #29
Source File: UName.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public UName(XSDeclaration decl) { this(decl.getTargetNamespace(),decl.getName()); }
Example #30
Source File: ClassSelector.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * The real meat of the "bindToType" code. * * @param cannotBeDelayed * if the binding of the body of the class cannot be defered * and needs to be done immediately. If the flag is false, * the binding of the body will be done later, to avoid * cyclic binding problem. * @param referer * The component that refers to {@code sc}. This can be null, * if figuring out the referer is too hard, in which case * the error message might be less user friendly. */ // TODO: consider getting rid of "cannotBeDelayed" CTypeInfo _bindToClass( @NotNull XSComponent sc, XSComponent referer, boolean cannotBeDelayed ) { // check if this class is already built. if(!bindMap.containsKey(sc)) { // craete a bind task // if this is a global declaration, make sure they will be generated // under a package. boolean isGlobal = false; if( sc instanceof XSDeclaration ) { isGlobal = ((XSDeclaration)sc).isGlobal(); if( isGlobal ) pushClassScope( new CClassInfoParent.Package( getPackage(((XSDeclaration)sc).getTargetNamespace())) ); } // otherwise check if this component should become a class. CElement bean = sc.apply(classBinder); if( isGlobal ) popClassScope(); if(bean==null) return null; // can this namespace generate a class? if (bean instanceof CClassInfo) { XSSchema os = sc.getOwnerSchema(); BISchemaBinding sb = builder.getBindInfo(os).get(BISchemaBinding.class); if(sb!=null && !sb.map) { // nope getErrorReporter().error(sc.getLocator(), Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS, sc.apply( new ComponentNameFunction() ) ); getErrorReporter().error(sb.getLocation(), Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE, os.getTargetNamespace() ); if(referer!=null) getErrorReporter().error(referer.getLocator(), Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER, referer.apply( new ComponentNameFunction() ) ); } } queueBuild( sc, bean ); } Binding bind = bindMap.get(sc); if( cannotBeDelayed ) bind.build(); return bind.bean; }