Пример #1
0
  /**
   * Take the given BibtexEntry and resolve any string references.
   *
   * @param entry A BibtexEntry in which all strings of the form #xxx# will be resolved against the
   *     hash map of string references stored in the databasee.
   * @param inPlace If inPlace is true then the given BibtexEntry will be modified, if false then a
   *     copy is made using close made before resolving the strings.
   * @return a BibtexEntry with all string references resolved. It is dependent on the value of
   *     inPlace whether a copy is made or the given BibtexEntries is modified.
   */
  public BibtexEntry resolveForStrings(BibtexEntry entry, boolean inPlace) {

    if (!inPlace) {
      entry = (BibtexEntry) entry.clone();
    }

    for (Object field : entry.getAllFields()) {
      entry.setField(field.toString(), this.resolveForStrings(entry.getField(field.toString())));
    }

    return entry;
  }