예제 #1
0
  @Override
  public String resolve(Compound compound) throws Exception {
    String inChI = super.resolve(compound);

    if (compound.getInChI() != null && !equals(inChI, compound.getInChI())) {
      throw new VerificationException(compound.getInChI(), inChI);
    }

    return inChI;
  }
  @Override
  public void mapValue(Compound compound, String string) throws IOException {
    string = filter(string);

    if (string == null) {
      return;
    }

    String id = getId();

    Cargo<Compound> cargo = compound.getOrAddCargo(id);

    // Alternatively, could be kept in memory as a StringPayload
    cargo.storeString(string);
  }