Changeset 36300


Ignore:
Timestamp:
2022-07-22T10:57:51+12:00 (3 weeks ago)
Author:
kjdon
Message:

subcollections should use searchmeta not collectionmeta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionIndexManager.java

    r18412 r36300  
    8080        if (!contains(subcollection_index)) {
    8181            // add a pseudo metadata
    82             CollectionMeta metadatum = new CollectionMeta(StaticStrings.STOP_CHARACTER + subcollection_index.getID());
     82            SearchMeta metadatum = new SearchMeta(subcollection_index.getID(), SearchMeta.TYPE_PARTITION);
    8383            metadatum.setValue(subcollection_index.getID());
    84             CollectionDesignManager.collectionmeta_manager.addMetadatum(metadatum);
     84            CollectionDesignManager.searchmeta_manager.addMetadatum(metadatum);
    8585            add(getSize(), subcollection_index);
    8686        }
     
    162162        if (subcollection_index != null) {
    163163            // Remove any current metadata from this index
    164             CollectionDesignManager.collectionmeta_manager.removeMetadata(StaticStrings.STOP_CHARACTER + subcollection_index.getID());
     164            CollectionDesignManager.searchmeta_manager.removeMetadata(subcollection_index.getID(), SearchMeta.TYPE_PARTITION);
    165165
    166166            // Check if the index removed happens to be the default index
     
    194194    private void replaceSubcollectionIndex(SubcollectionIndex old_subcollection, SubcollectionIndex new_subcollection) {
    195195        // Remove old collection meta
    196         CollectionDesignManager.collectionmeta_manager.removeMetadata(StaticStrings.STOP_CHARACTER + old_subcollection.getID());
     196        CollectionDesignManager.searchmeta_manager.removeMetadata(old_subcollection.getID(), SearchMeta.TYPE_PARTITION);
    197197        // Add new one
    198         CollectionMeta metadatum = new CollectionMeta(StaticStrings.STOP_CHARACTER + new_subcollection.getID());
     198        SearchMeta metadatum = new SearchMeta(new_subcollection.getID());
    199199        metadatum.setValue(new_subcollection.getID());
    200         CollectionDesignManager.collectionmeta_manager.addMetadatum(metadatum);
     200        CollectionDesignManager.searchmeta_manager.addMetadatum(metadatum);
    201201        if(default_index != null && default_index.equals(old_subcollection)) {
    202202            setDefault(new_subcollection);
Note: See TracChangeset for help on using the changeset viewer.