You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Marcos César de Oliveira <mc...@hmsolucoes.com.br> on 2006/08/15 23:31:25 UTC
About Feeds in GDataServer
A service can have more than one feed?
If no, what is a difference between a service and a feed?
If yes, do they have to belong to the same class?
Doesn't possible create sub feeds? Like a comments feed nested in a events
feed?
Why isn't permitted to have an entry of a subclass of the feeds class?
Creating ExtensionProfiles and implementing
com.google.gdata.data.Extensionseems to be a tedious task, anybody
knows some generator for these?
Thanks in advance,
Marcos César
Re: About Feeds in GDataServer
Posted by Simon Willnauer <si...@googlemail.com>.
On 8/16/06, Marcos César de Oliveira <mc...@gmail.com> wrote:
> 2006/8/15, Simon Willnauer <si...@googlemail.com>:
>
> > > Yes. May I have a feed with the class Feed and put any subclass of Feed
> in
> > > it?
> > You mean as an entry?
>
>
> In fact, I want to put in the feed any object whose class is a subclass of
> the entry-class configured in gdata-config.xml for the service.
>
> >
> > I see!! First, this is the calendar api which is a bit different and
> > has adifferent licence. Second, thats a nice feature I will add it to
> > the future tasks. If you wanna use such a feature you can just create
> > a new feed for each of the entries and put a link into the entry that
> > would lead to a different url but it works as a workarround.
> >
> > I will definately add this feature in the future!
>
>
> Is it possible to delegate to the storage as a workaround? I can use xpath
> in the object model to solve this.
There are many possibilities to do this, I could also implement a
visitor pattern to give users a kind of hook to redirect the request
internally, whats about that?
You also could overwrite the GDataService class and provide it via a
custom impl. to handle such insert requests. I will add an example of
custom impl. which goes more in depth to the wiki.
>
> > You can configure any subclass of BaseEntry in the gdata-config.xml!
> > Is the wiki saying something different? If yes could you point out
> > where so I can change it?!
>
>
> OK. My scenario is:
> - In the gdata-config.xml the configured entry-class is, say,
> com.google.gdata.data.Entry for the service;
> - The client sends a POST to the service with a xml representation of a
> object where it's class is a subclass of com.google.gdata.data.Entry;
> - The service receives the xml and reconstrucs the object, as it have the
> extension configured properly.
>
> (an axis web service works that way)
If and only if you prepare your configured extensionprofile properly
to meet your suites that is gonna work. If you configure a entry
class, each extensionprofile instance in the server for this
particular service is passed to the declareExtension method before
using it for parsing or generating rss or atom. so if you create a
custom one which has all extensions you should be fine with that.
>
> > > OK, but the implementation of Extension interface, in class Where for
> > > instance, is very tedious, a tool for this will be very helpful, for
> sure.
> >
> > I agree but that is out of scope of the server project at the moment.
>
>
> Perhaps I create this also.
Good stuff!
>
> Thanks,
>
> Marcos Cesar
>
regards Simon
Re: About Feeds in GDataServer
Posted by Marcos César de Oliveira <mc...@gmail.com>.
2006/8/15, Simon Willnauer <si...@googlemail.com>:
>
> > Yes. May I have a feed with the class Feed and put any subclass of Feed
> in
> > it?
> You mean as an entry?
In fact, I want to put in the feed any object whose class is a subclass of
the entry-class configured in gdata-config.xml for the service.
>
> I see!! First, this is the calendar api which is a bit different and
> has adifferent licence. Second, thats a nice feature I will add it to
> the future tasks. If you wanna use such a feature you can just create
> a new feed for each of the entries and put a link into the entry that
> would lead to a different url but it works as a workarround.
>
> I will definately add this feature in the future!
Is it possible to delegate to the storage as a workaround? I can use xpath
in the object model to solve this.
You can configure any subclass of BaseEntry in the gdata-config.xml!
> Is the wiki saying something different? If yes could you point out
> where so I can change it?!
OK. My scenario is:
- In the gdata-config.xml the configured entry-class is, say,
com.google.gdata.data.Entry for the service;
- The client sends a POST to the service with a xml representation of a
object where it's class is a subclass of com.google.gdata.data.Entry;
- The service receives the xml and reconstrucs the object, as it have the
extension configured properly.
(an axis web service works that way)
> OK, but the implementation of Extension interface, in class Where for
> > instance, is very tedious, a tool for this will be very helpful, for
> sure.
>
> I agree but that is out of scope of the server project at the moment.
Perhaps I create this also.
Thanks,
Marcos Cesar
Fwd: About Feeds in GDataServer
Posted by Simon Willnauer <si...@googlemail.com>.
On 8/15/06, Marcos César de Oliveira <mc...@gmail.com> wrote:
>
>
> 2006/8/15, Simon Willnauer <si...@googlemail.com>:
> > You can choose a class at the bottom of the class hierarchy and add
> > entries of super classes. does that solve your problem?
>
>
> Yes. May I have a feed with the class Feed and put any subclass of Feed in
> it?
You mean as an entry?
>
> > > Doesn't possible create sub feeds? Like a comments feed nested in a
> events
> > > feed?
> > Could you describe that a bit more in depth?
>
>
> See
> http://code.google.com/apis/gdata/calendar.html#Comments.
I see!! First, this is the calendar api which is a bit different and
has adifferent licence. Second, thats a nice feature I will add it to
the future tasks. If you wanna use such a feature you can just create
a new feed for each of the entries and put a link into the entry that
would lead to a different url but it works as a workarround.
I will definately add this feature in the future!
>
>
> > > Why isn't permitted to have an entry of a subclass of the feeds class?
> > Entry class and feed class don't conflict with each other. See, a
> > certain type of entry has a java class which "describes" it. An in OOP
> > you just can't down cast something without an upcast. So that's why
> > entries you want to add can not be subclasses of the class you
> > configured in your service.
>
>
> Sorry. I mean: "Why isn't permitted to have an entry of a subclass of the
> entry's class configured in gdata-config.xml?"
You can configure any subclass of BaseEntry in the gdata-config.xml!
Is the wiki saying something different? If yes could you point out
where so I can change it?!
>
> > I is a tedious task, no doubt. You should look at the implementation
> > of MessageFeed/Entry in the gdata client sources. have a look at
> > BaseEntry#declareExtensions(ExtensionProfile) --> you
> don't have to
> > extend the extension profile at all.
> >
>
> OK, but the implementation of Extension interface, in class Where for
> instance, is very tedious, a tool for this will be very helpful, for sure.
I agree but that is out of scope of the server project at the moment.
best regards simon
>
> Thanks,
>
> Marcos Cesar
>
Re: About Feeds in GDataServer
Posted by Marcos César de Oliveira <mc...@gmail.com>.
2006/8/15, Simon Willnauer <si...@googlemail.com>:
>
> You can choose a class at the bottom of the class hierarchy and add
> entries of super classes. does that solve your problem?
Yes. May I have a feed with the class Feed and put any subclass of Feed in
it?
> Doesn't possible create sub feeds? Like a comments feed nested in a events
> > feed?
> Could you describe that a bit more in depth?
See http://code.google.com/apis/gdata/calendar.html#Comments.
> Why isn't permitted to have an entry of a subclass of the feeds class?
> Entry class and feed class don't conflict with each other. See, a
> certain type of entry has a java class which "describes" it. An in OOP
> you just can't down cast something without an upcast. So that's why
> entries you want to add can not be subclasses of the class you
> configured in your service.
Sorry. I mean: "Why isn't permitted to have an entry of a subclass of the
entry's class configured in gdata-config.xml?"
I is a tedious task, no doubt. You should look at the implementation
> of MessageFeed/Entry in the gdata client sources. have a look at
> BaseEntry#declareExtensions(ExtensionProfile) --> you don't have to
> extend the extension profile at all.
>
OK, but the implementation of Extension interface, in class Where for
instance, is very tedious, a tool for this will be very helpful, for sure.
Thanks,
Marcos Cesar
Re: About Feeds in GDataServer
Posted by Simon Willnauer <si...@googlemail.com>.
On 8/15/06, Marcos César de Oliveira <mc...@hmsolucoes.com.br> wrote:
> A service can have more than one feed?
Yes!
> If no, what is a difference between a service and a feed?
see above.
> If yes, do they have to belong to the same class?
You can choose a class at the bottom of the class hierarchy and add
entries of super classes. does that solve your problem?
> Doesn't possible create sub feeds? Like a comments feed nested in a events
> feed?
Could you describe that a bit more in depth?
> Why isn't permitted to have an entry of a subclass of the feeds class?
Entry class and feed class don't conflict with each other. See, a
certain type of entry has a java class which "describes" it. An in OOP
you just can't down cast something without an upcast. So that's why
entries you want to add can not be subclasses of the class you
configured in your service.
> Creating ExtensionProfiles and implementing
> com.google.gdata.data.Extensionseems to be a tedious task, anybody
> knows some generator for these?
I is a tedious task, no doubt. You should look at the implementation
of MessageFeed/Entry in the gdata client sources. have a look at
BaseEntry#declareExtensions(ExtensionProfile) --> you don't have to
extend the extension profile at all.
best regards simon
>
>
> Thanks in advance,
>
> Marcos César
>
>