Esempio n. 1
0
  private void addNames(Accessions accession, List<NameLinkType> nameList)
      throws IllegalAccessException, InvocationTargetException, DuplicateLinkException,
          UnknownLookupListException, PersistenceException, NoSuchAlgorithmException,
          UnsupportedEncodingException {
    NamesDAO namesDao = new NamesDAO();
    ArchDescriptionNames accessionName;

    for (NameLinkType thisNameLink : nameList) {
      accessionName =
          new ArchDescriptionNames(lookupName(namesDao, thisNameLink.getName()), accession);
      ImportUtils.nullSafeSet(
          accessionName,
          ArchDescriptionNames.PROPERTYNAME_NAME_LINK_FUNCTION,
          thisNameLink.getNameLinkFunction());
      ImportUtils.nullSafeSet(
          accessionName, ArchDescriptionNames.PROPERTYNAME_FORM, thisNameLink.getNameLinkForm());
      ImportUtils.nullSafeSet(
          accessionName, ArchDescriptionNames.PROPERTYNAME_ROLE, thisNameLink.getNameLinkRole());
      accession.addName(accessionName);
    }
  }