< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DOMEntityResolverWrapper.java

Print this page


   1 /*
   2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
   3  * @LastModified: Nov 2017
   4  */
   5 /*
   6  * Licensed to the Apache Software Foundation (ASF) under one or more
   7  * contributor license agreements.  See the NOTICE file distributed with
   8  * this work for additional information regarding copyright ownership.
   9  * The ASF licenses this file to You under the Apache License, Version 2.0
  10  * (the "License"); you may not use this file except in compliance with
  11  * the License.  You may obtain a copy of the License at
  12  *
  13  *      http://www.apache.org/licenses/LICENSE-2.0
  14  *
  15  * Unless required by applicable law or agreed to in writing, software
  16  * distributed under the License is distributed on an "AS IS" BASIS,
  17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18  * See the License for the specific language governing permissions and
  19  * limitations under the License.
  20  */
  21 
  22 package com.sun.org.apache.xerces.internal.util;
  23 


  28 import com.sun.org.apache.xerces.internal.xni.parser.XMLEntityResolver;
  29 import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
  30 
  31 import org.w3c.dom.ls.LSResourceResolver;
  32 import org.w3c.dom.ls.LSInput;
  33 
  34 import java.io.InputStream;
  35 import java.io.IOException;
  36 import java.io.Reader;
  37 import java.io.StringReader;
  38 
  39 
  40 /**
  41  * This class wraps DOM entity resolver to XNI entity resolver.
  42  *
  43  * @see LSResourceResolver
  44  *
  45  * @author Gopal Sharma, SUN MicroSystems Inc.
  46  * @author Elena Litani, IBM
  47  * @author Ramesh Mandava, Sun Microsystems

  48  */
  49 public class DOMEntityResolverWrapper
  50     implements XMLEntityResolver {
  51 
  52     //
  53     // Data
  54     //
  55 
  56     /** XML 1.0 type constant according to DOM L3 LS CR spec "http://www.w3.org/TR/2003/CR-DOM-Level-3-LS-20031107" */
  57     private static final String XML_TYPE = "http://www.w3.org/TR/REC-xml";
  58 
  59     /** XML Schema constant according to DOM L3 LS CR spec "http://www.w3.org/TR/2003/CR-DOM-Level-3-LS-20031107" */
  60     private static final String XSD_TYPE = "http://www.w3.org/2001/XMLSchema";
  61 
  62     /** The DOM entity resolver. */
  63     protected LSResourceResolver fEntityResolver;
  64 
  65     //
  66     // Constructors
  67     //


   1 /*
   2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.

   3  */
   4 /*
   5  * Licensed to the Apache Software Foundation (ASF) under one or more
   6  * contributor license agreements.  See the NOTICE file distributed with
   7  * this work for additional information regarding copyright ownership.
   8  * The ASF licenses this file to You under the Apache License, Version 2.0
   9  * (the "License"); you may not use this file except in compliance with
  10  * the License.  You may obtain a copy of the License at
  11  *
  12  *      http://www.apache.org/licenses/LICENSE-2.0
  13  *
  14  * Unless required by applicable law or agreed to in writing, software
  15  * distributed under the License is distributed on an "AS IS" BASIS,
  16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17  * See the License for the specific language governing permissions and
  18  * limitations under the License.
  19  */
  20 
  21 package com.sun.org.apache.xerces.internal.util;
  22 


  27 import com.sun.org.apache.xerces.internal.xni.parser.XMLEntityResolver;
  28 import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
  29 
  30 import org.w3c.dom.ls.LSResourceResolver;
  31 import org.w3c.dom.ls.LSInput;
  32 
  33 import java.io.InputStream;
  34 import java.io.IOException;
  35 import java.io.Reader;
  36 import java.io.StringReader;
  37 
  38 
  39 /**
  40  * This class wraps DOM entity resolver to XNI entity resolver.
  41  *
  42  * @see LSResourceResolver
  43  *
  44  * @author Gopal Sharma, SUN MicroSystems Inc.
  45  * @author Elena Litani, IBM
  46  * @author Ramesh Mandava, Sun Microsystems
  47  * @LastModified: Nov 2017
  48  */
  49 public class DOMEntityResolverWrapper
  50     implements XMLEntityResolver {
  51 
  52     //
  53     // Data
  54     //
  55 
  56     /** XML 1.0 type constant according to DOM L3 LS CR spec "http://www.w3.org/TR/2003/CR-DOM-Level-3-LS-20031107" */
  57     private static final String XML_TYPE = "http://www.w3.org/TR/REC-xml";
  58 
  59     /** XML Schema constant according to DOM L3 LS CR spec "http://www.w3.org/TR/2003/CR-DOM-Level-3-LS-20031107" */
  60     private static final String XSD_TYPE = "http://www.w3.org/2001/XMLSchema";
  61 
  62     /** The DOM entity resolver. */
  63     protected LSResourceResolver fEntityResolver;
  64 
  65     //
  66     // Constructors
  67     //


< prev index next >