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.xerces.internal.impl.dtd;
23
24 import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl;
25 import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier;
26 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription;
27 import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
28 import java.util.List;
29
30 /**
31 * All information specific to DTD grammars.
32 *
33 * @xerces.internal
34 *
35 * @author Neil Graham, IBM
36 */
37 public class XMLDTDDescription extends XMLResourceIdentifierImpl
38 implements com.sun.org.apache.xerces.internal.xni.grammars.XMLDTDDescription {
39
40 // Data
41
42 // pieces of information needed to make this usable as a Grammar key
43 // if we know the root of this grammar, here's its name:
44 protected String fRootName = null;
45
46 // if we don't know the root name, this stores all elements that
47 // could serve; fPossibleRoots and fRootName cannot both be non-null
48 protected List<String> fPossibleRoots = null;
49
50 // Constructors:
51 public XMLDTDDescription(XMLResourceIdentifier id, String rootName) {
52 this.setValues(id.getPublicId(), id.getLiteralSystemId(),
53 id.getBaseSystemId(), id.getExpandedSystemId());
54 this.fRootName = rootName;
55 this.fPossibleRoots = null;
|
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.impl.dtd;
22
23 import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl;
24 import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier;
25 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription;
26 import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
27 import java.util.List;
28
29 /**
30 * All information specific to DTD grammars.
31 *
32 * @xerces.internal
33 *
34 * @author Neil Graham, IBM
35 * @LastModified: Oct 2017
36 */
37 public class XMLDTDDescription extends XMLResourceIdentifierImpl
38 implements com.sun.org.apache.xerces.internal.xni.grammars.XMLDTDDescription {
39
40 // Data
41
42 // pieces of information needed to make this usable as a Grammar key
43 // if we know the root of this grammar, here's its name:
44 protected String fRootName = null;
45
46 // if we don't know the root name, this stores all elements that
47 // could serve; fPossibleRoots and fRootName cannot both be non-null
48 protected List<String> fPossibleRoots = null;
49
50 // Constructors:
51 public XMLDTDDescription(XMLResourceIdentifier id, String rootName) {
52 this.setValues(id.getPublicId(), id.getLiteralSystemId(),
53 id.getBaseSystemId(), id.getExpandedSystemId());
54 this.fRootName = rootName;
55 this.fPossibleRoots = null;
|