Пример #1
0
  /**
   * Retrieves technology types
   *
   * @return array of strings
   */
  public static String[] getTechnologyTypes() {
    List<MappingObject> assayToTypeMapping = getMappings();
    Set<String> techTypeSet = new HashSet<String>();

    for (MappingObject mo : assayToTypeMapping) {
      if (!mo.getTechnologyType().equals("n/a") && !mo.getTechnologyType().equals("")) {
        techTypeSet.add(mo.getTechnologyType());
      }
    }

    List<String> tempTechTypes = new ArrayList<String>();
    tempTechTypes.addAll(techTypeSet);

    Collections.sort(tempTechTypes);

    tempTechTypes.add(0, AutoFilterComboCellEditor.BLANK_VALUE);

    return tempTechTypes.toArray(new String[tempTechTypes.size()]);
  }
Пример #2
0
  /**
   * Retrives the allowed technologies per endpoint
   *
   * @return map of string and string list
   */
  public static Map<String, List<String>> getAllowedTechnologiesPerEndpoint() {
    Map<String, List<String>> measToAllowedTechs = new HashMap<String, List<String>>();

    for (MappingObject mo : getMappings()) {
      if (!measToAllowedTechs.containsKey(mo.getMeasurementEndpointType())) {
        measToAllowedTechs.put(mo.getMeasurementEndpointType(), new ArrayList<String>());
      }
      measToAllowedTechs.get(mo.getMeasurementEndpointType()).add(mo.getTechnologyType());
    }

    return measToAllowedTechs;
  }
Пример #3
0
 public static MappingObject getMappingObjectForMeasurementAndTechnology(
     String measurementEndpoint, String techType) {
   measurementEndpoint = getTrimmedName(measurementEndpoint);
   techType = getTrimmedName(techType);
   for (MappingObject mappingObject : mappings) {
     if (mappingObject.getMeasurementEndpointType().equals(measurementEndpoint)
         && mappingObject.getTechnologyType().equals(techType)) {
       return mappingObject;
     }
   }
   return null;
 }
Пример #4
0
 public static TableReferenceObject searchMappingsForMatch(
     String measurementEndpoint, String technologyType) {
   for (MappingObject mo : getMappings()) {
     if (mo.getMeasurementEndpointType().equalsIgnoreCase(measurementEndpoint)
         && mo.getTechnologyType().equalsIgnoreCase(technologyType)) {
       for (TableReferenceObject tro : assayDefinitions) {
         if (tro.getTableName().equalsIgnoreCase(mo.getAssayName())) {
           return tro;
         }
       }
     }
   }
   return null;
 }
Пример #5
0
  /**
   * Retrieves the measurement endpoints
   *
   * @return array of strings with measurement endpoints
   */
  public static String[] getMeasurementEndpoints() {
    List<MappingObject> assayToTypeMapping = getMappings();
    Set<String> measTypeSet = new HashSet<String>();

    for (MappingObject mo : assayToTypeMapping) {
      if (!mo.getTechnologyType().equals("n/a")
          && !mo.getMeasurementEndpointType().equalsIgnoreCase("[sample]")
          && !mo.getMeasurementEndpointType().equalsIgnoreCase("[investigation]")) {
        measTypeSet.add(mo.getMeasurementEndpointType());
      }
    }

    List<String> tempMeasTypes = new ArrayList<String>();
    tempMeasTypes.addAll(measTypeSet);

    Collections.sort(tempMeasTypes);

    return tempMeasTypes.toArray(new String[tempMeasTypes.size()]);
  }