コード例 #1
0
ファイル: Robot.java プロジェクト: BackupTheBerlios/xirp-svn
 /**
  * Returns a {@link de.xirp.profile.Sensorgroup} for the given long name (ignoring the case).
  *
  * @param longName The long name of the sensor group.
  * @return The sensor group or <code>null</code> if no group was found for the given name.
  * @see de.xirp.profile.Sensorgroup
  */
 public Sensorgroup getSensorgroup(String longName) {
   for (Sensorgroup sensor : getSensorgroups()) {
     if (sensor.getLongName().equalsIgnoreCase(longName)) {
       return sensor;
     }
   }
   return null;
 }
コード例 #2
0
ファイル: Robot.java プロジェクト: BackupTheBerlios/xirp-svn
 /**
  * Returns all {@link de.xirp.profile.Sensorgroup sensor groups} for the given plugin main class.
  *
  * @param pluginMainClass The main class of the plugin.
  * @return An unmodifiable list with the sensor groups
  * @see de.xirp.profile.Sensorgroup
  */
 public List<Sensorgroup> getSensorgroups(String pluginMainClass) {
   List<Plugin> lst = getPlugins(pluginMainClass);
   List<Sensorgroup> displays = new ArrayList<Sensorgroup>();
   for (Plugin plugin : lst) {
     List<String> sensornames = plugin.getSensornames();
     for (Sensorgroup sensor : getSensorgroups()) {
       if (sensornames.contains(sensor.getLongName())) {
         displays.add(sensor);
       }
     }
   }
   return Collections.unmodifiableList(displays);
 }
コード例 #3
0
ファイル: Robot.java プロジェクト: BackupTheBerlios/xirp-svn
 /**
  * Returns all {@link de.xirp.profile.Sensorgroup sensor groups} for the given plugin main class
  * and identifier.
  *
  * @param pluginMainClass The main class of the plugin.
  * @param identifier The identifier of the plugin.
  * @return A unmodifiable list with the sensor groups.
  * @see de.xirp.profile.Sensorgroup
  */
 public List<Sensorgroup> getSensorgroups(String pluginMainClass, String identifier) {
   List<Plugin> lst = getPlugins(pluginMainClass);
   List<Sensorgroup> displays = new ArrayList<Sensorgroup>();
   for (Plugin plugin : lst) {
     String id = plugin.getUniqueIdentifier();
     if (id == identifier || (id != null && id.equals(identifier))) {
       List<String> sensornames = plugin.getSensornames();
       for (Sensorgroup sensor : getSensorgroups()) {
         if (sensornames.contains(sensor.getLongName())) {
           displays.add(sensor);
         }
       }
     }
   }
   return Collections.unmodifiableList(displays);
 }