Changeset 6305


Ignore:
Timestamp:
06/17/15 09:28:08 (9 years ago)
Author:
Twan Goosen
Message:

checking for parts by means of count field, not retrieving all hasPart field values
Refs #382

Location:
vlo/trunk/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vlo/trunk/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/config/VloSolrSpringConfig.java

    r6284 r6305  
    121121            FacetConstants.FIELD_HIERARCHY_WEIGHT,
    122122            FacetConstants.FIELD_HAS_PART,
     123            FacetConstants.FIELD_HAS_PART_COUNT,
    123124            FacetConstants.FIELD_IS_PART_OF,
    124125            FacetConstants.FIELD_SOLR_SCORE
  • vlo/trunk/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/pages/RecordPage.java

    r6304 r6305  
    280280            protected void onConfigure() {
    281281                final SolrDocument document = getModel().getObject();
     282                final Object partCount = document.getFieldValue(FacetConstants.FIELD_HAS_PART_COUNT);
    282283                final boolean hasHierarchy // has known parent or children
    283                         = null != document.getFieldValue(FacetConstants.FIELD_HAS_PART)
    284                         || null != document.getFieldValue(FacetConstants.FIELD_IS_PART_OF);
     284                        = null != document.getFieldValue(FacetConstants.FIELD_IS_PART_OF) // has parent
     285                        || (null != partCount && !Integer.valueOf(0).equals(partCount)); // children count != 0
    285286
    286287                // only show hierarchy panel if there's anything to show
Note: See TracChangeset for help on using the changeset viewer.