r1370 - in trunk/simexplorer-is: simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/attachment simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/composite simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service simexplorer-is-service/src/test/fr/cemagref/simexplorer/is/service simexplorer-is-service/src/test/properties simexplorer-is-storage/src/java/fr/cemagref/simex
Author: glandais Date: 2008-03-17 17:45:04 +0000 (Mon, 17 Mar 2008) New Revision: 1370 Added: trunk/simexplorer-is/simexplorer-is-service/src/test/properties/configlocal.properties trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/engine/StreamInfo.java Removed: trunk/simexplorer-is/simexplorer-is-service/src/test/properties/config.properties Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Leaf.java trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/attachment/Attachment.java trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/composite/Attachments.java trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/composite/SimpleComposite.java trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java trunk/simexplorer-is/simexplorer-is-service/src/test/fr/cemagref/simexplorer/is/service/StorageServiceVersionsLocalTestCase.java trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/attachment/AttachmentHandler.java trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/attachment/FileSystemAttachmentHandler.java trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/engine/StorageEngine.java trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/engine/StorageEngineImpl.java Log: Data size added Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Leaf.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Leaf.java 2008-03-16 21:10:15 UTC (rev 1369) +++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/Leaf.java 2008-03-17 17:45:04 UTC (rev 1370) @@ -36,6 +36,7 @@ /* (non-Javadoc) * @see fr.cemagref.simexplorer.is.entities.EntityVisitable#accept(fr.cemagref.simexplorer.is.entities.EntityVisitor) */ + @Override public void accept(EntityVisitor visitor) { visitor.visitLeaf(this); } Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/attachment/Attachment.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/attachment/Attachment.java 2008-03-16 21:10:15 UTC (rev 1369) +++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/attachment/Attachment.java 2008-03-17 17:45:04 UTC (rev 1370) @@ -23,6 +23,7 @@ import java.util.List; import org.apache.commons.lang.StringUtils; +import org.codelutin.util.StringUtil; import fr.cemagref.simexplorer.is.entities.Leaf; @@ -33,8 +34,8 @@ */ public class Attachment extends Leaf { - /** Serial version ID. */ - private static final long serialVersionUID = 5467615366054227592L; + /** The Constant serialVersionUID. */ + private static final long serialVersionUID = -7574882159899851556L; /** Filename. */ private String fileName; @@ -45,6 +46,9 @@ /** Data hash. */ private String dataHash; + /** The data size. */ + private long dataSize; + /** * Gets the file name. * @@ -100,6 +104,24 @@ } /** + * Gets the data size. + * + * @return the data size + */ + public long getDataSize() { + return dataSize; + } + + /** + * Sets the data size. + * + * @param dataSize the new data size + */ + public void setDataSize(long dataSize) { + this.dataSize = dataSize; + } + + /** * Gets the unique id. * * @return the unique id @@ -178,17 +200,23 @@ if (getContentType() != null) { sb.append(" - ").append(_(getContentType().getDescription())); } + sb.append(" (").append(StringUtil.convertMemory(getDataSize())).append(")"); return sb.toString(); } + /* (non-Javadoc) + * @see fr.cemagref.simexplorer.is.entities.Entity#getRow() + */ @Override public List<String> getRow() { List<String> row = new ArrayList<String>(); - row.add(""); row.add(getFileName()); if (getContentType() != null) { row.add(_(getContentType().getDescription())); + } else { + row.add(""); } + row.add(StringUtil.convertMemory(getDataSize())); return row; } Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/composite/Attachments.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/composite/Attachments.java 2008-03-16 21:10:15 UTC (rev 1369) +++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/composite/Attachments.java 2008-03-17 17:45:04 UTC (rev 1370) @@ -21,6 +21,8 @@ import java.util.List; +import org.codelutin.util.StringUtil; + import fr.cemagref.simexplorer.is.entities.EntityVisitor; import fr.cemagref.simexplorer.is.entities.attachment.Attachment; @@ -40,9 +42,24 @@ @Override public List<String> getRow() { List<String> row = super.getRow(); - row.add(_("simexplorer.common.attachment.filename")); + row.set(0, row.get(0) + " - " + _("simexplorer.common.attachment.filename")); row.add(_("simexplorer.common.attachment.datatype")); + row.add(StringUtil.convertMemory(getTotalSize())); return row; } -} + /** + * Gets the total size. + * + * @return the total size + */ + public long getTotalSize() { + List<Attachment> children = getInnerList(); + long total = 0; + for (Attachment attachment : children) { + total += attachment.getDataSize(); + } + return total; + } + +} \ No newline at end of file Modified: trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/composite/SimpleComposite.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/composite/SimpleComposite.java 2008-03-16 21:10:15 UTC (rev 1369) +++ trunk/simexplorer-is/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/composite/SimpleComposite.java 2008-03-17 17:45:04 UTC (rev 1370) @@ -151,6 +151,15 @@ row.add(toString()); return row; } + + /** + * Gets the inner list. + * + * @return the inner list + */ + public List<E> getInnerList() { + return elements; + } /** * Delegate List methods. Modified: trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java 2008-03-16 21:10:15 UTC (rev 1369) +++ trunk/simexplorer-is/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java 2008-03-17 17:45:04 UTC (rev 1370) @@ -37,8 +37,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.codelutin.util.MD5; -import org.codelutin.util.MD5InputStream; import org.codelutin.util.ZipStreamEncoder; import com.healthmarketscience.rmiio.SerializableInputStream; @@ -57,6 +55,7 @@ import fr.cemagref.simexplorer.is.storage.SortColumn; import fr.cemagref.simexplorer.is.storage.SortOrder; import fr.cemagref.simexplorer.is.storage.engine.StorageEngine; +import fr.cemagref.simexplorer.is.storage.engine.StreamInfo; /** * The Class StorageServiceCommon. @@ -75,9 +74,6 @@ /** The Constant log. */ private static final Log log = LogFactory.getLog(StorageServiceCommon.class); - /** The xml attachment. */ - protected Attachment xmlAttachment = null; - /** * Gets the storage engine. * @@ -262,27 +258,21 @@ while (entry != null) { if (!entry.isDirectory()) { String entryName = entry.getName(); + StreamInfo streamInfo = getStorageEngine().storeTempData(zis); if (entryName.equals(FILE_XML)) { - xmlFile = getStorageEngine().storeTempData(zis); + xmlFile = streamInfo.getUuid(); } else { if (entryName.startsWith(FILE_DATA_PREFIX)) { String fileName = entryName.replace(FILE_DATA_PREFIX + FOLDER_SEPARATOR, ""); - - String zipMD5 = Attachment.getHashFromUniqueId(fileName); fileName = Attachment.getFileNameFromUniqueId(fileName); - - MD5InputStream md5Stream = new MD5InputStream(zis); - String idFile = getStorageEngine().storeTempData(md5Stream); - - String localMD5 = MD5.asHex(md5Stream.hash()); - - if (!localMD5.equals(zipMD5)) { + String idFile = streamInfo.getUuid(); + String zipMD5 = Attachment.getHashFromUniqueId(fileName); + if (!streamInfo.getHash().equals(zipMD5)) { throw new SimExplorerBusinessException(_("simexplorer.service.invalidhash")); - } Attachment attachment = new Attachment(); attachment.setFileName(fileName); - attachment.setDataHash(localMD5); + attachment.setDataHash(zipMD5); attachments.put(attachment, idFile); } } @@ -319,10 +309,14 @@ public LoggableElement saveElement(String token, SerializableInputStream xmlFile, Map<Attachment, SerializableInputStream> attachments) throws SimExplorerException { // Store temporary data - String idxml = getStorageEngine().storeTempData(xmlFile); + String idxml = getStorageEngine().storeTempData(xmlFile).getUuid(); Map<Attachment, String> idsattachment = new HashMap<Attachment, String>(); for (Map.Entry<Attachment, SerializableInputStream> entry : attachments.entrySet()) { - String idattachment = getStorageEngine().storeTempData(entry.getValue()); + StreamInfo streamInfo = getStorageEngine().storeTempData(entry.getValue()); + String idattachment = streamInfo.getUuid(); + if (!streamInfo.getHash().equals(entry.getKey().getDataHash())) { + throw new SimExplorerBusinessException(_("simexplorer.service.invalidhash")); + } idsattachment.put(entry.getKey(), idattachment); } InputStream xmlData = getStorageEngine().retrieveTempData(idxml); @@ -524,7 +518,8 @@ * * @throws SimExplorerException the sim explorer exception */ - private void getDeletableChildren(String token, String uuid, String version, Set<MetaData> set) throws SimExplorerException { + private void getDeletableChildren(String token, String uuid, String version, Set<MetaData> set) + throws SimExplorerException { // this item is an orphan only if it has one parent maximum MetaData[] metadatasUsedBy = getMetadatasUsedBy(token, uuid, version); if (metadatasUsedBy.length <= 1) { @@ -674,11 +669,9 @@ * @return the xML attachment */ private Attachment getXMLAttachment() { - if (xmlAttachment == null) { - xmlAttachment = new Attachment(); - xmlAttachment.setDataHash(""); - xmlAttachment.setFileName("entity.xml"); - } + Attachment xmlAttachment = new Attachment(); + xmlAttachment.setFileName("entity.xml"); + xmlAttachment.setDataHash(""); return xmlAttachment; } @@ -760,10 +753,9 @@ // Compute element hash metaData.setHash(Long.toString(loggableElement.hashCode())); } - + /** - * Save all LE under element - * Only first level LE are saved + * Save all LE under element Only first level LE are saved * * @param token the token * @param element the element @@ -775,7 +767,7 @@ throws SimExplorerException { List<Entity> children = element.getChildren(); for (Entity child : children) { - if (child instanceof LoggableElement) { + if (child instanceof LoggableElement) { LoggableElement leChild = (LoggableElement) child; LoggableElement childElement = saveElement(token, leChild, idsattachment); // TODO check Modified: trunk/simexplorer-is/simexplorer-is-service/src/test/fr/cemagref/simexplorer/is/service/StorageServiceVersionsLocalTestCase.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-service/src/test/fr/cemagref/simexplorer/is/service/StorageServiceVersionsLocalTestCase.java 2008-03-16 21:10:15 UTC (rev 1369) +++ trunk/simexplorer-is/simexplorer-is-service/src/test/fr/cemagref/simexplorer/is/service/StorageServiceVersionsLocalTestCase.java 2008-03-17 17:45:04 UTC (rev 1370) @@ -29,7 +29,7 @@ */ @Override protected void buildStorageService() { - storageService = new StorageServiceClient(); + storageService = new StorageServiceClient("/properties/configlocal.properties", null); } /* (non-Javadoc) Deleted: trunk/simexplorer-is/simexplorer-is-service/src/test/properties/config.properties =================================================================== --- trunk/simexplorer-is/simexplorer-is-service/src/test/properties/config.properties 2008-03-16 21:10:15 UTC (rev 1369) +++ trunk/simexplorer-is/simexplorer-is-service/src/test/properties/config.properties 2008-03-17 17:45:04 UTC (rev 1370) @@ -1,4 +0,0 @@ -simexplorer.db=/var/local/simexplorer/local-db -simexplorer.data=/var/local/simexplorer/local-data -simexplorer.optimizeperiod=3600 -simexplorer.adminmail=landais at codelutin.com Copied: trunk/simexplorer-is/simexplorer-is-service/src/test/properties/configlocal.properties (from rev 1369, trunk/simexplorer-is/simexplorer-is-service/src/test/properties/config.properties) =================================================================== --- trunk/simexplorer-is/simexplorer-is-service/src/test/properties/configlocal.properties (rev 0) +++ trunk/simexplorer-is/simexplorer-is-service/src/test/properties/configlocal.properties 2008-03-17 17:45:04 UTC (rev 1370) @@ -0,0 +1,4 @@ +simexplorer.db=/var/local/simexplorer/local-db +simexplorer.data=/var/local/simexplorer/local-data +simexplorer.optimizeperiod=3600 +simexplorer.adminmail=landais at codelutin.com Modified: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/attachment/AttachmentHandler.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/attachment/AttachmentHandler.java 2008-03-16 21:10:15 UTC (rev 1369) +++ trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/attachment/AttachmentHandler.java 2008-03-17 17:45:04 UTC (rev 1370) @@ -53,20 +53,8 @@ * @throws SimExplorerException the sim explorer storage exception */ public abstract InputStream retrieveData(MetaData entity, Attachment attachment) throws SimExplorerException; - + /** - * Retrieve MD5. - * - * @param entity the entity - * @param attachment the attachment - * - * @return the string - * - * @throws SimExplorerException the sim explorer storage exception - */ - public abstract String retrieveMD5Data(MetaData entity, Attachment attachment) throws SimExplorerException; - - /** * Delete content. * * @param entity DataEntity related to content Modified: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/attachment/FileSystemAttachmentHandler.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/attachment/FileSystemAttachmentHandler.java 2008-03-16 21:10:15 UTC (rev 1369) +++ trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/attachment/FileSystemAttachmentHandler.java 2008-03-17 17:45:04 UTC (rev 1370) @@ -28,6 +28,7 @@ import java.io.OutputStream; import org.codelutin.util.MD5; +import org.codelutin.util.MD5InputStream; import fr.cemagref.simexplorer.is.entities.attachment.Attachment; import fr.cemagref.simexplorer.is.entities.metadata.MetaData; @@ -104,23 +105,9 @@ throw new SimExplorerTechnicalException(e); } return fis; - } + } /* (non-Javadoc) - * @see fr.cemagref.simexplorer.is.storage.attachment.AttachmentHandler#retrieveMD5Data(fr.cemagref.simexplorer.is.entities.metadata.MetaData, java.lang.String) - */ - @Override - public String retrieveMD5Data(MetaData entity, Attachment attachment) throws SimExplorerException { - String md5; - try { - md5 = MD5.asHex(MD5.getHash(getFile(entity, attachment, false))); - } catch (Exception e) { - throw new SimExplorerTechnicalException(e); - } - return md5; - } - - /* (non-Javadoc) * @see fr.cemagref.simexplorer.is.storage.attachment.AttachmentHandler#storeData(fr.cemagref.simexplorer.is.entities.metadata.MetaData, java.lang.String, java.io.InputStream) */ @Override @@ -135,16 +122,20 @@ // Buffer copy stream to stream BufferedInputStream bin = new BufferedInputStream(is); + MD5InputStream md5is = new MD5InputStream(bin); bout = new BufferedOutputStream(fos); while (true) { - int datum = bin.read(); + int datum = md5is.read(); if (datum == -1) break; bout.write(datum); } bout.flush(); + + attachment.setDataHash(MD5.asHex(md5is.hash())); + attachment.setDataSize(md5is.getStreamLength()); } catch (FileNotFoundException e) { throw new SimExplorerTechnicalException(e); Modified: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/engine/StorageEngine.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/engine/StorageEngine.java 2008-03-16 21:10:15 UTC (rev 1369) +++ trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/engine/StorageEngine.java 2008-03-17 17:45:04 UTC (rev 1370) @@ -246,7 +246,8 @@ * * @throws SimExplorerException the sim explorer storage exception */ - public abstract int findFullTextCount(String token, String query, SearchColumn searchColumn, boolean onlyLatest) throws SimExplorerException; + public abstract int findFullTextCount(String token, String query, SearchColumn searchColumn, boolean onlyLatest) + throws SimExplorerException; /** * Retrieve list of items corresponding to query. @@ -264,8 +265,8 @@ * * @throws SimExplorerException the sim explorer storage exception */ - public abstract MetaData[] findFullText(String token, String query, SearchColumn searchColumn, boolean onlyLatest, int indexStart, int count, - SortColumn sortColumn, SortOrder sortOrder) throws SimExplorerException; + public abstract MetaData[] findFullText(String token, String query, SearchColumn searchColumn, boolean onlyLatest, + int indexStart, int count, SortColumn sortColumn, SortOrder sortOrder) throws SimExplorerException; /** * Retrieve list of items of type wanted. @@ -319,19 +320,9 @@ * * @throws SimExplorerException the sim explorer storage exception */ - public abstract String storeTempData(InputStream stream) throws SimExplorerException; + public abstract StreamInfo storeTempData(InputStream stream) throws SimExplorerException; /** - * Store temporary data, for stream duplication. - * - * @param stream Stream to store - * @param id the id - * - * @throws SimExplorerException the sim explorer storage exception - */ - public abstract void storeTempData(String id, InputStream stream) throws SimExplorerException; - - /** * Retrieve temporary data. * * @param id Id associated @@ -343,17 +334,6 @@ public abstract InputStream retrieveTempData(String id) throws SimExplorerException; /** - * Retrieve MD5 temp data. - * - * @param id the id - * - * @return the string - * - * @throws SimExplorerException the sim explorer storage exception - */ - public abstract String retrieveMD5TempData(String id) throws SimExplorerException; - - /** * Delete temporary data. * * @param id the id Modified: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/engine/StorageEngineImpl.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/engine/StorageEngineImpl.java 2008-03-16 21:10:15 UTC (rev 1369) +++ trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/engine/StorageEngineImpl.java 2008-03-17 17:45:04 UTC (rev 1370) @@ -55,11 +55,10 @@ /** Storage. */ protected AttachmentHandler attachmentHandler; - /** Metadata handling temporary data. */ - private MetaData mdTmp; - /** The opened. */ private boolean opened = false; + + private static final String uuidTmpData = UUID.randomUUID().toString(); /** * Convert list. @@ -94,10 +93,15 @@ database = new LuceneDatabase(); // Storage attachmentHandler = new FileSystemAttachmentHandler(); + + } + + private MetaData getTmpMetaData() { // Storing tmp data - mdTmp = new MetaData(); - mdTmp.setUuid(UUID.randomUUID().toString()); + MetaData mdTmp = new MetaData(); + mdTmp.setUuid(uuidTmpData); mdTmp.setVersion("0"); + return mdTmp; } /* (non-Javadoc) @@ -341,44 +345,32 @@ /* (non-Javadoc) * @see fr.cemagref.simexplorer.is.storage.engine.StorageEngine#storeTempData(java.io.InputStream) */ - public String storeTempData(InputStream stream) throws SimExplorerException { - String id = UUID.randomUUID().toString(); - storeTempData(id, stream); - return id; + public StreamInfo storeTempData(InputStream stream) throws SimExplorerException { + String id = UUID.randomUUID().toString(); + StreamInfo streamInfo = new StreamInfo(); + MetaData tmpMetaData = getTmpMetaData(); + Attachment tmpAttachment = getTmpAttachment(id); + attachmentHandler.storeData(tmpMetaData, tmpAttachment, stream); + streamInfo.setUuid(id); + streamInfo.setHash(tmpAttachment.getDataHash()); + streamInfo.setLength(tmpAttachment.getDataSize()); + return streamInfo; } /* (non-Javadoc) - * @see fr.cemagref.simexplorer.is.storage.engine.StorageEngine#storeTempData(java.lang.String, java.io.InputStream) - */ - @Override - public void storeTempData(String id, InputStream stream) throws SimExplorerException { - attachmentHandler.storeData(mdTmp, getTmpAttachment(id), stream); - } - - /* (non-Javadoc) * @see fr.cemagref.simexplorer.is.storage.engine.StorageEngine#retrieveTempData(java.lang.String) */ public InputStream retrieveTempData(String id) throws SimExplorerException { InputStream is; - is = attachmentHandler.retrieveData(mdTmp, getTmpAttachment(id)); + is = attachmentHandler.retrieveData(getTmpMetaData(), getTmpAttachment(id)); return is; } /* (non-Javadoc) - * @see fr.cemagref.simexplorer.is.storage.engine.StorageEngine#retrieveMD5TempData(java.lang.String) - */ - @Override - public String retrieveMD5TempData(String id) throws SimExplorerException { - String md5; - md5 = attachmentHandler.retrieveMD5Data(mdTmp, getTmpAttachment(id)); - return md5; - } - - /* (non-Javadoc) * @see fr.cemagref.simexplorer.is.storage.engine.StorageEngine#deleteTempData(java.lang.String) */ public void deleteTempData(String id) throws SimExplorerException { - attachmentHandler.deleteData(mdTmp, getTmpAttachment(id)); + attachmentHandler.deleteData(getTmpMetaData(), getTmpAttachment(id)); } /* (non-Javadoc) Added: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/engine/StreamInfo.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/engine/StreamInfo.java (rev 0) +++ trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/engine/StreamInfo.java 2008-03-17 17:45:04 UTC (rev 1370) @@ -0,0 +1,88 @@ +/* +* ##% Copyright (C) 2008 Code Lutin, Gabriel Landais +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* ##% */ +package fr.cemagref.simexplorer.is.storage.engine; + +/** + * The Class StreamInfo. + */ +public class StreamInfo { + + /** The uuid. */ + private String uuid; + + /** The hash. */ + private String hash; + + /** The length. */ + private long length; + + /** + * Gets the uuid. + * + * @return the uuid + */ + public String getUuid() { + return uuid; + } + + /** + * Sets the uuid. + * + * @param uuid the new uuid + */ + public void setUuid(String uuid) { + this.uuid = uuid; + } + + /** + * Gets the hash. + * + * @return the hash + */ + public String getHash() { + return hash; + } + + /** + * Sets the hash. + * + * @param hash the new hash + */ + public void setHash(String hash) { + this.hash = hash; + } + + /** + * Gets the length. + * + * @return the length + */ + public long getLength() { + return length; + } + + /** + * Sets the length. + * + * @param length the new length + */ + public void setLength(long length) { + this.length = length; + } + +}
participants (1)
-
glandais@users.labs.libre-entreprise.org