Changeset 1507


Ignore:
Timestamp:
19/08/10 12:43:30 (18 months ago)
Author:
Stephen Rankin
Message:

Added copyright to files. Added some code for filtering bad nodes. ref#236.

Location:
trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate
Files:
43 edited

Legend:

Unmodified
Added
Removed
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/AbstractNXSnode.java

    r1495 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * AbstractNXSnode.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/Attribute.java

    r1495 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * Attribute.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/BulkLoadFilesFrame.java

    r1505 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
    5  
    6 /* 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
    723 * BulkLoadFilesFrame.java 
    824 * 
    925 * Created on 10-Aug-2010, 15:32:56 
    1026 */ 
     27 
    1128package org.nexusformat.nxvalidate; 
    1229 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/CheckNexusFileType.java

    r1504 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * CheckNexusFileType.java 
     24 * 
    425 */ 
    526package org.nexusformat.nxvalidate; 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/FileLoadingActions.java

    r1505 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * FileLoadingActions.java 
     24 * 
    425 */ 
    526package org.nexusformat.nxvalidate; 
     
    6586 
    6687        treeUtils = new TreeUtils(); 
    67  
    6888    } 
    6989 
     
    201221            node.setReducedFile(reducedFile); 
    202222            node.setRoot(root); 
    203             root.insert(node); 
     223            root.insert(node,0); 
    204224            //domTree.updateTree(); 
    205225 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/Logger.java

    r1367 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * Logger.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXLoadFilesDialog.java

    r1505 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
    5  
    6 /* 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
    723 * NXLoadFilesDialog.java 
    824 * 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXNodeMapper.java

    r1504 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * NXNodeMapper.java 
     24 * 
    425 */ 
    526package org.nexusformat.nxvalidate; 
     
    1233import javax.swing.tree.TreeNode; 
    1334import org.w3c.dom.Document; 
     35import org.w3c.dom.Element; 
    1436import org.w3c.dom.NamedNodeMap; 
    1537import org.w3c.dom.Node; 
     
    2244public class NXNodeMapper implements MutableTreeNode { 
    2345 
    24     Node domNode = null; 
     46    private Node domNode = null; 
    2547    private String nodeName = null; 
    2648    private boolean isRoot = false; 
     
    80102    } 
    81103 
     104    /** 
     105     * Check to see if this node is the root node. 
     106     * @return true is it is the root node, false otherwise. 
     107     */ 
    82108    public boolean isRoot() { 
    83109        return isRoot; 
    84110    } 
    85111 
     112    /** 
     113     * Check to see if this node is a document, i.e the list of nodes directly 
     114     * under the root note that are the open NXS documents. 
     115     * 
     116     * @return true if the node is a document node. 
     117     */ 
    86118    public boolean isDocument() { 
    87119        return isDocument; 
    88120    } 
    89121 
     122    /** 
     123     * Set the flag that says that this node is a documents node i.e. one of the 
     124     * list of nodes directly under the root note that are the open NXS documents. 
     125     * @param isDocument a flag which is true if the node is a document node. 
     126     */ 
    90127    public void setDocument(boolean isDocument) { 
    91128        this.isDocument = isDocument; 
    92129    } 
    93130 
     131    /** 
     132     * Set the root node that this node belongs to. 
     133     * @param the root node. 
     134     */ 
    94135    public void setRoot(NXNodeMapper root) { 
    95136        this.root = root; 
    96137    } 
    97138 
    98     public void insert(NXNodeMapper node) { 
     139    /*public void insert(NXNodeMapper node) { 
    99140        documents.add(node); 
    100     } 
    101  
    102     public void removeNode(NXNodeMapper node) { 
    103         if (!isRoot) { 
    104             documents.remove(node); 
    105         } 
    106     } 
     141    }*/ 
    107142 
    108143    public File getNXSFile() { 
     
    156191    public boolean getBadNode() { 
    157192        return badNode; 
     193    } 
     194 
     195    public Node getDomNode() { 
     196        return domNode; 
    158197    } 
    159198 
     
    272311 
    273312        } 
     313 
    274314        return childCount; 
    275315 
     
    413453 
    414454    public void insert(MutableTreeNode child, int index) { 
    415         if (isRoot) { 
    416  
    417             documents.add(index, (NXNodeMapper) child); 
    418  
     455 
     456        NXNodeMapper childNode = (NXNodeMapper) child; 
     457 
     458        if (isRoot) { 
     459            documents.add(index, childNode); 
     460        } else{ 
     461            NodeList list = domNode.getChildNodes(); 
     462 
     463            for (int i = 0; i < list.getLength(); ++i) { 
     464                if(i == index){ 
     465                    domNode.insertBefore(childNode.domNode, list.item(i)); 
     466                } 
     467            } 
    419468        } 
    420469    } 
     
    425474            documents.remove(index); 
    426475 
     476        } else{ 
     477 
     478            NodeList list = domNode.getChildNodes(); 
     479 
     480            for (int i = 0; i < list.getLength(); ++i) { 
     481                if(i == index){ 
     482                    domNode.removeChild(list.item(index)); 
     483                } 
     484            } 
     485 
    427486        } 
    428487    } 
    429488 
    430489    public void remove(MutableTreeNode node) { 
    431         if (isRoot) { 
    432  
     490 
     491        NXNodeMapper childNode = (NXNodeMapper) node; 
     492 
     493        if (isRoot) { 
    433494            documents.remove((NXNodeMapper) node); 
    434  
     495        }else{ 
     496            NodeList list = domNode.getChildNodes(); 
     497 
     498            for (int i = 0; i < list.getLength(); ++i) { 
     499                if(list.item(i).isSameNode(childNode.domNode)){ 
     500                    domNode.removeChild(childNode.domNode); 
     501                } 
     502            } 
    435503        } 
    436504    } 
    437505 
    438506    public void removeFromParent() { 
    439         if (!isRoot) { 
    440           documents.remove(this); 
     507        if (isRoot) { 
     508           return; 
     509        } else{ 
     510           NXNodeMapper parentNode = (NXNodeMapper)getParent(); 
     511           parentNode.remove(this); 
    441512        } 
    442513    } 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXReducedToTree.java

    r1504 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
     1 /* NeXus - Neutron & X-ray Common Data Format 
     2  * 
     3  * NeXus file validation GUI tool. 
     4  * 
     5  * Copyright (C) 2010 Stephen Rankin 
     6  * 
     7  * This library is free software; you can redistribute it and/or 
     8  * modify it under the terms of the GNU Lesser General Public 
     9  * License as published by the Free Software Foundation; either 
     10  * version 2 of the License, or (at your option) any later version. 
     11  * 
     12  * This library is distributed in the hope that it will be useful, 
     13  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15  * Lesser General Public License for more details. 
     16  * 
     17  * You should have received a copy of the GNU Lesser General Public 
     18  * License along with this library; if not, write to the Free Software 
     19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20  * 
     21  * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22  * 
     23  * NXReducedToTree.java 
     24  * 
     25  */ 
    526package org.nexusformat.nxvalidate; 
    627 
     28import java.util.ArrayList; 
    729import java.util.Enumeration; 
    8 import java.util.HashMap; 
    9 import java.util.Vector; 
    1030import javax.swing.event.TreeModelEvent; 
    1131import javax.swing.event.TreeModelListener; 
     
    1333import javax.swing.tree.DefaultTreeModel; 
    1434import javax.swing.tree.TreeNode; 
    15 import org.nexusformat.nxvalidate.exceptions.NXConvertpyException; 
    16 import org.w3c.dom.Document; 
    1735 
    1836/** 
     
    2341public class NXReducedToTree extends DefaultTreeModel { 
    2442 
    25     private Vector listenerList = new Vector(); 
     43    private ArrayList<TreeModelListener> listenerList = 
     44            new ArrayList<TreeModelListener>(); 
    2645    private NXNodeMapper root = null; 
    2746     
     
    3857    } 
    3958 
    40     // Basic TreeModel operations 
     59    @Override 
    4160    public Object getRoot() { 
    4261 
     
    4564    } 
    4665 
     66    @Override 
    4767    public boolean isLeaf(Object aNode) { 
    4868 
     
    5878    } 
    5979 
     80    @Override 
    6081    public int getChildCount(Object parent) { 
    6182 
     
    91112 
    92113        if ((listener != null) && !listenerList.contains(listener)) { 
    93             listenerList.addElement(listener); 
     114            listenerList.add(listener); 
    94115        } 
    95116 
     
    100121 
    101122        if (listener != null) { 
    102             listenerList.removeElement(listener); 
     123            listenerList.remove(listener); 
    103124        } 
    104125 
    105126    } 
    106127 
    107     // Note: Since XML works with 1.1, this example uses Vector. 
    108     // If coding for 1.2 or later, though, I'd use this instead: 
    109     //   private List listenerList = new LinkedList(); 
    110     // The operations on the List are then add(), remove() and 
    111     // iteration, via: 
    112     //  Iterator it = listenerList.iterator(); 
    113     //  while ( it.hasNext() ) { 
    114     //    TreeModelListener listener = (TreeModelListener) it.next(); 
    115     //    ... 
    116     //  } 
    117     public void fireTreeNodesChanged(TreeModelEvent e) { 
     128    public void fireTreeNodesChanged(TreeModelEvent ev) { 
     129        events(ev); 
     130    } 
    118131 
    119         Enumeration listeners = listenerList.elements(); 
     132    public void fireTreeNodesInserted(TreeModelEvent ev) { 
     133        events(ev); 
     134    } 
    120135 
    121         while (listeners.hasMoreElements()) { 
     136    public void fireTreeNodesRemoved(TreeModelEvent ev) { 
     137        events(ev); 
     138    } 
     139 
     140    public void fireTreeStructureChanged(TreeModelEvent ev) { 
     141        events(ev); 
     142    } 
     143 
     144    private void events(TreeModelEvent ev){ 
     145 
     146        for(int i = 0; i<listenerList.size(); ++i) { 
    122147            TreeModelListener listener = 
    123                     (TreeModelListener) listeners.nextElement(); 
    124             listener.treeNodesChanged(e); 
     148                    (TreeModelListener) listenerList.get(i); 
     149            listener.treeNodesChanged(ev); 
    125150        } 
    126          
    127151 
    128152    } 
    129153 
    130     public void fireTreeNodesInserted(TreeModelEvent e) { 
    131  
    132         Enumeration listeners = listenerList.elements(); 
    133  
    134         while (listeners.hasMoreElements()) { 
    135             TreeModelListener listener = 
    136                     (TreeModelListener) listeners.nextElement(); 
    137             listener.treeNodesInserted(e); 
    138         } 
    139          
    140  
    141     } 
    142  
    143     public void fireTreeNodesRemoved(TreeModelEvent e) { 
    144  
    145         Enumeration listeners = listenerList.elements(); 
    146  
    147         while (listeners.hasMoreElements()) { 
    148             TreeModelListener listener = 
    149                     (TreeModelListener) listeners.nextElement(); 
    150             listener.treeNodesRemoved(e); 
    151         } 
    152          
    153  
    154     } 
    155  
    156     public void fireTreeStructureChanged(TreeModelEvent e) { 
    157  
    158         Enumeration listeners = listenerList.elements(); 
    159  
    160         while (listeners.hasMoreElements()) { 
    161             TreeModelListener listener = 
    162                     (TreeModelListener) listeners.nextElement(); 
    163             listener.treeStructureChanged(e); 
    164         } 
    165          
    166          
    167     } 
    168154} 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXSettingsDialog.java

    r1499 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
    5  
    6 /* 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
    723 * NXLoadFilesDialog.java 
    824 * 
     
    1632/** 
    1733 * 
    18  * @author ser65 
     34 * @author Stephen Rankin 
    1935 */ 
    2036public class NXSettingsDialog extends javax.swing.JDialog { 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXSnode.java

    r1498 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * NXSnode.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXTreeRenderer.java

    r1498 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * NXTreeRenderer.java 
     24 * 
    425 */ 
    526package org.nexusformat.nxvalidate; 
     
    1334/** 
    1435 * 
    15  * @author steve 
     36 * @author Stephen rankin 
    1637 */ 
    1738public class NXTreeRenderer extends DefaultTreeCellRenderer { 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXValidateDialog.java

    r1504 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
    4  */ 
    5  
    6 /* 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
    723 * NXLoadFilesDialog.java 
    824 * 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXconvert.java

    r1504 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * NXconvert.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXproperties.java

    r1494 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * NXproperties.java 
     24 * 
    425 */ 
    526 
     
    1536/** 
    1637 * 
    17  * @author ser65 
     38 * @author Stephen Rankin 
    1839 */ 
    1940public class NXproperties { 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXschematron.java

    r1496 r1507  
    1 /** 
    2  *  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * NXschematron.java 
     24 * 
    325 */ 
    426package org.nexusformat.nxvalidate; 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXvalidate.java

    r1499 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * NXvalidate.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXvalidateBasicGui.java

    r1498 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * NXvalidateBasicGui.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXvalidateFrame.form

    r1505 r1507  
    8888                <Property name="text" type="java.lang.String" value="Filter Good Values"/> 
    8989              </Properties> 
     90              <Events> 
     91                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="filterMenuItemActionPerformed"/> 
     92              </Events> 
    9093            </MenuItem> 
    9194            <MenuItem class="javax.swing.JPopupMenu$Separator" name="jSeparator1"> 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXvalidateFrame.java

    r1505 r1507  
    264264        filterMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, java.awt.event.InputEvent.CTRL_MASK)); 
    265265        filterMenuItem.setText("Filter Good Values"); 
     266        filterMenuItem.addActionListener(new java.awt.event.ActionListener() { 
     267            public void actionPerformed(java.awt.event.ActionEvent evt) { 
     268                filterMenuItemActionPerformed(evt); 
     269            } 
     270        }); 
    266271        toolsMenu.add(filterMenuItem); 
    267272        toolsMenu.add(jSeparator1); 
     
    355360 
    356361        if (evt.getSource() == openFilesMenuItem) { 
    357  
    358362            if (!foundNXconvert) { 
    359363                displayErrorMessage( 
     
    422426            //been done, i.e. the files and documents already exist for the 
    423427            //current selected tree. 
    424             if (treeUtils.getNXDCFile(jTree1) != null) { 
    425                 nxdlFile = treeUtils.getNXDCFile(jTree1); 
     428            if (treeUtils.getNXDLFile(jTree1) != null) { 
     429                nxdlFile = treeUtils.getNXDLFile(jTree1); 
    426430            } 
    427431 
     
    496500            if (node != null) { 
    497501                if (!node.isRoot()) { 
    498                     root.removeNode(node); 
     502                    root.remove(node); 
    499503                    domTree.removeNodeFromParent((MutableTreeNode) node); 
    500504                    domTree.updateTree(); 
     
    542546 
    543547    }//GEN-LAST:event_bulkMenuItemActionPerformed 
     548 
     549    private void filterMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_filterMenuItemActionPerformed 
     550 
     551        if (evt.getSource() == filterMenuItem) { 
     552 
     553            treeUtils.hideGoodNodes(jTree1); 
     554 
     555        } 
     556 
     557    }//GEN-LAST:event_filterMenuItemActionPerformed 
    544558 
    545559    /** 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXvalidateGuiTree.java

    r1494 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * NXvalidateGuiTree.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NodeFilterInterface.java

    r1498 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * NodeFilterInterface.java 
     24 * 
     25 */ 
     26 
    127package org.nexusformat.nxvalidate; 
    228 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/OSValidator.java

    r1499 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * OSValidator.java 
     24 * 
    425 */ 
    526 
     
    829/** 
    930 * 
    10  * @author ser 
     31 * @author Stephen Rankin 
    1132 */ 
    1233public class OSValidator{ 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/PopupListener.java

    r1503 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * PopupListener.java 
     24 * 
    425 */ 
    526package org.nexusformat.nxvalidate; 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/Report.java

    r1498 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * Report.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/SVRLNodeFilter.java

    r1498 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * SVRLNodeFilter.java 
     24 * 
    425 */ 
    526package org.nexusformat.nxvalidate; 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/SVRLitem.java

    r1498 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * SVRLitem.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/StreamGobbler.java

    r1367 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * StreamGobbler.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/TextPaneStyle.java

    r1504 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * TextPaneStyle.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/TreeUtils.java

    r1504 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * TextPaneStyle.java 
     24 * 
    425 */ 
    526package org.nexusformat.nxvalidate; 
     
    1637public class TreeUtils { 
    1738 
     39    public void hideGoodNodes(JTree tree){ 
     40 
     41        if (tree.isSelectionEmpty()) { 
     42            return; 
     43        } 
     44 
     45        NXNodeMapper baseNode = getBaseNode(tree); 
     46        NXNodeMapper node = null; 
     47         
     48        int rows = tree.getRowCount(); 
     49 
     50        for (int i = 0; i < rows; ++i) { 
     51            node = (NXNodeMapper) tree.getPathForRow(i).getLastPathComponent(); 
     52            System.out.println("Node Name: " + node.toString() + ": " + node.getBadNode()); 
     53        } 
     54 
     55    } 
     56 
     57    public void showGoodNodes(JTree tree){ 
     58 
     59        if (tree.isSelectionEmpty()) { 
     60            return; 
     61        } 
     62 
     63        NXNodeMapper baseNode = getBaseNode(tree); 
     64        NXNodeMapper node = null; 
     65 
     66        int rows = tree.getRowCount(); 
     67 
     68        for (int i = 0; i < rows; ++i) { 
     69            node = (NXNodeMapper) tree.getPathForRow(i).getLastPathComponent(); 
     70            System.out.println("Node Name: " + node.toString()); 
     71        } 
     72 
     73    } 
     74 
    1875    public String getTreePath(JTree tree) { 
    1976 
     
    49106    } 
    50107 
    51     public File getNXDCFile(JTree tree) { 
     108    public File getNXDLFile(JTree tree) { 
    52109        if (getNode(tree) != null) { 
    53110            return getNode(tree).getSchematronFile(); 
     
    89146    } 
    90147 
    91     public void setNXDCFile(JTree tree, File file) { 
     148    public void setNXDLFile(JTree tree, File file) { 
    92149        if (getNode(tree) != null) { 
    93150            getNode(tree).setSchematronFile(file); 
     
    142199        return tmpNode; 
    143200    } 
     201 
    144202} 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/UserSettings.java

    r1501 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * UserSettings.java 
     24 * 
    425 */ 
    526 
     
    2849    private boolean foundNXconvert = false; 
    2950 
     51     
    3052    public UserSettings(){ 
    3153        props = new Properties(); 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/ValidatorUtils.java

    r1499 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * ValidatorUtils.java 
     24 * 
    425 */ 
    526package org.nexusformat.nxvalidate; 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/XMLIconTreeHandler.java

    r1498 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * XMLIconTreeHandler.java 
     24 * 
     25 */ 
     26 
    127package org.nexusformat.nxvalidate; 
    228 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/XMLTreeRenderer.java

    r1498 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * XMLTreeRenderer.java 
     24 * 
    425 */ 
    526package org.nexusformat.nxvalidate; 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/exceptions/NXConvertpyException.java

    r1494 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * XMLTreeRenderer.java 
     24 * 
    425 */ 
    526 
     
    829/** 
    930 * 
    10  * @author ser65 
     31 * @author Stephen Rankin 
    1132 */ 
    1233public class NXConvertpyException extends Exception { 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/filter/AllNeXusFilter.java

    r1494 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * AllNeXusFilter.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate.filter; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/filter/ExtensionFilter.java

    r1494 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * ExtensionFilter.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate.filter; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/filter/HdfFilter.java

    r1494 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * HdfFilter.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate.filter; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/filter/NXDLfilter.java

    r1494 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * NXDLfilter.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate.filter; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/filter/NeXusFilter.java

    r1494 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * NeXusFilter.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate.filter; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/filter/SchematronFilter.java

    r1494 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * SchematronFilter.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate.filter; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/filter/XmlFilter.java

    r1494 r1507  
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Nexus Team 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * XmlFilter.java 
     24 * 
     25 */ 
    126package org.nexusformat.nxvalidate.filter; 
    227 
  • trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/resources/XSLTResolver.java

    r1494 r1507  
    1 /* 
    2  * To change this template, choose Tools | Templates 
    3  * and open the template in the editor. 
     1/* NeXus - Neutron & X-ray Common Data Format 
     2 * 
     3 * NeXus file validation GUI tool. 
     4 * 
     5 * Copyright (C) 2010 Stephen Rankin 
     6 * 
     7 * This library is free software; you can redistribute it and/or 
     8 * modify it under the terms of the GNU Lesser General Public 
     9 * License as published by the Free Software Foundation; either 
     10 * version 2 of the License, or (at your option) any later version. 
     11 * 
     12 * This library is distributed in the hope that it will be useful, 
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15 * Lesser General Public License for more details. 
     16 * 
     17 * You should have received a copy of the GNU Lesser General Public 
     18 * License along with this library; if not, write to the Free Software 
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     20 * 
     21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 
     22 * 
     23 * XSLTResolver.java 
     24 * 
    425 */ 
    526package org.nexusformat.nxvalidate.resources; 
     
    728/** 
    829 * A copy from http://www.jezuk.co.uk/cgi-bin/view/jez?id=2260 
    9  * @author ser65 
     30 * @author Stephen Rankin 
    1031 */ 
    1132import java.net.URISyntaxException; 
Note: See TracChangeset for help on using the changeset viewer.