Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: s IT Solutions AT Spardat GmbH - initial API and implementation /
/*
 * @(#) $Id: XMASWTDescription.java 2084 2007-11-27 14:53:31Z s3460 $
 */
package at.spardat.xma.boot.comp.data;
This class represents the swt-description tag from xma-app.xml. It may contain an ordered list of prefered versions and a set of resources to download if none of the prefered versions is installed.

Author(s):
s2877
public class XMASWTDescription {

    
Ordered List of preinstalled swt-versions to use. Contains SWTPreinstall objects
    private List preinstalls = new ArrayList();

    
Map of resources to download if none of the preinstalls is found in the xma-installation. Contains XMAResource objects
    private HashMap resources = new HashMap();

    
Constructor, empty
    XMASWTDescription() {
    }

    
write this object to a xml print stream.

Parameters:
ps the PrintStream to write to
    public void writeXMLPrintStream ps ) {
        for (Iterator iter = .iterator(); iter.hasNext();) {
            SWTPreinstall element = (SWTPreinstall)iter.next();
            ps.print("   "); //$NON-NLS-1$
            element.writeXML(ps);
            ps.println();
        }
        for (Iterator iter = .values().iterator(); iter.hasNext();) {
            XMAResource element = (XMAResource)iter.next();
            ps.print("   "); //$NON-NLS-1$
            element.writeXML(ps);
            ps.println();
        }
    }

    
adds the given preinstall to the list preinstalls
    public void addPreinstall(SWTPreinstall preinstall) {
        .add(preinstall);
    }

    
adds the given resource to the map resources
    public void addResourceXMAResource resoure ) {
        .putresoure.getHref_(), resoure);
    }

    
returns the list of preinstalls, containing SWTPreinstall objects
    public List getPreinstalls() {
        return ;
    }

    
returns the map of resources, containing XMAResource objects
    public HashMap getResources() {
        return ;
    }
New to GrepCode? Check out our FAQ X