< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttributeMap.java

Print this page


   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.dom;
  23 
  24 import java.util.ArrayList;
  25 import java.util.List;
  26 import org.w3c.dom.DOMException;
  27 import org.w3c.dom.Node;
  28 
  29 /**
  30  * AttributeMap inherits from NamedNodeMapImpl and extends it to deal with the
  31  * specifics of storing attributes. These are:
  32  * <ul>
  33  *  <li>managing ownership of attribute nodes
  34  *  <li>managing default attributes
  35  *  <li>firing mutation events
  36  * </ul>
  37  * <p>
  38  * This class doesn't directly support mutation events, however, it notifies
  39  * the document when mutations are performed so that the document class do so.
  40  *
  41  * @xerces.internal
  42  *

  43  */
  44 public class AttributeMap extends NamedNodeMapImpl {
  45 
  46     /** Serialization version. */
  47     static final long serialVersionUID = 8872606282138665383L;
  48 
  49     //
  50     // Constructors
  51     //
  52 
  53     /** Constructs a named node map. */
  54     protected AttributeMap(ElementImpl ownerNode, NamedNodeMapImpl defaults) {
  55         super(ownerNode);
  56         if (defaults != null) {
  57             // initialize map with the defaults
  58             cloneContent(defaults);
  59             if (nodes != null) {
  60                 hasDefaults(true);
  61             }
  62         }


   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.dom;
  22 
  23 import java.util.ArrayList;
  24 import java.util.List;
  25 import org.w3c.dom.DOMException;
  26 import org.w3c.dom.Node;
  27 
  28 /**
  29  * AttributeMap inherits from NamedNodeMapImpl and extends it to deal with the
  30  * specifics of storing attributes. These are:
  31  * <ul>
  32  *  <li>managing ownership of attribute nodes
  33  *  <li>managing default attributes
  34  *  <li>firing mutation events
  35  * </ul>
  36  * <p>
  37  * This class doesn't directly support mutation events, however, it notifies
  38  * the document when mutations are performed so that the document class do so.
  39  *
  40  * @xerces.internal
  41  *
  42  * @LastModified: Oct 2017
  43  */
  44 public class AttributeMap extends NamedNodeMapImpl {
  45 
  46     /** Serialization version. */
  47     static final long serialVersionUID = 8872606282138665383L;
  48 
  49     //
  50     // Constructors
  51     //
  52 
  53     /** Constructs a named node map. */
  54     protected AttributeMap(ElementImpl ownerNode, NamedNodeMapImpl defaults) {
  55         super(ownerNode);
  56         if (defaults != null) {
  57             // initialize map with the defaults
  58             cloneContent(defaults);
  59             if (nodes != null) {
  60                 hasDefaults(true);
  61             }
  62         }


< prev index next >