Revision 9249
Added by Jing Tao almost 9 years ago
IdentifierManager.java | ||
---|---|---|
1682 | 1682 |
* @param startTime |
1683 | 1683 |
* @param endTime |
1684 | 1684 |
* @param objectFormat |
1685 |
* @param replicaStatus
|
|
1685 |
* @param nodeId
|
|
1686 | 1686 |
* @param start |
1687 | 1687 |
* @param count |
1688 | 1688 |
* @return ObjectList |
... | ... | |
1691 | 1691 |
* @throws PropertyNotFoundException |
1692 | 1692 |
*/ |
1693 | 1693 |
public ObjectList querySystemMetadata(Date startTime, Date endTime, |
1694 |
ObjectFormatIdentifier objectFormatId, boolean replicaStatus,
|
|
1694 |
ObjectFormatIdentifier objectFormatId, NodeReference nodeId,
|
|
1695 | 1695 |
int start, int count, Identifier identifier, boolean isSID) |
1696 | 1696 |
throws SQLException, PropertyNotFoundException, ServiceException { |
1697 | 1697 |
ObjectList ol = new ObjectList(); |
... | ... | |
1756 | 1756 |
f4 = true; |
1757 | 1757 |
} |
1758 | 1758 |
|
1759 |
if (!replicaStatus) { |
|
1759 |
/*if (!replicaStatus) {
|
|
1760 | 1760 |
String currentNodeId = PropertyService.getInstance().getProperty("dataone.nodeId"); |
1761 | 1761 |
if (!f1 && !f2 && !f3 && !f4) { |
1762 | 1762 |
whereClauseSql += " where authoritive_member_node = '" + |
... | ... | |
1765 | 1765 |
whereClauseSql += " and authoritive_member_node = '" + |
1766 | 1766 |
currentNodeId.trim() + "'"; |
1767 | 1767 |
} |
1768 |
}*/ |
|
1769 |
|
|
1770 |
if (nodeId != null && nodeId.getValue() != null && !nodeId.getValue().trim().equals("")) { |
|
1771 |
if (!f1 && !f2 && !f3 && !f4) { |
|
1772 |
whereClauseSql += " where authoritive_member_node = '" + |
|
1773 |
nodeId.getValue().trim() + "'"; |
|
1774 |
} else { |
|
1775 |
whereClauseSql += " and authoritive_member_node = '" + |
|
1776 |
nodeId.getValue().trim() + "'"; |
|
1777 |
} |
|
1768 | 1778 |
} |
1769 |
|
|
1770 | 1779 |
|
1771 | 1780 |
|
1772 | 1781 |
// connection |
Also available in: Unified diff
Use the NodeReference object to replace the replicaStatus to restrict the listObjects method.