Package com.esri.gpt.catalog.arcims

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


  MmdRecords records = getQueryResult().getRecords();
  PageCursor pageCursor = getQueryResult().getPageCursor();
  criteria.getDateRange().check();
  pageCursor.setTotalRecordCount(0);

  adminDao = new ImsMetadataAdminDao(getRequestContext());
  tblImsUser = getRequestContext().getCatalogConfiguration().getUserTableName();
  Users editablePublishers = Publisher.buildSelectablePublishers(getRequestContext(), false);
  for (User u : editablePublishers.values()) {
    if (u.getName().length() > 0) {
      hmEditablePublishers.put(u.getName().toLowerCase(), u.getKey());
View Full Code Here


      if (adapter.getUsingSingleWriter()) {
        writer = adapter.newWriter();
        adapter.setAutoCommitSingleWriter(false);
      }
     
      ImsMetadataAdminDao dao = new ImsMetadataAdminDao(context);
      String resourceTable =  context.getCatalogConfiguration().getResourceTableName();
      String resourceDataTable = context.getCatalogConfiguration().getResourceDataTableName();
      StringSet delUuids = new StringSet();
      MetadataAcl acl = new MetadataAcl(context);
      boolean bCheckAcl = !acl.isPolicyUnrestricted();
     
      StringBuilder sbIds = new StringBuilder();
      for (String sUuid: ids) {
        if (sbIds.length() > 0) sbIds.append(",");
        sbIds.append("'").append(sUuid).append("'");
      }
     
      StringBuilder sb = new StringBuilder("SELECT");
      sb.append(" ").append(resourceTable).append(".DOCUUID");
      sb.append(",").append(resourceTable).append(".APPROVALSTATUS");
      sb.append(",").append(resourceTable).append(".PROTOCOL_TYPE");
      sb.append(",").append(resourceTable).append(".FINDABLE");
      sb.append(",").append(resourceTable).append(".UPDATEDATE");
      sb.append(",").append(resourceTable).append(".ACL");
      sb.append(" FROM ").append(resourceTable);
      sb.append(" WHERE DOCUUID IN (").append(sbIds.toString()).append(")");
      String sql = sb.toString();
      LOGGER.finest(sql);
     
      ManagedConnection mc = context.getConnectionBroker().returnConnection("");
      Connection con = mc.getJdbcConnection();
      IClobMutator mutator = mc.getClobMutator();
     
      st = con.prepareStatement(sql);
      ResultSet rs = st.executeQuery();
      if (Thread.interrupted()) return;
      while (rs.next()) {
        if (Thread.interrupted()) return;
       
        String uuid = rs.getString(1);
        String status = rs.getString(2);
        String protocolType = Val.chkStr(rs.getString(3));
        boolean findable = Val.chkBool(rs.getString(4),false);

        boolean bIndexable = (status != null) &&
          (status.equalsIgnoreCase("approved") || status.equalsIgnoreCase("reviewed"));
        if (bIndexable && protocolType.length()>0 && !findable) {
          bIndexable = false;
        }
       
        if (!bIndexable) {
          delUuids.add(uuid);
        } else {         
          Timestamp tsDbModified = rs.getTimestamp(5);
          String sDbAcl = null;
          if (bCheckAcl) {
            sDbAcl = rs.getString(6);
          }
         
          try {
            String sXml = Val.chkStr(dao.readXml(uuid));
            if (sXml.length() > 0) {
              MetadataDocument mdDoc = new MetadataDocument();
              Schema schema = mdDoc.prepareForView(context,sXml);
              adapter.publishDocument(uuid,tsDbModified,schema,sDbAcl);
            }
View Full Code Here

   * @throws SAXException
   * @throws ParserConfigurationException
   */
  private HashMap<String, String> makeDocumentAclFromUUID(String uuid)
      throws SQLException, ParserConfigurationException, SAXException, IOException {
    ImsMetadataAdminDao adminDao = new ImsMetadataAdminDao(_requestContext);
    String xml = adminDao.queryAclByUUID(uuid);
    return buildDocumentAcl(xml);
  }
View Full Code Here

    // intitalize
    PreparedStatement stJobsDelete = null;
    PreparedStatement stCompletedJobsDelete = null;
    PreparedStatement stHistoryDelete = null;

    ImsMetadataAdminDao adminDao = new ImsMetadataAdminDao(getRequestContext());

    try {

      StringBuffer sbJobsDeleteSql = new StringBuffer();
      StringBuffer sbCompletedJobsDeleteSql = new StringBuffer();
View Full Code Here

TOP

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

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.