srcanaapps/apiquerytool/com.nokia.s60tools.apiquery/src/com/nokia/s60tools/apiquery/shared/util/xml/XMLElementData.java
changeset 0 a02c979e8dfd
equal deleted inserted replaced
-1:000000000000 0:a02c979e8dfd
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17  
       
    18 package com.nokia.s60tools.apiquery.shared.util.xml;
       
    19 
       
    20 import java.util.Map;
       
    21 
       
    22 /**
       
    23  * Stores data for a single XML element that
       
    24  * has simple string content and no sub elements.
       
    25  * Only attribute data is stored.
       
    26  */
       
    27 public class XMLElementData {
       
    28 
       
    29 	/**
       
    30 	 * Content for the element.
       
    31 	 */
       
    32 	private final String elementContent;
       
    33 	
       
    34 	/**
       
    35 	 * Name of the element.
       
    36 	 */
       
    37 	private final String elementName;
       
    38 
       
    39 	/**
       
    40 	 * Attribute data for the element.
       
    41 	 */
       
    42 	private final Map<String, String> attrData;
       
    43 
       
    44 	public XMLElementData(String elementName, String elementContent, Map<String, String> attrData){
       
    45 		this.elementName = elementName;
       
    46 		this.elementContent = elementContent;
       
    47 		this.attrData = attrData;		
       
    48 	}
       
    49 
       
    50 	/**
       
    51 	 * @return the elementContent
       
    52 	 */
       
    53 	public String getElementContent() {
       
    54 		return elementContent;
       
    55 	}
       
    56 
       
    57 	/**
       
    58 	 * @return the elementName
       
    59 	 */
       
    60 	public String getElementName() {
       
    61 		return elementName;
       
    62 	}
       
    63 	
       
    64 	/**
       
    65 	 * @return the attrData
       
    66 	 */
       
    67 	public Map<String, String> getAttributes() {
       
    68 		return attrData;
       
    69 	}	
       
    70 }