Changeset 1511


Ignore:
Timestamp:
19/08/10 15:26:00 (18 months ago)
Author:
Stephen Rankin
Message:

Refactoring due to name change. ref#236.

Location:
trunk/applications/NXvalidate/src/org/nexusformat/nxvalidate
Files:
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/applications/NXvalidate/src/org/nexusformat/nxvalidate/FileLoadingActions.java

    r1510 r1511  
    3838import javax.xml.parsers.DocumentBuilder; 
    3939import javax.xml.parsers.DocumentBuilderFactory; 
    40 import org.nexusformat.nxvalidate.exceptions.NXConvertpyException; 
     40import org.nexusformat.nxvalidate.exceptions.NXvalidateException; 
    4141 
    4242/** 
     
    188188                    bundle.getString("validationCompleteMessage")); 
    189189            } 
    190         } catch (NXConvertpyException ex) { 
     190        } catch (NXvalidateException ex) { 
    191191            Logger.getLogger(NXvalidateFrame.class.getName()).log( 
    192192                    Level.SEVERE, null, ex); 
     
    224224            //domTree.updateTree(); 
    225225 
    226         } catch (NXConvertpyException ex) { 
     226        } catch (NXvalidateException ex) { 
    227227            conversionFail = true; 
    228228            badDataFileList.add(nxsFile.getAbsolutePath()); 
  • trunk/applications/NXvalidate/src/org/nexusformat/nxvalidate/NXconvert.java

    r1507 r1511  
    3030import java.util.logging.Level; 
    3131import java.util.logging.Logger; 
    32 import org.nexusformat.nxvalidate.exceptions.NXConvertpyException; 
     32import org.nexusformat.nxvalidate.exceptions.NXvalidateException; 
    3333 
    3434public class NXconvert { 
     
    6767    } 
    6868 
    69     public File convert() throws IOException, InterruptedException, NXConvertpyException { 
     69    public File convert() throws IOException, InterruptedException, NXvalidateException { 
    7070 
    7171        Logger.getLogger(NXconvert.class.getName()).log( 
     
    9999            buffer.append("\" failed. Returned "); 
    100100            buffer.append(exitValue); 
    101             throw new NXConvertpyException(buffer.toString()); 
     101            throw new NXvalidateException(buffer.toString()); 
    102102        } 
    103103        return redfile; 
  • trunk/applications/NXvalidate/src/org/nexusformat/nxvalidate/NXproperties.java

    r1507 r1511  
    5757 
    5858       String propsFileName = 
    59                userHome + File.pathSeparator + ".NXConvertpy.properties"; 
     59               userHome + File.pathSeparator + ".NXvalidate.properties"; 
    6060 
    6161       File propsFile = new File(propsFileName); 
     
    7777                   new URLClassLoader(new java.net.URL[]{resourceURL}); 
    7878 
    79            userProps = ResourceBundle.getBundle(".NXConvertpy.properties", 
     79           userProps = ResourceBundle.getBundle(".NXvalidate.properties", 
    8080                java.util.Locale.getDefault(), urlLoader ); 
    8181 
  • trunk/applications/NXvalidate/src/org/nexusformat/nxvalidate/SVRLNodeFilter.java

    r1507 r1511  
    3434import javax.xml.xpath.XPathExpressionException; 
    3535import javax.xml.xpath.XPathFactory; 
    36 import org.nexusformat.nxvalidate.exceptions.NXConvertpyException; 
     36import org.nexusformat.nxvalidate.exceptions.NXvalidateException; 
    3737import org.w3c.dom.Document; 
    3838import org.w3c.dom.Element; 
     
    8686            getXPathList(); 
    8787 
    88         } catch (NXConvertpyException ex) { 
     88        } catch (NXvalidateException ex) { 
    8989            Logger.getLogger(SVRLNodeFilter.class.getName()).log( 
    9090                    Level.SEVERE, null, ex); 
     
    105105            resetNodes(); 
    106106 
    107         } catch (NXConvertpyException ex) { 
     107        } catch (NXvalidateException ex) { 
    108108            Logger.getLogger(SVRLNodeFilter.class.getName()).log( 
    109109                    Level.SEVERE, null, ex); 
     
    115115    } 
    116116 
    117     private void resetNodes() throws NXConvertpyException, 
     117    private void resetNodes() throws NXvalidateException, 
    118118            XPathExpressionException { 
    119119 
     
    180180    } 
    181181 
    182     private void getXPathList() throws NXConvertpyException, 
     182    private void getXPathList() throws NXvalidateException, 
    183183            XPathExpressionException { 
    184184 
  • trunk/applications/NXvalidate/src/org/nexusformat/nxvalidate/UserSettings.java

    r1507 r1511  
    6767        File settings = new File(System.getProperty("user.home") 
    6868                + System.getProperty("file.separator") 
    69                 + ".nxconvertpy.properties"); 
     69                + ".nxvalidate.properties"); 
    7070 
    7171        if (settings.exists()) { 
     
    9292 
    9393        File settings = new File(System.getProperty("user.home") 
    94                 + System.getProperty("file.separator") + ".nxconvertpy.properties"); 
     94                + System.getProperty("file.separator") + ".nxvalidate.properties"); 
    9595        try { 
    9696            if (settings.exists()) { 
    9797 
    9898                props.setProperty("nxconvert", nxconvertFile.getAbsolutePath()); 
    99                 props.store(new FileOutputStream(settings), "ISIS NXConvertpy"); 
     99                props.store(new FileOutputStream(settings), "ISIS NXvalidate"); 
    100100 
    101101            } else { 
    102102                settings.createNewFile(); 
    103103                props.setProperty("nxconvert", nxconvertFile.getAbsolutePath()); 
    104                 props.store(new FileOutputStream(settings), "ISIS NXConvertpy"); 
     104                props.store(new FileOutputStream(settings), "ISIS NXvalidate"); 
    105105 
    106106            } 
  • trunk/applications/NXvalidate/src/org/nexusformat/nxvalidate/ValidatorUtils.java

    r1507 r1511  
    2727 
    2828import java.io.File; 
    29 import org.nexusformat.nxvalidate.exceptions.NXConvertpyException; 
     29import org.nexusformat.nxvalidate.exceptions.NXvalidateException; 
    3030import java.util.logging.Level; 
    3131import java.util.logging.Logger; 
     
    133133     * and the Schematron file. The returned file is the results file. 
    134134     * @return the results file as a File object. 
    135      * @throws NXConvertpyException 
     135     * @throws NXvalidateException 
    136136     */ 
    137     public File validate() throws NXConvertpyException { 
     137    public File validate() throws NXvalidateException { 
    138138 
    139139        File result = null; 
     
    148148                        "While converting \"" + nxsFile 
    149149                        + "\" to reduced xml format"); 
    150                 throw new NXConvertpyException("While converting \"" + nxsFile 
     150                throw new NXvalidateException("While converting \"" + nxsFile 
    151151                        + "\" to reduced xml format"); 
    152152            } 
     
    165165                Logger.getLogger(ValidatorUtils.class.getName()).log(Level.SEVERE, 
    166166                        "While creating validation report"); 
    167                 throw new NXConvertpyException("While creating validation report"); 
     167                throw new NXvalidateException("While creating validation report"); 
    168168            } 
    169169        } 
  • trunk/applications/NXvalidate/src/org/nexusformat/nxvalidate/exceptions/NXvalidateException.java

    r1507 r1511  
    3131 * @author Stephen Rankin 
    3232 */ 
    33 public class NXConvertpyException extends Exception { 
     33public class NXvalidateException extends Exception { 
    3434 
    3535    /** 
    36      * Creates a new instance of <code>NXConvertpyException</code> without detail message. 
     36     * Creates a new instance of <code>NXvalidateException</code> without detail message. 
    3737     */ 
    38     public NXConvertpyException() { 
     38    public NXvalidateException() { 
    3939    } 
    4040 
    4141 
    4242    /** 
    43      * Constructs an instance of <code>NXConvertpyException</code> with the specified detail message. 
     43     * Constructs an instance of <code>NXvalidateException</code> with the specified detail message. 
    4444     * @param msg the detail message. 
    4545     */ 
    46     public NXConvertpyException(String msg) { 
     46    public NXvalidateException(String msg) { 
    4747        super(msg); 
    4848    } 
Note: See TracChangeset for help on using the changeset viewer.