1 /*
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
3 * @LastModified: Oct 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.xpath.internal;
23
24 import com.sun.org.apache.xml.internal.dtm.DTM;
25 import com.sun.org.apache.xml.internal.utils.SystemIDResolver;
26 import java.io.IOException;
27 import java.util.ArrayList;
28 import java.util.List;
29 import javax.xml.transform.Source;
30 import javax.xml.transform.SourceLocator;
31 import javax.xml.transform.TransformerException;
32 import javax.xml.transform.URIResolver;
33 import javax.xml.transform.sax.SAXSource;
34 import javax.xml.transform.stream.StreamSource;
35 import org.xml.sax.XMLReader;
36 import org.xml.sax.helpers.XMLReaderFactory;
37
38 /**
39 * This class bottlenecks all management of source trees. The methods
40 * in this class should allow easy garbage collection of source
41 * trees (not yet!), and should centralize parsing for those source trees.
42 */
43 @SuppressWarnings("deprecation")
44 public class SourceTreeManager
45 {
46
47 /** List of SourceTree objects that this manager manages. */
48 private List<SourceTree> m_sourceTree = new ArrayList<>();
49
50 /**
51 * Reset the list of SourceTree objects that this manager manages.
52 *
53 */
54 public void reset()
55 {
56 m_sourceTree = new ArrayList<>();
57 }
58
59 /** The TrAX URI resolver used to obtain source trees. */
60 URIResolver m_uriResolver;
61
|
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.xpath.internal;
22
23 import com.sun.org.apache.xml.internal.dtm.DTM;
24 import com.sun.org.apache.xml.internal.utils.SystemIDResolver;
25 import java.io.IOException;
26 import java.util.ArrayList;
27 import java.util.List;
28 import javax.xml.transform.Source;
29 import javax.xml.transform.SourceLocator;
30 import javax.xml.transform.TransformerException;
31 import javax.xml.transform.URIResolver;
32 import javax.xml.transform.sax.SAXSource;
33 import javax.xml.transform.stream.StreamSource;
34 import org.xml.sax.XMLReader;
35 import org.xml.sax.helpers.XMLReaderFactory;
36
37 /**
38 * This class bottlenecks all management of source trees. The methods
39 * in this class should allow easy garbage collection of source
40 * trees (not yet!), and should centralize parsing for those source trees.
41 *
42 * @LastModified: Oct 2017
43 */
44 @SuppressWarnings("deprecation")
45 public class SourceTreeManager
46 {
47
48 /** List of SourceTree objects that this manager manages. */
49 private List<SourceTree> m_sourceTree = new ArrayList<>();
50
51 /**
52 * Reset the list of SourceTree objects that this manager manages.
53 *
54 */
55 public void reset()
56 {
57 m_sourceTree = new ArrayList<>();
58 }
59
60 /** The TrAX URI resolver used to obtain source trees. */
61 URIResolver m_uriResolver;
62
|