dsSeq.deleteFeature(feature);\r
replaceJvObjMapping(feature, newsf);\r
dsSeq.addSequenceFeature(newsf);\r
- feature.otherDetails.clear();\r
+ if (feature.otherDetails!=null) {\r
+ // TODO later: leave this to finalise method ? \r
+ feature.otherDetails.clear();\r
+ }\r
}\r
}\r
\r
{\r
String link = (String) feature.links.elementAt(i);\r
UrlLink ulink = new UrlLink(link);\r
- /*\r
- * int sep = link.indexOf('|'); if (sep > -1) { Link vLink = new Link();\r
- * if (sep > 0) { vLink.setContent(link.substring(0, sep - 1)); } else {\r
- * vLink.setContent(""); } vLink.setHref(link.substring(sep + 1)); //\r
- * TODO: validate href. dsa.addLink(vLink); }\r
- */\r
- Link vLink = new Link();\r
- vLink.setContent(ulink.getLabel());\r
- vLink.setHref(ulink.getUrl_prefix());\r
+ if (ulink.isValid())\r
+ {\r
+ // We only add static links to the document.\r
+ Link vLink = new Link();\r
+ vLink.setContent(ulink.getLabel());\r
+ vLink.setHref(ulink.getTarget());\r
+ dsa.addLink(vLink);\r
+ }\r
}\r
}\r
dsa.setGroup(feature.getFeatureGroup());\r
{\r
Link[] links = dseta.getLink();\r
for (int i = 0; i < links.length; i++)\r
- {\r
+ { \r
+ // TODO: use URLLink parsing/validation here.\r
sf.addLink(links[i].getContent() + "|" + links[i].getHref());\r
}\r
}\r