[jboss-cvs] JBossAS SVN: r111547 - branches/snmp4j-int/varia/src/resources/services/snmp/deploy.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 7 15:18:19 EDT 2011


Author: thauser at redhat.com
Date: 2011-06-07 15:18:19 -0400 (Tue, 07 Jun 2011)
New Revision: 111547

Removed:
   branches/snmp4j-int/varia/src/resources/services/snmp/deploy/validator.class
   branches/snmp4j-int/varia/src/resources/services/snmp/deploy/validator.java
Log:
removal of mistakenly committed classes

Deleted: branches/snmp4j-int/varia/src/resources/services/snmp/deploy/validator.class
===================================================================
(Binary files differ)

Deleted: branches/snmp4j-int/varia/src/resources/services/snmp/deploy/validator.java
===================================================================
--- branches/snmp4j-int/varia/src/resources/services/snmp/deploy/validator.java	2011-06-07 19:17:14 UTC (rev 111546)
+++ branches/snmp4j-int/varia/src/resources/services/snmp/deploy/validator.java	2011-06-07 19:18:19 UTC (rev 111547)
@@ -1,41 +0,0 @@
-import java.io.File;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.validation.Validator;
-import javax.xml.XMLConstants;
-import org.w3c.dom.Document;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-// ...
-// Exception handling is not shown.
-// The ErrorHandler implementation which could just do System.err dumps is not shown.
-public class validator {
-
-public static void main(String [] args) throws Exception {
-// build an XSD-aware SchemaFactory
-SchemaFactory schemaFactory = SchemaFactory.newInstance( XMLConstants.W3C_XML_SCHEMA_NS_URI );
-
-// hook up org.xml.sax.ErrorHandler implementation.
-//schemaFactory.setErrorHandler( myErrorHandler );
-
-// get the custom xsd schema describing the required format for my XML files.
-Schema schemaXSD = schemaFactory.newSchema( new File (args[0] ) );
-
-// Create a Validator capable of validating XML files according to my custom schema.
-Validator validator = schemaXSD.newValidator();
-
-// Get a parser capable of parsing vanilla XML into a DOM tree
-DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
-
-// parse the XML purely as XML and get a DOM tree represenation.
-Document document = parser.parse( new File( args[1] ) );
-
-// parse the XML DOM tree againts the stricter XSD schema
-validator.validate( new DOMSource( document ) );
-System.out.println("Valid.");
-}
-}



More information about the jboss-cvs-commits mailing list