This project is read-only.

Since ODATA is a proposed extension of AtomPub and Google's GData protocol version 2 was incorporated into current AtomPub standard, does Odata support the following parameters in their URI?

Jan 14, 2010 at 3:14 PM

Since ODATA is a proposed extension of AtomPub and Google's GData protocol version 2 was incorporated into current AtomPub standard, does Odata support the following parameters in their URI?

I tried to compare Odata vs. Gdata below, as well as WS02 Open Source Data services server (which does not support atompub).

OData Query

Includes AtomPub

GData/AtomPub Query

WSO2 Data Server Query with REST and SOAP
 WSDL defined services

NO ATOMPub services

$expand
(allows to 1-many expand to child table)

 

 

$filter

(full SQL where clause)

/category (classification),
category ( alternate category search)

q (string search),

updated-min, updated-max (update date criteria)
published-min
, published-max (publish criteria)

EntryID (select by specific record id)



Complete SQL WHERE criteria clause  with “?” for parameter prompts/input defined on the server as a datasource.

 

Ex: <sql> select * from Customers where contactLastName = ? and contactFirstName = ?</sql>

 

$orderby

(like sql order by)

 

 

$format

(Json, atom,xml)

Alt (rss, json, atom formats)
prettyprint (readable xml)

 

$skip
(n skip from first  entry)

Start-index (start from results number)

 

$top

(like SQL top n netries)

 

 

$skiptoken

(user by orderby to skip to id/token)

 

 

$inlinecount

(include a line count in the results)

 

 

$select

(like SQL select, able to select attributes from the table/view).

 

No select

 

Max-results (limit returns results)

 

I'm not too sure if the above notes are correct.

I could not see how Odata can accept the additional features of Gdata protocol.

The gdata protocol URL parameters are:

Parameter

Meaning

Notes

q

Full-text query string

  • When creating a query, list search terms separated by spaces, in the form q=term1 term2 term3. (As with all of the query parameter values, the spaces must be URL encoded.) The service returns all entries that match all of the search terms (like using AND between terms). Like Google's web search, a service searches on complete words (and related words with the same stem), not substrings.
  • To search for an exact phrase, enclose the phrase in quotation marks: q="exact phrase".
  • To exclude entries that match a given term, use the form q=-term.
  • The search is case-insensitive.
  • Example: to search for all entries that contain the exact phrase "Elizabeth Bennet" and the word "Darcy" but don't contain the word "Austen", use the following query: ?q="Elizabeth Bennet" Darcy -Austen

/-/category 

Category filter

  • List each category as if it were part of the resource's URI, in the form /categoryname/—this is an exception to the usual name=value form.
  • List all categories before any other query parameters.
  • Precede the first category with /-/ to make clear that it's a category. For example, if Jo's feed has a category for entries about Fritz, you could request those entries like this: http://www.example.com/feeds/jo/-/Fritz. This allows the implementation to distinguish category-predicated query URIs from resource URIs.
  • You can query on multiple categories by listing multiple category parameters, separated by slashes. The service returns all entries that match all of the categories (like using AND between terms). For example: http://www.example.com/feeds/jo/-/Fritz/Laurie returns entries that match both categories.
  • To do an OR between terms, use a pipe character (|), URL-encoded as %7C. For example: http://www.example.com/feeds/jo/-/Fritz%7CLaurie returns entries that match either category.
  • An entry matches a specified category if the entry is in a category that has a matching term or label, as defined in the Atom specification. (Roughly, the "term" is the internal string used by the software to identify the category, while the "label" is the human-readable string presented to a user in a user interface.)
  • To exclude entries that match a given category, use the form /-categoryname/.
  • To query for a category that has a scheme—such as <category scheme="urn:google.com" term="public"/>—you must place the scheme in curly braces before the category name. For example: /{urn:google.com}public. If the scheme contains a slash character (/) it should be URL-encoded as %2F. To match a category that has no scheme, use an empty pair of curly braces. If you don't specify curly braces, then categories in any scheme will match.
  • The above features can be combined. For example: /A%7C-{urn:google.com}B/-C means (A OR (NOT B)) AND (NOT C).

category 

Category filter

  • An alternative way to perform a category filter. The two methods are equivalent.
  • To do an OR between terms, use a pipe character (|), URL-encoded as %7C. For example: http://www.example.com/feeds?category=Fritz%7CLaurie returns entries that match either category.
  • To do an AND between terms, use a comma character (,). For example: http://www.example.com/feeds?category=Fritz,Laurie returns entries that match both categories.

author

Entry author

  • The service returns entries where the author name and/or email address match your query string.

alt

Alternative representation type

  • If you don't specify an alt parameter, the service returns an Atom feed. This is equivalent to alt=atom.
  • alt=rss returns an RSS 2.0 result feed.
  • alt=json returns a JSON representation of the feed. More information
  • alt=json-in-script Requests a response that wraps JSON in a script tag. More information
  • alt=atom-in-script Requests an Atom response that wraps an XML string in a script tag.
  • alt=rss-in-script Requests an RSS response that wraps an XML string in a script tag.
  • alt=atom-service Requests an Atom service document that describes the feed.

updated-min, updated-max

Bounds on the entry update date

  • Use the RFC 3339 timestamp format. For example: 2005-08-09T10:57:00-08:00.
  • The lower bound is inclusive, whereas the upper bound is exclusive.
  • In some cases (such as when using v2.1 or newer of the Calendar Data API), specifying an updated-min that is too far in the past will cause an HTTP 410 (Gone) status to be returned.

prettyprint

Returns an XML response with identations and line breaks

  • If prettyprint=true, the XML returned by the server will be human readable (pretty printed).
  • Default: prettyprint=false

published-min, published-max

Bounds on the entry publication date

  • Use the RFC 3339 timestamp format. For example: 2005-08-09T10:57:00-08:00.
  • The lower bound is inclusive, whereas the upper bound is exclusive.

start-index

1-based index of the first result to be retrieved

  • Note that this isn't a general cursoring mechanism. If you first send a query with ?start-index=1&max-results=10 and then send another query with ?start-index=11&max-results=10, the service cannot guarantee that the results are equivalent to ?start-index=1&max-results=20, because insertions and deletions could have taken place in between the two queries.

strict

Strict query parameter checking

  • Set strict=true to verify that each of your query parameters are recognized by the service. An error will be returned if a parameter is not recognized.
  • Default: strict=false

max-results

Maximum number of results to be retrieved

For any service that has a default max-results value (to limit default feed size), you can specify a very large number if you want to receive the entire feed.

entryID

ID of a specific entry to be retrieved

  • If you specify an entry ID, you can't specify any other parameters.
  • The form of the entry ID is determined by the service.
  • Unlike most of the other query parameters, entry ID is specified as part of the URI, not as a pair.
  • Example: http://www.example.com/feeds/jo/entry1.

 

Odata has no mention that it supports the gdata protocol, I'm assuming it does not - correct?

Thanks,

v8

 

Coordinator
Jan 21, 2010 at 4:14 PM
Edited Jan 21, 2010 at 4:14 PM

v8,

Although we have built a fair amount of expertise on OData due to our use of it in OGDI, we are not on the team that created OData.  The team that created it is the WCF Data Services (formerly ADO.NET Data Serivce and codename "Astoria") team.  You can ask them questions via their blog:

http://blogs.msdn.com/astoriateam/

Also, ther is an official OData site:

http://www.odata.org/

There are links to the OData spec from the OData site.

Hope this helps!

Jan 24, 2010 at 3:19 PM

Thanks for the reply,

I asked IBM if their OData implementation (using what thay say is a  DB2 Plugin for WCF for Odata, or their extreme scale product) could be used  to create a OGDI look alike web site. They where not too sure if their Odata is 100% compatible.

The problem I'm having with your sdk, is that if a government  want to create your site, can they do it using just WCF or the IBM DB2 plugin that they have for WCF?

Can a government site produce your site with pure open source products?

Your sdk kit is c#, tied to proprietary packages, and suggesting  a fee for service Azure data service. I wish it was not plain J2EE, JS. etc.

I'm assuming some open source product like WSo2 data services or Gdata from Google will soon work on their Odata atompub extension and hopefully a OGDI lookalike. 

Thanks for the jquery and restlet framework ideas. 

v8

 

 

Coordinator
Feb 1, 2010 at 6:45 PM

Yes, one can use WCF or other technologies to implement an OData service.  We happened to use Windows Azure in our implementation.  Sure, one can produce what we produced with what you call "pure open source products" as long as those products have the capabilities to programmatically recreate what we did.  We aren't experts in those technologies.  However, the http://www.odata.org/ site has links on how to implement an OData service on multiple platforms.  If you are interested in implementing an OData service that does not take a dependency on Windows Azure Table Storage on .NET using WCF, then see http://msdn.microsoft.com/en-us/data/bb931106.aspx and http://blogs.msdn.com/astoriateam/.  Again, our implementation uses Windows Azure + Windows Azure Table Storage.  Using our codebase as a reference + the links provided in this email, one could recreate what we did.  I hope this helps.