Changeset 1507
- Timestamp:
- 19/08/10 12:43:30 (18 months ago)
- Location:
- trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate
- Files:
-
- 43 edited
-
AbstractNXSnode.java (modified) (1 diff)
-
Attribute.java (modified) (1 diff)
-
BulkLoadFilesFrame.java (modified) (1 diff)
-
CheckNexusFileType.java (modified) (1 diff)
-
FileLoadingActions.java (modified) (3 diffs)
-
Logger.java (modified) (1 diff)
-
NXLoadFilesDialog.java (modified) (1 diff)
-
NXNodeMapper.java (modified) (8 diffs)
-
NXReducedToTree.java (modified) (8 diffs)
-
NXSettingsDialog.java (modified) (2 diffs)
-
NXSnode.java (modified) (1 diff)
-
NXTreeRenderer.java (modified) (2 diffs)
-
NXValidateDialog.java (modified) (1 diff)
-
NXconvert.java (modified) (1 diff)
-
NXproperties.java (modified) (2 diffs)
-
NXschematron.java (modified) (1 diff)
-
NXvalidate.java (modified) (1 diff)
-
NXvalidateBasicGui.java (modified) (1 diff)
-
NXvalidateFrame.form (modified) (1 diff)
-
NXvalidateFrame.java (modified) (5 diffs)
-
NXvalidateGuiTree.java (modified) (1 diff)
-
NodeFilterInterface.java (modified) (1 diff)
-
OSValidator.java (modified) (2 diffs)
-
PopupListener.java (modified) (1 diff)
-
Report.java (modified) (1 diff)
-
SVRLNodeFilter.java (modified) (1 diff)
-
SVRLitem.java (modified) (1 diff)
-
StreamGobbler.java (modified) (1 diff)
-
TextPaneStyle.java (modified) (1 diff)
-
TreeUtils.java (modified) (5 diffs)
-
UserSettings.java (modified) (2 diffs)
-
ValidatorUtils.java (modified) (1 diff)
-
XMLIconTreeHandler.java (modified) (1 diff)
-
XMLTreeRenderer.java (modified) (1 diff)
-
exceptions/NXConvertpyException.java (modified) (2 diffs)
-
filter/AllNeXusFilter.java (modified) (1 diff)
-
filter/ExtensionFilter.java (modified) (1 diff)
-
filter/HdfFilter.java (modified) (1 diff)
-
filter/NXDLfilter.java (modified) (1 diff)
-
filter/NeXusFilter.java (modified) (1 diff)
-
filter/SchematronFilter.java (modified) (1 diff)
-
filter/XmlFilter.java (modified) (1 diff)
-
resources/XSLTResolver.java (modified) (2 diffs)
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 */ 1 26 package org.nexusformat.nxvalidate; 2 27 -
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 */ 1 26 package org.nexusformat.nxvalidate; 2 27 -
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 * 7 23 * BulkLoadFilesFrame.java 8 24 * 9 25 * Created on 10-Aug-2010, 15:32:56 10 26 */ 27 11 28 package org.nexusformat.nxvalidate; 12 29 -
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 * 4 25 */ 5 26 package 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 * 4 25 */ 5 26 package org.nexusformat.nxvalidate; … … 65 86 66 87 treeUtils = new TreeUtils(); 67 68 88 } 69 89 … … 201 221 node.setReducedFile(reducedFile); 202 222 node.setRoot(root); 203 root.insert(node );223 root.insert(node,0); 204 224 //domTree.updateTree(); 205 225 -
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 */ 1 26 package org.nexusformat.nxvalidate; 2 27 -
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 * 7 23 * NXLoadFilesDialog.java 8 24 * -
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 * 4 25 */ 5 26 package org.nexusformat.nxvalidate; … … 12 33 import javax.swing.tree.TreeNode; 13 34 import org.w3c.dom.Document; 35 import org.w3c.dom.Element; 14 36 import org.w3c.dom.NamedNodeMap; 15 37 import org.w3c.dom.Node; … … 22 44 public class NXNodeMapper implements MutableTreeNode { 23 45 24 Node domNode = null;46 private Node domNode = null; 25 47 private String nodeName = null; 26 48 private boolean isRoot = false; … … 80 102 } 81 103 104 /** 105 * Check to see if this node is the root node. 106 * @return true is it is the root node, false otherwise. 107 */ 82 108 public boolean isRoot() { 83 109 return isRoot; 84 110 } 85 111 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 */ 86 118 public boolean isDocument() { 87 119 return isDocument; 88 120 } 89 121 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 */ 90 127 public void setDocument(boolean isDocument) { 91 128 this.isDocument = isDocument; 92 129 } 93 130 131 /** 132 * Set the root node that this node belongs to. 133 * @param the root node. 134 */ 94 135 public void setRoot(NXNodeMapper root) { 95 136 this.root = root; 96 137 } 97 138 98 public void insert(NXNodeMapper node) {139 /*public void insert(NXNodeMapper node) { 99 140 documents.add(node); 100 } 101 102 public void removeNode(NXNodeMapper node) { 103 if (!isRoot) { 104 documents.remove(node); 105 } 106 } 141 }*/ 107 142 108 143 public File getNXSFile() { … … 156 191 public boolean getBadNode() { 157 192 return badNode; 193 } 194 195 public Node getDomNode() { 196 return domNode; 158 197 } 159 198 … … 272 311 273 312 } 313 274 314 return childCount; 275 315 … … 413 453 414 454 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 } 419 468 } 420 469 } … … 425 474 documents.remove(index); 426 475 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 427 486 } 428 487 } 429 488 430 489 public void remove(MutableTreeNode node) { 431 if (isRoot) { 432 490 491 NXNodeMapper childNode = (NXNodeMapper) node; 492 493 if (isRoot) { 433 494 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 } 435 503 } 436 504 } 437 505 438 506 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); 441 512 } 442 513 } -
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 */ 5 26 package org.nexusformat.nxvalidate; 6 27 28 import java.util.ArrayList; 7 29 import java.util.Enumeration; 8 import java.util.HashMap;9 import java.util.Vector;10 30 import javax.swing.event.TreeModelEvent; 11 31 import javax.swing.event.TreeModelListener; … … 13 33 import javax.swing.tree.DefaultTreeModel; 14 34 import javax.swing.tree.TreeNode; 15 import org.nexusformat.nxvalidate.exceptions.NXConvertpyException;16 import org.w3c.dom.Document;17 35 18 36 /** … … 23 41 public class NXReducedToTree extends DefaultTreeModel { 24 42 25 private Vector listenerList = new Vector(); 43 private ArrayList<TreeModelListener> listenerList = 44 new ArrayList<TreeModelListener>(); 26 45 private NXNodeMapper root = null; 27 46 … … 38 57 } 39 58 40 // Basic TreeModel operations59 @Override 41 60 public Object getRoot() { 42 61 … … 45 64 } 46 65 66 @Override 47 67 public boolean isLeaf(Object aNode) { 48 68 … … 58 78 } 59 79 80 @Override 60 81 public int getChildCount(Object parent) { 61 82 … … 91 112 92 113 if ((listener != null) && !listenerList.contains(listener)) { 93 listenerList.add Element(listener);114 listenerList.add(listener); 94 115 } 95 116 … … 100 121 101 122 if (listener != null) { 102 listenerList.remove Element(listener);123 listenerList.remove(listener); 103 124 } 104 125 105 126 } 106 127 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 } 118 131 119 Enumeration listeners = listenerList.elements(); 132 public void fireTreeNodesInserted(TreeModelEvent ev) { 133 events(ev); 134 } 120 135 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) { 122 147 TreeModelListener listener = 123 (TreeModelListener) listener s.nextElement();124 listener.treeNodesChanged(e );148 (TreeModelListener) listenerList.get(i); 149 listener.treeNodesChanged(ev); 125 150 } 126 127 151 128 152 } 129 153 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 }168 154 } -
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 * 7 23 * NXLoadFilesDialog.java 8 24 * … … 16 32 /** 17 33 * 18 * @author ser6534 * @author Stephen Rankin 19 35 */ 20 36 public 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 */ 1 26 package org.nexusformat.nxvalidate; 2 27 -
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 * 4 25 */ 5 26 package org.nexusformat.nxvalidate; … … 13 34 /** 14 35 * 15 * @author steve36 * @author Stephen rankin 16 37 */ 17 38 public 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 * 7 23 * NXLoadFilesDialog.java 8 24 * -
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 */ 1 26 package org.nexusformat.nxvalidate; 2 27 -
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 * 4 25 */ 5 26 … … 15 36 /** 16 37 * 17 * @author ser6538 * @author Stephen Rankin 18 39 */ 19 40 public 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 * 3 25 */ 4 26 package 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 */ 1 26 package org.nexusformat.nxvalidate; 2 27 -
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 */ 1 26 package org.nexusformat.nxvalidate; 2 27 -
trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXvalidateFrame.form
r1505 r1507 88 88 <Property name="text" type="java.lang.String" value="Filter Good Values"/> 89 89 </Properties> 90 <Events> 91 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="filterMenuItemActionPerformed"/> 92 </Events> 90 93 </MenuItem> 91 94 <MenuItem class="javax.swing.JPopupMenu$Separator" name="jSeparator1"> -
trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/NXvalidateFrame.java
r1505 r1507 264 264 filterMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, java.awt.event.InputEvent.CTRL_MASK)); 265 265 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 }); 266 271 toolsMenu.add(filterMenuItem); 267 272 toolsMenu.add(jSeparator1); … … 355 360 356 361 if (evt.getSource() == openFilesMenuItem) { 357 358 362 if (!foundNXconvert) { 359 363 displayErrorMessage( … … 422 426 //been done, i.e. the files and documents already exist for the 423 427 //current selected tree. 424 if (treeUtils.getNXD CFile(jTree1) != null) {425 nxdlFile = treeUtils.getNXD CFile(jTree1);428 if (treeUtils.getNXDLFile(jTree1) != null) { 429 nxdlFile = treeUtils.getNXDLFile(jTree1); 426 430 } 427 431 … … 496 500 if (node != null) { 497 501 if (!node.isRoot()) { 498 root.remove Node(node);502 root.remove(node); 499 503 domTree.removeNodeFromParent((MutableTreeNode) node); 500 504 domTree.updateTree(); … … 542 546 543 547 }//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 544 558 545 559 /** -
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 */ 1 26 package org.nexusformat.nxvalidate; 2 27 -
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 1 27 package org.nexusformat.nxvalidate; 2 28 -
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 * 4 25 */ 5 26 … … 8 29 /** 9 30 * 10 * @author ser31 * @author Stephen Rankin 11 32 */ 12 33 public 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 * 4 25 */ 5 26 package 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 */ 1 26 package org.nexusformat.nxvalidate; 2 27 -
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 * 4 25 */ 5 26 package 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 */ 1 26 package org.nexusformat.nxvalidate; 2 27 -
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 */ 1 26 package org.nexusformat.nxvalidate; 2 27 -
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 */ 1 26 package org.nexusformat.nxvalidate; 2 27 -
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 * 4 25 */ 5 26 package org.nexusformat.nxvalidate; … … 16 37 public class TreeUtils { 17 38 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 18 75 public String getTreePath(JTree tree) { 19 76 … … 49 106 } 50 107 51 public File getNXD CFile(JTree tree) {108 public File getNXDLFile(JTree tree) { 52 109 if (getNode(tree) != null) { 53 110 return getNode(tree).getSchematronFile(); … … 89 146 } 90 147 91 public void setNXD CFile(JTree tree, File file) {148 public void setNXDLFile(JTree tree, File file) { 92 149 if (getNode(tree) != null) { 93 150 getNode(tree).setSchematronFile(file); … … 142 199 return tmpNode; 143 200 } 201 144 202 } -
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 * 4 25 */ 5 26 … … 28 49 private boolean foundNXconvert = false; 29 50 51 30 52 public UserSettings(){ 31 53 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 * 4 25 */ 5 26 package 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 1 27 package org.nexusformat.nxvalidate; 2 28 -
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 * 4 25 */ 5 26 package 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 * 4 25 */ 5 26 … … 8 29 /** 9 30 * 10 * @author ser6531 * @author Stephen Rankin 11 32 */ 12 33 public 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 */ 1 26 package org.nexusformat.nxvalidate.filter; 2 27 -
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 */ 1 26 package org.nexusformat.nxvalidate.filter; 2 27 -
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 */ 1 26 package org.nexusformat.nxvalidate.filter; 2 27 -
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 */ 1 26 package org.nexusformat.nxvalidate.filter; 2 27 -
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 */ 1 26 package org.nexusformat.nxvalidate.filter; 2 27 -
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 */ 1 26 package org.nexusformat.nxvalidate.filter; 2 27 -
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 */ 1 26 package org.nexusformat.nxvalidate.filter; 2 27 -
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 * 4 25 */ 5 26 package org.nexusformat.nxvalidate.resources; … … 7 28 /** 8 29 * A copy from http://www.jezuk.co.uk/cgi-bin/view/jez?id=2260 9 * @author ser6530 * @author Stephen Rankin 10 31 */ 11 32 import java.net.URISyntaxException;
Note: See TracChangeset
for help on using the changeset viewer.
