Revision 6704
Added by ben leinfelder over 12 years ago
IdentifierManager.java | ||
---|---|---|
624 | 624 |
* return all local ids in the object store that do not have associated |
625 | 625 |
* system metadata |
626 | 626 |
*/ |
627 |
public List<String> getLocalIdsWithNoSystemMetadata() |
|
627 |
public List<String> getLocalIdsWithNoSystemMetadata(boolean includeRevisions)
|
|
628 | 628 |
{ |
629 | 629 |
Vector<String> ids = new Vector<String>(); |
630 | 630 |
String sql = "select docid, rev from xml_documents " + |
631 | 631 |
"where docid not in " + |
632 | 632 |
"(select docid from identifier where guid in (select guid from systemmetadata)))"; |
633 |
|
|
634 |
String revisionSql = "select docid, revisionid from xml_revisions " + |
|
635 |
"where docid not in " + |
|
636 |
"(select docid from identifier where guid in (select guid from systemmetadata)))"; |
|
637 |
|
|
638 |
if (includeRevisions) { |
|
639 |
sql = sql + " UNION ALL " + revisionSql; |
|
640 |
} |
|
641 |
|
|
633 | 642 |
DBConnection dbConn = null; |
634 | 643 |
int serialNumber = -1; |
635 | 644 |
try |
Also available in: Unified diff
include all document revisions when generating "missing" system metadata
TODO: revision graph captured in obsoletes/obsoletedBy