I think it is pretty simple. Based on this design we can extend
FeaturedSearch by adding a search method as follows:

ConstraintDocumentSet search(String keyword, Set<Constraint> constraints)
where constraints can be null. And we can use this method in narrow and
broaden methods of ConstraintDocumentSet.

However, for the sake of a unified API, IMHO we should change return
types of other search methods as ConstraintDocumentSet.

By the way, regarding the Facet interface, facets are not mapped to RDF
properties. Actually, they are not managed using RDF at all. So, we can
remove getProperty method.

Lastly, we can define this interface in
org.apache.stanbol.contenthub.servicesapi.search.featured or
org.apache.stanbol.contenthub.servicesapi.search.faceted in servicesapi
and implementation can be in search/featured module.

WDYT, how shall we proceed?

Best,
Suat


On 04/11/2012 12:11 PM, Reto Bachmann-Gmür wrote:
> Hi Suat,
>
>>> I think we could expose an easy to use interface that's independent of
>>> vfolder or the webview and can thus easily be integrated in CMSs and
>> other
>>> applications.
>>>
>>> I'll write a proposal on how such an API could look like.
>> I would be glad to see your proposal. I think we can adapt
>> FeaturedSearch stuff so that it would be easier to use and more useful.
>>
>>
> Here you go:
> https://svn.apache.org/repos/asf/incubator/stanbol/branches/faceted-browsing/src/main/java/org/apache/stanbol/contenthub/faceted/ConstrainedDocumentSet.java
>
> The interface represents a set of documents that can be narrowed by
> applying constraints. The constraints are grouped by facets, the available
> facets and the applicable constraints can be retrieved with
> getFacets().getConstraints().
>
> The missing bit is the range search but I think it might be a start, what
> do you think?
>
> Cheers,
> Reto
>

Reply via email to