Examples of DigitalObjectReference


Examples of eu.planets_project.ifr.core.wdt.impl.data.DigitalObjectReference

    if (currentItems != null) {
      // Add each of the selected items to the experiment:
      for (FileTreeNode dob : currentItems) {
        // Only include selected items that are eligible:
        if (dob.isSelectable() && dob.isSelected()) {
          DigitalObjectReference dor = new DigitalObjectReference(dob
              .getUri());
          URI dobURI = dob.getUri();
          DigitalObject o = null;
          try {
            // Special handling for the digital objects from OAI and JCR repositories
            // data registry URI and digital object URI is not the same
            if (dobURI.toString().contains(OAIDigitalObjectManagerDCBase.REGISTRY_NAME)
                || dobURI.toString().contains(OAIDigitalObjectManagerKBBase.REGISTRY_NAME)
                || dobURI.toString().contains(DOJCRConstants.REGISTRY_NAME)) {
              logger.info("addToWorkflow() special dobURI: " + dobURI);
                o = dr.getDataManager(dobURI).retrieve(dobURI);
//                o = recreateByValue(o);
            } else {
              logger.info("addToWorkflow() dobURI: " + dobURI);
                o = dr.getDataManager(dobURI).retrieve(dobURI);
           
              // Recreate digital object by value to enable workflow execution.
              // At the moment digital object uses a DataHandler. It is not serializable
              // and it is not possible to execute workflows.
              InputStream streamContent = o.getContent().getInputStream();
              byte[] byteContent = null;
                            try {
                                byteContent = IOUtils.toByteArray(streamContent);
                            } catch (IOException e) {
                                e.printStackTrace();
                            }
              DigitalObjectContent content = Content.byValue(byteContent);
              o = (new DigitalObject.Builder(o)).content(content)
                  .title(dor.getLeafname()).permanentUri(
                      dobURI).build();
            }

            //DigitalObject.Builder b = new DigitalObject.Builder(o);
            //o = b.title(dor.getLeafname()).build();
            logger.info("adding file name: " + dor.getLeafname());
           
          } catch (DigitalObjectNotFoundException e) {
            errorMessageString
                .add("\nUnable to retrieve selected digital object!");
            e.printStackTrace();
View Full Code Here

Examples of eu.planets_project.tb.api.data.DigitalObjectReference

   
    /**
     * @return
     */
    public DigitalObjectReference getRootDigitalObject() {
        return new DigitalObjectReference( null );
    }
View Full Code Here

Examples of eu.planets_project.tb.api.data.DigitalObjectReference

       
        // Create a DigitalObject for each URI.
        DigitalObjectReference[] dobs = new DigitalObjectReference[childs.size()];
        for( int i = 0; i < childs.size(); i ++ ) {
            // Create a DOB from the URI:
            dobs[i] = new DigitalObjectReference( childs.get(i) );
           
            // Mark that DigitalObject as a Directory if listing it returns NULL:
          log.info("Calling Data Registry List for " + childs.get(i));
            List<URI> grandchilds = this.dataReg.list(childs.get(i));
            if( grandchilds == null ) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.