org.tranche.project
Class ProjectSummary

java.lang.Object
  extended by org.tranche.project.ProjectSummary

public class ProjectSummary
extends java.lang.Object

This is a helper class to represent summaries of known project files. This way the tool can keep a lot of projects in memory without having to keep the entire project file.

Author:
James "Augie" Hill - augman85@gmail.com, Bryan E. Smith - bryanesmith@gmail.com

Field Summary
static long DEFAULT_NUMERIC_VALUE
          Need a consistent format so can easily test whether data was found.
static java.lang.String DEFAULT_STRING_VALUE
          Need a consistent format so can easily test whether data was found.
 java.lang.String description
           
 long files
           
 BigHash hash
           
 boolean isEncrypted
           
 boolean isHidden
           
 boolean isProject
           
 boolean isPublished
           
 BigHash newVersion
           
 BigHash oldVersion
           
 boolean shareMetaDataIfEncrypted
           
 long size
           
 java.lang.String title
           
 java.lang.String type
           
 java.lang.String uploader
           
 long uploadTimestamp
           
 
Constructor Summary
ProjectSummary(BigHash hash)
           
ProjectSummary(BigHash hash, java.lang.String title, java.lang.String description, long size, long files, long uploadTimestamp, java.lang.String uploader, boolean shareMetaDataIfEncrypted)
           
ProjectSummary(MetaData md, BigHash hash)
           
ProjectSummary(ProjectFile pf, MetaData md, BigHash hash)
           
 
Method Summary
 boolean hasNewVersion()
          Returns true if this has a new version in MetaData annotation
 boolean hasOldVersion()
          Returns true if this has an old version in MetaData annotation
 boolean isMetaDataParsed()
           
 boolean isProjectFileParsed()
           
 boolean isProjectInformationAvailable()
          Returns true if the project information is available.
 void parseMetaData(MetaData md, BigHash hash)
          Parses out the meta data info into this project summary
 void parseProjectFile(ProjectFile pf)
          Parses out the project file info into this project summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_STRING_VALUE

public static final java.lang.String DEFAULT_STRING_VALUE
Need a consistent format so can easily test whether data was found. Keeps code cleaner and more consistent behavior.

See Also:
Constant Field Values

DEFAULT_NUMERIC_VALUE

public static final long DEFAULT_NUMERIC_VALUE
Need a consistent format so can easily test whether data was found. Keeps code cleaner and more consistent behavior.

See Also:
Constant Field Values

title

public java.lang.String title

description

public java.lang.String description

uploader

public java.lang.String uploader

type

public java.lang.String type

size

public long size

files

public long files

uploadTimestamp

public long uploadTimestamp

hash

public BigHash hash

oldVersion

public BigHash oldVersion

newVersion

public BigHash newVersion

isEncrypted

public boolean isEncrypted

isPublished

public boolean isPublished

isHidden

public boolean isHidden

shareMetaDataIfEncrypted

public boolean shareMetaDataIfEncrypted

isProject

public boolean isProject
Constructor Detail

ProjectSummary

public ProjectSummary(BigHash hash)

ProjectSummary

public ProjectSummary(MetaData md,
                      BigHash hash)

ProjectSummary

public ProjectSummary(ProjectFile pf,
                      MetaData md,
                      BigHash hash)

ProjectSummary

public ProjectSummary(BigHash hash,
                      java.lang.String title,
                      java.lang.String description,
                      long size,
                      long files,
                      long uploadTimestamp,
                      java.lang.String uploader,
                      boolean shareMetaDataIfEncrypted)
Method Detail

parseMetaData

public void parseMetaData(MetaData md,
                          BigHash hash)

Parses out the meta data info into this project summary


parseProjectFile

public void parseProjectFile(ProjectFile pf)

Parses out the project file info into this project summary


hasOldVersion

public boolean hasOldVersion()
Returns true if this has an old version in MetaData annotation


hasNewVersion

public boolean hasNewVersion()
Returns true if this has a new version in MetaData annotation


isProjectInformationAvailable

public boolean isProjectInformationAvailable()

Returns true if the project information is available. Otherwise, must download.


isMetaDataParsed

public boolean isMetaDataParsed()
Returns:

isProjectFileParsed

public boolean isProjectFileParsed()
Returns:


This code is free for use both commercially and non-commercially as stated in the project's license