--[[----------------------------------------------------------------------------

WFCatSearchSchema.lua

--------------------------------------------------------------------------------

ADOBE CONFIDENTIAL
------------------
Copyright 2015 Adobe Systems Incorporated
All Rights Reserved.

NOTICE: All information contained herein is, and remains the property of
Adobe Systems Incorporated and its suppliers, if any. The intellectual and
technical concepts contained herein are proprietary to Adobe Systems
Incorporated and its suppliers and are protected by all applicable
intellectual property laws, including trade secret and copyright laws.
Dissemination of this information or reproduction of this material is
strictly forbidden unless prior written permission is obtained from
Adobe Systems Incorporated.

----------------------------------------------------------------------------]]--

local Rx = require 'Rx'

--==============================================================================

local WFCatSearchSchema = {
	_searchableData = false,
		-- a map mapping the search term to info about how to search that term.
}

--------------------------------------------------------------------------------

function WFCatSearchSchema:__init()
	self._searchableData = {}
end

--------------------------------------------------------------------------------

function WFCatSearchSchema:getSearchDescription( searchTerm )
	return self._searchableData[ searchTerm ]
end

--------------------------------------------------------------------------------

function WFCatSearchSchema:addSearchableData( searchDescriptor )
	local term = assert( searchDescriptor.term, 'search descriptor term required' )
	self._searchableData[ term ] = searchDescriptor
end

--==============================================================================

return Rx.Class 'WFCatSearchSchema' ( WFCatSearchSchema )
