public String eml(){
  if (resource == null) {
    return NOT_FOUND;
  }
  if (version == null) {
    BigDecimal latestVersion=resource.getLastPublishedVersionsVersion();
    if (latestVersion == null) {
      return NOT_FOUND;
    }
 else {
      version=latestVersion;
    }
  }
  data=dataDir.resourceEmlFile(resource.getShortname(),version);
  mimeType="text/xml";
  StringBuilder sb=new StringBuilder();
  sb.append("eml-" + resource.getShortname());
  if (version != null) {
    sb.append("-v" + version.toPlainString());
  }
  sb.append(".xml");
  filename=sb.toString();
  return execute();
}

public String eml ( ) { if ( resource == null ) { return NOT_FOUND ; } if ( version == null ) { BigDecimal latestVersion = resource . getLastPublishedVersionsVersion ( ) ; if ( latestVersion == null ) { return NOT_FOUND ; } else { version = latestVersion ; } } data = dataDir . resourceEmlFile ( resource . getShortname ( ) , version ) ; mimeType = "text/xml" ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( "eml-" + resource . getShortname ( ) ) ; if ( version != null ) { sb . append ( "-v" + version . toPlainString ( ) ) ; } sb . append ( ".xml" ) ; filename = sb . toString ( ) ; return execute ( ) ; }
handles eml file download request . specific versions can also be resolved depending on the optional parameter " version " . if no specific version is requested the latest published version is used .
