|
DLESE Tools v1.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.services.mmd.Query
Provides access to the meta-metadata database.
Sample test program:
###
Constructor Summary | |
---|---|
Query(int bugs,
String dbUrl)
Constructor: Makes the connection to the database. |
Method Summary | |
---|---|
void |
closeDb()
Closes the database connection. |
MmdRecord[] |
findAssociationChanges(Date specdateparm,
boolean assocFlag)
Returns an array of ids that have changed either meta-metadata or associations (duplicates) since the specified date. |
MmdRecord[] |
findDuplicates(String collKey,
String id)
Returns an array of MmdRecord representing ids in other collections that appear identical to the specified (collKey, id). |
String |
getCollectionName(String collKey)
Returns the collection name associated with a collection key, or null if none found. |
String |
getDirectory(String collKey)
Returns the directory containing the XML records of the given collection key, or null if none found. |
MmdRecord |
getMmdRecord(int changeType,
String collKey,
String id)
Returns the MmdRecord specified, or null if none found. |
MmdRecord |
getMmdRecord(String collKey,
String id)
Returns the MmdRecord specified, or null if none found. |
void |
setStatus(String collKey,
String id,
String newStatus)
Updates the status of a single record. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Query(int bugs, String dbUrl) throws MmdException
Method Detail |
public void closeDb() throws MmdException
MmdException
public String getCollectionName(String collKey) throws MmdException
MmdException
public String getDirectory(String collKey) throws MmdException
MmdException
public MmdRecord getMmdRecord(int changeType, String collKey, String id) throws MmdException
changeType
- The changeType to be set; one of the CHANGE_ values
specified in MmdRecord
.collKey
- The collection key.id
- The id of the record
MmdException
public MmdRecord getMmdRecord(String collKey, String id) throws MmdException
id
- The id of the record
MmdException
public void setStatus(String collKey, String id, String newStatus) throws MmdException
MmdRecord
.
collKey
- The collection key.id
- The id of the record
MmdException
public MmdRecord[] findAssociationChanges(Date specdateparm, boolean assocFlag) throws MmdException
Such ids may or may not have changed their meta-metadata content. For example, if id A used to appear identical to id B, but recently changed content so it now appears identical to id C, all three A, B, and C will be returned. This method is conservative: it also may return a few ids that have not changed associations.
specdateparm
- The specified dateassocFlag
- If false we return only the mmd records that have changed
in the DB; if true we return those plus any whose associations
may have changed.
MmdException
public MmdRecord[] findDuplicates(String collKey, String id) throws MmdException
collKey
- The collection key.id
- The id to search for
MmdException
|
DLESE Tools v1.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |