Naanou.ResourceExchange
Class Entry

A single resource

Field Summary
long byteLength
Naanou.Common.FileCategory category
string contentsHash
string DateTimeFormat
         Date time format to use
Naanou.ResourceExchange.DownloaderQueue downloaders
string filename
string LastModified
         Last modified time stamp in Naanou.ResourceExchange.Entry.DateTimeFormat format.
Naanou.Common.Metadata[] metadata

Constructor Summary
Entry()
         Used by Serializer
Entry(System.IO.FileInfo file)
         Constructor
Entry(string filename, string hash, long length, string lastModified, Naanou.Common.Metadata[] metadata, Naanou.Common.FileCategory category)
         Constructor

Property Summary
long ByteLength
         Length of file
Naanou.Common.FileCategory Category
string ContentsHash
         Hash of contents
string Downloaders
         Gets a space-delimited list of recent downloaders
string Filename
         Filename
bool HasBeenModified
         Checks whether file has been modified since it was last indexed
System.DateTime LastModifiedTime
         Gets the timestamp recorded for a file when it was indexed
Naanou.Common.Metadata[] Metadata
         Gets a copy of, or sets the metadata associated with this entry

Method Summary
void AddDownloader(string address)
         Adds a downloader in id|url form
Naanou.ResourceExchange.Entry CloneForPublishing()
         Clones an entry to be published
void GetCategory()
string ToString()
         Gets a string representation of entry

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone


Field Detail

byteLength

private long byteLength


category

private Naanou.Common.FileCategory category


contentsHash

private string contentsHash


DateTimeFormat

public string DateTimeFormat

Date time format to use


downloaders

private Naanou.ResourceExchange.DownloaderQueue downloaders


filename

private string filename


LastModified

public string LastModified

Last modified time stamp in Naanou.ResourceExchange.Entry.DateTimeFormat format.


metadata

private Naanou.Common.Metadata[] metadata

Constructor Detail

Entry

private Entry()

Used by Serializer


Entry

public Entry(System.IO.FileInfo file)

Constructor

Parameters:
file - File to parse

Entry

internal Entry(string filename,
               string hash,
               long length,
               string lastModified,
               Naanou.Common.Metadata[] metadata,
               Naanou.Common.FileCategory category)

Constructor

Parameters:
filename - Filename
hash - Content hash
length - Length (bytes)
lastModified - Last modified time stamp
metadata - Metadata
Property Detail

ByteLength

public long ByteLength

Length of file


Category

public Naanou.Common.FileCategory Category


ContentsHash

public string ContentsHash

Hash of contents


Downloaders

public string Downloaders

Gets a space-delimited list of recent downloaders


Filename

public string Filename

Filename


HasBeenModified

public bool HasBeenModified

Checks whether file has been modified since it was last indexed


LastModifiedTime

public System.DateTime LastModifiedTime

Gets the timestamp recorded for a file when it was indexed


Metadata

public Naanou.Common.Metadata[] Metadata

Gets a copy of, or sets the metadata associated with this entry

Method Detail

AddDownloader

public void AddDownloader(string address)

Adds a downloader in id|url form

Parameters:
address -

CloneForPublishing

public Naanou.ResourceExchange.Entry CloneForPublishing()

Clones an entry to be published

Returns:
Cloned entry

GetCategory

private void GetCategory()


ToString

public string ToString()

Gets a string representation of entry

Returns:
String representation of entry