com.sun.org.apache.xerces.internal.xni.grammars.XSGrammar Java Examples
The following examples show how to use
com.sun.org.apache.xerces.internal.xni.grammars.XSGrammar.
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: SchemaGrammar.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public XSModel toXSModel(XSGrammar[] grammars) { if (grammars == null || grammars.length == 0) return toXSModel(); int len = grammars.length; boolean hasSelf = false; for (int i = 0; i < len; i++) { if (grammars[i] == this) { hasSelf = true; break; } } SchemaGrammar[] gs = new SchemaGrammar[hasSelf ? len : len+1]; for (int i = 0; i < len; i++) gs[i] = (SchemaGrammar)grammars[i]; if (!hasSelf) gs[len] = this; return new XSModelImpl(gs); }
Example #2
Source File: SchemaGrammar.java From JDKSourceCode1.8 with MIT License | 6 votes |
public XSModel toXSModel(XSGrammar[] grammars) { if (grammars == null || grammars.length == 0) return toXSModel(); int len = grammars.length; boolean hasSelf = false; for (int i = 0; i < len; i++) { if (grammars[i] == this) { hasSelf = true; break; } } SchemaGrammar[] gs = new SchemaGrammar[hasSelf ? len : len+1]; for (int i = 0; i < len; i++) gs[i] = (SchemaGrammar)grammars[i]; if (!hasSelf) gs[len] = this; return new XSModelImpl(gs); }
Example #3
Source File: SchemaGrammar.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public XSModel toXSModel(XSGrammar[] grammars) { if (grammars == null || grammars.length == 0) return toXSModel(); int len = grammars.length; boolean hasSelf = false; for (int i = 0; i < len; i++) { if (grammars[i] == this) { hasSelf = true; break; } } SchemaGrammar[] gs = new SchemaGrammar[hasSelf ? len : len+1]; for (int i = 0; i < len; i++) gs[i] = (SchemaGrammar)grammars[i]; if (!hasSelf) gs[len] = this; return new XSModelImpl(gs); }
Example #4
Source File: SchemaGrammar.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public XSModel toXSModel(XSGrammar[] grammars) { if (grammars == null || grammars.length == 0) return toXSModel(); int len = grammars.length; boolean hasSelf = false; for (int i = 0; i < len; i++) { if (grammars[i] == this) { hasSelf = true; break; } } SchemaGrammar[] gs = new SchemaGrammar[hasSelf ? len : len+1]; for (int i = 0; i < len; i++) gs[i] = (SchemaGrammar)grammars[i]; if (!hasSelf) gs[len] = this; return new XSModelImpl(gs); }
Example #5
Source File: SchemaGrammar.java From hottub with GNU General Public License v2.0 | 6 votes |
public XSModel toXSModel(XSGrammar[] grammars) { if (grammars == null || grammars.length == 0) return toXSModel(); int len = grammars.length; boolean hasSelf = false; for (int i = 0; i < len; i++) { if (grammars[i] == this) { hasSelf = true; break; } } SchemaGrammar[] gs = new SchemaGrammar[hasSelf ? len : len+1]; for (int i = 0; i < len; i++) gs[i] = (SchemaGrammar)grammars[i]; if (!hasSelf) gs[len] = this; return new XSModelImpl(gs); }
Example #6
Source File: SchemaGrammar.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public XSModel toXSModel(XSGrammar[] grammars) { if (grammars == null || grammars.length == 0) return toXSModel(); int len = grammars.length; boolean hasSelf = false; for (int i = 0; i < len; i++) { if (grammars[i] == this) { hasSelf = true; break; } } SchemaGrammar[] gs = new SchemaGrammar[hasSelf ? len : len+1]; for (int i = 0; i < len; i++) gs[i] = (SchemaGrammar)grammars[i]; if (!hasSelf) gs[len] = this; return new XSModelImpl(gs); }
Example #7
Source File: SchemaGrammar.java From Bytecoder with Apache License 2.0 | 6 votes |
public XSModel toXSModel(XSGrammar[] grammars) { if (grammars == null || grammars.length == 0) return toXSModel(); int len = grammars.length; boolean hasSelf = false; for (int i = 0; i < len; i++) { if (grammars[i] == this) { hasSelf = true; break; } } SchemaGrammar[] gs = new SchemaGrammar[hasSelf ? len : len+1]; for (int i = 0; i < len; i++) gs[i] = (SchemaGrammar)grammars[i]; if (!hasSelf) gs[len] = this; return new XSModelImpl(gs); }
Example #8
Source File: SchemaGrammar.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public XSModel toXSModel(XSGrammar[] grammars) { if (grammars == null || grammars.length == 0) return toXSModel(); int len = grammars.length; boolean hasSelf = false; for (int i = 0; i < len; i++) { if (grammars[i] == this) { hasSelf = true; break; } } SchemaGrammar[] gs = new SchemaGrammar[hasSelf ? len : len+1]; for (int i = 0; i < len; i++) gs[i] = (SchemaGrammar)grammars[i]; if (!hasSelf) gs[len] = this; return new XSModelImpl(gs); }
Example #9
Source File: SchemaGrammar.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
public XSModel toXSModel(XSGrammar[] grammars) { if (grammars == null || grammars.length == 0) return toXSModel(); int len = grammars.length; boolean hasSelf = false; for (int i = 0; i < len; i++) { if (grammars[i] == this) { hasSelf = true; break; } } SchemaGrammar[] gs = new SchemaGrammar[hasSelf ? len : len+1]; for (int i = 0; i < len; i++) gs[i] = (SchemaGrammar)grammars[i]; if (!hasSelf) gs[len] = this; return new XSModelImpl(gs); }
Example #10
Source File: SchemaGrammar.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public XSModel toXSModel(XSGrammar[] grammars) { if (grammars == null || grammars.length == 0) return toXSModel(); int len = grammars.length; boolean hasSelf = false; for (int i = 0; i < len; i++) { if (grammars[i] == this) { hasSelf = true; break; } } SchemaGrammar[] gs = new SchemaGrammar[hasSelf ? len : len+1]; for (int i = 0; i < len; i++) gs[i] = (SchemaGrammar)grammars[i]; if (!hasSelf) gs[len] = this; return new XSModelImpl(gs); }
Example #11
Source File: SchemaGrammar.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public XSModel toXSModel(XSGrammar[] grammars) { if (grammars == null || grammars.length == 0) return toXSModel(); int len = grammars.length; boolean hasSelf = false; for (int i = 0; i < len; i++) { if (grammars[i] == this) { hasSelf = true; break; } } SchemaGrammar[] gs = new SchemaGrammar[hasSelf ? len : len+1]; for (int i = 0; i < len; i++) gs[i] = (SchemaGrammar)grammars[i]; if (!hasSelf) gs[len] = this; return new XSModelImpl(gs); }
Example #12
Source File: XSLoaderImpl.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Parse an XML Schema document from a resource identified by a * <code>LSInput</code> . * @param is The <code>LSInput</code> from which the source * document is to be read. * @return An XSModel representing this schema. */ public XSModel load(LSInput is) { try { fGrammarPool.clear(); return ((XSGrammar) fSchemaLoader.loadGrammar(fSchemaLoader.dom2xmlInputSource(is))).toXSModel(); } catch (Exception e) { fSchemaLoader.reportDOMFatalError(e); return null; } }
Example #13
Source File: XMLSchemaLoader.java From Bytecoder with Apache License 2.0 | 5 votes |
public XSModel loadURI(String uri) { try { Grammar g = loadGrammar(new XMLInputSource(null, uri, null, false)); return ((XSGrammar)g).toXSModel(); } catch (Exception e){ reportDOMFatalError(e); return null; } }
Example #14
Source File: XMLSchemaLoader.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public XSModel load(LSInput is) { try { Grammar g = loadGrammar(dom2xmlInputSource(is)); return ((XSGrammar) g).toXSModel(); } catch (Exception e) { reportDOMFatalError(e); return null; } }
Example #15
Source File: XSLoaderImpl.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Parse an XML Schema document from a location identified by a URI * reference. If the URI contains a fragment identifier, the behavior is * not defined by this specification. * @param uri The location of the XML Schema document to be read. * @return An XSModel representing this schema. */ public XSModel loadURI(String uri) { try { fGrammarPool.clear(); return ((XSGrammar) fSchemaLoader.loadGrammar(new XMLInputSource(null, uri, null, false))).toXSModel(); } catch (Exception e){ fSchemaLoader.reportDOMFatalError(e); return null; } }
Example #16
Source File: XMLSchemaLoader.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public XSModel loadURI(String uri) { try { Grammar g = loadGrammar(new XMLInputSource(null, uri, null, false)); return ((XSGrammar)g).toXSModel(); } catch (Exception e){ reportDOMFatalError(e); return null; } }
Example #17
Source File: XSLoaderImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Parse an XML Schema document from a location identified by a URI * reference. If the URI contains a fragment identifier, the behavior is * not defined by this specification. * @param uri The location of the XML Schema document to be read. * @return An XSModel representing this schema. */ public XSModel loadURI(String uri) { try { fGrammarPool.clear(); return ((XSGrammar) fSchemaLoader.loadGrammar(new XMLInputSource(null, uri, null, false))).toXSModel(); } catch (Exception e){ fSchemaLoader.reportDOMFatalError(e); return null; } }
Example #18
Source File: XSLoaderImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Parse an XML Schema document from a resource identified by a * <code>LSInput</code> . * @param is The <code>LSInput</code> from which the source * document is to be read. * @return An XSModel representing this schema. */ public XSModel load(LSInput is) { try { fGrammarPool.clear(); return ((XSGrammar) fSchemaLoader.loadGrammar(fSchemaLoader.dom2xmlInputSource(is))).toXSModel(); } catch (Exception e) { fSchemaLoader.reportDOMFatalError(e); return null; } }
Example #19
Source File: XSLoaderImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Parse an XML Schema document from a location identified by a URI * reference. If the URI contains a fragment identifier, the behavior is * not defined by this specification. * @param uri The location of the XML Schema document to be read. * @return An XSModel representing this schema. */ public XSModel loadURI(String uri) { try { fGrammarPool.clear(); return ((XSGrammar) fSchemaLoader.loadGrammar(new XMLInputSource(null, uri, null))).toXSModel(); } catch (Exception e){ fSchemaLoader.reportDOMFatalError(e); return null; } }
Example #20
Source File: XMLSchemaLoader.java From hottub with GNU General Public License v2.0 | 5 votes |
public XSModel load(LSInput is) { try { Grammar g = loadGrammar(dom2xmlInputSource(is)); return ((XSGrammar) g).toXSModel(); } catch (Exception e) { reportDOMFatalError(e); return null; } }
Example #21
Source File: XMLSchemaLoader.java From hottub with GNU General Public License v2.0 | 5 votes |
public XSModel loadURI(String uri) { try { Grammar g = loadGrammar(new XMLInputSource(null, uri, null)); return ((XSGrammar)g).toXSModel(); } catch (Exception e){ reportDOMFatalError(e); return null; } }
Example #22
Source File: XSLoaderImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Parse an XML Schema document from a location identified by a URI * reference. If the URI contains a fragment identifier, the behavior is * not defined by this specification. * @param uri The location of the XML Schema document to be read. * @return An XSModel representing this schema. */ public XSModel loadURI(String uri) { try { fGrammarPool.clear(); return ((XSGrammar) fSchemaLoader.loadGrammar(new XMLInputSource(null, uri, null))).toXSModel(); } catch (Exception e){ fSchemaLoader.reportDOMFatalError(e); return null; } }
Example #23
Source File: XSLoaderImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Parse an XML Schema document from a resource identified by a * <code>LSInput</code> . * @param is The <code>LSInput</code> from which the source * document is to be read. * @return An XSModel representing this schema. */ public XSModel load(LSInput is) { try { fGrammarPool.clear(); return ((XSGrammar) fSchemaLoader.loadGrammar(fSchemaLoader.dom2xmlInputSource(is))).toXSModel(); } catch (Exception e) { fSchemaLoader.reportDOMFatalError(e); return null; } }
Example #24
Source File: XMLSchemaLoader.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public XSModel load(LSInput is) { try { Grammar g = loadGrammar(dom2xmlInputSource(is)); return ((XSGrammar) g).toXSModel(); } catch (Exception e) { reportDOMFatalError(e); return null; } }
Example #25
Source File: XMLSchemaLoader.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public XSModel loadURI(String uri) { try { Grammar g = loadGrammar(new XMLInputSource(null, uri, null)); return ((XSGrammar)g).toXSModel(); } catch (Exception e){ reportDOMFatalError(e); return null; } }
Example #26
Source File: XSLoaderImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Parse an XML Schema document from a location identified by a URI * reference. If the URI contains a fragment identifier, the behavior is * not defined by this specification. * @param uri The location of the XML Schema document to be read. * @return An XSModel representing this schema. */ public XSModel loadURI(String uri) { try { fGrammarPool.clear(); return ((XSGrammar) fSchemaLoader.loadGrammar(new XMLInputSource(null, uri, null))).toXSModel(); } catch (Exception e){ fSchemaLoader.reportDOMFatalError(e); return null; } }
Example #27
Source File: XSLoaderImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Parse an XML Schema document from a resource identified by a * <code>LSInput</code> . * @param is The <code>LSInput</code> from which the source * document is to be read. * @return An XSModel representing this schema. */ public XSModel load(LSInput is) { try { fGrammarPool.clear(); return ((XSGrammar) fSchemaLoader.loadGrammar(fSchemaLoader.dom2xmlInputSource(is))).toXSModel(); } catch (Exception e) { fSchemaLoader.reportDOMFatalError(e); return null; } }
Example #28
Source File: XMLSchemaLoader.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public XSModel load(LSInput is) { try { Grammar g = loadGrammar(dom2xmlInputSource(is)); return ((XSGrammar) g).toXSModel(); } catch (Exception e) { reportDOMFatalError(e); return null; } }
Example #29
Source File: XMLSchemaLoader.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public XSModel loadURI(String uri) { try { Grammar g = loadGrammar(new XMLInputSource(null, uri, null)); return ((XSGrammar)g).toXSModel(); } catch (Exception e){ reportDOMFatalError(e); return null; } }
Example #30
Source File: XSLoaderImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Parse an XML Schema document from a location identified by a URI * reference. If the URI contains a fragment identifier, the behavior is * not defined by this specification. * @param uri The location of the XML Schema document to be read. * @return An XSModel representing this schema. */ public XSModel loadURI(String uri) { try { fGrammarPool.clear(); return ((XSGrammar) fSchemaLoader.loadGrammar(new XMLInputSource(null, uri, null))).toXSModel(); } catch (Exception e){ fSchemaLoader.reportDOMFatalError(e); return null; } }