1 22 23 package org.xquark.xquery.metadata; 24 25 import java.util.ArrayList ; 26 import java.util.Hashtable ; 27 28 32 public class MetaPath { 33 private static final String RCSRevision = "$Revision: 1.3 $"; 37 private static final String RCSName = "$Name: $"; 38 39 private ArrayList locations = null; 43 private Hashtable paths = null; 44 45 49 54 public MetaPath() { 55 locations = new ArrayList (); 56 paths = new Hashtable (); 57 } 58 59 69 public void add(ArrayList vecpath, String collectionname, String namespace, String wrappername) { 70 String [] location = addLocation(collectionname, namespace, wrappername); 71 for (int i = 0; i < vecpath.size(); i++) { 72 String path = (String ) vecpath.get(i); 73 addPath(path, location); 74 } 75 76 } 77 78 private String [] addLocation(String collectionname, String namespace, String wrappername) { 79 String [] location = new String [3]; 80 location[0] = collectionname; 81 location[1] = namespace; 82 location[2] = wrappername; 83 return location; 84 } 85 86 private void addPath(String path, String [] location) { 87 paths.put(path, location); 88 } 89 90 94 98 protected void finalize() throws Throwable { 99 } 100 } 101 | Popular Tags |