public Pattern getParsedPattern() throws IllegalSchemaException { if (hadError) throw new IllegalSchemaException(); return startPattern; }
public Pattern getParsedPattern() throws IllegalSchemaException { if (hadError) throw new IllegalSchemaException(); return startPattern; }
public Pattern getParsedPattern() throws IllegalSchemaException { if (hadError) throw new IllegalSchemaException(); return startPattern; }
static public RuntimeException unwrapBuildException(BuildException e) throws SAXException, IllegalSchemaException, IOException { Throwable t = e.getCause(); if (t instanceof IOException) throw (IOException)t; if (t instanceof RuntimeException) return (RuntimeException)t; if (t instanceof IllegalSchemaException) throw new IllegalSchemaException(); if (t instanceof SAXException) throw (SAXException)t; if (t instanceof Exception) throw new SAXException((Exception)t); throw new SAXException(t.getClass().getName() + " thrown"); }
static public RuntimeException unwrapBuildException(BuildException e) throws SAXException, IllegalSchemaException, IOException { Throwable t = e.getCause(); if (t instanceof IOException) throw (IOException)t; if (t instanceof RuntimeException) return (RuntimeException)t; if (t instanceof IllegalSchemaException) throw new IllegalSchemaException(); if (t instanceof SAXException) throw (SAXException)t; if (t instanceof Exception) throw new SAXException((Exception)t); throw new SAXException(t.getClass().getName() + " thrown"); }
Pattern parseInclude(IncludedGrammar<Pattern, Location, ElementAnnotation, CommentListImpl, AnnotationsImpl> g) throws IllegalSchemaException { try { Pattern p = IncludedGrammar(g); if (!hadError) return p; } catch (ParseException e) { error("syntax_error", e.currentToken.next); } catch (EscapeSyntaxException e) { reportEscapeSyntaxException(e); } throw new IllegalSchemaException(); }
Pattern parseInclude(IncludedGrammar<Pattern, Location, ElementAnnotation, CommentListImpl, AnnotationsImpl> g) throws IllegalSchemaException { try { Pattern p = IncludedGrammar(g); if (!hadError) return p; } catch (ParseException e) { error("syntax_error", e.currentToken.next); } catch (EscapeSyntaxException e) { reportEscapeSyntaxException(e); } throw new IllegalSchemaException(); }
Pattern parse(Scope<Pattern, Location, ElementAnnotation, CommentListImpl, AnnotationsImpl> scope) throws IllegalSchemaException { try { Pattern p = Input(scope); if (!hadError) return p; } catch (ParseException e) { error("syntax_error", e.currentToken.next); } catch (EscapeSyntaxException e) { reportEscapeSyntaxException(e); } throw new IllegalSchemaException(); }
Pattern parseInclude(IncludedGrammar<Pattern, Location, ElementAnnotation, CommentListImpl, AnnotationsImpl> g) throws IllegalSchemaException { try { Pattern p = IncludedGrammar(g); if (!hadError) return p; } catch (ParseException e) { error("syntax_error", e.currentToken.next); } catch (EscapeSyntaxException e) { reportEscapeSyntaxException(e); } throw new IllegalSchemaException(); }
Pattern parse(Scope<Pattern, Location, ElementAnnotation, CommentListImpl, AnnotationsImpl> scope) throws IllegalSchemaException { try { Pattern p = Input(scope); if (!hadError) return p; } catch (ParseException e) { error("syntax_error", e.currentToken.next); } catch (EscapeSyntaxException e) { reportEscapeSyntaxException(e); } throw new IllegalSchemaException(); }
Pattern parse(Scope<Pattern, Location, ElementAnnotation, CommentListImpl, AnnotationsImpl> scope) throws IllegalSchemaException { try { Pattern p = Input(scope); if (!hadError) return p; } catch (ParseException e) { error("syntax_error", e.currentToken.next); } catch (EscapeSyntaxException e) { reportEscapeSyntaxException(e); } throw new IllegalSchemaException(); }
static SchemaCollection parse(Parseable<Pattern, NameClass, SourceLocation, ElementAnnotationBuilderImpl, CommentListImpl, AnnotationsImpl> parseable, String uri, ErrorHandler eh, DatatypeLibraryFactory dlf, boolean commentsNeedTrimming) throws IllegalSchemaException, IOException, SAXException { try { SchemaCollection sc = new SchemaCollection(); SchemaBuilderImpl sb = new SchemaBuilderImpl(parseable, eh, sc.getSchemaDocumentMap(), dlf, commentsNeedTrimming); sc.setMainUri(uri); sb.parse(parseable, uri); if (sb.hadError) throw new IllegalSchemaException(); return sc; } catch (BuildException e) { Throwable t = e.getCause(); if (t instanceof IOException) throw (IOException)t; if (t instanceof RuntimeException) throw (RuntimeException)t; if (t instanceof SAXException) throw (SAXException)t; if (t instanceof Exception) throw new SAXException((Exception)t); throw new SAXException(t.getClass().getName() + " thrown"); } }
private Pattern expandPattern(Pattern pattern) throws IllegalSchemaException, BuildException { if (!hadError) { try { pattern.checkRecursion(0); pattern = pattern.expand(pb); pattern.checkRestrictions(Pattern.START_CONTEXT, null, null); if (!hadError) return pattern; } catch (SAXParseException e) { error(e); } catch (SAXException e) { throw new BuildException(e); } catch (RestrictionViolationException e) { if (e.getName() != null) error(e.getMessageId(), NameFormatter.format(e.getName()), e.getLocator()); else if (e.getNamespaceUri() != null) error(e.getMessageId(), e.getNamespaceUri(), e.getLocator()); else error(e.getMessageId(), e.getLocator()); } } throw new IllegalSchemaException(); }
private Pattern expandPattern(Pattern pattern) throws IllegalSchemaException, BuildException { if (!hadError) { try { pattern.checkRecursion(0); pattern = pattern.expand(pb); pattern.checkRestrictions(Pattern.START_CONTEXT, null, null); if (!hadError) return pattern; } catch (SAXParseException e) { error(e); } catch (SAXException e) { throw new BuildException(e); } catch (RestrictionViolationException e) { if (e.getName() != null) error(e.getMessageId(), NameFormatter.format(e.getName()), e.getLocator()); else if (e.getNamespaceUri() != null) error(e.getMessageId(), e.getNamespaceUri(), e.getLocator()); else error(e.getMessageId(), e.getLocator()); } } throw new IllegalSchemaException(); }