com.metamatrix.connector.metadata.index
Class MetadataResultsPostProcessor

java.lang.Object
  extended by com.metamatrix.connector.metadata.index.MetadataResultsPostProcessor

public class MetadataResultsPostProcessor
extends java.lang.Object

This is used to post process metadata records found by querying index files available to the metadata connector. Some of the post processing steps: 1) VdbRecords get wrapped into an object that has the name and version used by the user to logon. 2) Update ModelRecods with the visibility info from VDBService. 3) Filter FileRecords that are not visible. 4) Apply serch criteria to take care of case sensitive matches that get ingnore when querying indexes.

Since:
4.3

Constructor Summary
MetadataResultsPostProcessor(VdbMetadataContext context)
          Constructor MetadataResultsPostProcessor
 
Method Summary
 MetadataRecord filterBySearchCriteria(MetadataRecord record, java.util.Map searchCriteria)
          Apply the given search criteria and filter out records, currently used to apply case sensitive matches since records matched in indexes are case insensitive matches.
 ModelRecord getModelRecordWithUpdatedVisibility(ModelRecord record)
          Update the ModelRecord with the visibility from vdb service, if vdb service is not available there is nothing to update.
 MetadataRecord getWarpedVdbRecord(VdbRecord record)
          Wrap the vdb recods into a RuntimeVdbRecods with real vdb information.
 java.util.Collection processMetadataRecords(java.lang.String indexFileName, java.util.Collection records, java.util.Map searchCriteria, boolean needSearchFiltering)
          Post process metadata records, to update record information and filter out recods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataResultsPostProcessor

public MetadataResultsPostProcessor(VdbMetadataContext context)
Constructor MetadataResultsPostProcessor

Parameters:
context -
Since:
4.3
Method Detail

processMetadataRecords

public java.util.Collection processMetadataRecords(java.lang.String indexFileName,
                                                   java.util.Collection records,
                                                   java.util.Map searchCriteria,
                                                   boolean needSearchFiltering)
Post process metadata records, to update record information and filter out recods.

Parameters:
records - Collection of MetadataRecods from querying index files
searchCriteria - Map of fieldNames to MetadataSearchCriteria objects used to search
needSearchFiltering - boolean to indicate to post processing of metadata records is needed by applying search criteria
Returns:
Collection of processed MetadataRecods.
Since:
4.3

getWarpedVdbRecord

public MetadataRecord getWarpedVdbRecord(VdbRecord record)
Wrap the vdb recods into a RuntimeVdbRecods with real vdb information. Since the System vdb is available to a user logged into any vdb filter out the System vdb recod. But for test purposes if the logged in vdb is the system vdb do not filter it out.

Parameters:
record - The VDBRecord object.
Returns:
The wrapped vdb record
Since:
4.3

getModelRecordWithUpdatedVisibility

public ModelRecord getModelRecordWithUpdatedVisibility(ModelRecord record)
Update the ModelRecord with the visibility from vdb service, if vdb service is not available there is nothing to update.

Parameters:
record - The ModelRecord object.
Returns:
The updated ModelRecord
Since:
4.3

filterBySearchCriteria

public MetadataRecord filterBySearchCriteria(MetadataRecord record,
                                             java.util.Map searchCriteria)
Apply the given search criteria and filter out records, currently used to apply case sensitive matches since records matched in indexes are case insensitive matches.

Parameters:
record - The metadata reord to be filterd
searchCriteria - Map of fieldNames to MetadataSearchCriteria objects used to search
Returns:
The record that passed filtering
Since:
4.3


Copyright © 2009. All Rights Reserved.