Class AssociateAccessPolicy

java.lang.Object
edu.ucsb.nceas.metacat.AssociateAccessPolicy

public class AssociateAccessPolicy extends Object
This class is in order to fix a problem. It doesn't has functionality for Metacat. In Currently, some document in xml_document table doesn't have entries in xml_access table. This is okay during the old access policy. But we changed the access policy and if there is no entry in xml_access table, except owner, other person can not access it. So we need to associate with access policy in xml_access table for these doc ids. The same access policy of these docoments' data set will associate to them.
  • Constructor Details

    • AssociateAccessPolicy

      public AssociateAccessPolicy(DBConnection conn) throws IOException, SQLException, Exception
      construct an instance of the DBQuery class

      Generally, one would call the findDocuments() routine after creating an instance to specify the search query

      Parameters:
      conn - the JDBC connection that we use for the query
      parserName - the fully qualified name of a Java class implementing the org.xml.sax.XMLReader interface
      Throws:
      IOException
      SQLException
      Exception
  • Method Details

    • main

      public static void main(String[] args)
      the main routine used to associate access policy
    • getNotFoundDataSetId

      public Vector getNotFoundDataSetId()
      Get the docid which didn't found a dataset id to map it
    • geItsDataSetIdWithouAccessEntry

      public Vector geItsDataSetIdWithouAccessEntry()
      Get the docid which it's mapped dataset doesn't has access entry
    • associateAccess

      public void associateAccess() throws SQLException, McdbException, Exception
      Associate the access policy of dataset to the docid which the data set id mapped
      Throws:
      SQLException
      McdbException
      Exception