< prev index next >

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

Print this page


   1 /*
   2  * reserved comment block
   3  * DO NOT REMOVE OR ALTER!
   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 


 499         if (needsSyncData()) {
 500             synchronizeData();
 501         }
 502         return isSpecified();
 503 
 504     } // getSpecified():boolean
 505 
 506     //
 507     // Attr2 methods
 508     //
 509 
 510     /**
 511      * Returns the element node that this attribute is associated with,
 512      * or null if the attribute has not been added to an element.
 513      *
 514      * @see #getOwnerElement
 515      *
 516      * @deprecated Previous working draft of DOM Level 2. New method
 517      *             is <tt>getOwnerElement()</tt>.
 518      */

 519     public Element getElement() {
 520         // if we have an owner, ownerNode is our ownerElement, otherwise it's
 521         // our ownerDocument and we don't have an ownerElement
 522         return (Element) (isOwned() ? ownerNode : null);
 523     }
 524 
 525     /**
 526      * Returns the element node that this attribute is associated with,
 527      * or null if the attribute has not been added to an element.
 528      *
 529      * @since WD-DOM-Level-2-19990719
 530      */
 531     public Element getOwnerElement() {
 532         // if we have an owner, ownerNode is our ownerElement, otherwise it's
 533         // our ownerDocument and we don't have an ownerElement
 534         return (Element) (isOwned() ? ownerNode : null);
 535     }
 536 
 537     public void normalize() {
 538 


   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 


 498         if (needsSyncData()) {
 499             synchronizeData();
 500         }
 501         return isSpecified();
 502 
 503     } // getSpecified():boolean
 504 
 505     //
 506     // Attr2 methods
 507     //
 508 
 509     /**
 510      * Returns the element node that this attribute is associated with,
 511      * or null if the attribute has not been added to an element.
 512      *
 513      * @see #getOwnerElement
 514      *
 515      * @deprecated Previous working draft of DOM Level 2. New method
 516      *             is <tt>getOwnerElement()</tt>.
 517      */
 518     @Deprecated
 519     public Element getElement() {
 520         // if we have an owner, ownerNode is our ownerElement, otherwise it's
 521         // our ownerDocument and we don't have an ownerElement
 522         return (Element) (isOwned() ? ownerNode : null);
 523     }
 524 
 525     /**
 526      * Returns the element node that this attribute is associated with,
 527      * or null if the attribute has not been added to an element.
 528      *
 529      * @since WD-DOM-Level-2-19990719
 530      */
 531     public Element getOwnerElement() {
 532         // if we have an owner, ownerNode is our ownerElement, otherwise it's
 533         // our ownerDocument and we don't have an ownerElement
 534         return (Element) (isOwned() ? ownerNode : null);
 535     }
 536 
 537     public void normalize() {
 538 


< prev index next >