Project

General

Profile

« Previous | Next » 

Revision 2162

Added by Jing Tao over 20 years ago

Change the code when Eml parser name changed.

View differences:

src/edu/ucsb/nceas/metacat/DocumentImpl.java
988 988

  
989 989
        // if currentNode is inline and handle eml2, set flag proccess in
990 990
        if (currentNode.nodename != null &&
991
            currentNode.nodename.equals(EmlSAXHandler.INLINE) && proccessEml2)
991
            currentNode.nodename.equals(Eml200SAXHandler.INLINE) && proccessEml2)
992 992
        {
993 993
          prcocessInlineData = true;
994 994
        }
......
1027 1027
          // can combine the file name and inline data file path, to get it
1028 1028
          String fileName = currentNode.nodedata;
1029 1029
          Reader reader =
1030
                          EmlSAXHandler.readInlineDataFromFileSystem(fileName);
1030
                        Eml200SAXHandler.readInlineDataFromFileSystem(fileName);
1031 1031
          char [] characterArray = new char [4*1024];
1032 1032
          try
1033 1033
          {
......
1790 1790
          if ( parser != null)
1791 1791
          {
1792 1792
            ContentHandler handler = parser.getContentHandler();
1793
            if (handler instanceof EmlSAXHandler)
1793
            if (handler instanceof Eml200SAXHandler)
1794 1794
            {
1795
              EmlSAXHandler eml = (EmlSAXHandler) handler;
1795
              Eml200SAXHandler eml = (Eml200SAXHandler) handler;
1796 1796
              eml.deleteInlineFiles();
1797 1797
            }
1798 1798
          }
......
1861 1861
       if ( parser != null)
1862 1862
       {
1863 1863
          ContentHandler handler = parser.getContentHandler();
1864
          if (handler instanceof EmlSAXHandler)
1864
          if (handler instanceof Eml200SAXHandler)
1865 1865
          {
1866
            EmlSAXHandler eml = (EmlSAXHandler) handler;
1866
            Eml200SAXHandler eml = (Eml200SAXHandler) handler;
1867 1867
            eml.deleteInlineFiles();
1868 1868
          }
1869 1869
       }
......
1992 1992
      if ( parser != null)
1993 1993
      {
1994 1994
          ContentHandler handler = parser.getContentHandler();
1995
          if (handler instanceof EmlSAXHandler)
1995
          if (handler instanceof Eml200SAXHandler)
1996 1996
          {
1997
            EmlSAXHandler eml = (EmlSAXHandler) handler;
1997
            Eml200SAXHandler eml = (Eml200SAXHandler) handler;
1998 1998
            eml.deleteInlineFiles();
1999 1999
          }
2000 2000
       }
......
2332 2332
      if (ruleBase != null && ruleBase.equals(EML2))
2333 2333
      {
2334 2334
        MetaCatUtil.debugMessage("eml 2 parser", 20);
2335
        chandler = new EmlSAXHandler(dbconn, action,
2335
        chandler = new Eml200SAXHandler(dbconn, action,
2336 2336
                                    docid, rev, user, groups, pub, serverCode);
2337 2337
        parser.setContentHandler((ContentHandler)chandler);
2338 2338
        parser.setErrorHandler((ErrorHandler)chandler);

Also available in: Unified diff