NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
titleTable of Contents

Table of Contents

 

Different Lucene Query methods that should be pulled out of CodedNodeSetImpl and AbstractLazyCodeHolderFactory.  These methods can be pushed into an implementation of the Query interface below.  The interface will be used instead of calling Lucene directly.

Code Block
languagejava
titleQuery Interface
//code decoupling

// Interface for creating Queries
public interface Query {

	// methods required for CodedNodeSetImpl 
	public  Query getCodingSchemeQuery(String uri, String internalVersionString);  
	public  Query getRestrictionQuery(Restriction restriction, String internalCodeSystemName, String internalVersionString);  

	// methods required for AbstractLazyCodeHolderFactory
	private  Query getBooleanQuery(List<Query> queries);
	public Query getFilteredQuery(List<Filter> filters, BooleanQuery combinedQuery, Filter chainedFilter);
}

// Lucene Implementation
public class LuceneQuery implements Query {

}

...

Need to define different types of Queries and Filters.  Create an abstract class for each of them.  CodedNodeSetImpl and AbstractLazyCodeHolderFactory will not need to reference Lucene objects directly then.

Code Block
languagejava
titleAbstract QueryType
// Abstract class for defining different types of Queries
public abstract class QueryType {
}

public abstract class FilterType {
}