edu.arizona.cs.mbel.mbel
Class FileReference

java.lang.Object
  extended byedu.arizona.cs.mbel.mbel.FileReference
All Implemented Interfaces:
FileAttributes

public class FileReference
extends java.lang.Object
implements FileAttributes

This class represents a File reference, and is analogous to a File metadata table. Modules use these to refer to other modules in the same assembly, as well as data for ManifestResources.


Field Summary
 
Fields inherited from interface edu.arizona.cs.mbel.signature.FileAttributes
ContainsMetaData, ContainsNoMetaData
 
Constructor Summary
FileReference(long flags, java.lang.String filename, byte[] hash)
          Makes a FileReference with the given flags, filename, and hash value
 
Method Summary
 void addFileAttribute(CustomAttribute ca)
          Adds a CustomAttribute to this FileReference
 boolean equals(java.lang.Object o)
          Compares 2 file references Returns true iff all the fields are equal
 CustomAttribute[] getFileAttributes()
          Returns a non-null array of CustomAttributes on thie FileReference (File)
 java.lang.String getFileName()
          Returns the filename of this file
 long getFileRID()
          Returns the File RID of this FileReference
 long getFlags()
          Returns a bit vector of flags for this file reference (defined in FileAttributes)
 byte[] getHashValue()
          Returns the hash value of this file
 void removeFileAttribute(CustomAttribute ca)
          Removes a CustomAttribute from this File
 void setFileName(java.lang.String filename)
          Sets the filename of this file
 void setFileRID(long rid)
          Sets the File RID for this FileReference
 void setFlags(long flags)
          Sets the flags for this file reference
 void setHashValue(byte[] hash)
          Sets the hash value of this file
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileReference

public FileReference(long flags,
                     java.lang.String filename,
                     byte[] hash)
Makes a FileReference with the given flags, filename, and hash value

Parameters:
flags - a bit vector of flags (defined in FileAttributes)
filename - the name of the file (unqualified)
hash - the hash value of the file
Method Detail

addFileAttribute

public void addFileAttribute(CustomAttribute ca)
Adds a CustomAttribute to this FileReference


getFileAttributes

public CustomAttribute[] getFileAttributes()
Returns a non-null array of CustomAttributes on thie FileReference (File)


removeFileAttribute

public void removeFileAttribute(CustomAttribute ca)
Removes a CustomAttribute from this File


getFileRID

public long getFileRID()
Returns the File RID of this FileReference


setFileRID

public void setFileRID(long rid)
Sets the File RID for this FileReference


getFlags

public long getFlags()
Returns a bit vector of flags for this file reference (defined in FileAttributes)


setFlags

public void setFlags(long flags)
Sets the flags for this file reference


getFileName

public java.lang.String getFileName()
Returns the filename of this file


setFileName

public void setFileName(java.lang.String filename)
Sets the filename of this file


getHashValue

public byte[] getHashValue()
Returns the hash value of this file


setHashValue

public void setHashValue(byte[] hash)
Sets the hash value of this file


equals

public boolean equals(java.lang.Object o)
Compares 2 file references Returns true iff all the fields are equal