Changeset 9192
- Timestamp:
- 2005-02-25T14:57:52+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/Subcollection.java
r9184 r9192 29 29 import org.greenstone.gatherer.Gatherer; 30 30 import org.greenstone.gatherer.util.StaticStrings; 31 import org.greenstone.gatherer.util.Troolean;32 31 import org.greenstone.gatherer.util.XMLTools; 33 32 import org.w3c.dom.*; … … 41 40 implements Comparable, DOMProxyListEntry { 42 41 /** A <i>boolean</i> which is <i>true</i> if the condition is an include one, <i>false</i> otherwise. */ 43 private Troolean include = new Troolean();42 private boolean include = true; 44 43 /** The DOM Element this Subcollection is based upon. */ 45 44 private Element element = null; … … 75 74 // Cache the details 76 75 this.flags = flags; 77 this.include .set(include);76 this.include = include; 78 77 this.name = name; 79 78 this.pattern = pattern; … … 179 178 */ 180 179 public boolean isInclusive() { 181 if(!include.isDecided() && element != null) { 182 include.set(element.getAttribute(StaticStrings.TYPE_ATTRIBUTE).equals(StaticStrings.INCLUDE_STR)); 183 } 184 return include.isTrue(); 180 if (element != null) { 181 include = element.getAttribute(StaticStrings.TYPE_ATTRIBUTE).equals(StaticStrings.INCLUDE_STR); 182 } 183 184 return include; 185 185 } 186 186 … … 193 193 public void setElement(Element element) { 194 194 this.element = element; 195 include .reset();195 include = true; 196 196 flags = null; 197 197 name = null; … … 213 213 if(element != null) { 214 214 // Change element 215 element.setAttribute(StaticStrings.TYPE_ATTRIBUTE, (new_include ? StaticStrings.INCLUDE_STR : StaticStrings.EXCLUDE_STR));216 include.set(new_include);215 include = new_include; 216 element.setAttribute(StaticStrings.TYPE_ATTRIBUTE, (include ? StaticStrings.INCLUDE_STR : StaticStrings.EXCLUDE_STR)); 217 217 text = null; 218 218 }
Note:
See TracChangeset
for help on using the changeset viewer.