public static void exportThis(
      String target_sea_state_set,
      String target_sea_state_datum,
      String[] sea_state_headings,
      IntegerTargetTypeLookup states,
      Element envElement,
      Document doc) {
    // ok, put us into the element
    org.w3c.dom.Element itt = doc.createElement(target_sea_state_set);

    // get on with the name attribute
    Double unknown = states.getUnknownResult();
    if (unknown != null) itt.setAttribute(UNKNOWN_TYPE, writeThis(unknown.doubleValue()));

    // now the matrix of sea states
    Collection<String> keys = states.getNames();
    for (Iterator<String> iter = keys.iterator(); iter.hasNext(); ) {
      String thisN = (String) iter.next();

      // ok, cycle through the sea states for this participant
      NamedList thisList = states.getThisSeries(thisN);
      exportThisSeries(thisN, target_sea_state_datum, thisList, sea_state_headings, itt, doc);
    }

    envElement.appendChild(itt);
  }
  private static void exportThisSeries(
      String name,
      String target_sea_state_datum,
      NamedList thisList,
      String[] sea_state_headings,
      Element itt,
      Document doc) {
    // ok, put us into the element
    org.w3c.dom.Element datum = doc.createElement(target_sea_state_datum);

    datum.setAttribute("Type", name);

    // and step through its values
    Collection<Double> indices = thisList.getValues();
    int ctr = 0;
    for (Iterator<Double> iter = indices.iterator(); iter.hasNext(); ) {
      Double val = (Double) iter.next();
      if (val != null) {
        datum.setAttribute(sea_state_headings[ctr], writeThis(val.doubleValue()));
        ctr++;
      } else break;
    }

    itt.appendChild(datum);
  }
 public Collection hasSourceCodeFiles(Collection sourceCodeFilesToCheck) {
   Vector v = new Vector();
   for (Iterator en = sourceCodeFilesToCheck.iterator(); en.hasNext(); ) {
     IJavaSourceFile elt = (IJavaSourceFile) en.next();
     v.addElement(new Boolean(hasSourceCodeFile(elt)));
   }
   return v;
 }
 public Collection hasRepositoryLocations(Collection repositoryLocationsToCheck) {
   Vector v = new Vector();
   for (Iterator en = repositoryLocationsToCheck.iterator(); en.hasNext(); ) {
     IRepositoryLocation elt = (IRepositoryLocation) en.next();
     v.addElement(new Boolean(hasRepositoryLocation(elt)));
   }
   return v;
 }
 public boolean hasAllRepositoryLocations(Collection repositoryLocationsToCheck) {
   for (Iterator en = repositoryLocationsToCheck.iterator(); en.hasNext(); ) {
     IRepositoryLocation elt = (IRepositoryLocation) en.next();
     if (!hasRepositoryLocation(elt)) {
       return false;
     }
   }
   return true;
 }
 public boolean hasAllSourceCodeFiles(Collection sourceCodeFilesToCheck) {
   for (Iterator en = sourceCodeFilesToCheck.iterator(); en.hasNext(); ) {
     IJavaSourceFile elt = (IJavaSourceFile) en.next();
     if (!hasSourceCodeFile(elt)) {
       return false;
     }
   }
   return true;
 }
  public boolean hasRepositoryLocation(IRepositoryLocation repositoryLocationToCheck) {
    Collection c = getAllRepositoryLocations();

    for (Iterator en = c.iterator(); en.hasNext(); ) {
      IRepositoryLocation elt = (IRepositoryLocation) en.next();
      if (elt.isEquivalent(repositoryLocationToCheck)) {
        return true;
      }
    }
    return false;
  }
  public boolean hasSourceCodeFile(IJavaSourceFile sourceCodeFileToCheck) {
    Collection c = getAllSourceCodeFiles();

    for (Iterator en = c.iterator(); en.hasNext(); ) {
      IJavaSourceFile elt = (IJavaSourceFile) en.next();
      if (elt.isEquivalent(sourceCodeFileToCheck)) {
        return true;
      }
    }
    return false;
  }
 public void removeRepositoryLocations(Collection repositoryLocations) {
   for (Iterator en = repositoryLocations.iterator(); en.hasNext(); ) {
     IRepositoryLocation elt = (IRepositoryLocation) en.next();
     removeRepositoryLocation(elt);
   }
 }
 public void removeSourceCodeFiles(Collection sourceCodeFiles) {
   for (Iterator en = sourceCodeFiles.iterator(); en.hasNext(); ) {
     IJavaSourceFile elt = (IJavaSourceFile) en.next();
     removeSourceCodeFile(elt);
   }
 }