Esempio n. 1
0
 /**
  * Specialized Constructor, which creates a clone of the given container.
  *
  * @param clonedContainer Container.
  * @throws org.hydra.core.InvalidElementException the invalid element exception
  */
 public Container(final Container clonedContainer) throws InvalidElementException {
   this.fingerprint.setHash(clonedContainer.getFingerprint().getHash());
   this.repositoryFile = new File(this.config.getFPStore(), this.fingerprint.getHash());
   this.workspaceFile = new File(clonedContainer.cloneWorkspaceFile().getPath());
   for (final FingerprintedElement e : clonedContainer.listElements()) {
     if (e instanceof Artifact) {
       this.elements.add(e);
     } else {
       this.elements.add(new Container((Container) e));
     }
   }
 }