コード例 #1
0
 private void addLink(TopLevelObject obj, String linkURI, String linkRel) {
   Link l = objFactory.createLinksLink();
   l.setOwner(this.getClass().getCanonicalName());
   l.setValue(linkURI);
   l.setRel(linkRel);
   addLink(obj, l);
 }
コード例 #2
0
 private Link findLinkByRel(TopLevelObject obj, String linkRel) {
   Links links = obj.getLinks();
   if (links != null) {
     for (Link l : links.getLink()) {
       if (l.getRel().equalsIgnoreCase(linkRel)) {
         Link cloned = objFactory.createLinksLink();
         cloned.setOwner(l.getOwner());
         cloned.setRel(l.getRel());
         cloned.setValue(l.getValue());
         return cloned;
       }
     }
   }
   return null;
 }