abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r432043 - in /incubator/abdera/java/trunk: core/src/main/java/org/apache/abdera/model/ parser/src/main/java/org/apache/abdera/parser/stax/
Date Wed, 16 Aug 2006 21:55:20 GMT
Author: jmsnell
Date: Wed Aug 16 14:55:19 2006
New Revision: 432043

URL: http://svn.apache.org/viewvc?rev=432043&view=rev
Log:
Add getEditMediaLink() to Entry and FOMEntry to support APP media link entries
Add get*LinkResolvedHref() methods to Entry and Feed as a shortcut

Modified:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java?rev=432043&r1=432042&r2=432043&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java Wed
Aug 16 14:55:19 2006
@@ -563,4 +563,20 @@
    */
   Link getEditLink();
   
+  /**
+   * Returns this entries first edit-media link (if any)
+   */
+  Link getEditMediaLink();
+  
+  /**
+   * Returns this entries first self link
+   */
+  Link getSelfLink();
+ 
+  URI getLinkResolvedHref(String rel) throws URISyntaxException;
+  URI getAlternateLinkResolvedHref() throws URISyntaxException;
+  URI getEnclosureLinkResolvedHref() throws URISyntaxException;
+  URI getEditLinkResolvedHref() throws URISyntaxException;
+  URI getEditMediaLinkResolvedHref() throws URISyntaxException;
+  URI getSelfLinkResolvedHref() throws URISyntaxException;
 }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java?rev=432043&r1=432042&r2=432043&view=diff
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java Wed
Aug 16 14:55:19 2006
@@ -468,4 +468,7 @@
    */
   Link getAlternateLink();
   
+  URI getLinkResolvedHref(String rel) throws URISyntaxException;
+  URI getSelfLinkResolvedHref() throws URISyntaxException;
+  URI getAlternateLinkResolvedHref() throws URISyntaxException;
 }

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java?rev=432043&r1=432042&r2=432043&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
Wed Aug 16 14:55:19 2006
@@ -641,6 +641,39 @@
     return getLink(Link.REL_EDIT);
   }
   
+  public Link getSelfLink() {
+    return getLink(Link.REL_SELF);
+  }
+  
+  public Link getEditMediaLink() {
+    return getLink(Link.REL_EDIT_MEDIA);
+  }
+  
+  public URI getLinkResolvedHref(String rel) throws URISyntaxException {
+    Link link = getLink(rel);
+    return (link != null) ? link.getResolvedHref() : null;
+  }
+  public URI getAlternateLinkResolvedHref() throws URISyntaxException {
+    Link link = getAlternateLink();
+    return (link != null) ? link.getResolvedHref() : null;
+  }
+  public URI getEnclosureLinkResolvedHref() throws URISyntaxException {
+    Link link = getEnclosureLink();
+    return (link != null) ? link.getResolvedHref() : null;
+  }
+  public URI getEditLinkResolvedHref() throws URISyntaxException {
+    Link link = getEditLink();
+    return (link != null) ? link.getResolvedHref() : null;
+  }
+  public URI getEditMediaLinkResolvedHref() throws URISyntaxException {
+    Link link = getEditMediaLink();
+    return (link != null) ? link.getResolvedHref() : null;
+  }
+  public URI getSelfLinkResolvedHref() throws URISyntaxException {
+    Link link = getSelfLink();
+    return (link != null) ? link.getResolvedHref() : null;
+  }
+  
   public String getContent() {
     Content content = getContentElement();
     return (content != null) ? content.getValue() : null;

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java?rev=432043&r1=432042&r2=432043&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
Wed Aug 16 14:55:19 2006
@@ -520,6 +520,19 @@
     return getLink(Link.REL_ALTERNATE);
   }
 
+  public URI getLinkResolvedHref(String rel) throws URISyntaxException {
+    Link link = getLink(rel);
+    return (link != null) ? link.getResolvedHref() : null;
+  }
+  public URI getSelfLinkResolvedHref() throws URISyntaxException {
+    Link link = getSelfLink();
+    return (link != null) ? link.getResolvedHref() : null;
+  }
+  public URI getAlternateLinkResolvedHref() throws URISyntaxException {
+    Link link = getAlternateLink();
+    return (link != null) ? link.getResolvedHref() : null;
+  }
+  
   public Text.Type getRightsType() {
     Text text = getRightsElement();
     return (text != null) ? text.getTextType() : null;



Mime
View raw message