325N/A * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 325N/A * This code is free software; you can redistribute it and/or modify it 325N/A * under the terms of the GNU General Public License version 2 only, as 325N/A * published by the Free Software Foundation. Oracle designates this 325N/A * particular file as subject to the "Classpath" exception as provided 325N/A * by Oracle in the LICENSE file that accompanied this code. 325N/A * This code is distributed in the hope that it will be useful, but WITHOUT 325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 325N/A * version 2 for more details (a copy is included in the LICENSE file that 325N/A * accompanied this code). 325N/A * You should have received a copy of the GNU General Public License version 325N/A * 2 along with this work; if not, write to the Free Software Foundation, 325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 325N/A * or visit www.oracle.com if you need additional information or have any 325N/A * To correctly feed documents to a schema parser, we need to remember 325N/A * which documents (of the forest) were given as the root 325N/A * Set of system ids as strings. 325N/A * Contains wsdl:import(s) 325N/A * actual data storage map<SystemId,Document>. 325N/A * inlined schema elements inside wsdl:type section 325N/A * Stores location information for all the trees in this forest. 325N/A * Stores all the outer-most <jaxb:bindings> customizations. 325N/A * Schema language dependent part of the processing. 325N/A * Parses an XML at the given location ( 325N/A * and XMLs referenced by it) into DOM trees 325N/A * and stores them to this forest. 325N/A * @return the parsed DOM document object. 325N/A // allow entity resolver to find the actual byte stream. 325N/A // this document has already been parsed. Just ignore. 325N/A // but we still use the original system Id as the key. 325N/A * Parses the given document and add it to the DOM forest. 325N/A * @return null if there was a parse error. otherwise non-null. 325N/A // put into the map before growing a tree, to 325N/A // prevent recursive reference from causing infinite loop. 325N/A * Gets the DOM that was built. 325N/A * This version requires that the DOM object to be created and registered 325N/A * to the map beforehand. 325N/A // insert the reference finder so that 325N/A // leave the system ID untouched. In my experience URI is often too strict 325N/A * Gets the DOM tree associated with the specified system ID, 325N/A * or null if none is found. 325N/A // As of JDK1.4, java.net.URL.toExternal method returns URLs like 325N/A // "file:/abc/def/ghi" which is an incorrect file protocol URL according to RFC1738. 325N/A // Some other correctly functioning parts return the correct URLs ("file:///abc/def/ghi"), 325N/A // and this descripancy breaks DOM look up by system ID. 325N/A // this extra check solves this problem. 325N/A // on Windows, filenames are case insensitive. 325N/A // perform case-insensitive search for improved user experience 325N/A * Strips off the leading 'file:///' portion from an URL. 325N/A * Gets all the system IDs of the documents. 325N/A * Gets the system ID from which the given DOM is parsed. 325N/A * Gets the first one (which is more or less random) in {@link #rootDocuments}. 325N/A * Dumps the contents of the forest to the specified stream. 325N/A * This is a debug method. As such, error handling is sloppy. 325N/A // create identity transformer