< prev index next >

src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java

Print this page


   1 /*
   2  * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  58 import com.sun.xml.internal.rngom.ast.builder.Grammar;
  59 import com.sun.xml.internal.rngom.ast.builder.GrammarSection;
  60 import com.sun.xml.internal.rngom.ast.builder.Include;
  61 import com.sun.xml.internal.rngom.ast.builder.IncludedGrammar;
  62 import com.sun.xml.internal.rngom.ast.builder.NameClassBuilder;
  63 import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
  64 import com.sun.xml.internal.rngom.ast.builder.Scope;
  65 import com.sun.xml.internal.rngom.ast.om.Location;
  66 import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
  67 import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
  68 import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
  69 import com.sun.xml.internal.rngom.ast.util.LocatorImpl;
  70 import com.sun.xml.internal.rngom.dt.builtin.BuiltinDatatypeLibraryFactory;
  71 import com.sun.xml.internal.rngom.dt.CascadingDatatypeLibraryFactory;
  72 import com.sun.xml.internal.rngom.nc.NameClass;
  73 import com.sun.xml.internal.rngom.nc.NameClassBuilderImpl;
  74 import com.sun.xml.internal.rngom.parse.Context;
  75 import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
  76 import com.sun.xml.internal.rngom.parse.Parseable;
  77 import com.sun.xml.internal.rngom.util.Localizer;
  78 import org.relaxng.datatype.Datatype;
  79 import org.relaxng.datatype.DatatypeBuilder;
  80 import org.relaxng.datatype.DatatypeException;
  81 import org.relaxng.datatype.DatatypeLibrary;
  82 import org.relaxng.datatype.DatatypeLibraryFactory;
  83 import org.relaxng.datatype.ValidationContext;
  84 import org.relaxng.datatype.helpers.DatatypeLibraryLoader;
  85 import org.xml.sax.ErrorHandler;
  86 import org.xml.sax.Locator;
  87 import org.xml.sax.SAXException;
  88 import org.xml.sax.SAXParseException;
  89 
  90 public class SchemaBuilderImpl implements SchemaBuilder, ElementAnnotationBuilder, CommentList {
  91 
  92     private final SchemaBuilderImpl parent;
  93     private boolean hadError = false;
  94     private final SchemaPatternBuilder pb;
  95     private final DatatypeLibraryFactory datatypeLibraryFactory;
  96     private final String inheritNs;
  97     private final ErrorHandler eh;
  98     private final OpenIncludes openIncludes;
  99     private final NameClassBuilder ncb = new NameClassBuilderImpl();
 100     static final Localizer localizer = new Localizer(SchemaBuilderImpl.class);
 101 
 102     static class OpenIncludes {
 103 
 104         final String uri;


   1 /*
   2  * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  58 import com.sun.xml.internal.rngom.ast.builder.Grammar;
  59 import com.sun.xml.internal.rngom.ast.builder.GrammarSection;
  60 import com.sun.xml.internal.rngom.ast.builder.Include;
  61 import com.sun.xml.internal.rngom.ast.builder.IncludedGrammar;
  62 import com.sun.xml.internal.rngom.ast.builder.NameClassBuilder;
  63 import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
  64 import com.sun.xml.internal.rngom.ast.builder.Scope;
  65 import com.sun.xml.internal.rngom.ast.om.Location;
  66 import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
  67 import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
  68 import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
  69 import com.sun.xml.internal.rngom.ast.util.LocatorImpl;
  70 import com.sun.xml.internal.rngom.dt.builtin.BuiltinDatatypeLibraryFactory;
  71 import com.sun.xml.internal.rngom.dt.CascadingDatatypeLibraryFactory;
  72 import com.sun.xml.internal.rngom.nc.NameClass;
  73 import com.sun.xml.internal.rngom.nc.NameClassBuilderImpl;
  74 import com.sun.xml.internal.rngom.parse.Context;
  75 import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
  76 import com.sun.xml.internal.rngom.parse.Parseable;
  77 import com.sun.xml.internal.rngom.util.Localizer;
  78 import com.sun.xml.internal.org.relaxng.datatype.Datatype;
  79 import com.sun.xml.internal.org.relaxng.datatype.DatatypeBuilder;
  80 import com.sun.xml.internal.org.relaxng.datatype.DatatypeException;
  81 import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
  82 import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
  83 import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
  84 import com.sun.xml.internal.org.relaxng.datatype.helpers.DatatypeLibraryLoader;
  85 import org.xml.sax.ErrorHandler;
  86 import org.xml.sax.Locator;
  87 import org.xml.sax.SAXException;
  88 import org.xml.sax.SAXParseException;
  89 
  90 public class SchemaBuilderImpl implements SchemaBuilder, ElementAnnotationBuilder, CommentList {
  91 
  92     private final SchemaBuilderImpl parent;
  93     private boolean hadError = false;
  94     private final SchemaPatternBuilder pb;
  95     private final DatatypeLibraryFactory datatypeLibraryFactory;
  96     private final String inheritNs;
  97     private final ErrorHandler eh;
  98     private final OpenIncludes openIncludes;
  99     private final NameClassBuilder ncb = new NameClassBuilderImpl();
 100     static final Localizer localizer = new Localizer(SchemaBuilderImpl.class);
 101 
 102     static class OpenIncludes {
 103 
 104         final String uri;


< prev index next >