DELTA
SVN   ‘AaUI―EEGEG«D―EGZ7DVLF(JeNH^EhD6P<U:DZLIFXDEuH8 IEBDHEFLF4D|EFEFF FUIFDD[D|D3FI7GhD;G;E{D|L0EFO-E{IFDDE5EF+G5DDxD|DGEIDH#O6D-J	G$EZHF9H7IE5JI
EGHGFMFbDPK$H@D>E&D9JHE
EPEZGD[DmF!J=EZDM=D[D G I?F*DHtE{J?EIzIF<EE@F{F*D4DeDF^JkIE+O>JD.M>D6DDQFPN/HDEECE1JTDGLOZHFmDG8NWJiD{LSLHiF=FREgD FE]J DFPJWHDzFyGUG+DqFlKG DqFwDPEMETDoGzFUD]D%E H&FRKJHjF{GDDWHLJ DDF
DMDOmS}VD6GuMJO&F/IuITD0Y]D)G DD"F.FyDPD:DD1D`LNDPI]DG&IKH&D6G0EsE`D!EE4G$F`EdDHMEJ1DeKGLE4J,N
FyLjQqD-DYLWP~D@F=KDM+EbGDEaHHGDEE`D
DfFGFgV}JuI:JFD-E EOEJHjJ,FJE.EM?MNEGGHIODtJ3J,gFG\HtJnFEHWN{HNJnKGD?D5EJIrD[GUF=KOE=DOHGUAF8F`DVD?DFFO^EREDkDDUHFD#EFqE}FGNHDXJ3FqEDjD%DbD;KDDeFEENDEE0FMIDQDwGHIhFF6EKHhDDG6IrEHGRuEEBKAU8EJM YZEJI!Z+I+EJ;OQL'UzI!@dqTQLDFuD]HM\a =
SVN:
-
$Date: 2007-04-17 12:06:42 -0700 (Tue, 17 Apr) $
$Revision: 113Author: jsimonsHeadURL: https://svn.cs.hmc.edu/cs121spring/awesome/project4/Joe/InterfaceRequirements.txtId: 9Z Joe S
*
Acceptance Tests: # 1Name: 	
  Barricad
Purpose: whether the i module successfully acts as a bto ocompon inDataManag.
Set-upWe needstubcontroller anddata m.Randomly generate (log) a series of bad inputsbe fetoB_.wantsurhaveyof each type, butnumberwe are ablwill depend oTypare: 1. Vector<Meta>FindSimilar() method 2St>  SearchForKeywords3. Ob AddMedia()Removes.  forUninitilized v. Empty with repeated elnull orwisvaliAfabove, plus,canr ss, that include "bad" characters,hll, newlinecage returnwe wouldn't expbasbdeals,doactuarepresent m  o r fromexis.Op
Pasg sbed by callingppropri HreportheceivResulIf no re,passtesIt's ok i sar. For ins,a wasat had a fixis notonus fulfiitnc.2
 Robustness
 It ienoughh Ifwhichcaua failurtstop working.mustinuewigoohiscloselfirst Umsfils.  RuNow, fiprobabaftspecificve already beenre-'s rstrert ph messagormatrproitWaluckoll. Tauncorrup, ()fsdimeitutomatiyrS34dal (whiox)ENDREP
DELTA 103 0 588
SVN  h\@ & c3 
SVN:
----------
$Date$
$Revision$
$Author$
$HeadURL$
$Id

More requirements:
It must function as a barricade, only passing sanitized input to the other components.
Robustness- the interface should allow the data manager to fail gracefully when asked to do a task that it cannot complete, such as add a media file to the database when the media file doesn't exist.
Must meet requirements for the data manager component, and must expose specified functionality.
Should hide complexity of other modules in the data manager component.


Description of the data manager from the top level architecture description in project 3:

First, it can receive a message to add or remove a certain set of media from the database (if, for instance, a portable hard drive is removed form the system, none of the media on that drive is available any more).  It performs the requested operations on the database and returns a status message to the controller (Succeed/Fail).  Also, when asked to add a set of media to the database, the Data Manager is responsible for making the associated metadata as complete as possible.  This can be accomplished through internet accesses to metadata or TV listing sites.
	Second, the Data Manager can be asked to search the database.  All search logic is contained inside the Data Manager, and a set of results is returned to the Controller.  The results are returned as a Metadata object, which is a wrapper around the retrieved media.  This object is specified inside the Data Manager.


Requirements for the data manager as a whole from project 3:

The Data Manager should be able to store any media that the user has in one centralized Database.  This includes, but is not limited to, TV listings, Movies, Music, Recorded TV shows, etc.

The Data Manager should support powerful search capabilities over this database.  In particular,  there are two types of search that need to be supported.  The user should be able to either directly query the Data Manager to, for example, return every song by a particular composer.  Additionally, the user should be able to search for media in the database that is similar to a set of media that the user provides.



DB_Interface methods:
---------------------
Private:
  createModules() Initializes instances of the other modules

Public:
  DB_Interface(Controller) 
    Initialize the interface

  Vector<Metadata> FindSimilar(Vector<Metadata>) 
    Validates the input and calls the correct search functionality.

  Vector<Metadata> SearchForKeywords(Vector<String>) 
    Validates the input and calls the appropriate search functionality.
  
  AddMedia(Object) 
    Turns the media into a Metadata object and calls the add media functionality

  RemoveMedia(Object) 
    Turns the media into a Metadata object and then calls the remove media functionality.

-----------------------



ENDREP
id: b7.0.r114/5475
type: file
count: 0
text: 114 0 2498 4289 490993cf718f782ee3142844e75cede1
cpath: /project4/Joe/Tests.txt
copyroot: 0 /

id: b0.0.r114/5615
type: file
pred: b0.0.r113/266
count: 4
text: 114 2511 2941 3304 44ad3983f5a803b71af2c5c84c041992
props: 104 213 59 0 26a9286e4363e514bb5c6062f5e16e10
cpath: /project4/Joe/InterfaceRequirements.txt
copyroot: 0 /

PLAIN
K 25
InterfaceRequirements.txt
V 19
file b0.0.r114/5615
K 18
ProjectOutline.txt
V 18
file b1.0.r106/630
K 9
Tests.txt
V 19
file b7.0.r114/5475
END
ENDREP
id: ay.0.r114/6007
type: dir
pred: ay.0.r113/612
count: 6
text: 114 5847 147 147 3cf35acfe3646c6d10a1cc33ec318640
cpath: /project4/Joe
copyroot: 0 /

PLAIN
K 5
Jason
V 18
dir aq.0.r112/2989
K 3
Joe
V 18
dir ay.0.r114/6007
END
ENDREP
id: ap.0.r114/6240
type: dir
pred: ap.0.r113/842
count: 15
text: 114 6157 70 70 b3d5d84c5527480ce9c0468dfb758f9f
cpath: /project4
copyroot: 0 /

PLAIN
K 8
project2
V 17
dir 1.0.r30/25403
K 8
project3
V 17
dir 22.0.r98/1882
K 8
project4
V 18
dir ap.0.r114/6240
END
ENDREP
id: 0.0.r114/6511
type: dir
pred: 0.0.r113/1111
count: 114
text: 114 6385 113 113 1f19ce618e2e180bf68b9b925223fd2d
cpath: /
copyroot: 0 /

_0.0.t113-1 add true false /project4/Joe/Tests.txt

b0.0.t113-1 modify true false /project4/Joe/InterfaceRequirements.txt


6511 6650
