Revision 6802
Added by ben leinfelder about 13 years ago
src/edu/ucsb/nceas/metacat/Eml200SAXHandler.java | ||
---|---|---|
57 | 57 |
import edu.ucsb.nceas.metacat.accesscontrol.AccessSection; |
58 | 58 |
import edu.ucsb.nceas.metacat.database.DBConnection; |
59 | 59 |
import edu.ucsb.nceas.metacat.database.DBConnectionPool; |
60 |
import edu.ucsb.nceas.metacat.dataone.hazelcast.HazelcastService; |
|
60 | 61 |
import edu.ucsb.nceas.metacat.properties.PropertyService; |
61 | 62 |
import edu.ucsb.nceas.metacat.util.AuthUtil; |
62 | 63 |
import edu.ucsb.nceas.metacat.util.DocumentUtil; |
... | ... | |
2184 | 2185 |
+ ee.getMessage()); |
2185 | 2186 |
} |
2186 | 2187 |
}//finally |
2188 |
|
|
2189 |
// for D1, refresh the entries |
|
2190 |
HazelcastService.getInstance().refreshSystemMetadataEntry(guid); |
|
2191 |
HazelcastService.getInstance().refreshSystemMetadataEntry(dataId); |
|
2187 | 2192 |
|
2188 | 2193 |
}//writeGivenAccessRuleIntoDB |
2189 | 2194 |
|
src/edu/ucsb/nceas/metacat/Eml210SAXHandler.java | ||
---|---|---|
51 | 51 |
import edu.ucsb.nceas.metacat.accesscontrol.AccessSection; |
52 | 52 |
import edu.ucsb.nceas.metacat.database.DBConnection; |
53 | 53 |
import edu.ucsb.nceas.metacat.database.DBConnectionPool; |
54 |
import edu.ucsb.nceas.metacat.dataone.hazelcast.HazelcastService; |
|
54 | 55 |
import edu.ucsb.nceas.metacat.properties.PropertyService; |
55 | 56 |
import edu.ucsb.nceas.metacat.util.DocumentUtil; |
56 | 57 |
import edu.ucsb.nceas.metacat.util.MetacatUtil; |
... | ... | |
1510 | 1511 |
} |
1511 | 1512 |
|
1512 | 1513 |
String guid = null; |
1514 |
String referencedGuid = accessSection.getDataFileName(); |
|
1515 |
|
|
1513 | 1516 |
try { |
1514 | 1517 |
guid = IdentifierManager.getInstance().getGUID(docid, Integer.valueOf(revision)); |
1515 | 1518 |
} catch (NumberFormatException e) { |
... | ... | |
1548 | 1551 |
logMetacat.debug("Guid in accesstable: " + guid); |
1549 | 1552 |
} |
1550 | 1553 |
if (!topLevel) { |
1551 |
// TODO: look up guid?
|
|
1552 |
pstmt.setString(1, accessSection.getDataFileName());
|
|
1554 |
// use the referenced guid
|
|
1555 |
pstmt.setString(1, referencedGuid );
|
|
1553 | 1556 |
logMetacat.debug("Docid in accesstable: " + inlineDataFileName); |
1554 | 1557 |
|
1555 | 1558 |
// for subtree should specify the |
... | ... | |
1595 | 1598 |
+ ee.getMessage()); |
1596 | 1599 |
} |
1597 | 1600 |
}// finally |
1601 |
|
|
1602 |
// for D1, refresh the entries |
|
1603 |
HazelcastService.getInstance().refreshSystemMetadataEntry(guid); |
|
1604 |
HazelcastService.getInstance().refreshSystemMetadataEntry(referencedGuid); |
|
1605 |
|
|
1598 | 1606 |
|
1599 | 1607 |
}// writeGivenAccessRuleIntoDB |
1600 | 1608 |
|
Also available in: Unified diff
refresh the SystemMetadata entry for EML and referenced data files when parsing EML access rules -- this ensures our in-memory system metadata map is up to date WRT the DB entries.