|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.xml.LimeXMLReplyCollection
Stores a schema and a list of replies corresponding to that schema.
So when a search comes in, we only have to look at the set of replies that correspond to the schema of the query. Locking: Never obtain a this' monitor PRIOR to obtaining that of the FileManager.
Field Summary | |
static int |
BAD_ID3
|
static int |
FAILED_ALBUM
|
static int |
FAILED_ARTIST
|
static int |
FAILED_COMMENT
|
static int |
FAILED_GENRE
|
static int |
FAILED_TITLE
|
static int |
FAILED_TRACK
|
static int |
FAILED_YEAR
|
static int |
FILE_DEFECTIVE
|
static int |
HASH_FAILED
|
static int |
NORMAL
|
static int |
RW_ERROR
|
Constructor Summary | |
LimeXMLReplyCollection(FileDesc[] fds,
java.lang.String URI,
boolean audio)
Creates a new LimeXMLReplyCollection. |
Method Summary | |
void |
addReply(FileDesc fd,
LimeXMLDocument replyDoc)
Adds a reply into the mainMap of this collection. |
int |
getCount()
Returns the amount of items in this collection. |
LimeXMLDocument |
getDocForHash(URN hash)
Returns the LimeXMLDocument associated with this hash. |
protected java.util.List |
getKeyWords()
Gets a list of keywords from all the documents in this collection. |
java.util.List |
getMatchingReplies(LimeXMLDocument query)
Returns all documents that match the particular query. |
java.lang.String |
getSchemaURI()
Returns the schema URI of this collection. |
boolean |
isAudio()
Returns whether or not this reply collection is for audio files. |
int |
mp3ToDisk(java.lang.String mp3FileName,
LimeXMLDocument doc)
Writes this mp3 file to disk, using the XML in the doc. |
boolean |
removeDoc(FileDesc fd)
Removes the document associated with this FileDesc from this collection, as well as removing it from the FileDesc. |
LimeXMLDocument |
replaceDoc(FileDesc fd,
LimeXMLDocument newDoc)
Replaces the document in the map with a newer LimeXMLDocument. |
boolean |
write()
Simply write() out the mainMap to disk. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NORMAL
public static final int FILE_DEFECTIVE
public static final int RW_ERROR
public static final int BAD_ID3
public static final int FAILED_TITLE
public static final int FAILED_ARTIST
public static final int FAILED_ALBUM
public static final int FAILED_YEAR
public static final int FAILED_COMMENT
public static final int FAILED_TRACK
public static final int FAILED_GENRE
public static final int HASH_FAILED
Constructor Detail |
public LimeXMLReplyCollection(FileDesc[] fds, java.lang.String URI, boolean audio)
fds
- The list of shared FileDescs.URI
- This collection's schema URIaudio
- Whether this is a collection of audio files.Method Detail |
protected java.util.List getKeyWords()
delegates to the individual documents and collates the list
public java.lang.String getSchemaURI()
public void addReply(FileDesc fd, LimeXMLDocument replyDoc)
public int getCount()
public boolean isAudio()
public LimeXMLDocument getDocForHash(URN hash)
public java.util.List getMatchingReplies(LimeXMLDocument query)
public LimeXMLDocument replaceDoc(FileDesc fd, LimeXMLDocument newDoc)
public boolean removeDoc(FileDesc fd)
public boolean write()
public int mp3ToDisk(java.lang.String mp3FileName, LimeXMLDocument doc)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |