Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 662
  • Last Modified:

java ROME API

I am trying to access the link at :
http://wiki.java.net/bin/edit/Javawsxml/Rome04URIMapping

But that is not working.
It is from :
http://www.jarvana.com/jarvana/view/net/java/dev/rome/rome/1.0.0/rome-1.0.0-javadoc.jar!/com/sun/syndication/feed/synd/SyndEntry.html#getUri()

trying to understand when to use geturi and getlink on a feed?

if any one has access to that link can you please let me know
0
vkchaitu82
Asked:
vkchaitu82
  • 7
  • 4
  • 2
1 Solution
 
for_yanCommented:
This is about URI vs URL

http://www.bernzilla.com/item.php?id=100

I guess link is even more amorphous than URL
0
 
for_yanCommented:

This is better about URI vs URL
http://blog.markfeeney.com/2010/11/java-uri-vs-url.html

URL must include protcol, URI not necessarily
Link is kind of not technical general term I guess, we need to get to ROME
to understaand what they mean
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
for_yanCommented:

Even though this link
http://xmlandmore.blogspot.com/2010/04/role-of-uri-in-rome-for-duplicate.html
referes for ultimate deatlis to that same ROME site which requires password, still according to the conclusions of this
guy, we chose the right way to rely on getUri() method as a key:


Conclusions
Uri property at the feed or entry level of ROME implementation (i.e., SyndFeed or SyndEntry) can be used as feed's or entry's primary key. For example, it can be used to detect duplicate items in a syndication feed.

However, it's possible that uri property could be missing from SyndFeed or SyndEntry. In this case, other elements or combinations of them may be used as primary keys.
0
 
vkchaitu82Author Commented:
so does geturi gives the entry's primary key?
and when the geturi==NULL we should use getlink?
0
 
objectsCommented:
the uri is the primary key for an rss entry
the link property is the link that should be used to access it
typically they will both be the same
0
 
for_yanCommented:
Well, I understand that there is no 100% solutiion, as the feeds are created by many people and not all
of them are going through details to make sure they follow recommendations of this RFC or whatever.
getUri is your best bet - with it you'll get things correctly for majority of better organized sites,
For other sites - it uri is null , you may try link, if not you may go even for say author + date, etc.
No single rule for those who do not follow the rules.

Do you see the sites which return null for getUri , but return non-null for link.
Sure it is good to use it in such cases
0
 
vkchaitu82Author Commented:
that is what I taught initially that both will be same.
but most of the times it is not the case.
0
 
objectsCommented:
> that is what I taught initially that both will be same.

they don't have to be

you're also assuming that a document will never change when it may.
Just because you have previously seen a uri does not necessarily mean it is a duplicate
0
 
for_yanCommented:
getUri is better, but if it null, go to getLink and use it
0
 
for_yanCommented:
Nevertheless,  in the scope of time when you are using it, it would be
not very probable that it will change.
All this public stuff - RSS, podcasts - do not guarantee 100% following the protocol.
I'm from time to time not getting my podacsts as they should be coming, even
though I use different podcasting programs  - they all for some reason do not download some particular show.
Nevertheless , I guess more than 95% and probably even more of those shows I'm subscribing to, reach me OK.  
0
 
objectsCommented:
Why did you accept that exactly?

I showed you how to access that link, and explained the difference between link and uri.
Why did you ignore my comments?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 7
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now