[Smax-commit] SF.net SVN: smax: [23] trunk/smax
Status: Alpha
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2008-01-19 05:59:09
|
Revision: 23
http://smax.svn.sourceforge.net/smax/?rev=23&view=rev
Author: dbrosius
Date: 2008-01-18 21:59:06 -0800 (Fri, 18 Jan 2008)
Log Message:
-----------
Initial checkin of skeleton
Added Paths:
-----------
trunk/smax/src/
trunk/smax/src/com/
trunk/smax/src/com/mebigfatguy/
trunk/smax/src/com/mebigfatguy/smax/
trunk/smax/src/com/mebigfatguy/smax/SmaxParser.java
trunk/smax/src/com/mebigfatguy/smax/SmaxParserFactory.java
trunk/smax/src/javax/
trunk/smax/src/javax/xml/
trunk/smax/src/javax/xml/parsers/
trunk/smax/src/javax/xml/parsers/smax/
trunk/smax/src/javax/xml/parsers/smax/SMAXParserFactory.java
trunk/smax/src/org/
trunk/smax/src/org/xml/
trunk/smax/src/org/xml/smax/
trunk/smax/src/org/xml/smax/ContentHandler.java
trunk/smax/src/org/xml/smax/DefaultHandler.java
trunk/smax/src/org/xml/smax/InputSource.java
trunk/smax/src/org/xml/smax/SMAXException.java
trunk/smax/src/org/xml/smax/SMAXParser.java
Added: trunk/smax/src/com/mebigfatguy/smax/SmaxParser.java
===================================================================
--- trunk/smax/src/com/mebigfatguy/smax/SmaxParser.java (rev 0)
+++ trunk/smax/src/com/mebigfatguy/smax/SmaxParser.java 2008-01-19 05:59:06 UTC (rev 23)
@@ -0,0 +1,35 @@
+/*
+ * smax - The Simple Mutated API for XML
+ * Copyright (C) 2008 Dave Brosius
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package com.mebigfatguy.smax;
+
+import java.io.IOException;
+
+import org.xml.smax.ContentHandler;
+import org.xml.smax.InputSource;
+import org.xml.smax.SMAXException;
+import org.xml.smax.SMAXParser;
+
+public class SmaxParser implements SMAXParser {
+
+ public void setContentHandler(ContentHandler handler) {
+ }
+
+ public void parse(InputSource input) throws IOException, IllegalArgumentException, SMAXException {
+ }
+}
Added: trunk/smax/src/com/mebigfatguy/smax/SmaxParserFactory.java
===================================================================
--- trunk/smax/src/com/mebigfatguy/smax/SmaxParserFactory.java (rev 0)
+++ trunk/smax/src/com/mebigfatguy/smax/SmaxParserFactory.java 2008-01-19 05:59:06 UTC (rev 23)
@@ -0,0 +1,32 @@
+/*
+ * smax - The Simple Mutated API for XML
+ * Copyright (C) 2008 Dave Brosius
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package com.mebigfatguy.smax;
+
+import javax.xml.parsers.smax.SMAXParserFactory;
+
+import org.xml.smax.SMAXParser;
+
+public class SmaxParserFactory extends SMAXParserFactory {
+
+ @Override
+ public SMAXParser newSMAXParser() {
+ return null;
+ }
+
+}
Added: trunk/smax/src/javax/xml/parsers/smax/SMAXParserFactory.java
===================================================================
--- trunk/smax/src/javax/xml/parsers/smax/SMAXParserFactory.java (rev 0)
+++ trunk/smax/src/javax/xml/parsers/smax/SMAXParserFactory.java 2008-01-19 05:59:06 UTC (rev 23)
@@ -0,0 +1,48 @@
+/*
+ * smax - The Simple Mutated API for XML
+ * Copyright (C) 2008 Dave Brosius
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package javax.xml.parsers.smax;
+
+import javax.xml.parsers.FactoryConfigurationError;
+
+import org.xml.smax.SMAXParser;
+
+import com.mebigfatguy.smax.SmaxParserFactory;
+
+public abstract class SMAXParserFactory {
+ public static final String FACTORY_PROPERTY = "javax.xml.parsers.SMAXParserFactory";
+
+ public static SMAXParserFactory newInstance() throws FactoryConfigurationError {
+ try
+ {
+ String factoryClsName = System.getProperty(FACTORY_PROPERTY);
+ if (factoryClsName != null) {
+ Class<?> cls = Class.forName(factoryClsName);
+ return (SMAXParserFactory)cls.newInstance();
+ }
+ return new SmaxParserFactory();
+ }
+ catch (Exception e) {
+ FactoryConfigurationError fce = new FactoryConfigurationError("Failed initializing SMAXParserFactory");
+ fce.initCause(e);
+ throw fce;
+ }
+ }
+
+ public abstract SMAXParser newSMAXParser();
+}
Added: trunk/smax/src/org/xml/smax/ContentHandler.java
===================================================================
--- trunk/smax/src/org/xml/smax/ContentHandler.java (rev 0)
+++ trunk/smax/src/org/xml/smax/ContentHandler.java 2008-01-19 05:59:06 UTC (rev 23)
@@ -0,0 +1,35 @@
+/*
+ * smax - The Simple Mutated API for XML
+ * Copyright (C) 2008 Dave Brosius
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package org.xml.smax;
+
+public interface ContentHandler {
+ public enum NextParserAction { ProcessChildren, ProcessChildElements, ProcessChildTextNodes, ProcessAttributes, SkipChildElements, SkipChildTextNodes, SkipAttributes, SkipChildren, Terminate };
+
+ NextParserAction startDocument();
+
+ void endDocument();
+
+ NextParserAction startElement(String uri, String localName, String qName);
+
+ void endElement(String uri, String localName, String qName);
+
+ void attribute(String uri, String localName, String qName, String value);
+
+ void textNode(String text);
+}
Added: trunk/smax/src/org/xml/smax/DefaultHandler.java
===================================================================
--- trunk/smax/src/org/xml/smax/DefaultHandler.java (rev 0)
+++ trunk/smax/src/org/xml/smax/DefaultHandler.java 2008-01-19 05:59:06 UTC (rev 23)
@@ -0,0 +1,42 @@
+/*
+ * smax - The Simple Mutated API for XML
+ * Copyright (C) 2008 Dave Brosius
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package org.xml.smax;
+
+public class DefaultHandler implements ContentHandler {
+
+ public NextParserAction startDocument() {
+ return NextParserAction.ProcessChildren;
+ }
+
+ public void endDocument() {
+ }
+
+ public NextParserAction startElement(String uri, String localName, String name) {
+ return NextParserAction.ProcessChildren;
+ }
+
+ public void endElement(String uri, String localName, String name) {
+ }
+
+ public void attribute(String uri, String localName, String qName, String value) {
+ }
+
+ public void textNode(String text) {
+ }
+}
Added: trunk/smax/src/org/xml/smax/InputSource.java
===================================================================
--- trunk/smax/src/org/xml/smax/InputSource.java (rev 0)
+++ trunk/smax/src/org/xml/smax/InputSource.java 2008-01-19 05:59:06 UTC (rev 23)
@@ -0,0 +1,23 @@
+/*
+ * smax - The Simple Mutated API for XML
+ * Copyright (C) 2008 Dave Brosius
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package org.xml.smax;
+
+public class InputSource {
+
+}
Added: trunk/smax/src/org/xml/smax/SMAXException.java
===================================================================
--- trunk/smax/src/org/xml/smax/SMAXException.java (rev 0)
+++ trunk/smax/src/org/xml/smax/SMAXException.java 2008-01-19 05:59:06 UTC (rev 23)
@@ -0,0 +1,36 @@
+/*
+ * smax - The Simple Mutated API for XML
+ * Copyright (C) 2008 Dave Brosius
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package org.xml.smax;
+
+public class SMAXException extends Exception {
+
+ private static final long serialVersionUID = -6902556051191638977L;
+
+ public SMAXException() {
+ super();
+ }
+
+ public SMAXException(String message) {
+ super(message);
+ }
+
+ public SMAXException(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
Added: trunk/smax/src/org/xml/smax/SMAXParser.java
===================================================================
--- trunk/smax/src/org/xml/smax/SMAXParser.java (rev 0)
+++ trunk/smax/src/org/xml/smax/SMAXParser.java 2008-01-19 05:59:06 UTC (rev 23)
@@ -0,0 +1,28 @@
+/*
+ * smax - The Simple Mutated API for XML
+ * Copyright (C) 2008 Dave Brosius
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package org.xml.smax;
+
+import java.io.IOException;
+
+
+public interface SMAXParser {
+ void setContentHandler(ContentHandler handler);
+
+ void parse(InputSource input) throws IOException, IllegalArgumentException, SMAXException;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|