/******************************************************************************* * ALMA - Atacama Large Millimeter Array * Copyright (c) ESO - European Southern Observatory, 2011 * (in the framework of the ALMA collaboration). * All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *******************************************************************************/ package cl.utfsm.samplingSystemUI; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import javax.swing.JOptionPane; import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.SAXException; import alma.JavaContainerError.wrappers.AcsJContainerEx; import alma.JavaContainerError.wrappers.AcsJContainerServicesEx; import alma.acs.component.ComponentDescriptor; import alma.acs.container.ContainerServices; import cl.utfsm.samplingSystemUI.core.AcsInformation; import cl.utfsm.samplingSystemUI.core.AcsInformationException; import cl.utfsm.samplingSystemUI.core.SamplingManagerUITool; public class SampTool extends SamplingManagerUITool { private static SamplingSystemGUI window; public static final String NAME="TheNewSampTool"; private static final String SAMP_MAN_IFACE = "IDL:alma/acssamp/Samp:1.0"; protected static ContainerServices cServices; private static String[] compList = null; private static LinkedList sampManList = new LinkedList(); private static LinkedList cDescriptorList = new LinkedList(); private static LinkedList> propList = new LinkedList>(); private static String managerLoc = System.getProperty("ACS.manager"); public static String[] getComponents(){ return compList; } public static String[] getSamplingManagers() { String tmp[] = null; tmp = new String[sampManList.size()]; sampManList.toArray(tmp); Arrays.sort(tmp); return tmp; } public static void initializeComponents() throws AcsJContainerEx, AcsInformationException{ info=AcsInformation.getInstance(NAME); /* Get all component names and descriptors */ List listTmp = new ArrayList(); compList = info.getCManager().getComponentsName(); cServices = info.getContainerServices(); for(int i=0; i> getProps(){ return propList; } public static List getPropsForComponent(String comp) { return info.getCManager().getComponentProperties(comp); } }