Package com.esri.gpt.catalog.arcims

Examples of com.esri.gpt.catalog.arcims.DeleteMetadataRequest


   * @throws IOException if accessing index fails
   */
  protected void deleteSourceURIs(Publisher publisher, Iterable<Map.Entry<String,String>> sourceURIs, CatalogRecordListener listener)
      throws ImsServiceException, SQLException, CatalogIndexException, IOException {
    ImsMetadataAdminDao adminDao = new ImsMetadataAdminDao(getRequestContext());
    DeleteMetadataRequest delRequest = new DeleteMetadataRequest(
        this.getRequestContext(),publisher);
    for (Map.Entry<String,String> entry: sourceURIs) {
      if (Thread.currentThread().isInterrupted()) break;
      String uri = entry.getKey();
      String uuid = entry.getValue();
      LOGGER.finest("Deleting uuid="+uuid+", sourceuri="+uri);
      boolean bOk = delRequest.executeDelete(uuid);
      if (bOk) {
        listener.onRecord(uri, uuid);
      }
    }
  }
View Full Code Here


* @throws CatalogIndexException if a document indexing exception occurs
*/
private void executeDelete(ImsMetadataAdminDao adminDao, StringSet uuids)
    throws ImsServiceException, SQLException, CatalogIndexException {
  ActionResult result = getActionResult();
  DeleteMetadataRequest imsRequest;
  imsRequest = new DeleteMetadataRequest(getRequestContext(), getPublisher());
  for (String sUuid : uuids) {
    boolean bOk = imsRequest.executeDelete(sUuid);
    if (bOk) {
      int nMod = (result.getNumberOfRecordsModified() + 1);
      result.setNumberOfRecordsModified(nMod);
    }
  }
View Full Code Here

TOP

Related Classes of com.esri.gpt.catalog.arcims.DeleteMetadataRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.