comparison src/main/java/de/mpiwg/indexmeta/AnnotateIndexMeta.java @ 7:bc57f2660b0f

implementation of web service
author Jorge Urzua <jurzua@mpiwg-berlin.mpg.de>
date Fri, 12 Apr 2013 17:48:42 +0200
parents 8f6c4dab5d17
children 9ce7979fd037
comparison
equal deleted inserted replaced
5:7d231e4e86e5 7:bc57f2660b0f
60 Integer count = 0; 60 Integer count = 0;
61 for(String contextElement : contextualizableList){ 61 for(String contextElement : contextualizableList){
62 NodeList nodeList = doc.getElementsByTagName(contextElement); 62 NodeList nodeList = doc.getElementsByTagName(contextElement);
63 for(int i=0; i < nodeList.getLength(); i++){ 63 for(int i=0; i < nodeList.getLength(); i++){
64 Node iter2 = nodeList.item(i); 64 Node iter2 = nodeList.item(i);
65 String currentNodeValue = iter2.getTextContent(); 65 String currentNodeValue = null;
66 //String currentNodeValue = iter2.getTextContent();
66 NamedNodeMap attr = iter2.getAttributes(); 67 NamedNodeMap attr = iter2.getAttributes();
67 // make a new attribute 68 // make a new attribute
68 if (attr.getNamedItem("context-id") == null){ 69 if (attr.getNamedItem("context-id") == null){
69 Attr attribute = doc.createAttribute ("context-id"); 70 Attr attribute = doc.createAttribute ("context-id");
70 attribute.setValue (count.toString()); 71 attribute.setValue (count.toString());