Package org.atomojo.app.db

Examples of org.atomojo.app.db.Entry.createResource()


               file += "."+ext;
            }
         }
         EntryMedia media;
         try {
            media = entry.createResource(file,mediaType);
         } catch (SQLException ex) {
            try {
               entry.delete(null);
            } catch (SQLException ox) {
               log.log(Level.SEVERE,"Cannot delete entry for exception cleanup.",ox);
View Full Code Here


            int dot = media.getName().lastIndexOf('.');
            if (dot>0) {
               String ext = media.getName().substring(dot+1);
               type = MediaType.valueOf(metaService.getMetadata(ext).getName());
            }
            entry.createResource(media.getName(), type);
         }

         // edit entry date
         entryObj.setEdited(entry.getEdited());
         Writer out = new OutputStreamWriter(new FileOutputStream(file),"UTF-8");
View Full Code Here

     
      // create entry for media
      Entry entry = parent.createEntry();
     
      // create entry media
      entry.createResource(name, type);
     
      // creae entry document
      Document doc = AtomResource.createMediaEntryDocument(name,entry.getUUID(),entry.getCreated(),null,name,type);
      Writer out = new OutputStreamWriter(new FileOutputStream(new File(file.getParentFile(),"."+entry.getUUID()+".atom")),"UTF-8");
      XMLWriter.writeDocument(doc, out);
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.