Changeset 10345
- Timestamp:
- 2005-07-28T16:19:40+12:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Configuration.java
r10342 r10345 45 45 import javax.swing.plaf.*; 46 46 import org.greenstone.gatherer.util.StaticStrings; 47 import org.greenstone.gatherer.util.Utility;48 47 import org.greenstone.gatherer.util.XMLTools; 49 48 import org.w3c.dom.*; -
trunk/gli/src/org/greenstone/gatherer/Dictionary.java
r9349 r10345 44 44 import javax.swing.text.*; 45 45 import javax.swing.tree.*; 46 import org.greenstone.gatherer.util.Utility;47 46 48 47 /** Extends the ResourceBundle class to allow for the automatic insertion of arguments.<BR> -
trunk/gli/src/org/greenstone/gatherer/cdm/Argument.java
r9126 r10345 42 42 import org.greenstone.gatherer.metadata.MetadataTools; 43 43 import org.greenstone.gatherer.util.StaticStrings; 44 import org.greenstone.gatherer.util.Utility;45 44 import org.greenstone.gatherer.util.XMLTools; 46 45 import org.w3c.dom.*; -
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java
r10332 r10345 37 37 import org.greenstone.gatherer.gui.GLIButton; 38 38 import org.greenstone.gatherer.metadata.MetadataElement; 39 import org.greenstone.gatherer.metadata.MetadataSetManager; 39 40 import org.greenstone.gatherer.metadata.MetadataTools; 40 41 import org.greenstone.gatherer.util.DOMTree; 41 42 import org.greenstone.gatherer.util.Codec; 42 43 import org.greenstone.gatherer.util.StaticStrings; 43 import org.greenstone.gatherer.util.Utility;44 44 import org.greenstone.gatherer.util.XMLTools; 45 45 import org.w3c.dom.*; … … 594 594 // Remove any references to a namespace for extracted metadata 595 595 if (!show_extracted_namespace) { 596 String match_string = "\\[" + Utility.EXTRACTED_METADATA_NAMESPACE + "\\.";596 String match_string = "\\[" + MetadataSetManager.EXTRACTED_METADATA_NAMESPACE + "\\."; 597 597 value_str = value_str.replaceAll(match_string, "["); 598 598 } -
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionMeta.java
r8243 r10345 30 30 import org.greenstone.gatherer.util.Codec; 31 31 import org.greenstone.gatherer.util.StaticStrings; 32 import org.greenstone.gatherer.util.Utility;33 32 import org.greenstone.gatherer.util.XMLTools; 34 33 import org.w3c.dom.*; -
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionMetaManager.java
r8243 r10345 36 36 import org.greenstone.gatherer.Gatherer; 37 37 import org.greenstone.gatherer.util.StaticStrings; 38 import org.greenstone.gatherer.util.Utility;39 38 import org.w3c.dom.*; 40 39 -
trunk/gli/src/org/greenstone/gatherer/cdm/FormatManager.java
r10341 r10345 41 41 import org.greenstone.gatherer.metadata.MetadataSetManager; 42 42 import org.greenstone.gatherer.util.StaticStrings; 43 import org.greenstone.gatherer.util.Utility;44 43 import org.w3c.dom.*; 45 44 -
trunk/gli/src/org/greenstone/gatherer/cdm/GeneralManager.java
r10237 r10345 45 45 import org.greenstone.gatherer.gui.WarningDialog; 46 46 import org.greenstone.gatherer.util.StaticStrings; 47 import org.greenstone.gatherer.util.Utility;48 47 49 48 /** This class is responsible for generating the necessary GUI components. It does this by calling the getEditControls() method of the appropriate class (i.e. IndexManager for index related edits). It also is in charge of correctly adding (and removing) listeners, using phrases from the <strong>Dictionary</strong> rather than the text keys inserted in the component classes, and several other aspects of the design page, including the config file section tree. -
trunk/gli/src/org/greenstone/gatherer/cdm/Index.java
r9995 r10345 35 35 import org.greenstone.gatherer.metadata.MetadataTools; 36 36 import org.greenstone.gatherer.util.StaticStrings; 37 import org.greenstone.gatherer.util.Utility;38 37 import org.greenstone.gatherer.util.XMLTools; 39 38 import org.w3c.dom.*; -
trunk/gli/src/org/greenstone/gatherer/cdm/MetadataSetView.java
r10342 r10345 45 45 import org.greenstone.gatherer.metadata.MetadataTools; 46 46 import org.greenstone.gatherer.metadata.MetadataXMLFileManager; 47 import org.greenstone.gatherer.util.Utility;48 47 49 48 -
trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionIndex.java
r9161 r10345 30 30 import org.greenstone.gatherer.DebugStream; 31 31 import org.greenstone.gatherer.util.StaticStrings; 32 import org.greenstone.gatherer.util.Utility;33 32 import org.greenstone.gatherer.util.XMLTools; 34 33 import org.w3c.dom.*; -
trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionManager.java
r10237 r10345 42 42 import org.greenstone.gatherer.metadata.MetadataSetManager; 43 43 import org.greenstone.gatherer.util.StaticStrings; 44 import org.greenstone.gatherer.util.Utility;45 44 import org.w3c.dom.*; 46 45 -
trunk/gli/src/org/greenstone/gatherer/collection/BasicCollectionConfiguration.java
r8247 r10345 43 43 import org.greenstone.gatherer.util.Codec; 44 44 import org.greenstone.gatherer.util.StaticStrings; 45 import org.greenstone.gatherer.util.Utility;46 45 import org.w3c.dom.*; 47 46 -
trunk/gli/src/org/greenstone/gatherer/collection/Collection.java
r10237 r10345 48 48 import org.greenstone.gatherer.cdm.CollectionMetaManager; 49 49 import org.greenstone.gatherer.util.StaticStrings; 50 import org.greenstone.gatherer.util.Utility;51 50 import org.greenstone.gatherer.util.XMLTools; 52 51 import org.w3c.dom.*; -
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r10342 r10345 173 173 if(collection != null) { 174 174 // Determine if the collection has been built by looking for the build.cfg file 175 File build_cfg_file = new File(getCollectionIndexDirectoryPath() + Utility.BUILD_CFG_FILENAME);175 File build_cfg_file = new File(getCollectionIndexDirectoryPath() + "build.cfg"); 176 176 return build_cfg_file.exists(); 177 177 } … … 395 395 // Always import the extracted metadata set if we didn't already 396 396 if (MetadataSetManager.getMetadataSet(MetadataSetManager.EXTRACTED_METADATA_NAMESPACE) == null) { 397 File extracted_metadata_set_file = new File(Gatherer.getGLIMetadataDirectoryPath() + Utility.EXTRACTED_METADATA_NAMESPACE + StaticStrings.METADATA_SET_EXTENSION);397 File extracted_metadata_set_file = new File(Gatherer.getGLIMetadataDirectoryPath() + MetadataSetManager.EXTRACTED_METADATA_NAMESPACE + StaticStrings.METADATA_SET_EXTENSION); 398 398 importMetadataSet(new MetadataSet(extracted_metadata_set_file)); 399 399 } … … 1146 1146 1147 1147 // Always import the extracted metadata set 1148 File extracted_metadata_set_file = new File(Gatherer.getGLIMetadataDirectoryPath() + Utility.EXTRACTED_METADATA_NAMESPACE + StaticStrings.METADATA_SET_EXTENSION);1148 File extracted_metadata_set_file = new File(Gatherer.getGLIMetadataDirectoryPath() + MetadataSetManager.EXTRACTED_METADATA_NAMESPACE + StaticStrings.METADATA_SET_EXTENSION); 1149 1149 importMetadataSet(new MetadataSet(extracted_metadata_set_file)); 1150 1150 -
trunk/gli/src/org/greenstone/gatherer/file/FileSystem.java
r10342 r10345 5 5 import org.greenstone.gatherer.Dictionary; 6 6 import org.greenstone.gatherer.Gatherer; 7 import org.greenstone.gatherer.util.Utility;8 7 9 8 -
trunk/gli/src/org/greenstone/gatherer/file/RecycleBin.java
r10342 r10345 51 51 import org.greenstone.gatherer.util.DragGroup; 52 52 import org.greenstone.gatherer.util.JarTools; 53 import org.greenstone.gatherer.util.Utility;54 53 55 54 -
trunk/gli/src/org/greenstone/gatherer/file/WorkspaceTree.java
r9062 r10345 34 34 import org.greenstone.gatherer.Gatherer; 35 35 import org.greenstone.gatherer.gui.tree.DragTree; 36 import org.greenstone.gatherer.util.Utility;37 36 38 37 -
trunk/gli/src/org/greenstone/gatherer/gems/GEMS.java
r10342 r10345 66 66 import org.greenstone.gatherer.util.Codec; 67 67 import org.greenstone.gatherer.util.JarTools; 68 import org.greenstone.gatherer.util.Utility;69 68 import org.greenstone.gatherer.util.XMLTools; 70 69 import org.w3c.dom.*; -
trunk/gli/src/org/greenstone/gatherer/gems/GEMSLanguageManager.java
r8971 r10345 50 50 import org.greenstone.gatherer.Gatherer; 51 51 import org.greenstone.gatherer.gui.GLIButton; 52 import org.greenstone.gatherer.util.Utility;53 52 import org.w3c.dom.*; 54 53 -
trunk/gli/src/org/greenstone/gatherer/gems/GEMSNode.java
r8971 r10345 46 46 import org.greenstone.gatherer.Dictionary; 47 47 import org.greenstone.gatherer.collection.BasicCollectionConfiguration; 48 import org.greenstone.gatherer.util.Utility;49 48 import org.w3c.dom.*; 50 49 /** -
trunk/gli/src/org/greenstone/gatherer/gems/MSMUtils.java
r9301 r10345 33 33 import org.greenstone.gatherer.util.ArrayTools; 34 34 import org.greenstone.gatherer.util.StaticStrings; 35 import org.greenstone.gatherer.util.Utility;36 35 import org.greenstone.gatherer.util.XMLTools; 37 36 import org.w3c.dom.*; … … 308 307 // If no root, or no namespace found, assume its extracted (at least then they can't edit it) 309 308 if(namespace == null || namespace.equals("")) { 310 namespace = Utility.EXTRACTED_METADATA_NAMESPACE;309 namespace = MetadataSetManager.EXTRACTED_METADATA_NAMESPACE; 311 310 } 312 311 name_buffer.insert(0, NS_SEP); -
trunk/gli/src/org/greenstone/gatherer/gems/MetadataSet.java
r10006 r10345 45 45 import org.greenstone.gatherer.Dictionary; 46 46 import org.greenstone.gatherer.util.StaticStrings; 47 import org.greenstone.gatherer.util.Utility;48 47 import org.greenstone.gatherer.util.XMLTools; 49 48 import org.w3c.dom.*; … … 469 468 String namespace = root.getAttribute("namespace"); 470 469 if(namespace == null || namespace.equals("")) { 471 namespace = Utility.EXTRACTED_METADATA_NAMESPACE;470 namespace = MetadataSetManager.EXTRACTED_METADATA_NAMESPACE; 472 471 } 473 472 name = name + " (" + namespace + ")"; -
trunk/gli/src/org/greenstone/gatherer/gems/MetadataSetManager.java
r10342 r10345 58 58 * @version 2.3b 59 59 */ 60 public class MetadataSetManager { 60 public class MetadataSetManager 61 { 62 static public final String EXTRACTED_METADATA_NAMESPACE = "ex"; 63 61 64 static final public String HIDDEN = "hidden"; //The name of the hidden, or system, metadata set. 62 65 static final public int MAX_LOADED_SETS = 64; … … 150 153 for(Enumeration keys = mds_hashtable.keys(); keys.hasMoreElements(); ) { 151 154 MetadataSet mds = (MetadataSet)mds_hashtable.get(keys.nextElement()); 152 if((!mds.getNamespace().equals( Utility.EXTRACTED_METADATA_NAMESPACE) && !mds.getNamespace().equals(HIDDEN))153 || (mds.getNamespace().equals( Utility.EXTRACTED_METADATA_NAMESPACE) && (Configuration.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC) || force_extracted))154 || (mds.getNamespace().equals( Utility.EXTRACTED_METADATA_NAMESPACE) && mds.getNamespace().equals(HIDDEN) && all)) {155 if((!mds.getNamespace().equals(EXTRACTED_METADATA_NAMESPACE) && !mds.getNamespace().equals(HIDDEN)) 156 || (mds.getNamespace().equals(EXTRACTED_METADATA_NAMESPACE) && (Configuration.get("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC) || force_extracted)) 157 || (mds.getNamespace().equals(EXTRACTED_METADATA_NAMESPACE) && mds.getNamespace().equals(HIDDEN) && all)) { 155 158 ArrayList set_elements = mds.getElements(); 156 159 ///ystem.err.println("The set " + mds + " has " + set_elements.getLength() + " elements."); … … 222 225 else if(!perfect) { 223 226 // No namespace so assume that its extracted metadata. 224 set = (MetadataSet)mds_hashtable.get( Utility.EXTRACTED_METADATA_NAMESPACE);227 set = (MetadataSet)mds_hashtable.get(EXTRACTED_METADATA_NAMESPACE); 225 228 element = name; 226 229 } … … 293 296 for(Enumeration keys = mds_hashtable.keys(); keys.hasMoreElements(); ) { 294 297 MetadataSet set = (MetadataSet)mds_hashtable.get(keys.nextElement()); 295 if(!set.getNamespace().equals(HIDDEN) && (include_greenstone_extracted || !set.getNamespace().equals( Utility.EXTRACTED_METADATA_NAMESPACE))) {298 if(!set.getNamespace().equals(HIDDEN) && (include_greenstone_extracted || !set.getNamespace().equals(EXTRACTED_METADATA_NAMESPACE))) { 296 299 result.add(set); 297 300 } -
trunk/gli/src/org/greenstone/gatherer/gui/HelpFrame.java
r10342 r10345 50 50 import org.greenstone.gatherer.util.JarTools; 51 51 import org.greenstone.gatherer.util.StaticStrings; 52 import org.greenstone.gatherer.util.Utility;53 52 import org.greenstone.gatherer.util.XMLTools; 54 53 import org.w3c.dom.*; -
trunk/gli/src/org/greenstone/gatherer/gui/MenuBar.java
r10012 r10345 45 45 import org.greenstone.gatherer.Gatherer; 46 46 import org.greenstone.gatherer.util.JarTools; 47 import org.greenstone.gatherer.util.Utility;48 47 49 48 /** The menu bar for the Gatherer main GUI. -
trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionMetadataPrompt.java
r10342 r10345 41 41 import org.greenstone.gatherer.util.CheckList; 42 42 import org.greenstone.gatherer.util.CheckListEntry; 43 import org.greenstone.gatherer.util.Utility;44 43 45 44 -
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r10342 r10345 65 65 /** The size of the io buffer, in bytes. */ 66 66 static final public int BUFFER_SIZE = 1024; 67 static final public String BUILD_CFG_FILENAME = "build.cfg";68 static final public String CFG_COLLECTIONMETA_COLLECTIONNAME = "collectionmeta\tcollectionname";69 static final public String CFG_COLLECTIONMETA_COLLECTIONEXTRA = "collectionmeta\tcollectionextra";70 static final public String CFG_COLLECTIONMETA_ICONCOLLECTION = "collectionmeta\ticoncollection";71 67 static final public String CFG_CLASSIFY = "classify"; 72 68 static final public String CFG_CLASSIFY_BUTTONNAME = "-buttonname"; … … 74 70 static final public String CFG_CLASSIFY_METADATA = "-metadata"; 75 71 static final public String CFG_CLASSIFY_SORT = "-sort"; 76 static final public String CFG_CREATOR = "creator";77 72 static final public String CFG_FORMAT = "format"; 78 static final public String CFG_MAINTAINER = "maintainer";79 73 static final public String COLLECTION_TREE = "Collection"; 80 74 /** Definition of an important directory name, in this case the file the collection configuration is expect to be in. */ 81 75 static final public String CONFIG_FILE = "etc" + File.separator + "collect.cfg"; 82 static final public String EXTRACTED_METADATA_NAMESPACE = "ex";83 /** The location of the default greenstone metadata file. */84 static final public String GREENSTONEDIRECTORYMETADATA_TEMPLATE = "xml/metadata.xml";85 76 static final public String GLI_ARCHIVE = "GLI.jar"; 86 77 static final public String GLI_EXTENSION = ".col";
Note:
See TracChangeset
for help on using the changeset viewer.