Package eu.planets_project.ifr.core.storage.api

Examples of eu.planets_project.ifr.core.storage.api.DataRegistry


  public UUID submitWorkflowByReference(ArrayList<URI> digObjRefs,
      String workflowTemplateName, String xmlWorkflowConfig)
      throws Exception {
   
    ArrayList<DigitalObject> lDigObjs = new ArrayList<DigitalObject>();
    DataRegistry dataRegistry = DataRegistryFactory.getDataRegistry();
   
    //now iterate over the payload and build digital objects
    for(URI digoRefURI : digObjRefs){
      try{
        DigitalObject digo = dataRegistry.retrieve(digoRefURI);
        lDigObjs.add(digo)
      }
      catch(DigitalObjectNotFoundException e){
        log.debug("skipping data reference: "+digoRefURI);
      }
View Full Code Here


      wfResultItem.addLogInfo("Completed migration. URI: " + dgoBRef);
     
      // Add migration resulting text to metadata
      if (dgoBRef != null) {
        try {
            DataRegistry dataRegistry = DataRegistryFactory.getDataRegistry();
          URI baseUri = new PDURI(dgoBRef.normalize()).formDataRegistryRootURI();
          wfResultItem.addLogInfo("base URI " + baseUri);
     
          DigitalObject obj = dataRegistry.getDigitalObjectManager(baseUri).retrieve(dgoBRef);   
          wfResultItem.addLogInfo("obj: " + obj.toString());

          InputStream contentStream = obj.getContent().getInputStream();             
              BufferedReader br = new BufferedReader(new InputStreamReader(contentStream));
              StringBuilder sb = new StringBuilder();
View Full Code Here

      DigitalObject dgoC = null;
          wfResultItem.addLogInfo("STEP 4: Starting migration");
          wfResultItem.addLogInfo("processingDigo.getPermanentUri(): " + processingDigo.getPermanentUri() +
              ", dgoB.getPermanentUri(): " + dgoB.getPermanentUri());
         
        DataRegistry dataRegistry = DataRegistryFactory.getDataRegistry();
        URI baseUri = DataRegistryFactory.createDataRegistryIdFromName(DOJCRConstants.REGISTRY_NAME);
      wfResultItem.addLogInfo("base URI: " + baseUri);
      URI resUri = URI.create(baseUri.toString() + dgoB.getPermanentUri().toString());
      wfResultItem.addLogInfo("resUri: " + resUri);

      URI dgoCRef = runMigration(migrate, resUri, true);
      wfResultItem.addLogInfo("Completed migration. URI: " + dgoCRef);
     
      // Add migration resulting text to metadata
      if (dgoCRef != null) {
        try {
          baseUri = new PDURI(dgoCRef.normalize()).formDataRegistryRootURI();
          wfResultItem.addLogInfo("migration base URI: " + baseUri);
     
          dgoC = dataRegistry.getDigitalObjectManager(baseUri).retrieve(dgoCRef)
          wfResultItem.addLogInfo("dgoC: " + dgoC.toString());
          if (dgoC != null && dgoB.getPermanentUri() != null) {
              Event eMigration = buildEvent(dgoB.getPermanentUri(), MIGRATE_EVENT);
            dgoC = addEvent(dgoC, eMigration, null, true);
               }
View Full Code Here

      wfResultItem.addLogInfo("Completed migration. URI: " + dgoBRef);
     
      // Add migration resulting text to metadata
      if (dgoBRef != null) {
        try {
            DataRegistry dataRegistry = DataRegistryFactory.getDataRegistry();
          URI baseUri = new PDURI(dgoBRef.normalize()).formDataRegistryRootURI();
          wfResultItem.addLogInfo("base URI " + baseUri);
     
          dgoB = dataRegistry.getDigitalObjectManager(baseUri).retrieve(dgoBRef)
          wfResultItem.addLogInfo("dgoB: " + dgoB.toString());
          if (dgoB != null && dgoA.getPermanentUri() != null) {
              Event eMigration = buildEvent(dgoA.getPermanentUri());
            dgoB = addEvent(dgoB, eMigration);
               }
View Full Code Here

      String migratedFileName = "";
      String migratedFileSize = "";
     
      if (dgoBRef != null) {
        try {
            DataRegistry dataRegistry = DataRegistryFactory.getDataRegistry();
          URI baseUri = new PDURI(dgoBRef.normalize()).formDataRegistryRootURI();
          wfResultItem.addLogInfo("base URI " + baseUri);
     
          DigitalObject obj = dataRegistry.getDigitalObjectManager(baseUri).retrieve(dgoBRef);   
          wfResultItem.addLogInfo("obj: " + obj.toString());

          InputStream contentStream = obj.getContent().getInputStream();             
              BufferedReader br = new BufferedReader(new InputStreamReader(contentStream));
              StringBuilder sb = new StringBuilder();
View Full Code Here

     * @throws IOException
     * @throws DigitalObjectNotFoundException
     * @throws URISyntaxException
     */
    private String helperReadDigoToString(String fileRef) throws IOException, DigitalObjectNotFoundException, URISyntaxException{
      DataRegistry digoManager = DataRegistryFactory.getDataRegistry();
      URI uriRef = new URI(fileRef);
      this.log.info("Retrieving Digital Object at " + uriRef);
    DigitalObject xmlTemplateDigo = digoManager.retrieve(new URI(fileRef));
      BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(xmlTemplateDigo.getContent().getInputStream()));
        StringBuilder stringBuilder = new StringBuilder();
        String line = null;

        while ((line = bufferedReader.readLine()) != null) {
View Full Code Here

TOP

Related Classes of eu.planets_project.ifr.core.storage.api.DataRegistry

Copyright © 2018 www.massapicom. 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.