Project

General

Profile

« Previous | Next » 

Revision 8630

get guid from online id for call to SyncAccessPolicy

View differences:

src/edu/ucsb/nceas/metacat/Eml200SAXHandler.java
2002 2002
                                        inlineFileName, subreeid);
2003 2003
             // Save guid of data object for syncing of access policy with CN after parsing
2004 2004
             // is successful (see DocumentImpl.write)
2005
             
2006 2005
             // look-up pid assuming docid
2007 2006
             String dataGuid = inlineFileName;
2008 2007
             try {
......
2012 2011
             } catch (McdbDocNotFoundException e) {
2013 2012
            	 // log the warning
2014 2013
            	 logMetacat.warn("No pid found for [assumed] data docid: " + inlineFileName);
2015
            	 // what do you do?
2016 2014
             }
2017
			guidsToSync.add(dataGuid);
2015
 			 guidsToSync.add(dataGuid);
2018 2016
           }
2019 2017
           else if (onlineURLDistributionIdList.containsKey(subreeid))
2020 2018
           {
......
2037 2035
                                   "xml_access table for " + dataFileName);
2038 2036
               // Save guid of data object for syncing of access policy with CN after parsing
2039 2037
               // is successful (see DocumentImpl.write)
2040
               guidsToSync.add(dataFileName);
2038
               // look-up pid assuming docid
2039
               String dataGuid = dataFileName;
2040
               try {
2041
  	             String dataDocid = DocumentUtil.getDocIdFromAccessionNumber(dataFileName);
2042
  	             int dataRev = DocumentUtil.getRevisionFromAccessionNumber(dataFileName);
2043
  	             dataGuid = IdentifierManager.getInstance().getGUID(dataDocid, dataRev);
2044
               } catch (McdbDocNotFoundException e) {
2045
              	 // log the warning
2046
              	 logMetacat.warn("No pid found for [assumed] data docid: " + dataFileName);
2047
               }
2048
               guidsToSync.add(dataGuid);
2041 2049
               // put the id into a hashtalbe. So when we run wirtetop level
2042 2050
               // access, those id will be ignored because they already has
2043 2051
               // additional access rules

Also available in: Unified diff