You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rd...@apache.org on 2004/02/21 18:32:39 UTC
cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read MappingAction.java SimpleTypeBindAction.java
rdonkin 2004/02/21 09:32:39
Modified: betwixt/src/java/org/apache/commons/betwixt/io/read Tag:
REFACTORING-BRANCH_2004-01-13 MappingAction.java
SimpleTypeBindAction.java
Log:
Made simple type actions ignore sub graph.
Revision Changes Path
No revision
No revision
1.1.2.4 +28 -6 jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/Attic/MappingAction.java
Index: MappingAction.java
===================================================================
RCS file: /home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/Attic/MappingAction.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- MappingAction.java 21 Feb 2004 17:20:06 -0000 1.1.2.3
+++ MappingAction.java 21 Feb 2004 17:32:39 -0000 1.1.2.4
@@ -117,6 +117,28 @@
public static final MappingAction EMPTY = new MappingAction.Base();
+ public static final MappingAction IGNORE = new MappingAction.Ignore();
+
+ private static final class Ignore extends MappingAction {
+
+ public MappingAction next(String namespace, String name, Attributes attributes, ReadContext context) throws Exception {
+ return this;
+ }
+
+ public MappingAction begin(String namespace, String name, Attributes attributes, ReadContext context) throws Exception {
+ return this;
+ }
+
+ public void body(String text, ReadContext context) throws Exception {
+ // do nothing
+ }
+
+ public void end(ReadContext context) throws Exception {
+ // do nothing
+ }
+
+ }
+
/**
* Basic action.
*
1.1.2.5 +17 -5 jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/Attic/SimpleTypeBindAction.java
Index: SimpleTypeBindAction.java
===================================================================
RCS file: /home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/Attic/SimpleTypeBindAction.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- SimpleTypeBindAction.java 21 Feb 2004 16:58:58 -0000 1.1.2.4
+++ SimpleTypeBindAction.java 21 Feb 2004 17:32:39 -0000 1.1.2.5
@@ -63,6 +63,7 @@
import org.apache.commons.betwixt.ElementDescriptor;
import org.apache.commons.betwixt.expression.Updater;
+import org.xml.sax.Attributes;
/**
* Action binds a simple type.
@@ -73,6 +74,8 @@
public static final SimpleTypeBindAction INSTANCE = new SimpleTypeBindAction();
+
+
public void body(String text, ReadContext context) throws Exception {
// add dyna-bean support!
// probably refactoring needed
@@ -95,6 +98,15 @@
result = elementDescriptor.getUpdater();
}
return result;
+ }
+
+ public MappingAction next(
+ String namespace,
+ String name,
+ Attributes attributes,
+ ReadContext context)
+ throws Exception {
+ return MappingAction.IGNORE;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org