Package eu.planets_project.services.datatypes.DigitalObject

Examples of eu.planets_project.services.datatypes.DigitalObject.Builder


            }
          }
            log.info("OAIDigitalObjectManagerDCImpl retrieveAll() found idurl: " + url);
          if (url != null) {
                resultList.add(URI.create(url));
            Builder builder = new DigitalObject.Builder(Content.byReference(new URL(url)));
            builder.title(title);
            String filename = "";
                  if(url != null) {
                      filename = URI.create(url).getPath();
                      log.info("OAIDigitalObjectManagerKBImpl list() filename: " + filename);
                      if(filename != null) {
                          String[] parts = filename.split("/");
                          if( parts != null && parts.length > 0 )
                            filename = parts[parts.length-1];
                      }
                  }
                  log.info("OAIDigitalObjectManagerKBImpl list() filename: " + filename +
                      ", pdURI.toString(): " + pdURI.toString() + ", url: " + url);

                   URI permanentUri = URI.create(getBaseRegistryURI() +"/"+ filename).normalize();           
            builder.permanentUri(permanentUri);
            builder.metadata(new Metadata(namespaceURI, record.getMetadataAsString()));
              long endtime = System.currentTimeMillis();
              log.info("OAIDigitalObjectManagerDCImpl retrieve() timediff: " + (endtime - starttime));
            DigitalObject o = builder.build();
            if (url != null && !leafMap.containsKey(URI.create(url))) {
                log.info("OAIDigitalObjectManagerDCImpl retrieve() add to map uri: " + URI.create(url));
              leafMap.put(URI.create(url), o);
            }
          }
View Full Code Here


                  }
                    }
                  }
                             
              if (publicationLink != null && publicationLink.toString().length() > 0) {
                Builder builder = new DigitalObject.Builder(Content.byReference(URI.create(publicationLink).toURL()));
                builder.title(title);
                String filename = "";
                      if(publicationLink != null) {
                          filename = URI.create(publicationLink).getPath();
                          log.info("OAIDigitalObjectManagerKBImpl list() filename: " + filename);
                          if(filename != null) {
                              String[] parts = filename.split("/");
                              if( parts != null && parts.length > 0 )
                                filename = parts[parts.length-1];
                          }
                      }
                      log.info("OAIDigitalObjectManagerKBImpl list() filename: " + filename +
                          ", pdURI.toString(): " + pdURI.toString() + ", publicationLink: " + publicationLink);

                       URI permanentUri = URI.create(getBaseRegistryURI() +"/"+ filename).normalize();           
                builder.permanentUri(permanentUri);
                builder.metadata(metadataList.toArray(new Metadata[]{}));
               
                  long endtime = System.currentTimeMillis();
                  log.info("OAIDigitalObjectManagerKBImpl list() timediff: " + (endtime - starttime));
                DigitalObject o = builder.build();
                if (publicationLink != null && !leafMap.containsKey(publicationLink)) {
                    log.info("OAIDigitalObjectManagerKBImpl list() add to map uri: " + publicationLink);
                  leafMap.put(URI.create(publicationLink), o);
                }
              }
View Full Code Here

TOP

Related Classes of eu.planets_project.services.datatypes.DigitalObject.Builder

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.