public class RepositorySearcher
extends atg.nucleus.logging.ApplicationLoggingImpl
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected static java.lang.String |
SEARCHRESOURCES |
protected static java.util.ResourceBundle |
sResourceBundle |
| Constructor and Description |
|---|
RepositorySearcher() |
| Modifier and Type | Method and Description |
|---|---|
atg.repository.Query |
createAndQuery(atg.repository.Query[] pAndableQueries,
atg.repository.Repository pRepository,
java.lang.String pViewName)
Return the query that should be executed on the Repository View.
|
protected java.lang.String |
formatSearchString(java.lang.String pSearchString,
java.lang.String pFormatString)
Return a formatted text search string based on the input pSearchString and
pFormatString.
|
protected atg.repository.Query |
generateAdvancedSearchQuery(SearchAttribute pAttribute,
atg.repository.QueryBuilder pQueryBuilder,
atg.repository.RepositoryView pView)
Return a query which represents an advanced search based on selected
property values.
|
protected atg.repository.Query |
generateKeywordSearchQuery(SearchAttribute pSearchAttribute,
atg.repository.QueryBuilder pQueryBuilder,
atg.repository.RepositoryView pView)
Return a query which represents a keyword search.
|
atg.repository.Query |
generateSearchQuery(SearchAttribute[] pSearchAttributes,
atg.repository.Repository pSearchRepository,
java.lang.String pViewName,
java.util.Locale locale)
Return the query that should be executed on the Repository View.
|
java.util.Collection<atg.repository.RepositoryItem> |
generateSearchResult(atg.repository.Query pQuery,
atg.repository.QueryOptions pQueryOptions,
atg.repository.Repository pSearchRepository,
java.lang.String pViewName) |
int |
generateSearchResultCount(atg.repository.Query pQuery,
atg.repository.Repository pSearchRepository,
java.lang.String pViewName) |
protected atg.repository.Query |
generateSingleKeywordQuery(atg.repository.QueryBuilder pQueryBuilder,
java.lang.String pPropertyName,
java.lang.String[] pKeywords,
atg.repository.RepositoryView pView,
boolean pIgnorecase)
Return a query for the given property name against the set of supplied
keywords.
|
protected atg.repository.Query |
generateSubQuery(SearchAttribute pSearchAttribute,
atg.repository.QueryBuilder pQueryBuilder,
atg.repository.RepositoryView pView)
generate subquery using RQL
|
protected atg.repository.Query |
generateSubtypeQuery(SearchAttribute pSearchAttribute,
atg.repository.QueryBuilder pQueryBuilder,
atg.repository.RepositoryView pView,
atg.repository.Repository pRepository)
This method build query on subtype item properties.
|
protected atg.repository.Query |
generateTextSearchQuery(SearchAttribute pAttribute,
atg.repository.QueryBuilder pQueryBuilder,
atg.repository.RepositoryView pView)
Return a query which represents a text search query.
|
protected atg.repository.Query |
generateValueSearchQuery(SearchAttribute pAttribute,
atg.repository.QueryBuilder pQueryBuilder,
atg.repository.RepositoryView pView,
java.util.Locale locale)
Based on the input SearchAttribute value, this method constructs an
appropriate comparison Query.
|
java.lang.String |
getLoggingIdentifier()
Returns property LoggingIdentifier
|
java.lang.Integer |
getMinScore()
Returns property MinScore
|
protected java.lang.String[] |
getMutiPropertyName(SearchAttribute pSearchAttribute) |
protected java.beans.PropertyEditor |
getPropertyEditor(java.lang.String displayName,
atg.repository.RepositoryView pView)
given a display name for a property looks up and returns the property type
|
protected java.lang.String |
getPropertyName(java.lang.String displayName,
atg.repository.RepositoryView pView)
given a display name for a property looks up and returns the real name
|
atg.repository.QueryBuilder |
getQueryBuilder(atg.repository.RepositoryView pView)
Returns a QueryBuilder based on the Repository's View
|
protected atg.repository.RepositoryItemDescriptor |
getRepositoryItemDescriptor(atg.repository.RepositoryView pView)
Returns the item descriptor for the repository
|
atg.repository.RepositoryView |
getRepositoryView(atg.repository.Repository pRepository,
java.lang.String pViewName)
Returns the repository view for the repository
|
protected java.lang.Object |
getSearchAttributeValue(SearchAttribute pAttribute,
atg.repository.RepositoryView pView,
java.util.Locale locale)
Based on the set SearchAttribute returns that property value
|
java.lang.String |
getSearchStringFormat()
Returns property SearchStringFormat
|
java.lang.String |
getTextSearchStringFormat()
Returns property mTextSearchStringFormat
|
boolean |
getTrimString()
Returns property TrimString
|
protected void |
init() |
void |
setLoggingIdentifier(java.lang.String pLoggingIdentifier)
Sets property LoggingIdentifier
|
void |
setMinScore(java.lang.Integer pMinScore)
Sets property MinScore
|
void |
setSearchStringFormat(java.lang.String pSearchStringFormat)
Sets property SearchStringFormat
|
void |
setTextSearchStringFormat(java.lang.String pTextSearchStringFormat)
Sets property mTextSearchStringFormat
|
void |
setTrimString(boolean pTrimString)
Sets property TrimString
|
addGlobalLogListeners, addLogListener, getLoggingForVlogging, getLoggingIdentifer, getLogListenerCount, getLogListeners, initializeFromServiceEvent, isAutoInitListeners, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, removeLogListener, sendLogEvent, setAutoInitListeners, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarningvlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static final java.lang.String CLASS_VERSION
protected static final java.lang.String SEARCHRESOURCES
protected static final java.util.ResourceBundle sResourceBundle
public void setLoggingIdentifier(java.lang.String pLoggingIdentifier)
setLoggingIdentifier in class atg.nucleus.logging.ApplicationLoggingImplpLoggingIdentifier - the property which identifies this object as the Repository
Search.public java.lang.String getLoggingIdentifier()
getLoggingIdentifier in class atg.nucleus.logging.ApplicationLoggingImplpublic void setSearchStringFormat(java.lang.String pSearchStringFormat)
pSearchStringFormat - the property to store any string formatting information parameters
for searching.public java.lang.String getSearchStringFormat()
public void setTextSearchStringFormat(java.lang.String pTextSearchStringFormat)
pTextSearchStringFormat - the property to store any string formatting parameters for text
searching. # such as fussy, soundex, .......public java.lang.String getTextSearchStringFormat()
public void setTrimString(boolean pTrimString)
pTrimString - the property to store the flag to trim strings or not.public boolean getTrimString()
public void setMinScore(java.lang.Integer pMinScore)
pMinScore - the property to store the minimum scoring used for text searching.public java.lang.Integer getMinScore()
protected void init()
public atg.repository.RepositoryView getRepositoryView(atg.repository.Repository pRepository,
java.lang.String pViewName)
throws atg.repository.RepositoryException
atg.repository.RepositoryExceptionprotected atg.repository.RepositoryItemDescriptor getRepositoryItemDescriptor(atg.repository.RepositoryView pView)
throws atg.repository.RepositoryException
atg.repository.RepositoryExceptionpublic atg.repository.QueryBuilder getQueryBuilder(atg.repository.RepositoryView pView)
throws atg.repository.RepositoryException
atg.repository.RepositoryExceptionprotected java.lang.String getPropertyName(java.lang.String displayName,
atg.repository.RepositoryView pView)
displayName - protected java.beans.PropertyEditor getPropertyEditor(java.lang.String displayName,
atg.repository.RepositoryView pView)
displayName - protected java.lang.String[] getMutiPropertyName(SearchAttribute pSearchAttribute)
pSearchAttribute - public atg.repository.Query createAndQuery(atg.repository.Query[] pAndableQueries,
atg.repository.Repository pRepository,
java.lang.String pViewName)
throws atg.repository.RepositoryException
atg.repository.RepositoryException - if an error occured while forming the querypublic atg.repository.Query generateSearchQuery(SearchAttribute[] pSearchAttributes, atg.repository.Repository pSearchRepository, java.lang.String pViewName, java.util.Locale locale) throws atg.repository.RepositoryException
pSearchAttributes - atg.repository.RepositoryException - if an error occured while forming the querypublic java.util.Collection<atg.repository.RepositoryItem> generateSearchResult(atg.repository.Query pQuery,
atg.repository.QueryOptions pQueryOptions,
atg.repository.Repository pSearchRepository,
java.lang.String pViewName)
throws atg.repository.RepositoryException
pQuery - the search query to execute.pQueryOptions - atg.repository.RepositoryExceptionpublic int generateSearchResultCount(atg.repository.Query pQuery,
atg.repository.Repository pSearchRepository,
java.lang.String pViewName)
throws atg.repository.RepositoryException
pQuery - the search query to execute.pSearchRepository - pViewName - atg.repository.RepositoryExceptionprotected java.lang.Object getSearchAttributeValue(SearchAttribute pAttribute, atg.repository.RepositoryView pView, java.util.Locale locale) throws java.lang.IllegalArgumentException, atg.repository.RepositoryException
java.lang.IllegalArgumentExceptionatg.repository.RepositoryExceptionprotected atg.repository.Query generateValueSearchQuery(SearchAttribute pAttribute, atg.repository.QueryBuilder pQueryBuilder, atg.repository.RepositoryView pView, java.util.Locale locale) throws atg.repository.RepositoryException
pQueryBuilder - a query builder with which to construct the querypAttribute - pView - atg.repository.RepositoryException - if an error occured while forming the queryprotected atg.repository.Query generateTextSearchQuery(SearchAttribute pAttribute, atg.repository.QueryBuilder pQueryBuilder, atg.repository.RepositoryView pView) throws atg.repository.RepositoryException
searchStringFormat property.pAttribute - the SearchAttribute objectpQueryBuilder - the builder that should be used to construct the querypView - atg.repository.RepositoryException - if an error occured while forming the queryprotected java.lang.String formatSearchString(java.lang.String pSearchString,
java.lang.String pFormatString)
pSearchString - the String objectpFormatString - protected atg.repository.Query generateAdvancedSearchQuery(SearchAttribute pAttribute, atg.repository.QueryBuilder pQueryBuilder, atg.repository.RepositoryView pView) throws atg.repository.RepositoryException
pAttribute - SearchAttribute objectpQueryBuilder - the builder that should be used to construct the querypView - the RepositoryViewatg.repository.RepositoryException - if an error occured while forming the queryprotected atg.repository.Query generateKeywordSearchQuery(SearchAttribute pSearchAttribute, atg.repository.QueryBuilder pQueryBuilder, atg.repository.RepositoryView pView) throws atg.repository.RepositoryException
pSearchAttribute - pQueryBuilder - the builder that should be used to construct the querypView - the RepositoryViewatg.repository.RepositoryException - if an error occurred while forming the queryprotected atg.repository.Query generateSingleKeywordQuery(atg.repository.QueryBuilder pQueryBuilder,
java.lang.String pPropertyName,
java.lang.String[] pKeywords,
atg.repository.RepositoryView pView,
boolean pIgnorecase)
throws atg.repository.RepositoryException
pQueryBuilder - the builder that should be used to construct the querypPropertyName - pKeywords - the set of words that the user has entered as search criteriapView - the RepositoryView.pIgnorecase - atg.repository.RepositoryException - if an error occurred while forming the queryprotected atg.repository.Query generateSubQuery(SearchAttribute pSearchAttribute, atg.repository.QueryBuilder pQueryBuilder, atg.repository.RepositoryView pView) throws atg.repository.RepositoryException
pSearchAttribute - pQueryBuilder - the builder that should be used to construct the querypView - the RepositoryViewatg.repository.RepositoryException - if an error occurred while forming the queryprotected atg.repository.Query generateSubtypeQuery(SearchAttribute pSearchAttribute, atg.repository.QueryBuilder pQueryBuilder, atg.repository.RepositoryView pView, atg.repository.Repository pRepository) throws atg.repository.RepositoryException
pSearchAttribute - pQueryBuilder - the builder that should be used to construct the querypView - pRepository - atg.repository.RepositoryException - if an error occured while forming the query