You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@abdera.apache.org by dogan yazar <do...@gmail.com> on 2009/04/21 13:06:37 UTC
opensearch
I could not find any examples about how to use openserach extension and got
lost. Can anybody give some basic usages?
Re: opensearch
Posted by Gerke Ephorus <ge...@gmail.com>.
Yes, thanks, fellow users. This got me started. Very handy indeed.
wkr,
Gerke
Jimmie Fulton wrote:
> In case you haven't had any luck, OpenSearch is easy to add to your feed. Hopefully, this gets you started:
>
> int max = 20;
> int start = 1;
> int total = 2114;
>
> IntegerElement ie = feed.addExtension(OpenSearchConstants.ITEMS_PER_PAGE);
> ie.setValue(max);
> ie = feed.addExtension(OpenSearchConstants.START_INDEX);
> ie.setValue(start);
> ie = feed.addExtension(OpenSearchConstants.TOTAL_RESULTS);
> ie.setValue(total);
>
> This should register the OpenSearch namespace at the in the feed declaration with xmlns:os, and add:
> <os:itemsPerPage>20</os:itemsPerPage>
> <os:startIndex>1</os:startIndex>
> <os:totalResults>2114</os:totalResults>
>
>
> If you want to customize the declared prefix, you'll want to call one of the other overloads on feed.addExtension(...);
>
> Hope this helps,
>
> Jimmie
>
> -----Original Message-----
> From: dogan yazar [mailto:doganyazar@gmail.com]
> Sent: Tuesday, August 18, 2009 2:54 AM
> To: user@abdera.apache.org
> Subject: Re: opensearch
>
> Nope, I did not have time to work on it.
>
> On Tue, Aug 18, 2009 at 8:42 AM, Gerke Ephorus <ge...@gmail.com>wrote:
>
>
>> Hi david (& list),
>>
>> I compiled the 1.0 tag (abdera-1.0) <
>> http://svn.apache.org/repos/asf/abdera/java/tags/abdera-1.0> from
>> subversion. (I could not get the trunk compiled here)
>>
>> thanks,
>> Gerke
>>
>>
>> David Calavera wrote:
>>
>>
>>> What version of abdera are you using, 0.4 or 1.0-snapshot?
>>>
>>> On Mon, Aug 17, 2009 at 4:51 PM, Gerke Ephorus <gerke.ephorus@gmail.com
>>>
>>>> wrote:
>>>>
>>>
>>>
>>>> Hi Dogan,
>>>>
>>>> did you find any examples after this post? We try to find examples as
>>>> well.
>>>>
>>>> wkr,
>>>> Gerke
>>>>
>>>>
>>>>
>>>> dogan yazar wrote:
>>>>
>>>>
>>>>
>>>>
>>>>> I could not find any examples about how to use openserach extension and
>>>>> got
>>>>> lost. Can anybody give some basic usages?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
RE: opensearch
Posted by Jimmie Fulton <ji...@gensler.com>.
In case you haven't had any luck, OpenSearch is easy to add to your feed. Hopefully, this gets you started:
int max = 20;
int start = 1;
int total = 2114;
IntegerElement ie = feed.addExtension(OpenSearchConstants.ITEMS_PER_PAGE);
ie.setValue(max);
ie = feed.addExtension(OpenSearchConstants.START_INDEX);
ie.setValue(start);
ie = feed.addExtension(OpenSearchConstants.TOTAL_RESULTS);
ie.setValue(total);
This should register the OpenSearch namespace at the in the feed declaration with xmlns:os, and add:
<os:itemsPerPage>20</os:itemsPerPage>
<os:startIndex>1</os:startIndex>
<os:totalResults>2114</os:totalResults>
If you want to customize the declared prefix, you'll want to call one of the other overloads on feed.addExtension(...);
Hope this helps,
Jimmie
-----Original Message-----
From: dogan yazar [mailto:doganyazar@gmail.com]
Sent: Tuesday, August 18, 2009 2:54 AM
To: user@abdera.apache.org
Subject: Re: opensearch
Nope, I did not have time to work on it.
On Tue, Aug 18, 2009 at 8:42 AM, Gerke Ephorus <ge...@gmail.com>wrote:
> Hi david (& list),
>
> I compiled the 1.0 tag (abdera-1.0) <
> http://svn.apache.org/repos/asf/abdera/java/tags/abdera-1.0> from
> subversion. (I could not get the trunk compiled here)
>
> thanks,
> Gerke
>
>
> David Calavera wrote:
>
>> What version of abdera are you using, 0.4 or 1.0-snapshot?
>>
>> On Mon, Aug 17, 2009 at 4:51 PM, Gerke Ephorus <gerke.ephorus@gmail.com
>> >wrote:
>>
>>
>>
>>> Hi Dogan,
>>>
>>> did you find any examples after this post? We try to find examples as
>>> well.
>>>
>>> wkr,
>>> Gerke
>>>
>>>
>>>
>>> dogan yazar wrote:
>>>
>>>
>>>
>>>> I could not find any examples about how to use openserach extension and
>>>> got
>>>> lost. Can anybody give some basic usages?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>
Re: opensearch
Posted by David Calavera <da...@gmail.com>.
you can take a look at the opensearch tests, I think they cover most of the
user cases:
http://svn.apache.org/repos/asf/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/
there are also some example in the wiki but I think they're not up to date:
http://cwiki.apache.org/ABDERA/extensions.html#Extensions-OpenSearchExtensions
http://cwiki.apache.org/ABDERA/server-implementation-guide.html#ServerImplementationGuide-HowtoimplementanAbderaserver%2528theshortversion%2529
On Tue, Aug 18, 2009 at 11:53 AM, dogan yazar <do...@gmail.com> wrote:
> Nope, I did not have time to work on it.
>
> On Tue, Aug 18, 2009 at 8:42 AM, Gerke Ephorus <gerke.ephorus@gmail.com
> >wrote:
>
> > Hi david (& list),
> >
> > I compiled the 1.0 tag (abdera-1.0) <
> > http://svn.apache.org/repos/asf/abdera/java/tags/abdera-1.0> from
> > subversion. (I could not get the trunk compiled here)
> >
> > thanks,
> > Gerke
> >
> >
> > David Calavera wrote:
> >
> >> What version of abdera are you using, 0.4 or 1.0-snapshot?
> >>
> >> On Mon, Aug 17, 2009 at 4:51 PM, Gerke Ephorus <gerke.ephorus@gmail.com
> >> >wrote:
> >>
> >>
> >>
> >>> Hi Dogan,
> >>>
> >>> did you find any examples after this post? We try to find examples as
> >>> well.
> >>>
> >>> wkr,
> >>> Gerke
> >>>
> >>>
> >>>
> >>> dogan yazar wrote:
> >>>
> >>>
> >>>
> >>>> I could not find any examples about how to use openserach extension
> and
> >>>> got
> >>>> lost. Can anybody give some basic usages?
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>
> >>
> >>
> >
>
--
David Calavera
http://www.thinkincode.net
Re: opensearch
Posted by dogan yazar <do...@gmail.com>.
Nope, I did not have time to work on it.
On Tue, Aug 18, 2009 at 8:42 AM, Gerke Ephorus <ge...@gmail.com>wrote:
> Hi david (& list),
>
> I compiled the 1.0 tag (abdera-1.0) <
> http://svn.apache.org/repos/asf/abdera/java/tags/abdera-1.0> from
> subversion. (I could not get the trunk compiled here)
>
> thanks,
> Gerke
>
>
> David Calavera wrote:
>
>> What version of abdera are you using, 0.4 or 1.0-snapshot?
>>
>> On Mon, Aug 17, 2009 at 4:51 PM, Gerke Ephorus <gerke.ephorus@gmail.com
>> >wrote:
>>
>>
>>
>>> Hi Dogan,
>>>
>>> did you find any examples after this post? We try to find examples as
>>> well.
>>>
>>> wkr,
>>> Gerke
>>>
>>>
>>>
>>> dogan yazar wrote:
>>>
>>>
>>>
>>>> I could not find any examples about how to use openserach extension and
>>>> got
>>>> lost. Can anybody give some basic usages?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>
Re: opensearch
Posted by Gerke Ephorus <ge...@gmail.com>.
Hi david (& list),
I compiled the 1.0 tag (abdera-1.0)
<http://svn.apache.org/repos/asf/abdera/java/tags/abdera-1.0> from
subversion. (I could not get the trunk compiled here)
thanks,
Gerke
David Calavera wrote:
> What version of abdera are you using, 0.4 or 1.0-snapshot?
>
> On Mon, Aug 17, 2009 at 4:51 PM, Gerke Ephorus <ge...@gmail.com>wrote:
>
>
>> Hi Dogan,
>>
>> did you find any examples after this post? We try to find examples as well.
>>
>> wkr,
>> Gerke
>>
>>
>>
>> dogan yazar wrote:
>>
>>
>>> I could not find any examples about how to use openserach extension and
>>> got
>>> lost. Can anybody give some basic usages?
>>>
>>>
>>>
>>>
>
>
>
Re: opensearch
Posted by David Calavera <da...@gmail.com>.
What version of abdera are you using, 0.4 or 1.0-snapshot?
On Mon, Aug 17, 2009 at 4:51 PM, Gerke Ephorus <ge...@gmail.com>wrote:
> Hi Dogan,
>
> did you find any examples after this post? We try to find examples as well.
>
> wkr,
> Gerke
>
>
>
> dogan yazar wrote:
>
>> I could not find any examples about how to use openserach extension and
>> got
>> lost. Can anybody give some basic usages?
>>
>>
>>
>
--
David Calavera
http://www.thinkincode.net
Re: opensearch
Posted by Gerke Ephorus <ge...@gmail.com>.
Hi Dogan,
did you find any examples after this post? We try to find examples as well.
wkr,
Gerke
dogan yazar wrote:
> I could not find any examples about how to use openserach extension and got
> lost. Can anybody give some basic usages?
>
>