Changeset 5093


Ignore:
Timestamp:
04/29/14 14:07:48 (10 years ago)
Author:
Twan Goosen
Message:

Sending document self link instead of docId to FCS aggregator. Fixes #542.
Also added "_selfLink" as a technical field.

Location:
vlo/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • vlo/trunk/vlo-commons/src/main/resources/VloConfig.xml

    r5068 r5093  
    114114    <technicalFields>
    115115        <technicalField>id</technicalField>
     116        <technicalField>_selfLink</technicalField>
    116117        <technicalField>dataProvider</technicalField>
    117118        <technicalField>metadataSource</technicalField>
  • vlo/trunk/vlo-commons/src/test/java/eu/clarin/cmdi/vlo/config/DefaultVloConfigFactoryTest.java

    r5068 r5093  
    981981    public void testGetTechnicalFields() {
    982982        Set<String> result = config.getTechnicalFields();
    983         assertEquals(8, result.size());
     983        assertEquals(9, result.size());
    984984    }
    985985
  • vlo/trunk/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/config/VloSpringConfig.java

    r5046 r5093  
    227227            FacetConstants.FIELD_RESOURCE_CLASS,
    228228            FacetConstants.FIELD_RESOURCE,
     229            FacetConstants.FIELD_SELF_LINK,
    229230            FacetConstants.FIELD_ID,
    230231            FacetConstants.FIELD_DATA_PROVIDER,
  • vlo/trunk/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/panels/record/ContentSearchFormPanel.java

    r4902 r5093  
    6969
    7070    private IModel<String> createJsonModel(final IModel<SolrDocument> model, final IModel<String> endpointModel) {
    71         // Prepare a JSON object that holds the CQL endpoint and the document ID
     71        // Prepare a JSON object that holds the CQL endpoint and the document self link
    7272        return new AbstractReadOnlyModel<String>() {
    7373            @Override
    7474            public String getObject() {
    7575                final String endPoint = endpointModel.getObject();
    76                 final Object docId = model.getObject().getFirstValue(FacetConstants.FIELD_ID);
     76                final Object selfLink = model.getObject().getFirstValue(FacetConstants.FIELD_SELF_LINK);
    7777                try {
    7878                    final JSONObject json = new JSONObject();
    79                     json.put(endPoint, new JSONArray(new Object[]{docId}));
     79                    json.put(endPoint, new JSONArray(new Object[]{selfLink}));
    8080                    return json.toString(2);
    8181                } catch (JSONException ex) {
    82                     logger.warn("Could not create JSON for aggregation context with endpoint '{}' and docId '{}'", endPoint, docId, ex);
     82                    logger.warn("Could not create JSON for aggregation context with endpoint '{}' and docId '{}'", endPoint, selfLink, ex);
    8383                    return null;
    8484                }
  • vlo/trunk/vlo-web-app/src/main/resources/fieldNames.properties

    r5026 r5093  
    3333
    3434#hidden/technical fields
     35field.metadataSource=Metadata source
    3536field._componentProfile=Profile name
    36 field.metadataSource=Metadata source
    3737field._landingPageRef=Landing page
    3838field._searchPageRef=Search page
     39field._contentSearchRef=Content search reference
    3940field._lastSeen=Last seen
     41field._selfLink=Self link
Note: See TracChangeset for help on using the changeset viewer.