Changeset 8768
- Timestamp:
- 2004-12-09T15:37:34+13:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/cdm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/Plugin.java
r8607 r8768 36 36 extends ArrayList 37 37 implements ArgumentContainer, Comparable, DOMProxyListEntry, Serializable { 38 private boolean is_abstract = false; // Only for Base39 38 /** The DOM Element this assigned Plugin is modelled on. */ 40 39 private Element element; 40 private boolean does_explode_metadata_databases = false; // Only for Base 41 private boolean is_abstract = false; // Only for Base 41 42 /** The parent Plugin this one inherits from, if any. */ 42 43 private Plugin super_plugin; // Only for Base … … 156 157 157 158 159 /** Checks whether the plugin this instance is based on processes metadata databases that can be exploded. */ 160 public boolean doesExplodeMetadataDatabases() 161 { 162 Plugin base_plugin = CollectionDesignManager.plugin_manager.getBasePlugin(getName()); 163 return base_plugin.does_explode_metadata_databases; 164 } 165 166 167 /** Checks whether this plugin instance will process the specified file (given its process_exp and block_exp). */ 158 168 public boolean doesProcessFile(File file) 159 169 { … … 189 199 } 190 200 191 // This plugin (probably) willnot deal with the specified file201 // This plugin will (probably) not deal with the specified file 192 202 return false; 193 203 } … … 368 378 } 369 379 380 public void setDoesExplodeMetadataDatabases(boolean does_explode_metadata_databases) { 381 this.does_explode_metadata_databases = does_explode_metadata_databases; 382 } 383 370 384 public void setElement(Element element) { 371 385 this.element = element; -
trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java
r8765 r8768 124 124 125 125 126 /** This function listens for new files being added to the collection and hints about suitable plugins. */ 126 127 public void fileAddedToCollection(File file) 127 128 { … … 134 135 // This file will be processed by an assigned plugin, so no suggestion is necessary 135 136 System.err.println("Processed by assigned plugin: " + assigned_plugin); 137 System.err.println("Explodes metadata databases: " + assigned_plugin.doesExplodeMetadataDatabases()); 136 138 return; 137 139 } … … 606 608 Plugin plugin = new Plugin(); 607 609 String node_name = null; 608 for(Node node = root.getFirstChild(); node != null; 609 node = node.getNextSibling()) { 610 for (Node node = root.getFirstChild(); node != null; node = node.getNextSibling()) { 610 611 node_name = node.getNodeName(); 611 612 if(node_name.equalsIgnoreCase("Name")) { … … 618 619 plugin.setName(name); 619 620 } 620 else if (node_name.equalsIgnoreCase("Desc")) {621 else if (node_name.equalsIgnoreCase("Desc")) { 621 622 plugin.setDescription(XMLTools.getValue(node)); 622 623 } 623 else if(node_name.equalsIgnoreCase("Abstract")) { 624 plugin.setIsAbstract(XMLTools.getValue(node).equalsIgnoreCase(CollectionConfiguration.YES_STR)); 625 } 626 // Parse the multitude of arguments. 624 else if (node_name.equalsIgnoreCase("Abstract")) { 625 plugin.setIsAbstract(XMLTools.getValue(node).equalsIgnoreCase(StaticStrings.YES_STR)); 626 } 627 else if (node_name.equalsIgnoreCase("Explodes")) { 628 plugin.setDoesExplodeMetadataDatabases(XMLTools.getValue(node).equalsIgnoreCase(StaticStrings.YES_STR)); 629 System.err.println("Plugin " + plugin.getName() + " explodes metadata databases: " + plugin.doesExplodeMetadataDatabases()); 630 } 631 // Parse the multitude of arguments 627 632 else if(node_name.equalsIgnoreCase("Arguments")) { 628 633 for(Node arg = node.getFirstChild(); arg != null; arg = arg.getNextSibling()) {
Note:
See TracChangeset
for help on using the changeset viewer.