- Timestamp:
- 2008-06-16T14:08:57+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java
r15031 r16023 1331 1331 // The next token is the type 1332 1332 String type = tokenizer.nextToken (); 1333 type = ensureNewPluginName(type); 1333 1334 command_element.setAttribute (StaticStrings.TYPE_ATTRIBUTE, type); 1334 1335 // Now we parse out the remaining arguments into a hashmapping from name to value … … 3887 3888 return skeleton; 3888 3889 } 3890 3891 static private HashMap plugin_map = null; 3892 3893 private void setUpPluginNameMap() { 3894 plugin_map = new HashMap(); 3895 plugin_map.put("RecPlug", "DirectoryPlugin"); 3896 plugin_map.put("ArcPlug","ArchivesInfPlugin"); 3897 plugin_map.put("TEXTPlug","TextPlugin"); 3898 plugin_map.put("EMAILPlug","EmailPlugin"); 3899 plugin_map.put("SRCPlug","SourceCodePlugin"); 3900 plugin_map.put("NULPlug","NulPlugin"); 3901 plugin_map.put("W3ImgPlug","W3ImagePlugin"); 3902 plugin_map.put("PagedImgPlug","PagedImagePlugin"); 3903 } 3904 3905 private String ensureNewPluginName(String plugin) { 3906 if (plugin.endsWith("Plugin")) return plugin; 3907 if (plugin_map == null) { 3908 setUpPluginNameMap(); 3909 } 3910 String new_name = (String)plugin_map.get(plugin); 3911 if (new_name != null) return new_name; 3912 new_name = plugin.replace("Plug", "Plugin"); 3913 return new_name; 3914 } 3915 3916 3889 3917 ///*********************************************************************************************************/// 3890 3918 } 3919
Note:
See TracChangeset
for help on using the changeset viewer.