Coverage Report - org.simpleframework.xml.stream.EventAttribute
 
Classes in this File Line Coverage Branch Coverage Complexity
EventAttribute
20%
1/5
N/A
1
 
 1  
 /*
 2  
  * EventAttribute.java January 2010
 3  
  *
 4  
  * Copyright (C) 2010, Niall Gallagher <niallg@users.sf.net>
 5  
  *
 6  
  * Licensed under the Apache License, Version 2.0 (the "License");
 7  
  * you may not use this file except in compliance with the License.
 8  
  * You may obtain a copy of the License at
 9  
  *
 10  
  *     http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing, software
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
 14  
  * implied. See the License for the specific language governing 
 15  
  * permissions and limitations under the License.
 16  
  */
 17  
 
 18  
 package org.simpleframework.xml.stream;
 19  
 
 20  
 /**
 21  
  * The <code>EventAttribute</code> object represents an attribute 
 22  
  * that is associated with an event node. An attribute is required 
 23  
  * to provide the name and value for the attribute, and optionally 
 24  
  * the namespace reference and prefix. For debugging purposes the 
 25  
  * source object from the internal XML provider can be acquired.
 26  
  * 
 27  
  * @author Niall Gallagher
 28  
  */
 29  806499
 abstract class EventAttribute implements Attribute {
 30  
 
 31  
    /**
 32  
     * This is used to acquire the namespace prefix associated with
 33  
     * this attribute. A prefix is used to qualify the attribute
 34  
     * within a namespace. So, if this has a prefix then it should
 35  
     * have a reference associated with it.
 36  
     * 
 37  
     * @return this returns the namespace prefix for the attribute
 38  
     */
 39  
    public String getPrefix() {
 40  0
       return null;
 41  
    }
 42  
 
 43  
    /**
 44  
     * This is used to acquire the namespace reference that this 
 45  
     * attribute is in. A namespace is normally associated with an
 46  
     * attribute if that attribute is prefixed with a known token.
 47  
     * If there is no prefix then this will return null.
 48  
     * 
 49  
     * @return this provides the associated namespace reference
 50  
     */
 51  
    public String getReference() {
 52  0
       return null;
 53  
    }
 54  
    
 55  
    /**
 56  
     * This is used to return the source of the attribute. Depending 
 57  
     * on which provider was selected to parse the XML document an
 58  
     * object for the internal parsers representation of this will
 59  
     * be returned. This is useful for debugging purposes.
 60  
     * 
 61  
     * @return this will return the source object for this event
 62  
     */
 63  
    public Object getSource() {
 64  0
       return null;
 65  
    }
 66  
 
 67  
    /**
 68  
     * This returns true if the attribute is reserved. An attribute
 69  
     * is considered reserved if it begins with "xml" according to 
 70  
     * the namespaces in XML 1.0 specification. Such attributes are
 71  
     * used for namespaces and other such details.
 72  
     *
 73  
     * @return this returns true if the attribute is reserved
 74  
     */
 75  
    public boolean isReserved() {
 76  0
       return false;
 77  
    }
 78  
 }