- Timestamp:
- 2022-05-09T09:48:37+12:00 (2 years ago)
- Location:
- main/trunk/gli/src/org/greenstone/gatherer/cdm
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/cdm/Index.java
r36138 r36151 49 49 protected Element element = null; 50 50 /** The name for our elements */ 51 protected String element_name= StaticStrings.INDEX_ELEMENT;51 static final String index_element = StaticStrings.INDEX_ELEMENT; 52 52 /** The name for the default element */ 53 protected String default_element_name= StaticStrings.INDEX_DEFAULT_ELEMENT;53 static final String default_index_element = StaticStrings.INDEX_DEFAULT_ELEMENT; 54 54 /** The unique, if cryptic, identifier of an index. */ 55 55 protected String id = null; … … 68 68 this.sources = sources; 69 69 // Create a new element 70 this.element = CollectionConfiguration.createElement( this.element_name);70 this.element = CollectionConfiguration.createElement(getElementName()); 71 71 // For each source add a content element 72 72 int size = sources.size(); … … 87 87 } 88 88 89 protected String getElementName() { 90 return index_element; 91 } 92 93 protected String getDefaultElementName() { 94 return default_index_element; 95 } 96 89 97 /** Method to compare two indexes. 90 98 * @param object The other index as an <strong>Object</strong>. … … 102 110 public DOMProxyListEntry create(Element element) { 103 111 return new Index(element); 112 } 113 public DOMProxyListEntry create(ArrayList sources) { 114 return new Index(sources); 104 115 } 105 116 … … 196 207 */ 197 208 public void setSources(ArrayList sources) { 198 if(element != null && element.getNodeName().equals( this.default_element_name)) {209 if(element != null && element.getNodeName().equals(getDefaultElementName())) { 199 210 // Erase old sources 200 211 XMLTools.clear(element);
Note:
See TracChangeset
for help on using the changeset viewer.