Project

General

Profile

« Previous | Next » 

Revision 3310

Added by Jing Tao almost 17 years ago

Remove an method

View differences:

src/edu/ucsb/nceas/metacat/QuerySpecification.java
643 643

  
644 644
    }
645 645

  
646
    /**
647
     * Method to transfer string to return field
648
     */
649
    /* public void handleReturnField(String inputString)
650
    {
651
        // make sure if return fields has an attribute or not
652
        if (inputString.indexOf(ATTRIBUTESYMBOL) == -1) {
653
            // no attribute value will be returned
654
            logMetacat.info("QuerySpecification.handleReturnField(): " );
655
            logMetacat.info("  there are no attributes in the XPATH statement" );
656
            returnFieldList.add(inputString);
657
            containsExtendedSQL = true;
658
        } else {
659

  
660
          if ( inputString.startsWith(ATTRIBUTESYMBOL) ) {
661

  
662
            // case where the return field is solely an attribute
663
            logMetacat.info("QuerySpecification.handleReturnField(): " );
664
            logMetacat.info("  there are *only* attributes in the XPATH statement" );
665
            String returnPath = newPathExpressionWithOutAttribute(inputString);
666
            String attributeName = getAttributeName(inputString);
667
            Vector pathInfo = new Vector();
668
            // the vector has the information about return path and
669
            // attributename
670
            pathInfo.addElement(returnPath);
671
            pathInfo.addElement(attributeName);
672
            // put the vector into a hash table. The reseaon why don't put
673
            // return path or attributename as a key is because they are not
674
            // unique
675
            attributeReturnList.put(new Integer(countAttributeReturnField),
676
                    pathInfo);
677
            countAttributeReturnField++;
678
            hasAttributeReturnField = true;
679
            containsExtendedSQL = true;
680
          } else {
681
            // has a attribute return field
682
            // divied the return filed into two parts, one is path and the
683
            // other is attribue name
684
            logMetacat.info("QuerySpecification.handleReturnField: " );
685
            logMetacat.info("  there are both attributes and elements" );
686
            logMetacat.info("  in the XPATH statement" );
687
            String returnPath = newPathExpressionWithOutAttribute(inputString);
688
            String attributeName = getAttributeName(inputString);
689
            Vector pathInfo = new Vector();
690
            // the vector has the information about return path and
691
            // attributename
692
            pathInfo.addElement(returnPath);
693
            pathInfo.addElement(attributeName);
694
            // put the vector into a hash table. The reseaon why don't put
695
            // return path or attributename as a key is because they are not
696
            // unique
697
            attributeReturnList.put(new Integer(countAttributeReturnField),
698
                    pathInfo);
699
            countAttributeReturnField++;
700
            hasAttributeReturnField = true;
701
            containsExtendedSQL = true;
702
          }
703
        }
704
    }
705
     */
646
   
706 647
    private void handleReturnField(String inputString)
707 648
    {
708 649
        int attributePos = inputString.indexOf(ATTRIBUTESYMBOL);

Also available in: Unified diff