Project

General

Profile

« Previous | Next » 

Revision 4466

Added by daigle about 16 years ago

Add some generics typing

View differences:

src/edu/ucsb/nceas/metacat/SubTree.java
48 48
  protected String startElementName = null;
49 49
  protected long   startNodeId = -1;
50 50
  protected long   endNodeId =   -1;
51
  private Stack  subTreeNodeStack = null;
51
  private Stack<NodeRecord>  subTreeNodeStack = null;
52 52
  
53 53
  private static Logger logMetacat = Logger.getLogger(SubTree.class);
54 54

  
......
80 80
    /**
81 81
     * Get subtree node stack
82 82
     */
83
    public Stack getSubTreeNodeStack() throws SAXException
83
    public Stack<NodeRecord> getSubTreeNodeStack() throws SAXException
84 84
    {
85 85
      try
86 86
      {
src/edu/ucsb/nceas/metacat/PermissionController.java
1033 1033
   * @param user , the name of user
1034 1034
   * @param groups, the group which the user belong to
1035 1035
   */
1036
   public static Hashtable getUnReadableInlineDataIdList(String docidWithoutRev,
1036
   public static Hashtable<String, String> getUnReadableInlineDataIdList(String docidWithoutRev,
1037 1037
                                                   String user, String[] groups,
1038 1038
                                                   boolean withRevision)
1039 1039
                                                throws Exception
1040 1040
   {
1041
     Hashtable inlineDataList = getUnAccessableInlineDataIdList(docidWithoutRev,
1041
     Hashtable<String, String> inlineDataList = getUnAccessableInlineDataIdList(docidWithoutRev,
1042 1042
                              user, groups, AccessControlInterface.READSTRING,
1043 1043
                              withRevision);
1044 1044

  
......
1055 1055
  * @param user , the name of user
1056 1056
  * @param groups, the group which the user belong to
1057 1057
  */
1058
  public static Hashtable getUnWritableInlineDataIdList(String docidWithoutRev,
1058
  public static Hashtable<String, String> getUnWritableInlineDataIdList(String docidWithoutRev,
1059 1059
                                                  String user, String[] groups,
1060 1060
                                                  boolean withRevision)
1061 1061
                                               throws Exception
1062 1062
  {
1063
    Hashtable inlineDataList = getUnAccessableInlineDataIdList(docidWithoutRev,
1063
    Hashtable<String, String> inlineDataList = getUnAccessableInlineDataIdList(docidWithoutRev,
1064 1064
                            user, groups, AccessControlInterface.WRITESTRING,
1065 1065
                            withRevision);
1066 1066

  
......
1076 1076
    * e.g. when withRevision is true, temp.1.1.1, temp.1.1.2 would be returned
1077 1077
    * otherwise temp.1.1 and temp.1.2 would be returned.
1078 1078
    */
1079
   private static Hashtable getUnAccessableInlineDataIdList(String docid,
1079
   private static Hashtable<String, String> getUnAccessableInlineDataIdList(String docid,
1080 1080
                               String user, String[] groups, String permission,
1081 1081
                               boolean withRevision)
1082 1082
                             throws SQLException,McdbException, Exception
1083 1083
   {
1084
      Hashtable unAccessbleIdList = new Hashtable();
1084
      Hashtable<String, String> unAccessibleIdList = new Hashtable();
1085 1085
      Hashtable allIdList = getAllInlineDataIdList(docid);
1086
      Enumeration en = allIdList.keys();
1086
      Enumeration<String> en = allIdList.keys();
1087 1087
      while (en.hasMoreElements())
1088 1088
      {
1089 1089
        String subTreeId = (String) en.nextElement();
......
1099 1099
                                         " and " + "inline data file name " +
1100 1100
                                         fileId + " into " + "un" + permission +
1101 1101
                                         " hash");
1102
                unAccessbleIdList.put(subTreeId, fileId);
1102
                unAccessibleIdList.put(subTreeId, fileId);
1103 1103

  
1104 1104
            }
1105 1105
            else
......
1110 1110
                                         getInlineDataIdWithoutRev(fileId) +
1111 1111
                                         " into " + "un" + permission +
1112 1112
                                         " hash");
1113
                unAccessbleIdList.put(subTreeId, MetaCatUtil.
1113
                unAccessibleIdList.put(subTreeId, MetaCatUtil.
1114 1114
                                      getInlineDataIdWithoutRev(fileId));
1115 1115
            }
1116 1116
        }
1117 1117
      }
1118
      return unAccessbleIdList;
1118
      return unAccessibleIdList;
1119 1119
   }
1120 1120

  
1121 1121

  
src/edu/ucsb/nceas/metacat/DBUtil.java
694 694
   * @return is a vector which contains Integer object
695 695
   * @throws SQLException
696 696
   */
697
  public static Vector getRevListFromRevisionTable(String docIdWithoutRev) throws SQLException
697
  public static Vector<Integer> getRevListFromRevisionTable(String docIdWithoutRev) throws SQLException
698 698
  {
699
      Vector list = new Vector();
699
      Vector<Integer> list = new Vector<Integer>();
700 700
      int rev = 1;
701 701
      PreparedStatement pStmt = null;
702 702
      DBConnection dbConn = null;

Also available in: Unified diff