Project

General

Profile

« Previous | Next » 

Revision 3634

add retrieval of field type for each node (TEXT, ATTRIBUTE, etc).
this is to support a fix for bug#2999

View differences:

src/edu/ucsb/nceas/metacat/QuerySpecification.java
837 837
                }
838 838
                String path  = (String) returnFieldList.elementAt(i);
839 839
                self.append("select xml_nodes.docid, ");
840
                self.append("'"+ path.replaceAll("'", "''") + "' as path, xml_nodes.nodedata, ");
841
                self.append("xml_nodes.parentnodeid ");
840
                self.append("'"+ path.replaceAll("'", "''") + "' as path, ");
841
                self.append("xml_nodes.nodedata, ");
842
                self.append("xml_nodes.parentnodeid, ");
843
                self.append("xml_nodes.nodetype ");
842 844
                self.append("from xml_nodes, xml_documents ");
843 845
                self.append("where parentnodeid IN ");
844 846
                self.append(QueryTerm.useNestedStatements(path));
......
901 903
        }
902 904

  
903 905
        if(usePathIndex){
904
            self.append("select docid, path, nodedata, parentnodeid ");
906
            self.append("select docid, path, nodedata, parentnodeid, nodetype ");
905 907
            self.append("from xml_path_index where path in( '");
906 908

  
907 909
            boolean firstfield = true;
......
925 927

  
926 928
        } else {
927 929
            self.append("select xml_nodes.docid, xml_index.path, xml_nodes.nodedata,  ");
928
            self.append("xml_nodes.parentnodeid ");
930
            self.append("xml_nodes.parentnodeid, ");
931
            self.append("xml_nodes.nodetype ");
929 932
            self.append("FROM xml_index, xml_nodes WHERE (");
930 933
           
931 934

  

Also available in: Unified diff