srcanaapps/apiquerytool/com.nokia.s60tools.apiquery/src/com/nokia/s60tools/apiquery/shared/datatypes/APIShortDescription.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.datatypes;
       
    19 
       
    20 import java.util.ArrayList;
       
    21 
       
    22 /**
       
    23  * Stores information related to a single API Summary
       
    24  * object to be shown in UI.
       
    25  */
       
    26 public class APIShortDescription {
       
    27 
       
    28 	/**
       
    29 	 * Name of the API in question.
       
    30 	 */
       
    31 	private final String name;
       
    32 	
       
    33 	/**
       
    34 	 * Source this informatio summary is got from. 
       
    35 	 */
       
    36 	private final String source;
       
    37 
       
    38 	/**
       
    39 	 * Description for the source shown in the UI.
       
    40 	 */
       
    41 	private final String sourceDescription;
       
    42 	
       
    43 	private ArrayList<String> detailsShortData = null;
       
    44 
       
    45 
       
    46 	private APIDetails apiDetails = null;
       
    47 
       
    48 	/**
       
    49 	 * Constructor. 
       
    50 	 * @param name Name of the API.
       
    51 	 * @param source Source this information summary is got from. Can be used
       
    52 	 *               to find further details.
       
    53 	 * @param sourceDescription Description for the source shown in the UI.
       
    54 	 */
       
    55 	public APIShortDescription(String name, String source, String sourceDescription){
       
    56 		this.name = name;
       
    57 		this.source = source;
       
    58 		this.sourceDescription = sourceDescription;		
       
    59 	}
       
    60 
       
    61 	/**
       
    62 	 * @return the name
       
    63 	 */
       
    64 	public String getName() {
       
    65 		return name;
       
    66 	}
       
    67 
       
    68 	/**
       
    69 	 * @return the source
       
    70 	 */
       
    71 	public String getSource() {
       
    72 		return source;
       
    73 	}
       
    74 
       
    75 	/**
       
    76 	 * @return the sourceDescription
       
    77 	 */
       
    78 	public String getSourceDescription() {
       
    79 		return sourceDescription;
       
    80 	}
       
    81 
       
    82 	/**
       
    83 	 * Set API Details for this Description
       
    84 	 * @param apiDetails
       
    85 	 */
       
    86 	public void setAPIDetails(APIDetails apiDetails) {
       
    87 		this.apiDetails = apiDetails;
       
    88 	}
       
    89 	
       
    90 	/**
       
    91 	 * Get API Details for this Description
       
    92 	 * @param apiDetails or <code>null</code> if not set.
       
    93 	 */
       
    94 	public APIDetails getAPIDetails() {
       
    95 		return apiDetails;
       
    96 	}
       
    97 
       
    98 	/**
       
    99 	 * Check if this Description has {@link APIDetails} added.
       
   100 	 * @return <code>true</code> if API Details is added, <code>false</code> otherwise.
       
   101 	 */
       
   102 	public boolean hasAPIDetails(){
       
   103 		return apiDetails != null;
       
   104 	}
       
   105 	
       
   106 	public  void addSerachedData (ArrayList<String> serachedData) {
       
   107 		
       
   108 		this.detailsShortData =serachedData;
       
   109 			}
       
   110 	
       
   111 public ArrayList<String>  	getSearchedData()
       
   112 {
       
   113 	return  detailsShortData;
       
   114 }
       
   115 	
       
   116 }