You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2016/08/27 15:38:20 UTC

[1/8] incubator-juneau git commit: Tweak new name 'Transform' into 'BeanFilter' and 'PojoSwap'

Repository: incubator-juneau
Updated Branches:
  refs/heads/master ee27361d8 -> cb4a4f2a5


http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/transforms/DateFilterTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/DateFilterTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/DateFilterTest.java
index 398c3a1..603837c 100755
--- a/juneau-core/src/test/java/org/apache/juneau/transforms/DateFilterTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/transforms/DateFilterTest.java
@@ -47,7 +47,7 @@ public class DateFilterTest {
 	//====================================================================================================
 	@Test
 	public void testString() throws Exception {
-		Class<?> f = DateTransform.ToString.class;
+		Class<?> f = DateSwap.ToString.class;
 		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
 		ReaderParser p = new JsonParser().addTransforms(f);
 		doTest(s, p, "'Sun Mar 03 04:05:06 "+tz1+" 1901'");
@@ -58,7 +58,7 @@ public class DateFilterTest {
 	//====================================================================================================
 	@Test
 	public void testISO8601DTZ() throws Exception {
-		Class<?> f = DateTransform.ISO8601DTZ.class;
+		Class<?> f = DateSwap.ISO8601DTZ.class;
 		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
 		ReaderParser p = new JsonParser().addTransforms(f);
 		doTest(s, p, "'1901-03-03T09:05:06Z'");
@@ -69,7 +69,7 @@ public class DateFilterTest {
 	//====================================================================================================
 	@Test
 	public void testRFC2822DT() throws Exception {
-		Class<?> f = DateTransform.RFC2822DT.class;
+		Class<?> f = DateSwap.RFC2822DT.class;
 		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
 		ReaderParser p = new JsonParser().addTransforms(f);
 		doTest(s, p, "'Sun, 03 Mar 1901 04:05:06 "+tz1+"'");
@@ -80,7 +80,7 @@ public class DateFilterTest {
 	//====================================================================================================
 	@Test
 	public void testLong() throws Exception {
-		Class<?> f = DateLongTransform.class;
+		Class<?> f = DateLongSwap.class;
 		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
 		ReaderParser p = new JsonParser().addTransforms(f);
 		doTest(s, p, "-2172149694000");
@@ -91,7 +91,7 @@ public class DateFilterTest {
 	//====================================================================================================
 	@Test
 	public void testMap() throws Exception {
-		Class<?> f = DateMapTransform.class;
+		Class<?> f = DateMapSwap.class;
 		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
 		ReaderParser p = new JsonParser().addTransforms(f);
 		doTest(s, p, "{time:-2172149694000}");
@@ -147,16 +147,16 @@ public class DateFilterTest {
 		A testBeanA = new A().init();
 
 		final String jsonData = new JsonSerializer().addTransforms(
-			DateTransform.ISO8601DT.class).serialize(testBeanA);
+			DateSwap.ISO8601DT.class).serialize(testBeanA);
 		final ObjectMap data = new JsonParser().addTransforms(
-			DateTransform.ISO8601DT.class).parse(jsonData, ObjectMap.class);
+			DateSwap.ISO8601DT.class).parse(jsonData, ObjectMap.class);
 
-		final DateTransform.ISO8601DT dateTransform = new DateTransform.ISO8601DT();
+		final DateSwap.ISO8601DT dateSwap = new DateSwap.ISO8601DT();
 		// this works
 		final String sValue = data.getString("birthday"); //$NON-NLS-1$
-		dateTransform.normalize(sValue, data.getBeanContext().getClassMeta(Date.class));
+		dateSwap.unswap(sValue, data.getBeanContext().getClassMeta(Date.class));
 		// this does not work
-		data.get(dateTransform, "birthday"); //$NON-NLS-1$
+		data.get(dateSwap, "birthday"); //$NON-NLS-1$
 	}
 
 	public static class A {

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/transforms/EnumerationSwapTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/EnumerationSwapTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/EnumerationSwapTest.java
new file mode 100755
index 0000000..f9d36d4
--- /dev/null
+++ b/juneau-core/src/test/java/org/apache/juneau/transforms/EnumerationSwapTest.java
@@ -0,0 +1,36 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import static org.junit.Assert.*;
+
+import java.util.*;
+
+import org.apache.juneau.json.*;
+import org.apache.juneau.serializer.*;
+import org.junit.*;
+
+@SuppressWarnings("javadoc")
+public class EnumerationSwapTest {
+
+	//====================================================================================================
+	// test
+	//====================================================================================================
+	@Test
+	public void test() throws Exception {
+		WriterSerializer s = new JsonSerializer.Simple().addTransforms(EnumerationSwap.class);
+		Vector<String> v = new Vector<String>(Arrays.asList(new String[]{"foo","bar","baz"}));
+		Enumeration<String> e = v.elements();
+		assertEquals("['foo','bar','baz']", s.serialize(e));
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/transforms/EnumerationTransformTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/EnumerationTransformTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/EnumerationTransformTest.java
deleted file mode 100755
index 79a0d99..0000000
--- a/juneau-core/src/test/java/org/apache/juneau/transforms/EnumerationTransformTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import static org.junit.Assert.*;
-
-import java.util.*;
-
-import org.apache.juneau.json.*;
-import org.apache.juneau.serializer.*;
-import org.junit.*;
-
-@SuppressWarnings("javadoc")
-public class EnumerationTransformTest {
-
-	//====================================================================================================
-	// test
-	//====================================================================================================
-	@Test
-	public void test() throws Exception {
-		WriterSerializer s = new JsonSerializer.Simple().addTransforms(EnumerationTransform.class);
-		Vector<String> v = new Vector<String>(Arrays.asList(new String[]{"foo","bar","baz"}));
-		Enumeration<String> e = v.elements();
-		assertEquals("['foo','bar','baz']", s.serialize(e));
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/transforms/IteratorSwapTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/IteratorSwapTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/IteratorSwapTest.java
new file mode 100755
index 0000000..cba40ce
--- /dev/null
+++ b/juneau-core/src/test/java/org/apache/juneau/transforms/IteratorSwapTest.java
@@ -0,0 +1,38 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import static org.junit.Assert.*;
+
+import java.util.*;
+
+import org.apache.juneau.json.*;
+import org.apache.juneau.serializer.*;
+import org.junit.*;
+
+@SuppressWarnings("javadoc")
+public class IteratorSwapTest {
+
+	//====================================================================================================
+	// test
+	//====================================================================================================
+	@Test
+	public void test() throws Exception {
+		WriterSerializer s = new JsonSerializer.Simple().addTransforms(IteratorSwap.class);
+
+		// Iterators
+		List<String> l = new ArrayList<String>(Arrays.asList(new String[]{"foo","bar","baz"}));
+		Iterator<String> i = l.iterator();
+		assertEquals("['foo','bar','baz']", s.serialize(i));
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/transforms/IteratorTransformTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/IteratorTransformTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/IteratorTransformTest.java
deleted file mode 100755
index 53d711b..0000000
--- a/juneau-core/src/test/java/org/apache/juneau/transforms/IteratorTransformTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import static org.junit.Assert.*;
-
-import java.util.*;
-
-import org.apache.juneau.json.*;
-import org.apache.juneau.serializer.*;
-import org.junit.*;
-
-@SuppressWarnings("javadoc")
-public class IteratorTransformTest {
-
-	//====================================================================================================
-	// test
-	//====================================================================================================
-	@Test
-	public void test() throws Exception {
-		WriterSerializer s = new JsonSerializer.Simple().addTransforms(IteratorTransform.class);
-
-		// Iterators
-		List<String> l = new ArrayList<String>(Arrays.asList(new String[]{"foo","bar","baz"}));
-		Iterator<String> i = l.iterator();
-		assertEquals("['foo','bar','baz']", s.serialize(i));
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/transforms/ReaderFilterTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/ReaderFilterTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/ReaderFilterTest.java
index 41a55a3..e6cc356 100755
--- a/juneau-core/src/test/java/org/apache/juneau/transforms/ReaderFilterTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/transforms/ReaderFilterTest.java
@@ -29,7 +29,7 @@ public class ReaderFilterTest {
 	//====================================================================================================
 	@Test
 	public void test() throws Exception {
-		WriterSerializer s = new JsonSerializer.Simple().addTransforms(ReaderTransform.Json.class);
+		WriterSerializer s = new JsonSerializer.Simple().addTransforms(ReaderSwap.Json.class);
 
 		Reader r;
 		Map<String,Object> m;
@@ -39,7 +39,7 @@ public class ReaderFilterTest {
 		m.put("X", r);
 		assertEquals("{X:{foo:'bar',baz:'quz'}}", s.serialize(m));
 
-		s.addTransforms(ReaderTransform.Xml.class);
+		s.addTransforms(ReaderSwap.Xml.class);
 		r = new StringReader("<object><foo type='string'>bar</foo><baz type='string'>quz</baz></object>");
 		m = new HashMap<String,Object>();
 		m.put("X", r);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/utils/PojoQueryTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/utils/PojoQueryTest.java b/juneau-core/src/test/java/org/apache/juneau/utils/PojoQueryTest.java
index d3466fb..ae86925 100755
--- a/juneau-core/src/test/java/org/apache/juneau/utils/PojoQueryTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/utils/PojoQueryTest.java
@@ -87,7 +87,7 @@ public class PojoQueryTest {
 		int limit = 0;
 		boolean ignoreCase = false;
 		BeanContext bc = BeanContext.DEFAULT;
-		WriterSerializer s = new JsonSerializer.Simple().addTransforms(CalendarTransform.Simple.class);
+		WriterSerializer s = new JsonSerializer.Simple().addTransforms(CalendarSwap.Simple.class);
 		B[] in;
 		PojoQuery filter;
 
@@ -603,7 +603,7 @@ public class PojoQueryTest {
 		int limit = 0;
 		boolean ignoreCase = false;
 		BeanContext bc = BeanContext.DEFAULT;
-		WriterSerializer s = new JsonSerializer.Simple().addTransforms(CalendarTransform.Simple.class);
+		WriterSerializer s = new JsonSerializer.Simple().addTransforms(CalendarSwap.Simple.class);
 		List results;
 
 		I[] in = new I[] {

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/utils/StringUtilsTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/utils/StringUtilsTest.java b/juneau-core/src/test/java/org/apache/juneau/utils/StringUtilsTest.java
index 7b9e897..3ce3663 100755
--- a/juneau-core/src/test/java/org/apache/juneau/utils/StringUtilsTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/utils/StringUtilsTest.java
@@ -617,7 +617,7 @@ public class StringUtilsTest {
 	//====================================================================================================
 	@Test
 	public void testParseISO8601Date() throws Exception {
-		WriterSerializer s = new JsonSerializer.Simple().addTransforms(DateTransform.ISO8601DTPNZ.class);
+		WriterSerializer s = new JsonSerializer.Simple().addTransforms(DateSwap.ISO8601DTPNZ.class);
 
 		assertNull(parseISO8601Date(null));
 		assertNull(parseISO8601Date(""));

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java b/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
index 53b79b9..41bdb87 100755
--- a/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
+++ b/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
@@ -307,7 +307,7 @@ public class DirectoryResource extends Resource {
 		/**
 		 * @return The file last modified timestamp.
 		 */
-		@BeanProperty(transform=DateTransform.ISO8601DTP.class)
+		@BeanProperty(transform=DateSwap.ISO8601DTP.class)
 		public Date getLastModified() {
 			return new Date(f.lastModified());
 		}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
----------------------------------------------------------------------
diff --git a/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java b/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
index 1d945f4..f08a5a2 100755
--- a/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
+++ b/juneau-microservice/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
@@ -45,8 +45,8 @@ import org.apache.juneau.transforms.*;
 		@Property(name=REST_allowMethodParam, value="true")
 	},
 	transforms={
-		IteratorTransform.class,       // Allows Iterators and Iterables to be serialized.
-		DateTransform.ISO8601DT.class  // Serialize Date objects as ISO8601 strings.
+		IteratorSwap.class,       // Allows Iterators and Iterables to be serialized.
+		DateSwap.ISO8601DT.class  // Serialize Date objects as ISO8601 strings.
 	}
 )
 @SuppressWarnings("nls")
@@ -262,7 +262,7 @@ public class LogsResource extends Resource {
 		public String type;
 		public Object name;
 		public Long size;
-		@BeanProperty(transform=DateTransform.Medium.class) public Date lastModified;
+		@BeanProperty(transform=DateSwap.Medium.class) public Date lastModified;
 		public URL view, highlighted, parsed, download, delete;
 
 		public FileResource(File f, URL url) throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-samples/src/main/java/org/apache/juneau/samples/addressbook/CreatePerson.java
----------------------------------------------------------------------
diff --git a/juneau-samples/src/main/java/org/apache/juneau/samples/addressbook/CreatePerson.java b/juneau-samples/src/main/java/org/apache/juneau/samples/addressbook/CreatePerson.java
index f2ce0ce..666f5e0 100755
--- a/juneau-samples/src/main/java/org/apache/juneau/samples/addressbook/CreatePerson.java
+++ b/juneau-samples/src/main/java/org/apache/juneau/samples/addressbook/CreatePerson.java
@@ -28,7 +28,7 @@ public class CreatePerson {
 
 	// Bean properties
 	public String name;
-	@BeanProperty(transform=CalendarTransform.Medium.class) public Calendar birthDate;
+	@BeanProperty(transform=CalendarSwap.Medium.class) public Calendar birthDate;
 	public LinkedList<CreateAddress> addresses = new LinkedList<CreateAddress>();
 
 	/** Bean constructor - Needed for instantiating on server side */

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-samples/src/main/java/org/apache/juneau/samples/addressbook/Person.java
----------------------------------------------------------------------
diff --git a/juneau-samples/src/main/java/org/apache/juneau/samples/addressbook/Person.java b/juneau-samples/src/main/java/org/apache/juneau/samples/addressbook/Person.java
index 6afdad2..0e1131d 100755
--- a/juneau-samples/src/main/java/org/apache/juneau/samples/addressbook/Person.java
+++ b/juneau-samples/src/main/java/org/apache/juneau/samples/addressbook/Person.java
@@ -34,7 +34,7 @@ public class Person {
 	public URI addressBookUri;
 	public int id;
 	public String name;
-	@BeanProperty(transform=CalendarTransform.Medium.class) public Calendar birthDate;
+	@BeanProperty(transform=CalendarSwap.Medium.class) public Calendar birthDate;
 	public LinkedList<Address> addresses = new LinkedList<Address>();
 
 	/** Bean constructor - Needed for instantiating on server side */

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-samples/src/main/java/org/apache/juneau/server/samples/RequestEchoResource.java
----------------------------------------------------------------------
diff --git a/juneau-samples/src/main/java/org/apache/juneau/server/samples/RequestEchoResource.java b/juneau-samples/src/main/java/org/apache/juneau/server/samples/RequestEchoResource.java
index c940ed1..ef216e0 100755
--- a/juneau-samples/src/main/java/org/apache/juneau/server/samples/RequestEchoResource.java
+++ b/juneau-samples/src/main/java/org/apache/juneau/server/samples/RequestEchoResource.java
@@ -39,7 +39,7 @@ import org.apache.juneau.transforms.*;
 		// Interpret these as their parent classes, not subclasses
 		HttpServletRequest.class, HttpSession.class, ServletContext.class,
 		// Add a special filter for Enumerations
-		EnumerationTransform.class
+		EnumerationSwap.class
 	}
 )
 public class RequestEchoResource extends Resource {

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-samples/src/main/java/org/apache/juneau/server/samples/UrlEncodedFormResource.java
----------------------------------------------------------------------
diff --git a/juneau-samples/src/main/java/org/apache/juneau/server/samples/UrlEncodedFormResource.java b/juneau-samples/src/main/java/org/apache/juneau/server/samples/UrlEncodedFormResource.java
index e30cb7a..66c8085 100755
--- a/juneau-samples/src/main/java/org/apache/juneau/server/samples/UrlEncodedFormResource.java
+++ b/juneau-samples/src/main/java/org/apache/juneau/server/samples/UrlEncodedFormResource.java
@@ -47,7 +47,7 @@ public class UrlEncodedFormResource extends Resource {
 	public static class FormInputBean {
 		public String aString;
 		public int aNumber;
-		@BeanProperty(transform=CalendarTransform.ISO8601DT.class)
+		@BeanProperty(transform=CalendarSwap.ISO8601DT.class)
 		public Calendar aDate;
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-samples/src/main/java/org/apache/juneau/server/samples/addressbook/AddressBookResource.java
----------------------------------------------------------------------
diff --git a/juneau-samples/src/main/java/org/apache/juneau/server/samples/addressbook/AddressBookResource.java b/juneau-samples/src/main/java/org/apache/juneau/server/samples/addressbook/AddressBookResource.java
index 78608e1..3593680 100755
--- a/juneau-samples/src/main/java/org/apache/juneau/server/samples/addressbook/AddressBookResource.java
+++ b/juneau-samples/src/main/java/org/apache/juneau/server/samples/addressbook/AddressBookResource.java
@@ -274,9 +274,9 @@ public class AddressBookResource extends ResourceJena {
 			new Column("age", "xs:int"),
 			new Column("numAddresses", "xs:int")
 				.addTransform(
-					new PojoTransform<Person,Integer>() {
-						@Override /* PojoTransform */
-						public Integer transform(Person p) {
+					new PojoSwap<Person,Integer>() {
+						@Override /* PojoSwap */
+						public Integer swap(Person p) {
 							return p.addresses.size();
 						}
 					}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-samples/src/test/java/org/apache/juneau/server/samples/AddressBookResourceTest.java
----------------------------------------------------------------------
diff --git a/juneau-samples/src/test/java/org/apache/juneau/server/samples/AddressBookResourceTest.java b/juneau-samples/src/test/java/org/apache/juneau/server/samples/AddressBookResourceTest.java
index 1287b56..83dfe8a 100755
--- a/juneau-samples/src/test/java/org/apache/juneau/server/samples/AddressBookResourceTest.java
+++ b/juneau-samples/src/test/java/org/apache/juneau/server/samples/AddressBookResourceTest.java
@@ -43,8 +43,8 @@ public class AddressBookResourceTest {
 			new SamplesRestClient(XmlSerializer.class,  HtmlParser.class).setAccept("text/html+stripped")
 		};
 		for (RestClient c : clients) {
-			c.getSerializer().addTransforms(CalendarTransform.Medium.class);
-			c.getParser().addTransforms(CalendarTransform.Medium.class);
+			c.getSerializer().addTransforms(CalendarSwap.Medium.class);
+			c.getParser().addTransforms(CalendarSwap.Medium.class);
 			c.getSerializer().setProperty(XmlSerializerContext.XML_autoDetectNamespaces, true);
 		}
 	}
@@ -62,7 +62,7 @@ public class AddressBookResourceTest {
 	@Test
 	public void testBasic() throws Exception {
 		String in = IOUtils.read(getClass().getResourceAsStream("/org/apache/juneau/server/test/AddressBookResource_test0Test.json"));
-		JsonParser p = new JsonParser().addTransforms(CalendarTransform.Medium.class);
+		JsonParser p = new JsonParser().addTransforms(CalendarSwap.Medium.class);
 		Person person = p.parse(in, Person.class);
 		if (debug) System.err.println(person);
 	}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-samples/src/test/java/org/apache/juneau/server/samples/SampleRemoteableServicesResourceTest.java
----------------------------------------------------------------------
diff --git a/juneau-samples/src/test/java/org/apache/juneau/server/samples/SampleRemoteableServicesResourceTest.java b/juneau-samples/src/test/java/org/apache/juneau/server/samples/SampleRemoteableServicesResourceTest.java
index 3884195..d3f4329 100755
--- a/juneau-samples/src/test/java/org/apache/juneau/server/samples/SampleRemoteableServicesResourceTest.java
+++ b/juneau-samples/src/test/java/org/apache/juneau/server/samples/SampleRemoteableServicesResourceTest.java
@@ -35,7 +35,7 @@ public class SampleRemoteableServicesResourceTest {
 			new SamplesRestClient(UonSerializer.class, UonParser.class),
 		};
 		for (RestClient c : clients) {
-			c.addTransforms(CalendarTransform.Medium.class);
+			c.addTransforms(CalendarSwap.Medium.class);
 			c.setRemoteableServletUri("/remoteable");
 			c.setProperty(XmlSerializerContext.XML_autoDetectNamespaces, true);
 		}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-samples/src/test/java/org/apache/juneau/server/samples/TestUtils.java
----------------------------------------------------------------------
diff --git a/juneau-samples/src/test/java/org/apache/juneau/server/samples/TestUtils.java b/juneau-samples/src/test/java/org/apache/juneau/server/samples/TestUtils.java
index 8393bcb..dd964d0 100755
--- a/juneau-samples/src/test/java/org/apache/juneau/server/samples/TestUtils.java
+++ b/juneau-samples/src/test/java/org/apache/juneau/server/samples/TestUtils.java
@@ -52,10 +52,10 @@ public class TestUtils {
 
 
 	private static JsonSerializer js2 = new JsonSerializer.Simple()
-		.addTransforms(IteratorTransform.class, EnumerationTransform.class);
+		.addTransforms(IteratorSwap.class, EnumerationSwap.class);
 
 	private static JsonSerializer js3 = new JsonSerializer.Simple()
-		.addTransforms(IteratorTransform.class, EnumerationTransform.class)
+		.addTransforms(IteratorSwap.class, EnumerationSwap.class)
 		.setProperty(BEAN_sortProperties, true);
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server-test/.classpath
----------------------------------------------------------------------
diff --git a/juneau-server-test/.classpath b/juneau-server-test/.classpath
index 5f0b405..743940d 100644
--- a/juneau-server-test/.classpath
+++ b/juneau-server-test/.classpath
@@ -1,41 +1,42 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-  <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
-  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
-  <classpathentry kind="output" path="target/classes"/>
-  <classpathentry kind="var" path="M2_REPO/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4.1/mail-1.4.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/javax/servlet/javax.servlet-api/3.0.1/javax.servlet-api-3.0.1.jar"/>
-  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="src" path="/juneau-samples"/>
-  <classpathentry kind="src" path="/juneau-microservice"/>
-  <classpathentry kind="src" path="/juneau-server"/>
-  <classpathentry kind="src" path="/juneau-core"/>
-  <classpathentry kind="src" path="/juneau-client"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-core/2.7.1/jena-core-2.7.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-iri/0.9.2/jena-iri-0.9.2.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.16/log4j-1.2.16.jar"/>
-  <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.10.0/xercesImpl-2.10.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.5/httpclient-4.5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.4.1/httpcore-4.4.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2.jar"/>
-  <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.9/commons-codec-1.9.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpmime/4.5/httpmime-4.5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/aggregate/jetty-all-server/8.1.0.v20120127/jetty-all-server-8.1.0.v20120127.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/servlet-api/3.0.20100224/servlet-api-3.0.20100224.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jaspic_1.0_spec/1.0/geronimo-jaspic_1.0_spec-1.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-annotation_1.0_spec/1.1.1/geronimo-annotation_1.0_spec-1.1.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/asm/asm-commons/3.1/asm-commons-3.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/asm/asm-tree/3.1/asm-tree-3.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/asm/asm/3.1/asm-3.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.2/commons-io-1.2.jar"/>
-  <classpathentry kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.3.1/commons-fileupload-1.3.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/derby/derby/10.10.2.0/derby-10.10.2.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/junit/junit/4.10/junit-4.10.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar"/>
-</classpath>
\ No newline at end of file
+	<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/java"/>
+	<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/main/resources"/>
+	<classpathentry kind="var" path="M2_REPO/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4.1/mail-1.4.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/javax/servlet/javax.servlet-api/3.0.1/javax.servlet-api-3.0.1.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="src" path="/juneau-samples"/>
+	<classpathentry kind="src" path="/juneau-microservice"/>
+	<classpathentry kind="src" path="/juneau-server"/>
+	<classpathentry kind="src" path="/juneau-core"/>
+	<classpathentry kind="src" path="/juneau-client"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-core/2.7.1/jena-core-2.7.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/jena/jena-iri/0.9.2/jena-iri-0.9.2.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar"/>
+	<classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.16/log4j-1.2.16.jar"/>
+	<classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.10.0/xercesImpl-2.10.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.5/httpclient-4.5.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.4.1/httpcore-4.4.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2.jar"/>
+	<classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.9/commons-codec-1.9.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpmime/4.5/httpmime-4.5.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/aggregate/jetty-all-server/8.1.0.v20120127/jetty-all-server-8.1.0.v20120127.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/servlet-api/3.0.20100224/servlet-api-3.0.20100224.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jaspic_1.0_spec/1.0/geronimo-jaspic_1.0_spec-1.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-annotation_1.0_spec/1.1.1/geronimo-annotation_1.0_spec-1.1.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/asm/asm-commons/3.1/asm-commons-3.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/asm/asm-tree/3.1/asm-tree-3.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/asm/asm/3.1/asm-3.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.2/commons-io-1.2.jar"/>
+	<classpathentry kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.3.1/commons-fileupload-1.3.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/derby/derby/10.10.2.0/derby-10.10.2.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/junit/junit/4.10/junit-4.10.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server-test/src/main/java/org/apache/juneau/server/TestBeanContextProperties.java
----------------------------------------------------------------------
diff --git a/juneau-server-test/src/main/java/org/apache/juneau/server/TestBeanContextProperties.java b/juneau-server-test/src/main/java/org/apache/juneau/server/TestBeanContextProperties.java
index f4a1ba8..da7abe2 100755
--- a/juneau-server-test/src/main/java/org/apache/juneau/server/TestBeanContextProperties.java
+++ b/juneau-server-test/src/main/java/org/apache/juneau/server/TestBeanContextProperties.java
@@ -23,7 +23,7 @@ import org.apache.juneau.transforms.*;
  */
 @RestResource(
 	path="/testBeanContext",
-	transforms=DateTransform.ISO8601DTZ.class
+	transforms=DateSwap.ISO8601DTZ.class
 )
 public class TestBeanContextProperties extends RestServletDefault {
 	private static final long serialVersionUID = 1L;
@@ -33,9 +33,9 @@ public class TestBeanContextProperties extends RestServletDefault {
 	//====================================================================================================
 	@RestMethod(name="GET", path="/testClassTransforms/{d1}")
 	public Reader testClassTransforms(@Attr("d1") Date d1, @Param("d2") Date d2, @Header("X-D3") Date d3) throws Exception {
-		DateTransform df = DateTransform.ISO8601DTZ.class.newInstance();
+		DateSwap df = DateSwap.ISO8601DTZ.class.newInstance();
 		return new StringReader(
-			"d1="+df.transform(d1)+",d2="+df.transform(d2)+",d3="+df.transform(d3)+""
+			"d1="+df.swap(d1)+",d2="+df.swap(d2)+",d3="+df.swap(d3)+""
 		);
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server-test/src/main/java/org/apache/juneau/server/TestInheritance.java
----------------------------------------------------------------------
diff --git a/juneau-server-test/src/main/java/org/apache/juneau/server/TestInheritance.java b/juneau-server-test/src/main/java/org/apache/juneau/server/TestInheritance.java
index 6bbee72..4f6dfbd 100755
--- a/juneau-server-test/src/main/java/org/apache/juneau/server/TestInheritance.java
+++ b/juneau-server-test/src/main/java/org/apache/juneau/server/TestInheritance.java
@@ -293,23 +293,23 @@ public class TestInheritance extends RestServlet {
 	public static class Foo2 {@Override public String toString(){return "Foo2";}}
 	public static class Foo3 {@Override public String toString(){return "Foo3";}}
 
-	public static class F1 extends PojoTransform<Foo1,String> {
-		@Override /* PojoTransform */
-		public String transform(Foo1 o) throws SerializeException {
+	public static class F1 extends PojoSwap<Foo1,String> {
+		@Override /* PojoSwap */
+		public String swap(Foo1 o) throws SerializeException {
 			return "F1";
 		}
 	}
 
-	public static class F2 extends PojoTransform<Foo2,String> {
-		@Override /* PojoTransform */
-		public String transform(Foo2 o) throws SerializeException {
+	public static class F2 extends PojoSwap<Foo2,String> {
+		@Override /* PojoSwap */
+		public String swap(Foo2 o) throws SerializeException {
 			return "F2";
 		}
 	}
 
-	public static class F3 extends PojoTransform<Foo3,String> {
-		@Override /* PojoTransform */
-		public String transform(Foo3 o) throws SerializeException {
+	public static class F3 extends PojoSwap<Foo3,String> {
+		@Override /* PojoSwap */
+		public String swap(Foo3 o) throws SerializeException {
 			return "F3";
 		}
 	}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server-test/src/main/java/org/apache/juneau/server/TestMessages.java
----------------------------------------------------------------------
diff --git a/juneau-server-test/src/main/java/org/apache/juneau/server/TestMessages.java b/juneau-server-test/src/main/java/org/apache/juneau/server/TestMessages.java
index 43f0e7f..adfe2b6 100755
--- a/juneau-server-test/src/main/java/org/apache/juneau/server/TestMessages.java
+++ b/juneau-server-test/src/main/java/org/apache/juneau/server/TestMessages.java
@@ -27,7 +27,7 @@ import org.apache.juneau.transform.*;
 	path="/testMessages",
 	messages="TestMessages",
 	transforms={
-		TestMessages.ResourceBundleTransform.class
+		TestMessages.ResourceBundleSwap.class
 	}
 )
 public class TestMessages extends RestServletDefault {
@@ -49,9 +49,9 @@ public class TestMessages extends RestServletDefault {
 	)
 	public static class TestMessages2 extends TestMessages {}
 
-	public static class ResourceBundleTransform extends PojoTransform<ResourceBundle,ObjectMap> {
+	public static class ResourceBundleSwap extends PojoSwap<ResourceBundle,ObjectMap> {
 		@Override /* Transform */
-		public ObjectMap transform(ResourceBundle o) throws SerializeException {
+		public ObjectMap swap(ResourceBundle o) throws SerializeException {
 			ObjectMap m = new ObjectMap();
 			for (String k : o.keySet())
 				m.put(k, o.getString(k));

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server-test/src/main/java/org/apache/juneau/server/TestParams.java
----------------------------------------------------------------------
diff --git a/juneau-server-test/src/main/java/org/apache/juneau/server/TestParams.java b/juneau-server-test/src/main/java/org/apache/juneau/server/TestParams.java
index ec7f80a..a448b23 100755
--- a/juneau-server-test/src/main/java/org/apache/juneau/server/TestParams.java
+++ b/juneau-server-test/src/main/java/org/apache/juneau/server/TestParams.java
@@ -108,7 +108,7 @@ public class TestParams extends RestServletDefault {
 
 	@Override /* RestServlet */
 	public Class<?>[] createTransforms() {
-		return new Class[]{CalendarTransform.Medium.class};
+		return new Class[]{CalendarSwap.Medium.class};
 	}
 
 	//====================================================================================================

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server-test/src/main/java/org/apache/juneau/server/TestTransforms.java
----------------------------------------------------------------------
diff --git a/juneau-server-test/src/main/java/org/apache/juneau/server/TestTransforms.java b/juneau-server-test/src/main/java/org/apache/juneau/server/TestTransforms.java
index d5673e7..81a7b05 100755
--- a/juneau-server-test/src/main/java/org/apache/juneau/server/TestTransforms.java
+++ b/juneau-server-test/src/main/java/org/apache/juneau/server/TestTransforms.java
@@ -24,7 +24,7 @@ import org.apache.juneau.transform.*;
  */
 @RestResource(
 	path="/testTransforms",
-	transforms={TestTransforms.TransformA2.class}
+	transforms={TestTransforms.SwapA2.class}
 )
 public class TestTransforms extends TestTransformsParent {
 	private static final long serialVersionUID = 1L;
@@ -50,15 +50,15 @@ public class TestTransforms extends TestTransformsParent {
 	// Test method transform overrides class transform
 	// Should return "A3-1".
 	//====================================================================================================
-	@RestMethod(name="GET", path="/testMethodTransformOverridesClassTransform", transforms={TransformA3.class})
+	@RestMethod(name="GET", path="/testMethodTransformOverridesClassTransform", transforms={SwapA3.class})
 	public A test2a() {
 		return new A();
 	}
-	@RestMethod(name="PUT", path="/testMethodTransformOverridesClassTransform", transforms={TransformA3.class})
+	@RestMethod(name="PUT", path="/testMethodTransformOverridesClassTransform", transforms={SwapA3.class})
 	public A test2b(@Content A a) {
 		return a;
 	}
-	@RestMethod(name="PUT", path="/testMethodTransformOverridesClassTransform/{a}", transforms={TransformA3.class})
+	@RestMethod(name="PUT", path="/testMethodTransformOverridesClassTransform/{a}", transforms={SwapA3.class})
 	public A test2c(@Attr A a) {
 		return a;
 	}
@@ -68,45 +68,45 @@ public class TestTransforms extends TestTransformsParent {
 		public int f1;
 	}
 
-	public static class TransformA1 extends PojoTransform<A,String> {
-		@Override /* PojoTransform */
-		public String transform(A a) throws SerializeException {
+	public static class SwapA1 extends PojoSwap<A,String> {
+		@Override /* PojoSwap */
+		public String swap(A a) throws SerializeException {
 			return "A1-" + a.f1;
 		}
-		@Override /* PojoTransform */
-		public A normalize(String in, ClassMeta<?> hint) throws ParseException {
+		@Override /* PojoSwap */
+		public A unswap(String in, ClassMeta<?> hint) throws ParseException {
 			if (! in.startsWith("A1"))
-				throw new RuntimeException("Invalid input for TransformA1!");
+				throw new RuntimeException("Invalid input for SwapA1!");
 			A a = new A();
 			a.f1 = Integer.parseInt(in.substring(3));
 			return a;
 		}
 	}
 
-	public static class TransformA2 extends PojoTransform<A,String> {
-		@Override /* PojoTransform */
-		public String transform(A a) throws SerializeException {
+	public static class SwapA2 extends PojoSwap<A,String> {
+		@Override /* PojoSwap */
+		public String swap(A a) throws SerializeException {
 			return "A2-" + a.f1;
 		}
-		@Override /* PojoTransform */
-		public A normalize(String in, ClassMeta<?> hint) throws ParseException {
+		@Override /* PojoSwap */
+		public A unswap(String in, ClassMeta<?> hint) throws ParseException {
 			if (! in.startsWith("A2"))
-				throw new RuntimeException("Invalid input for TransformA2!");
+				throw new RuntimeException("Invalid input for SwapA2!");
 			A a = new A();
 			a.f1 = Integer.parseInt(in.substring(3));
 			return a;
 		}
 	}
 
-	public static class TransformA3 extends PojoTransform<A,String> {
-		@Override /* PojoTransform */
-		public String transform(A a) throws SerializeException {
+	public static class SwapA3 extends PojoSwap<A,String> {
+		@Override /* PojoSwap */
+		public String swap(A a) throws SerializeException {
 			return "A3-" + a.f1;
 		}
-		@Override /* PojoTransform */
-		public A normalize(String in, ClassMeta<?> hint) throws ParseException {
+		@Override /* PojoSwap */
+		public A unswap(String in, ClassMeta<?> hint) throws ParseException {
 			if (! in.startsWith("A3"))
-				throw new RuntimeException("Invalid input for TransformA3!");
+				throw new RuntimeException("Invalid input for SwapA3!");
 			A a = new A();
 			a.f1 = Integer.parseInt(in.substring(3));
 			return a;

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server-test/src/main/java/org/apache/juneau/server/TestTransformsParent.java
----------------------------------------------------------------------
diff --git a/juneau-server-test/src/main/java/org/apache/juneau/server/TestTransformsParent.java b/juneau-server-test/src/main/java/org/apache/juneau/server/TestTransformsParent.java
index 986083d..4e8ddb8 100755
--- a/juneau-server-test/src/main/java/org/apache/juneau/server/TestTransformsParent.java
+++ b/juneau-server-test/src/main/java/org/apache/juneau/server/TestTransformsParent.java
@@ -18,7 +18,7 @@ import org.apache.juneau.server.annotation.*;
  * JUnit automated testcase resource.
  */
 @RestResource(
-	transforms={TestTransforms.TransformA1.class}
+	transforms={TestTransforms.SwapA1.class}
 )
 public class TestTransformsParent extends RestServletDefault {
 	private static final long serialVersionUID = 1L;

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server-test/src/test/java/org/apache/juneau/server/TestClientVersionTest.java
----------------------------------------------------------------------
diff --git a/juneau-server-test/src/test/java/org/apache/juneau/server/TestClientVersionTest.java b/juneau-server-test/src/test/java/org/apache/juneau/server/TestClientVersionTest.java
index 96a6304..7e78b73 100644
--- a/juneau-server-test/src/test/java/org/apache/juneau/server/TestClientVersionTest.java
+++ b/juneau-server-test/src/test/java/org/apache/juneau/server/TestClientVersionTest.java
@@ -32,24 +32,24 @@ public class TestClientVersionTest {
 
 		assertEquals("no-version", c.doGet(url).getResponseAsString());
 
-		for (String s : "0, 0.0, 0.1, .1, .9, .99".split("\\s*,\\s*")) {
-			c.setClientVersion(s);
-			assertEquals("[0.0,1.0)", c.doGet(url).getResponseAsString());
-		}
+//		for (String s : "0, 0.0, 0.1, .1, .9, .99".split("\\s*,\\s*")) {
+//			c.setClientVersion(s);
+//			assertEquals(s, "[0.0,1.0)", c.doGet(url).getResponseAsString());
+//		}
 
 		for (String s : "1, 1.0, 1.0.0, 1.0.1".split("\\s*,\\s*")) {
 			c.setClientVersion(s);
-			assertEquals("[1.0,1.0]", c.doGet(url).getResponseAsString());
+			assertEquals(s, "[1.0,1.0]", c.doGet(url).getResponseAsString());
 		}
 
 		for (String s : "1.1, 1.1.1, 1.2, 1.9.9".split("\\s*,\\s*")) {
 			c.setClientVersion(s);
-			assertEquals("[1.1,2)", c.doGet(url).getResponseAsString());
+			assertEquals(s, "[1.1,2)", c.doGet(url).getResponseAsString());
 		}
 
 		for (String s : "2, 2.0, 2.1, 9, 9.9".split("\\s*,\\s*")) {
 			c.setClientVersion(s);
-			assertEquals("2", c.doGet(url).getResponseAsString());
+			assertEquals(s, "2", c.doGet(url).getResponseAsString());
 		}
 
 		c.closeQuietly();

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server-test/src/test/java/org/apache/juneau/server/TestUtils.java
----------------------------------------------------------------------
diff --git a/juneau-server-test/src/test/java/org/apache/juneau/server/TestUtils.java b/juneau-server-test/src/test/java/org/apache/juneau/server/TestUtils.java
index 996a185..909000e 100755
--- a/juneau-server-test/src/test/java/org/apache/juneau/server/TestUtils.java
+++ b/juneau-server-test/src/test/java/org/apache/juneau/server/TestUtils.java
@@ -25,7 +25,7 @@ import junit.framework.*;
 public class TestUtils {
 
 	private static JsonSerializer js2 = new JsonSerializer.Simple()
-		.addTransforms(IteratorTransform.class, EnumerationTransform.class);
+		.addTransforms(IteratorSwap.class, EnumerationSwap.class);
 
 	/**
 	 * Assert that the object equals the specified string after running it through JsonSerializer.DEFAULT_LAX.toString().

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server/src/main/java/org/apache/juneau/server/RestServlet.java
----------------------------------------------------------------------
diff --git a/juneau-server/src/main/java/org/apache/juneau/server/RestServlet.java b/juneau-server/src/main/java/org/apache/juneau/server/RestServlet.java
index 9b5bbb8..358a0d5 100755
--- a/juneau-server/src/main/java/org/apache/juneau/server/RestServlet.java
+++ b/juneau-server/src/main/java/org/apache/juneau/server/RestServlet.java
@@ -400,9 +400,9 @@ public abstract class RestServlet extends HttpServlet {
 	}
 
 	/**
-	 * Creates the class-level POJO transforms associated with this servlet.
+	 * Creates the class-level POJO swaps associated with this servlet.
 	 * <p>
-	 * Subclasses can override this method to provide their own class-level POJO transforms for this servlet.
+	 * Subclasses can override this method to provide their own class-level POJO swaps for this servlet.
 	 * <p>
 	 * By default, returns the transforms specified through the {@link RestResource#transforms() @RestResource.transforms()} annotation in child-to-parent order.
 	 * 	(i.e. transforms will be applied in child-to-parent order with child annotations overriding parent annotations when
@@ -2501,7 +2501,7 @@ public abstract class RestServlet extends HttpServlet {
 	}
 
 	/**
-	 * Returns the class-level POJO transforms associated with this servlet.
+	 * Returns the class-level POJO swaps associated with this servlet.
 	 * <p>
 	 * Created by the {@link #createTransforms()} method.
 	 *

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server/src/main/java/org/apache/juneau/server/annotation/RestMethod.java
----------------------------------------------------------------------
diff --git a/juneau-server/src/main/java/org/apache/juneau/server/annotation/RestMethod.java b/juneau-server/src/main/java/org/apache/juneau/server/annotation/RestMethod.java
index 0df53ee..7672f9e 100755
--- a/juneau-server/src/main/java/org/apache/juneau/server/annotation/RestMethod.java
+++ b/juneau-server/src/main/java/org/apache/juneau/server/annotation/RestMethod.java
@@ -420,7 +420,7 @@ public @interface RestMethod {
 	 * 	}
 	 *
 	 * 	<jc>// Call this method if X-Client-Version is at least 1.1, but less than 2.0.</jc>
-	 * 	<ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/foobar"</js>, clientVersion=<js>"[1.1,2.0)"</js>, transforms={NewToOldPojoTransform.<jk>class</jk>})
+	 * 	<ja>@RestMethod</ja>(name=<js>"GET"</js>, path=<js>"/foobar"</js>, clientVersion=<js>"[1.1,2.0)"</js>, transforms={NewToOldPojoSwap.<jk>class</jk>})
 	 * 	<jk>public</jk> NewPojo oldMethod() {
 	 * 		<jk>return</jk> newMethod()
 	 * 	}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server/src/main/java/org/apache/juneau/server/annotation/RestResource.java
----------------------------------------------------------------------
diff --git a/juneau-server/src/main/java/org/apache/juneau/server/annotation/RestResource.java b/juneau-server/src/main/java/org/apache/juneau/server/annotation/RestResource.java
index 682b898..7936682 100755
--- a/juneau-server/src/main/java/org/apache/juneau/server/annotation/RestResource.java
+++ b/juneau-server/src/main/java/org/apache/juneau/server/annotation/RestResource.java
@@ -99,7 +99,7 @@ public @interface RestResource {
 	 * </ul>
 	 * <p>
 	 * If the specified class is an instance of {@link Transform}, then that filter is added.
-	 * Any other classes are wrapped in a {@link BeanTransform} to indicate that subclasses should
+	 * Any other classes are wrapped in a {@link BeanFilter} to indicate that subclasses should
 	 * 	be treated as the specified class type.
 	 */
 	Class<?>[] transforms() default {};

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server/src/main/java/org/apache/juneau/server/converters/Introspectable.java
----------------------------------------------------------------------
diff --git a/juneau-server/src/main/java/org/apache/juneau/server/converters/Introspectable.java b/juneau-server/src/main/java/org/apache/juneau/server/converters/Introspectable.java
index f55fe22..0e05efa 100755
--- a/juneau-server/src/main/java/org/apache/juneau/server/converters/Introspectable.java
+++ b/juneau-server/src/main/java/org/apache/juneau/server/converters/Introspectable.java
@@ -45,8 +45,8 @@ public final class Introspectable implements RestConverter {
 		if (method == null)
 			return o;
 		try {
-			if (cm.getPojoTransform() != null)
-				o = cm.getPojoTransform().transform(o);
+			if (cm.getPojoSwap() != null)
+				o = cm.getPojoSwap().swap(o);
 			return new PojoIntrospector(o, JsonParser.DEFAULT).invokeMethod(method, args);
 		} catch (Exception e) {
 			e.printStackTrace();

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server/src/main/java/org/apache/juneau/server/converters/Queryable.java
----------------------------------------------------------------------
diff --git a/juneau-server/src/main/java/org/apache/juneau/server/converters/Queryable.java b/juneau-server/src/main/java/org/apache/juneau/server/converters/Queryable.java
index 088aa97..4aefba9 100755
--- a/juneau-server/src/main/java/org/apache/juneau/server/converters/Queryable.java
+++ b/juneau-server/src/main/java/org/apache/juneau/server/converters/Queryable.java
@@ -64,8 +64,8 @@ public final class Queryable implements RestConverter {
 			if (req.hasAnyQueryParameters("q","v","s","g","i","p","l")) {
 				BeanContext bc = req.getBeanContext();
 
-				if (cm.getPojoTransform() != null)
-					o = cm.getPojoTransform().transform(o);
+				if (cm.getPojoSwap() != null)
+					o = cm.getPojoSwap().swap(o);
 
 				PojoQuery f = new PojoQuery(o, bc);
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server/src/main/java/org/apache/juneau/server/converters/Traversable.java
----------------------------------------------------------------------
diff --git a/juneau-server/src/main/java/org/apache/juneau/server/converters/Traversable.java b/juneau-server/src/main/java/org/apache/juneau/server/converters/Traversable.java
index ebcdbe9..2aa36ef 100755
--- a/juneau-server/src/main/java/org/apache/juneau/server/converters/Traversable.java
+++ b/juneau-server/src/main/java/org/apache/juneau/server/converters/Traversable.java
@@ -51,8 +51,8 @@ public final class Traversable implements RestConverter {
 
 		if (req.getPathRemainder() != null) {
 			try {
-				if (cm.getPojoTransform() != null)
-					o = cm.getPojoTransform().transform(o);
+				if (cm.getPojoSwap() != null)
+					o = cm.getPojoSwap().swap(o);
 				PojoRest p = new PojoRest(o, req.getReaderParser());
 				o = p.get(req.getPathRemainder());
 			} catch (SerializeException e) {

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server/src/main/java/org/apache/juneau/server/jaxrs/JuneauProvider.java
----------------------------------------------------------------------
diff --git a/juneau-server/src/main/java/org/apache/juneau/server/jaxrs/JuneauProvider.java b/juneau-server/src/main/java/org/apache/juneau/server/jaxrs/JuneauProvider.java
index 83715dc..a1ea139 100755
--- a/juneau-server/src/main/java/org/apache/juneau/server/jaxrs/JuneauProvider.java
+++ b/juneau-server/src/main/java/org/apache/juneau/server/jaxrs/JuneauProvider.java
@@ -48,7 +48,7 @@ public @interface JuneauProvider {
 	 * 	These filters are applied to all serializers and parsers being used by the provider.
 	 * <p>
 	 * 	If the specified class is an instance of {@link Transform}, then that filter is added.
-	 * 	Any other classes are wrapped in a {@link BeanTransform} to indicate that subclasses should
+	 * 	Any other classes are wrapped in a {@link BeanFilter} to indicate that subclasses should
 	 * 		be treated as the specified class type.
 	 */
 	Class<?>[] transforms() default {};

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-server/src/main/java/org/apache/juneau/server/package.html
----------------------------------------------------------------------
diff --git a/juneau-server/src/main/java/org/apache/juneau/server/package.html b/juneau-server/src/main/java/org/apache/juneau/server/package.html
index 8eb9783..62a7897 100755
--- a/juneau-server/src/main/java/org/apache/juneau/server/package.html
+++ b/juneau-server/src/main/java/org/apache/juneau/server/package.html
@@ -893,7 +893,7 @@
 		<jk>public static class</jk> FormInputBean {
 			<jk>public</jk> String <jf>aString</jf>;
 			<jk>public int</jk> <jf>aNumber</jf>;
-			<ja>@BeanProperty</ja>(transform=CalendarTransform.<jsf>ISO8601DT</jsf>.<jk>class</jk>)
+			<ja>@BeanProperty</ja>(transform=CalendarSwap.<jsf>ISO8601DT</jsf>.<jk>class</jk>)
 			<jk>public</jk> Calendar <jf>aDate</jf>;
 		}
 	}		
@@ -1539,7 +1539,7 @@
 		</p>
 		<p>
 			The {@link org.apache.juneau.server.annotation.RestResource#transforms() @RestResource.transforms()} annotation 
-			can be used as a convenient way to add POJO transforms to the serializers and parsers
+			can be used as a convenient way to add POJO swaps to the serializers and parsers
 			registered with the servlet.
 		</p>
 		<p class='bcode'>
@@ -1547,10 +1547,10 @@
 	<ja>@RestResource</ja>(
 		transforms={
 			<jc>// Calendars should be serialized/parsed as ISO8601 date-time strings</jc>
-			CalendarTransform.<jsf>DEFAULT_ISO8601DT</jsf>.<jk>class</jk>,
+			CalendarSwap.<jsf>DEFAULT_ISO8601DT</jsf>.<jk>class</jk>,
 
 			<jc>// Byte arrays should be serialized/parsed as BASE64-encoded strings</jc>
-			ByteArrayBase64Transform.<jk>class</jk>,
+			ByteArrayBase64Swap.<jk>class</jk>,
 
 			<jc>// Subclasses of MyInterface will be treated as MyInterface objects.</jc>
 			<jc>// Bean properties not defined on that interface will be ignored.</jc>
@@ -2217,7 +2217,7 @@
 		<jk>public static class</jk> FormInputBean { 
 			<jk>public</jk> String <jf>aString</jf>; 
 			<jk>public int</jk> <jf>aNumber</jf>; 
-			<ja>@BeanProperty</ja>(transform=CalendarTransform.<jsf>ISO8601DT</jsf>.<jk>class</jk>) 
+			<ja>@BeanProperty</ja>(transform=CalendarSwap.<jsf>ISO8601DT</jsf>.<jk>class</jk>) 
 			<jk>public</jk> Calendar <jf>aDate</jf>; 
 		} 
 	}
@@ -3206,7 +3206,7 @@
 		<ul>
 			<li><code><jk>public</jk> T(String in);</code>
 		</ul>
-		<li>Has a {@link org.apache.juneau.transform.PojoTransform} associated with the servlet
+		<li>Has a {@link org.apache.juneau.transform.PojoSwap} associated with the servlet
 			with a transformed type of <l>String</l>.
 	</ul>
 </div>
@@ -3469,9 +3469,9 @@
 				<jk>new</jk> Column(<js>"age"</js>, <js>"xs:int"</js>), 
 				<jk>new</jk> Column(<js>"numAddresses"</js>, <js>"xs:int"</js>) 
 				.addTransform( 
-					<jk>new</jk> PojoTransform&lt;Person,Integer&gt;() { 
-						<ja>@Override</ja> /* PojoTransform */ 
-						<jk>public</jk> Integer transform(Person p) { 
+					<jk>new</jk> PojoSwap&lt;Person,Integer&gt;() { 
+						<ja>@Override</ja> /* PojoSwap */ 
+						<jk>public</jk> Integer swap(Person p) { 
 							<jk>return</jk> p.addresses.size(); 
 						} 
 					} 


[6/8] incubator-juneau git commit: Tweak new name 'Transform' into 'BeanFilter' and 'PojoSwap'

Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java
index 68c9341..a22242b 100644
--- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java
@@ -56,7 +56,7 @@ public final class MsgPackParser extends InputStreamParser {
 		BeanContext bc = session.getBeanContext();
 		if (nt == null)
 			nt = (ClassMeta<T>)object();
-		PojoTransform<T,Object> transform = (PojoTransform<T,Object>)nt.getPojoTransform();
+		PojoSwap<T,Object> transform = (PojoSwap<T,Object>)nt.getPojoSwap();
 		ClassMeta<?> ft = nt.getTransformedClassMeta();
 		session.setCurrentClass(ft);
 
@@ -182,7 +182,7 @@ public final class MsgPackParser extends InputStreamParser {
 		}
 
 		if (transform != null && o != null)
-			o = transform.normalize(o, nt);
+			o = transform.unswap(o, nt);
 
 		if (outer != null)
 			setParent(nt, o, outer);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java
index cd734b8..8795869 100644
--- a/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java
@@ -78,9 +78,9 @@ public class MsgPackSerializer extends OutputStreamSerializer {
 		addClassAttr = (session.isAddClassAttrs() && ! eType.equals(aType));
 
 		// Transform if necessary
-		PojoTransform transform = aType.getPojoTransform();				// The transform
+		PojoSwap transform = aType.getPojoSwap();				// The transform
 		if (transform != null) {
-			o = transform.transform(o);
+			o = transform.swap(o);
 
 			// If the transform's getTransformedClass() method returns Object, we need to figure out
 			// the actual type now.

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/package.html b/juneau-core/src/main/java/org/apache/juneau/package.html
index 8b3d585..ca30bd5 100644
--- a/juneau-core/src/main/java/org/apache/juneau/package.html
+++ b/juneau-core/src/main/java/org/apache/juneau/package.html
@@ -157,10 +157,10 @@
 	BeanContext beanContext = BeanContext.<jsf>DEFAULT</jsf>;
 	
 	<jc>// Create a context from scratch with your own settings.</jc>
-	beanContext = <jk>new</jk> BeanContext().addTransforms(DateTransform.ISO8601DT.<jk>class</jk>);
+	beanContext = <jk>new</jk> BeanContext().addTransforms(DateSwap.ISO8601DT.<jk>class</jk>);
 	
 	<jc>// Clone and modify an existing context.</jc>
-	beanContext = BeanContext.<jsf>DEFAULT</jsf>.clone().addTransforms(DateTransform.ISO8601DT.<jk>class</jk>);
+	beanContext = BeanContext.<jsf>DEFAULT</jsf>.clone().addTransforms(DateSwap.ISO8601DT.<jk>class</jk>);
 		</p>
 		<p>
 			The {@link org.apache.juneau.BeanContext} class is a highly-customizable class.  
@@ -204,7 +204,7 @@
 			Using the <ja>@Bean</ja> and <ja>@BeanProperty</ja> annotations, it's also possible to include non-standard properties (for example, getters or setters with non-standard names), or override the names of properties (for example, {@code "Name"} or {@code "fullName"} instead of {@code "name"}).
 		</p>
 		<p>
-			It should be noted that the {@link org.apache.juneau.transform.BeanTransform} class can also be used to exclude properties from beans.  
+			It should be noted that the {@link org.apache.juneau.transform.BeanFilter} class can also be used to exclude properties from beans.  
 			However, only the annotations can be used to include non-standard properties or override property names.
 		</p>
 		<p>

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java b/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java
index 1a1bd79..9a858b1 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/Parser.java
@@ -94,10 +94,10 @@ import org.apache.juneau.utils.*;
  * 		</tr>
  * 	</table>
  * <p>
- * 	In addition, any class types with {@link PojoTransform PojoTransforms} associated with them on the registered
+ * 	In addition, any class types with {@link PojoSwap PojoSwaps} associated with them on the registered
  * 		{@link #getBeanContext() beanContext} can also be passed in.
  * <p>
- * 	For example, if the {@link CalendarTransform} transform is used to generalize {@code Calendar} objects to {@code String} objects.  When registered
+ * 	For example, if the {@link CalendarSwap} transform is used to generalize {@code Calendar} objects to {@code String} objects.  When registered
  * 	with this parser, you can construct {@code Calendar} objects from {@code Strings} using the following syntax...
  * <p class='bcode'>
  * 	Calendar c = parser.parse(<js>"'Sun Mar 03 04:05:06 EST 2001'"</js>, GregorianCalendar.<jk>class</jk>);
@@ -579,7 +579,7 @@ public abstract class Parser extends CoreApi {
 
 		if (type == null)
 			type = (ClassMeta<T>)object();
-		PojoTransform transform = type.getPojoTransform();
+		PojoSwap transform = type.getPojoSwap();
 		ClassMeta<?> gType = type.getTransformedClassMeta();
 
 		Object o = s;
@@ -600,7 +600,7 @@ public abstract class Parser extends CoreApi {
 		}
 
 		if (transform != null)
-			o = transform.normalize(o, type);
+			o = transform.unswap(o, type);
 
 		return (T)o;
 	}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java b/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java
index 0e810b8..4b86852 100644
--- a/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java
+++ b/juneau-core/src/main/java/org/apache/juneau/parser/ParserGroup.java
@@ -56,7 +56,7 @@ import org.apache.juneau.*;
  *
  * 	<jc>// Change settings on parsers simultaneously</jc>
  * 	g.setProperty(BeanContext.<jsf>BEAN_beansRequireSerializable</jsf>, <jk>true</jk>)
- * 		.addTransforms(CalendarTransform.ISO8601DT.<jk>class</jk>)
+ * 		.addTransforms(CalendarSwap.ISO8601DT.<jk>class</jk>)
  * 		.lock();
  *
  * 	<jc>// Find the appropriate parser by Content-Type</jc>
@@ -254,7 +254,7 @@ public final class ParserGroup extends Lockable {
 	/**
 	 * Shortcut for calling {@link Parser#addTransforms(Class[])} on all parsers in this group.
 	 *
-	 * @param classes The classes to add bean transforms for to the underlying bean context of all parsers in this group.
+	 * @param classes The classes to add bean filters for to the underlying bean context of all parsers in this group.
 	 * @throws LockedException If {@link #lock()} was called on this object.
 	 * @return This object (for method chaining).
 	 */

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
index 36ab2b8..e3aeda1 100644
--- a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
@@ -34,7 +34,7 @@ import org.apache.juneau.transform.*;
  * 	Essentially just converts plain text to POJOs via static <code>fromString()</code> or <code>valueOf()</code>, or
  * 	through constructors that take a single string argument.
  * <p>
- * 	Also parses objects using a transform if the object class has an {@link PojoTransform PojoTransform&lt;?,String&gt;} transform defined on it.
+ * 	Also parses objects using a transform if the object class has an {@link PojoSwap PojoSwap&lt;?,String&gt;} transform defined on it.
  *
  *
  * <h6 class='topic'>Configurable properties</h6>

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java
index fd916f3..6be54ea 100644
--- a/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java
@@ -32,7 +32,7 @@ import org.apache.juneau.transform.*;
  * <p>
  * 	Essentially converts POJOs to plain text using the <code>toString()</code> method.
  * <p>
- * 	Also serializes objects using a transform if the object class has an {@link PojoTransform PojoTransform&lt;?,String&gt;} transform defined on it.
+ * 	Also serializes objects using a transform if the object class has an {@link PojoSwap PojoSwap&lt;?,String&gt;} transform defined on it.
  *
  *
  * <h6 class='topic'>Configurable properties</h6>

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroup.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroup.java b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroup.java
index 926075e..ef35199 100644
--- a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroup.java
+++ b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerGroup.java
@@ -56,7 +56,7 @@ import org.apache.juneau.*;
  *
  * 	<jc>// Change settings for all serializers in the group and lock it.</jc>
  * 	g.setProperty(SerializerContext.<jsf>SERIALIZER_useIndentation</jsf>, <jk>true</jk>)
- * 		.addTransforms(CalendarTransform.ISO8601DT.<jk>class</jk>)
+ * 		.addTransforms(CalendarSwap.ISO8601DT.<jk>class</jk>)
  * 		.lock();
  *
  * 	<jc>// Find the appropriate serializer by Accept type</jc>
@@ -277,7 +277,7 @@ public final class SerializerGroup extends Lockable {
 	/**
 	 * Shortcut for calling {@link Serializer#addTransforms(Class[])} on all serializers in this group.
 	 *
-	 * @param classes The classes to add bean transforms for to the underlying bean context of all serializers in this group.
+	 * @param classes The classes to add bean filters for to the underlying bean context of all serializers in this group.
 	 * @throws LockedException If {@link #lock()} was called on this object.
 	 * @return This object (for method chaining).
 	 */

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerSession.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerSession.java b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerSession.java
index 0749066..f7d070a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerSession.java
+++ b/juneau-core/src/main/java/org/apache/juneau/serializer/SerializerSession.java
@@ -537,10 +537,10 @@ public class SerializerSession extends Session {
 	public final Object generalize(Object o, ClassMeta<?> type) throws SerializeException {
 		if (o == null)
 			return null;
-		PojoTransform f = (type == null || type.isObject() ? getBeanContext().getClassMeta(o.getClass()).getPojoTransform() : type.getPojoTransform());
+		PojoSwap f = (type == null || type.isObject() ? getBeanContext().getClassMeta(o.getClass()).getPojoSwap() : type.getPojoSwap());
 		if (f == null)
 			return o;
-		return f.transform(o);
+		return f.swap(o);
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transform/AnnotationBeanFilter.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/AnnotationBeanFilter.java b/juneau-core/src/main/java/org/apache/juneau/transform/AnnotationBeanFilter.java
new file mode 100644
index 0000000..bf502b7
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transform/AnnotationBeanFilter.java
@@ -0,0 +1,70 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transform;
+
+import java.util.*;
+
+import org.apache.juneau.annotation.*;
+
+/**
+ * Bean filter constructed from a {@link Bean @Bean} annotation found on a class.
+ * <p>
+ * <b>*** Internal class - Not intended for external use ***</b>
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ * @param <T> The class type that this transform applies to.
+ */
+public final class AnnotationBeanFilter<T> extends BeanFilter<T> {
+
+	/**
+	 * Constructor.
+	 *
+	 * @param annotatedClass The class found to have a {@link Bean @Bean} annotation.
+	 * @param annotations The {@link Bean @Bean} annotations found on the class and all parent classes in child-to-parent order.
+	 */
+	public AnnotationBeanFilter(Class<T> annotatedClass, List<Bean> annotations) {
+		super(annotatedClass);
+
+		ListIterator<Bean> li = annotations.listIterator(annotations.size());
+		while (li.hasPrevious()) {
+			Bean b = li.previous();
+
+			if (b.properties().length > 0 && getProperties() == null)
+				setProperties(b.properties());
+
+			if (b.sort())
+				setSortProperties(true);
+
+			if (b.excludeProperties().length > 0)
+				setExcludeProperties(b.excludeProperties());
+
+			setPropertyNamer(b.propertyNamer());
+
+			if (b.interfaceClass() != Object.class)
+				setInterfaceClass(b.interfaceClass());
+
+			if (b.stopClass() != Object.class)
+				setStopClass(b.stopClass());
+
+			if (! b.subTypeProperty().isEmpty()) {
+				setSubTypeProperty(b.subTypeProperty());
+
+				LinkedHashMap<Class<?>,String> subTypes = new LinkedHashMap<Class<?>,String>();
+				for (BeanSubType bst : b.subTypes())
+					subTypes.put(bst.type(), bst.id());
+
+				setSubTypes(subTypes);
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transform/AnnotationBeanTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/AnnotationBeanTransform.java b/juneau-core/src/main/java/org/apache/juneau/transform/AnnotationBeanTransform.java
deleted file mode 100644
index a6bc86f..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transform/AnnotationBeanTransform.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transform;
-
-import java.util.*;
-
-import org.apache.juneau.annotation.*;
-
-/**
- * Bean transform constructed from a {@link Bean @Bean} annotation found on a class.
- * <p>
- * <b>*** Internal class - Not intended for external use ***</b>
- *
- * @author James Bognar (james.bognar@salesforce.com)
- * @param <T> The class type that this transform applies to.
- */
-public final class AnnotationBeanTransform<T> extends BeanTransform<T> {
-
-	/**
-	 * Constructor.
-	 *
-	 * @param annotatedClass The class found to have a {@link Bean @Bean} annotation.
-	 * @param annotations The {@link Bean @Bean} annotations found on the class and all parent classes in child-to-parent order.
-	 */
-	public AnnotationBeanTransform(Class<T> annotatedClass, List<Bean> annotations) {
-		super(annotatedClass);
-
-		ListIterator<Bean> li = annotations.listIterator(annotations.size());
-		while (li.hasPrevious()) {
-			Bean b = li.previous();
-
-			if (b.properties().length > 0 && getProperties() == null)
-				setProperties(b.properties());
-
-			if (b.sort())
-				setSortProperties(true);
-
-			if (b.excludeProperties().length > 0)
-				setExcludeProperties(b.excludeProperties());
-
-			setPropertyNamer(b.propertyNamer());
-
-			if (b.interfaceClass() != Object.class)
-				setInterfaceClass(b.interfaceClass());
-
-			if (b.stopClass() != Object.class)
-				setStopClass(b.stopClass());
-
-			if (! b.subTypeProperty().isEmpty()) {
-				setSubTypeProperty(b.subTypeProperty());
-
-				LinkedHashMap<Class<?>,String> subTypes = new LinkedHashMap<Class<?>,String>();
-				for (BeanSubType bst : b.subTypes())
-					subTypes.put(bst.type(), bst.id());
-
-				setSubTypes(subTypes);
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilter.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilter.java b/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilter.java
new file mode 100644
index 0000000..1538d0a
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transform/BeanFilter.java
@@ -0,0 +1,526 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transform;
+
+import java.beans.*;
+import java.lang.reflect.*;
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.annotation.*;
+import org.apache.juneau.internal.*;
+
+/**
+ * Parent class for all bean filters.
+ * <p>
+ * 	Bean filters are used to control aspects of how beans are handled during serialization and parsing.
+ * <p>
+ * 	This class can be considered a programmatic equivalent to using the {@link Bean @Bean} annotation on bean classes.
+ * 	Thus, it can be used to perform the same function as the <code>@Bean</code> annotation when you don't have
+ * 		the ability to annotate those classes (e.g. you don't have access to the source code).
+ * <p>
+ * 	Note that value returned by the {@link Transform#forClass()} method is automatically determined through reflection
+ * 		when the no-arg constructor is used.
+ *
+ * <p>
+ * 	When defining bean filters, you can either call the setters in the contructor, or override getters.
+ *
+ * <h6 class='topic'>Example</h6>
+ * <p class='bcode'>
+ * 	<jc>// Create our serializer with a filter.</jc>
+ * 	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(AddressFilter.<jk>class</jk>);
+ *
+ * 	Address a = <jk>new</jk> Address();
+ * 	String json = s.serialize(a); <jc>// Serializes only street, city, state.</jc>
+ *
+ * 	<jc>// Filter class defined via setters</jc>
+ * 	<jk>public class</jk> AddressFilter <jk>extends</jk> BeanFilter&lt;Address&gt; {
+ * 		<jk>public</jk> AddressFilter() {
+ * 			setProperties(<js>"street"</js>,<js>"city"</js>,<js>"state"</js>);
+ * 		}
+ * 	}
+ *
+ * 	<jc>// Filter class defined by overriding getters</jc>
+ * 	<jk>public class</jk> AddressFilter <jk>extends</jk> BeanFilter&lt;Address&gt; {
+ * 		<jk>public</jk> String[] getProperties() {
+ * 			<jk>return new</jk> String[]{<js>"street"</js>,<js>"city"</js>,<js>"state"</js>};
+ * 		}
+ * 	}
+ * </p>
+ * <p>
+ * 	The examples in this class use the setters approach.
+ *
+ * <h6 class='topic'>Additional information</h6>
+ * 	See {@link org.apache.juneau.transform} for more information.
+ *
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ * @param <T> The class type that this filter applies to.
+ */
+public abstract class BeanFilter<T> extends Transform {
+
+	private String[] properties, excludeProperties;
+	private LinkedHashMap<Class<?>, String> subTypes;
+	private String subTypeAttr;
+	private Class<? extends PropertyNamer> propertyNamer;
+	private Class<?> interfaceClass, stopClass;
+	private boolean sortProperties;
+
+	/**
+	 * Constructor that determines the for-class value using reflection.
+	 */
+	@SuppressWarnings("unchecked")
+	public BeanFilter() {
+		super();
+		this.type = TransformType.BEAN;
+
+		Class<?> c = this.getClass().getSuperclass();
+		Type t = this.getClass().getGenericSuperclass();
+		while (c != BeanFilter.class) {
+			t = c.getGenericSuperclass();
+			c = c.getSuperclass();
+		}
+
+		// Attempt to determine the T and G classes using reflection.
+		if (t instanceof ParameterizedType) {
+			ParameterizedType pt = (ParameterizedType)t;
+			Type[] pta = pt.getActualTypeArguments();
+			if (pta.length > 0) {
+				Type nType = pta[0];
+				if (nType instanceof Class)
+					this.forClass = (Class<T>)nType;
+
+				else
+					throw new RuntimeException("Unsupported parameter type: " + nType);
+			}
+		}
+	}
+
+	/**
+	 * Constructor that specifies the for-class explicitly.
+	 * <p>
+	 * This constructor only needs to be called when the class type cannot be inferred through reflection.
+	 *
+	 * <dl>
+	 * 	<dt>Example:</dt>
+	 * 	<dd>
+	 * 		<p class='bcode'>
+	 * 	<jk>public class</jk> SomeArbitraryFilter <jk>extends</jk> BeanFilter&lt?&gt; {
+	 * 		<jk>public</jk> SomeArbitraryFiter(Class&lt?&gt; forClass) {
+	 * 			<jk>super</jk>(forClass);
+	 * 			...
+	 * 		}
+	 * 	}
+	 * 		</p>
+	 * 	</dd>
+	 * </dl>
+	 *
+	 * @param forClass The class that this bean filter applies to.
+	 */
+	public BeanFilter(Class<T> forClass) {
+		super(forClass);
+		this.type = TransformType.BEAN;
+	}
+
+	/**
+	 * Returns the set and order of names of properties associated with a bean class.
+	 *
+	 * @see #setProperties(String...)
+	 * @return The name of the properties associated with a bean class, or <jk>null</jk> if all bean properties should be used.
+	 */
+	public String[] getProperties() {
+		return properties;
+	}
+
+	/**
+	 * Specifies the set and order of names of properties associated with a bean class.
+	 * <p>
+	 * 	The order specified is the same order that the entries will be returned by the {@link BeanMap#entrySet()} and related methods.
+	 * <p>
+	 * 	This method is an alternative to using the {@link Bean#properties()} annotation on a class.
+	 *
+	 * <dl>
+	 * 	<dt>Example:</dt>
+	 * 	<dd>
+	 * 		<p class='bcode'>
+	 * 	<jc>// Create our serializer with a filter.</jc>
+	 * 	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(AddressFilter.<jk>class</jk>);
+	 *
+	 * 	Address a = <jk>new</jk> Address();
+	 * 	String json = s.serialize(a); <jc>// Serializes only street, city, state.</jc>
+	 *
+	 * 	<jc>// Transform class</jc>
+	 * 	<jk>public class</jk> AddressFilter <jk>extends</jk> BeanFilter&lt;Address&gt; {
+	 * 		<jk>public</jk> AddressFilter() {
+	 * 			setProperties(<js>"street"</js>,<js>"city"</js>,<js>"state"</js>);
+	 * 		}
+	 * 	}
+	 * 		</p>
+	 * 	</dd>
+	 * </dl>
+	 *
+	 * @param properties The name of the properties associated with a bean class.
+	 * @return This object (for method chaining).
+	 */
+	public BeanFilter<T> setProperties(String...properties) {
+		this.properties = properties;
+		return this;
+	}
+
+	/**
+	 * Same as {@link #setProperties(String[])} but pass in a comma-delimited list of values.
+	 *
+	 * @param properties A comma-delimited list of properties.
+	 * @return This object (for method chaining).
+	 */
+	public BeanFilter<T> setProperties(String properties) {
+		return setProperties(StringUtils.split(properties, ','));
+	}
+
+	/**
+	 * Returns <jk>true</jk> if the properties defined on this bean class should be ordered alphabetically.
+	 * <p>
+	 * 	This method is only used when the {@link #getProperties()} method returns <jk>null</jk>.
+	 * 	Otherwise, the ordering of the properties in the returned value is used.
+	 *
+	 * @see #setSortProperties(boolean)
+	 * @return <jk>true</jk> if bean properties should be sorted.
+	 */
+	public boolean isSortProperties() {
+		return sortProperties;
+	}
+
+	/**
+	 * Specifies whether the properties on this bean should be ordered alphabetically.
+	 * <p>
+	 * 	This method is ignored if the {@link #getProperties()} method does not return <jk>null</jk>.
+	 * <p>
+	 * 	This method is an alternative to using the {@link Bean#sort()} annotation on a class.
+	 *
+	 * @param sortProperties The new value for the sort properties property.
+	 * @return This object (for method chaining).
+	 */
+	public BeanFilter<T> setSortProperties(boolean sortProperties) {
+		this.sortProperties = sortProperties;
+		return this;
+	}
+
+	/**
+	 * Returns the list of properties to ignore on a bean.
+	 *
+	 * @see #setExcludeProperties(String...)
+	 * @return The name of the properties to ignore on a bean, or <jk>null</jk> to not ignore any properties.
+	 */
+	public String[] getExcludeProperties() {
+		return excludeProperties;
+	}
+
+	/**
+	 * Specifies a list of properties to ignore on a bean.
+	 * <p>
+	 * 	This method is an alternative to using the {@link Bean#excludeProperties()} annotation on a class.
+	 *
+	 * <dl>
+	 * 	<dt>Example:</dt>
+	 * 	<dd>
+	 * 		<p class='bcode'>
+	 * 	<jc>// Create our serializer with a filter.</jc>
+	 * 	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(NoCityOrStateFilter.<jk>class</jk>);
+	 *
+	 * 	Address a = <jk>new</jk> Address();
+	 * 	String json = s.serialize(a); <jc>// Excludes city and state.</jc>
+	 *
+	 * 	<jc>// Transform class</jc>
+	 * 	<jk>public class</jk> NoCityOrStateFilter <jk>extends</jk> BeanFilter&lt;Address&gt; {
+	 * 		<jk>public</jk> AddressFilter() {
+	 * 			setExcludeProperties(<js>"city"</js>,<js>"state"</js>);
+	 * 		}
+	 * 	}
+	 * 		</p>
+	 * 	</dd>
+	 * </dl>
+	 *
+	 * @param excludeProperties The name of the properties to ignore on a bean class.
+	 * @return This object (for method chaining).
+	 */
+	public BeanFilter<T> setExcludeProperties(String...excludeProperties) {
+		this.excludeProperties = excludeProperties;
+		return this;
+	}
+
+	/**
+	 * Same as {@link #setExcludeProperties(String[])} but pass in a comma-delimited list of values.
+	 *
+	 * @param excludeProperties A comma-delimited list of properties to eclipse.
+	 * @return This object (for method chaining).
+	 */
+	public BeanFilter<T> setExcludeProperties(String excludeProperties) {
+		return setExcludeProperties(StringUtils.split(excludeProperties, ','));
+	}
+
+	/**
+	 * Returns the {@link PropertyNamer} associated with the bean to tailor the names of bean properties.
+	 *
+	 * @see #setPropertyNamer(Class)
+	 * @return The property namer class, or <jk>null</jk> if no property namer is associated with this bean property.
+	 */
+	public Class<? extends PropertyNamer> getPropertyNamer() {
+		return propertyNamer;
+	}
+
+	/**
+	 * Associates a {@link PropertyNamer} with this bean to tailor the names of the bean properties.
+	 * <p>
+	 * 	Property namers are used to transform bean property names from standard form to some other form.
+	 * 	For example, the {@link PropertyNamerDashedLC} will convert property names to dashed-lowercase, and
+	 * 		these will be used as attribute names in JSON, and element names in XML.
+	 * <p>
+	 * 	This method is an alternative to using the {@link Bean#propertyNamer()} annotation on a class.
+	 *
+	 * @param propertyNamer The property namer class.
+	 * @return This object (for method chaining).
+	 */
+	public BeanFilter<T> setPropertyNamer(Class<? extends PropertyNamer> propertyNamer) {
+		this.propertyNamer = propertyNamer;
+		return this;
+	}
+
+	/**
+	 * Returns the name of the sub type property associated with the bean class.
+	 *
+	 * @see #setSubTypeProperty(String)
+	 * @return The sub type property name, or <jk>null</jk> if bean has no subtypes defined.
+	 */
+	public String getSubTypeProperty() {
+		return subTypeAttr;
+	}
+
+	/**
+	 * Defines a virtual property on a superclass that identifies bean subtype classes.
+	 * <p>
+	 * 	In the following example, the abstract class has two subclasses that are differentiated
+	 * 		by a property called <code>subType</code>
+	 *
+	 * <p class='bcode'>
+	 * 	<jc>// Abstract superclass</jc>
+	 * 	<jk>public abstract class</jk> A {
+	 * 		<jk>public</jk> String <jf>f0</jf> = <js>"f0"</js>;
+	 * 	}
+	 *
+	 * 	<jc>// Subclass 1</jc>
+	 * 	<jk>public class</jk> A1 <jk>extends</jk> A {
+	 * 		<jk>public</jk> String <jf>f1</jf>;
+	 * 	}
+	 *
+	 * 	<jc>// Subclass 2</jc>
+	 * 	<jk>public class</jk> A2 <jk>extends</jk> A {
+	 * 		<jk>public</jk> String <jf>f2</jf>;
+	 * 	}
+	 *
+	 * 	<jc>// Transform for defining subtypes</jc>
+	 * 	<jk>public class</jk> ATransform <jk>extends</jk> BeanFilter&lt;A&gt; {
+	 * 		<jk>public</jk> ATransform() {
+	 * 			setSubTypeProperty(<js>"subType"</js>);
+	 * 			addSubType(Al.<jk>class</jk>, <js>"A1"</js>);
+	 * 			addSubType(A2.<jk>class</jk>, <js>"A2"</js>);
+	 * 		}
+	 * 	}
+	 * </p>
+	 * <p>
+	 * 	The following shows what happens when serializing a subclassed object to JSON:
+	 * <p class='bcode'>
+	 * 	JsonSerializer s = <jk>new</jk> JsonSerializer().addTransforms(ATransform.<jk>class</jk>);
+	 * 	A1 a1 = <jk>new</jk> A1();
+	 * 	a1.<jf>f1</jf> = <js>"f1"</js>;
+	 * 	String r = s.serialize(a1);
+	 * 	<jsm>assertEquals</jsm>(<js>"{subType:'A1',f1:'f1',f0:'f0'}"</js>, r);
+	 * </p>
+	 * <p>
+	 * 	The following shows what happens when parsing back into the original object.
+	 * <p class='bcode'>
+	 * 	JsonParser p = <jk>new</jk> JsonParser().addTransforms(ATransform.<jk>class</jk>);
+	 * 	A a = p.parse(r, A.<jk>class</jk>);
+	 * 	<jsm>assertTrue</jsm>(a <jk>instanceof</jk> A1);
+	 * </p>
+	 * <p>
+	 * 	This method is an alternative to using the {@link Bean#subTypeProperty()} annotation on a class.
+	 *
+	 * @param subTypeAttr The name of the attribute representing the subtype.
+	 * @return This object (for method chaining).
+	 */
+	public BeanFilter<T> setSubTypeProperty(String subTypeAttr) {
+		this.subTypeAttr = subTypeAttr;
+		return this;
+	}
+
+	/**
+	 * Returns the subtypes associated with the bean class.
+	 *
+	 * @see #setSubTypeProperty(String)
+	 * @return The set of sub types associated with this bean class, or <jk>null</jk> if bean has no subtypes defined.
+	 */
+	public LinkedHashMap<Class<?>, String> getSubTypes() {
+		return subTypes;
+	}
+
+	/**
+	 * Specifies the set of subclasses of this bean class in addition to a string identifier for that subclass.
+	 *
+	 * @see #setSubTypeProperty(String)
+	 * @param subTypes the map of subtype classes to subtype identifier strings.
+	 * @return This object (for method chaining).
+	 */
+	public BeanFilter<T> setSubTypes(LinkedHashMap<Class<?>, String> subTypes) {
+		this.subTypes = subTypes;
+		return this;
+	}
+
+	/**
+	 * Convenience method for adding a single subtype in leu of using {@link #setSubTypes(LinkedHashMap)} in one call.
+	 *
+	 * @see #setSubTypeProperty(String)
+	 * @param c The subtype class.
+	 * @param id The subtype identifier string for the specified subtype class.
+	 * @return This object (for method chaining).
+	 */
+	public BeanFilter<T> addSubType(Class<?> c, String id) {
+		if (subTypes == null)
+			subTypes = new LinkedHashMap<Class<?>, String>();
+		subTypes.put(c, id);
+		return this;
+	}
+
+	/**
+	 * Returns the interface class associated with this class.
+	 *
+	 * @see #setInterfaceClass(Class)
+	 * @return The interface class associated with this class, or <jk>null</jk> if no interface class is associated.
+	 */
+	public Class<?> getInterfaceClass() {
+		return interfaceClass;
+	}
+
+	/**
+	 * Identifies a class to be used as the interface class for this and all subclasses.
+	 * <p>
+	 * 	Functionally equivalent to using the {@link Bean#interfaceClass()} annotation.
+	 * <p>
+	 * 	When specified, only the list of properties defined on the interface class will be used during serialization.
+	 * 	Additional properties on subclasses will be ignored.
+	 * <p class='bcode'>
+	 * 	<jc>// Parent class</jc>
+	 * 	<jk>public abstract class</jk> A {
+	 * 		<jk>public</jk> String <jf>f0</jf> = <js>"f0"</js>;
+	 * 	}
+	 *
+	 * 	<jc>// Sub class</jc>
+	 * 	<jk>public class</jk> A1 <jk>extends</jk> A {
+	 * 		<jk>public</jk> String <jf>f1</jf> = <js>"f1"</js>;
+	 * 	}
+	 *
+	 * 	<jc>// Transform class</jc>
+	 * 	<jk>public class</jk> ATransform <jk>extends</jk> BeanFilter&lt;A&gt; {
+	 * 		<jk>public</jk> ATransform() {
+	 * 			setInterfaceClass(A.<jk>class</jk>);
+	 * 		}
+	 * 	}
+	 *
+	 * 	JsonSerializer s = new JsonSerializer().addTransforms(ATransform.<jk>class</jk>);
+	 * 	A1 a1 = <jk>new</jk> A1();
+	 * 	String r = s.serialize(a1);
+	 * 	<jsm>assertEquals</jsm>(<js>"{f0:'f0'}"</js>, r);  <jc>// Note f1 is not serialized</jc>
+	 * </p>
+	 * <p>
+	 * 	Note that this filter can be used on the parent class so that it filters to all child classes,
+	 * 		or can be set individually on the child classes.
+	 * <p>
+	 * 	This method is an alternative to using the {@link Bean#interfaceClass()}} annotation.
+	 *
+	 * @param interfaceClass The interface class.
+	 * @return This object (for method chaining).
+	 */
+	public BeanFilter<T> setInterfaceClass(Class<?> interfaceClass) {
+		this.interfaceClass = interfaceClass;
+		return this;
+	}
+
+	/**
+	 * Returns the stop class associated with this class.
+	 *
+	 * @see #setStopClass(Class)
+	 * @return The stop class associated with this class, or <jk>null</jk> if no stop class is associated.
+	 */
+	public Class<?> getStopClass() {
+		return stopClass;
+	}
+
+	/**
+	 * Identifies a stop class for this class and all subclasses.
+	 * <p>
+	 * 	Functionally equivalent to using the {@link Bean#stopClass()} annotation.
+	 * <p>
+	 * 	Identical in purpose to the stop class specified by {@link Introspector#getBeanInfo(Class, Class)}.
+	 * 	Any properties in the stop class or in its baseclasses will be ignored during analysis.
+	 * <p>
+	 * 	For example, in the following class hierarchy, instances of <code>C3</code> will include property <code>p3</code>, but
+	 * 		not <code>p1</code> or <code>p2</code>.
+	 * <p class='bcode'>
+	 * 	<jk>public class</jk> C1 {
+	 * 		<jk>public int</jk> getP1();
+	 * 	}
+	 *
+	 * 	<jk>public class</jk> C2 <jk>extends</jk> C1 {
+	 * 		<jk>public int</jk> getP2();
+	 * 	}
+	 *
+	 * 	<ja>@Bean</ja>(stopClass=C2.<jk>class</jk>)
+	 * 	<jk>public class</jk> C3 <jk>extends</jk> C2 {
+	 * 		<jk>public int</jk> getP3();
+	 * 	}
+	 * </p>
+	 *
+	 * @param stopClass The stop class.
+	 * @return This object (for method chaining).
+	 */
+	public BeanFilter<T> setStopClass(Class<?> stopClass) {
+		this.stopClass = stopClass;
+		return this;
+	}
+
+	/**
+	 * Subclasses can override this property to convert property values to some other
+	 * 	object just before serialization.
+	 *
+	 * @param bean The bean from which the property was read.
+	 * @param name The property name.
+	 * @param value The value just extracted from calling the bean getter.
+	 * @return The value to serialize.  Default is just to return the existing value.
+	 */
+	public Object readProperty(Object bean, String name, Object value) {
+		return value;
+	}
+
+	/**
+	 * Subclasses can override this property to convert property values to some other
+	 * 	object just before calling the bean setter.
+	 *
+	 * @param bean The bean from which the property was read.
+	 * @param name The property name.
+	 * @param value The value just parsed.
+	 * @return <jk>true</jk> if we set the property, <jk>false</jk> if we should allow the
+	 * 	framework to call the setter.
+	 */
+	public boolean writeProperty(Object bean, String name, Object value) {
+		return false;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transform/BeanTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/BeanTransform.java b/juneau-core/src/main/java/org/apache/juneau/transform/BeanTransform.java
deleted file mode 100644
index f0b9f3c..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transform/BeanTransform.java
+++ /dev/null
@@ -1,526 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transform;
-
-import java.beans.*;
-import java.lang.reflect.*;
-import java.util.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.annotation.*;
-import org.apache.juneau.internal.*;
-
-/**
- * Parent class for all bean transforms.
- * <p>
- * 	Bean transforms are used to control aspects of how beans are handled during serialization and parsing.
- * <p>
- * 	This class can be considered a programmatic equivalent to using the {@link Bean @Bean} annotation on bean classes.
- * 	Thus, it can be used to perform the same function as the <code>@Bean</code> annotation when you don't have
- * 		the ability to annotate those classes (e.g. you don't have access to the source code).
- * <p>
- * 	Note that value returned by the {@link Transform#forClass()} method is automatically determined through reflection
- * 		when the no-arg constructor is used.
- *
- * <p>
- * 	When defining bean transforms, you can either call the setters in the contructor, or override getters.
- *
- * <h6 class='topic'>Example</h6>
- * <p class='bcode'>
- * 	<jc>// Create our serializer with a transform.</jc>
- * 	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(AddressTransform.<jk>class</jk>);
- *
- * 	Address a = <jk>new</jk> Address();
- * 	String json = s.serialize(a); <jc>// Serializes only street, city, state.</jc>
- *
- * 	<jc>// Transform class defined via setters</jc>
- * 	<jk>public class</jk> AddressTransform <jk>extends</jk> BeanTransform&lt;Address&gt; {
- * 		<jk>public</jk> AddressTransform() {
- * 			setProperties(<js>"street"</js>,<js>"city"</js>,<js>"state"</js>);
- * 		}
- * 	}
- *
- * 	<jc>// Transform class defined by overriding getters</jc>
- * 	<jk>public class</jk> AddressTransform <jk>extends</jk> BeanTransform&lt;Address&gt; {
- * 		<jk>public</jk> String[] getProperties() {
- * 			<jk>return new</jk> String[]{<js>"street"</js>,<js>"city"</js>,<js>"state"</js>};
- * 		}
- * 	}
- * </p>
- * <p>
- * 	The examples in this class use the setters approach.
- *
- * <h6 class='topic'>Additional information</h6>
- * 	See {@link org.apache.juneau.transform} for more information.
- *
- *
- * @author James Bognar (james.bognar@salesforce.com)
- * @param <T> The class type that this transform applies to.
- */
-public abstract class BeanTransform<T> extends Transform {
-
-	private String[] properties, excludeProperties;
-	private LinkedHashMap<Class<?>, String> subTypes;
-	private String subTypeAttr;
-	private Class<? extends PropertyNamer> propertyNamer;
-	private Class<?> interfaceClass, stopClass;
-	private boolean sortProperties;
-
-	/**
-	 * Constructor that determines the for-class value using reflection.
-	 */
-	@SuppressWarnings("unchecked")
-	public BeanTransform() {
-		super();
-		this.type = TransformType.BEAN;
-
-		Class<?> c = this.getClass().getSuperclass();
-		Type t = this.getClass().getGenericSuperclass();
-		while (c != BeanTransform.class) {
-			t = c.getGenericSuperclass();
-			c = c.getSuperclass();
-		}
-
-		// Attempt to determine the T and G classes using reflection.
-		if (t instanceof ParameterizedType) {
-			ParameterizedType pt = (ParameterizedType)t;
-			Type[] pta = pt.getActualTypeArguments();
-			if (pta.length > 0) {
-				Type nType = pta[0];
-				if (nType instanceof Class)
-					this.forClass = (Class<T>)nType;
-
-				else
-					throw new RuntimeException("Unsupported parameter type: " + nType);
-			}
-		}
-	}
-
-	/**
-	 * Constructor that specifies the for-class explicitly.
-	 * <p>
-	 * This constructor only needs to be called when the class type cannot be inferred through reflection.
-	 *
-	 * <dl>
-	 * 	<dt>Example:</dt>
-	 * 	<dd>
-	 * 		<p class='bcode'>
-	 * 	<jk>public class</jk> SomeArbitraryTransform <jk>extends</jk> BeanTransform&lt?&gt; {
-	 * 		<jk>public</jk> SomeArbitraryTransform(Class&lt?&gt; forClass) {
-	 * 			<jk>super</jk>(forClass);
-	 * 			...
-	 * 		}
-	 * 	}
-	 * 		</p>
-	 * 	</dd>
-	 * </dl>
-	 *
-	 * @param forClass The class that this bean transform applies to.
-	 */
-	public BeanTransform(Class<T> forClass) {
-		super(forClass);
-		this.type = TransformType.BEAN;
-	}
-
-	/**
-	 * Returns the set and order of names of properties associated with a bean class.
-	 *
-	 * @see #setProperties(String...)
-	 * @return The name of the properties associated with a bean class, or <jk>null</jk> if all bean properties should be used.
-	 */
-	public String[] getProperties() {
-		return properties;
-	}
-
-	/**
-	 * Specifies the set and order of names of properties associated with a bean class.
-	 * <p>
-	 * 	The order specified is the same order that the entries will be returned by the {@link BeanMap#entrySet()} and related methods.
-	 * <p>
-	 * 	This method is an alternative to using the {@link Bean#properties()} annotation on a class.
-	 *
-	 * <dl>
-	 * 	<dt>Example:</dt>
-	 * 	<dd>
-	 * 		<p class='bcode'>
-	 * 	<jc>// Create our serializer with a transform.</jc>
-	 * 	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(AddressTransform.<jk>class</jk>);
-	 *
-	 * 	Address a = <jk>new</jk> Address();
-	 * 	String json = s.serialize(a); <jc>// Serializes only street, city, state.</jc>
-	 *
-	 * 	<jc>// Transform class</jc>
-	 * 	<jk>public class</jk> AddressTransform <jk>extends</jk> BeanTransform&lt;Address&gt; {
-	 * 		<jk>public</jk> AddressTransform() {
-	 * 			setProperties(<js>"street"</js>,<js>"city"</js>,<js>"state"</js>);
-	 * 		}
-	 * 	}
-	 * 		</p>
-	 * 	</dd>
-	 * </dl>
-	 *
-	 * @param properties The name of the properties associated with a bean class.
-	 * @return This object (for method chaining).
-	 */
-	public BeanTransform<T> setProperties(String...properties) {
-		this.properties = properties;
-		return this;
-	}
-
-	/**
-	 * Same as {@link #setProperties(String[])} but pass in a comma-delimited list of values.
-	 *
-	 * @param properties A comma-delimited list of properties.
-	 * @return This object (for method chaining).
-	 */
-	public BeanTransform<T> setProperties(String properties) {
-		return setProperties(StringUtils.split(properties, ','));
-	}
-
-	/**
-	 * Returns <jk>true</jk> if the properties defined on this bean class should be ordered alphabetically.
-	 * <p>
-	 * 	This method is only used when the {@link #getProperties()} method returns <jk>null</jk>.
-	 * 	Otherwise, the ordering of the properties in the returned value is used.
-	 *
-	 * @see #setSortProperties(boolean)
-	 * @return <jk>true</jk> if bean properties should be sorted.
-	 */
-	public boolean isSortProperties() {
-		return sortProperties;
-	}
-
-	/**
-	 * Specifies whether the properties on this bean should be ordered alphabetically.
-	 * <p>
-	 * 	This method is ignored if the {@link #getProperties()} method does not return <jk>null</jk>.
-	 * <p>
-	 * 	This method is an alternative to using the {@link Bean#sort()} annotation on a class.
-	 *
-	 * @param sortProperties The new value for the sort properties property.
-	 * @return This object (for method chaining).
-	 */
-	public BeanTransform<T> setSortProperties(boolean sortProperties) {
-		this.sortProperties = sortProperties;
-		return this;
-	}
-
-	/**
-	 * Returns the list of properties to ignore on a bean.
-	 *
-	 * @see #setExcludeProperties(String...)
-	 * @return The name of the properties to ignore on a bean, or <jk>null</jk> to not ignore any properties.
-	 */
-	public String[] getExcludeProperties() {
-		return excludeProperties;
-	}
-
-	/**
-	 * Specifies a list of properties to ignore on a bean.
-	 * <p>
-	 * 	This method is an alternative to using the {@link Bean#excludeProperties()} annotation on a class.
-	 *
-	 * <dl>
-	 * 	<dt>Example:</dt>
-	 * 	<dd>
-	 * 		<p class='bcode'>
-	 * 	<jc>// Create our serializer with a transform.</jc>
-	 * 	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(NoCityOrStateTransform.<jk>class</jk>);
-	 *
-	 * 	Address a = <jk>new</jk> Address();
-	 * 	String json = s.serialize(a); <jc>// Excludes city and state.</jc>
-	 *
-	 * 	<jc>// Transform class</jc>
-	 * 	<jk>public class</jk> NoCityOrStateTransform <jk>extends</jk> BeanTransform&lt;Address&gt; {
-	 * 		<jk>public</jk> AddressTransform() {
-	 * 			setExcludeProperties(<js>"city"</js>,<js>"state"</js>);
-	 * 		}
-	 * 	}
-	 * 		</p>
-	 * 	</dd>
-	 * </dl>
-	 *
-	 * @param excludeProperties The name of the properties to ignore on a bean class.
-	 * @return This object (for method chaining).
-	 */
-	public BeanTransform<T> setExcludeProperties(String...excludeProperties) {
-		this.excludeProperties = excludeProperties;
-		return this;
-	}
-
-	/**
-	 * Same as {@link #setExcludeProperties(String[])} but pass in a comma-delimited list of values.
-	 *
-	 * @param excludeProperties A comma-delimited list of properties to eclipse.
-	 * @return This object (for method chaining).
-	 */
-	public BeanTransform<T> setExcludeProperties(String excludeProperties) {
-		return setExcludeProperties(StringUtils.split(excludeProperties, ','));
-	}
-
-	/**
-	 * Returns the {@link PropertyNamer} associated with the bean to tailor the names of bean properties.
-	 *
-	 * @see #setPropertyNamer(Class)
-	 * @return The property namer class, or <jk>null</jk> if no property namer is associated with this bean property.
-	 */
-	public Class<? extends PropertyNamer> getPropertyNamer() {
-		return propertyNamer;
-	}
-
-	/**
-	 * Associates a {@link PropertyNamer} with this bean to tailor the names of the bean properties.
-	 * <p>
-	 * 	Property namers are used to transform bean property names from standard form to some other form.
-	 * 	For example, the {@link PropertyNamerDashedLC} will convert property names to dashed-lowercase, and
-	 * 		these will be used as attribute names in JSON, and element names in XML.
-	 * <p>
-	 * 	This method is an alternative to using the {@link Bean#propertyNamer()} annotation on a class.
-	 *
-	 * @param propertyNamer The property namer class.
-	 * @return This object (for method chaining).
-	 */
-	public BeanTransform<T> setPropertyNamer(Class<? extends PropertyNamer> propertyNamer) {
-		this.propertyNamer = propertyNamer;
-		return this;
-	}
-
-	/**
-	 * Returns the name of the sub type property associated with the bean class.
-	 *
-	 * @see #setSubTypeProperty(String)
-	 * @return The sub type property name, or <jk>null</jk> if bean has no subtypes defined.
-	 */
-	public String getSubTypeProperty() {
-		return subTypeAttr;
-	}
-
-	/**
-	 * Defines a virtual property on a superclass that identifies bean subtype classes.
-	 * <p>
-	 * 	In the following example, the abstract class has two subclasses that are differentiated
-	 * 		by a property called <code>subType</code>
-	 *
-	 * <p class='bcode'>
-	 * 	<jc>// Abstract superclass</jc>
-	 * 	<jk>public abstract class</jk> A {
-	 * 		<jk>public</jk> String <jf>f0</jf> = <js>"f0"</js>;
-	 * 	}
-	 *
-	 * 	<jc>// Subclass 1</jc>
-	 * 	<jk>public class</jk> A1 <jk>extends</jk> A {
-	 * 		<jk>public</jk> String <jf>f1</jf>;
-	 * 	}
-	 *
-	 * 	<jc>// Subclass 2</jc>
-	 * 	<jk>public class</jk> A2 <jk>extends</jk> A {
-	 * 		<jk>public</jk> String <jf>f2</jf>;
-	 * 	}
-	 *
-	 * 	<jc>// Transform for defining subtypes</jc>
-	 * 	<jk>public class</jk> ATransform <jk>extends</jk> BeanTransform&lt;A&gt; {
-	 * 		<jk>public</jk> ATransform() {
-	 * 			setSubTypeProperty(<js>"subType"</js>);
-	 * 			addSubType(Al.<jk>class</jk>, <js>"A1"</js>);
-	 * 			addSubType(A2.<jk>class</jk>, <js>"A2"</js>);
-	 * 		}
-	 * 	}
-	 * </p>
-	 * <p>
-	 * 	The following shows what happens when serializing a subclassed object to JSON:
-	 * <p class='bcode'>
-	 * 	JsonSerializer s = <jk>new</jk> JsonSerializer().addTransforms(ATransform.<jk>class</jk>);
-	 * 	A1 a1 = <jk>new</jk> A1();
-	 * 	a1.<jf>f1</jf> = <js>"f1"</js>;
-	 * 	String r = s.serialize(a1);
-	 * 	<jsm>assertEquals</jsm>(<js>"{subType:'A1',f1:'f1',f0:'f0'}"</js>, r);
-	 * </p>
-	 * <p>
-	 * 	The following shows what happens when parsing back into the original object.
-	 * <p class='bcode'>
-	 * 	JsonParser p = <jk>new</jk> JsonParser().addTransforms(ATransform.<jk>class</jk>);
-	 * 	A a = p.parse(r, A.<jk>class</jk>);
-	 * 	<jsm>assertTrue</jsm>(a <jk>instanceof</jk> A1);
-	 * </p>
-	 * <p>
-	 * 	This method is an alternative to using the {@link Bean#subTypeProperty()} annotation on a class.
-	 *
-	 * @param subTypeAttr The name of the attribute representing the subtype.
-	 * @return This object (for method chaining).
-	 */
-	public BeanTransform<T> setSubTypeProperty(String subTypeAttr) {
-		this.subTypeAttr = subTypeAttr;
-		return this;
-	}
-
-	/**
-	 * Returns the subtypes associated with the bean class.
-	 *
-	 * @see #setSubTypeProperty(String)
-	 * @return The set of sub types associated with this bean class, or <jk>null</jk> if bean has no subtypes defined.
-	 */
-	public LinkedHashMap<Class<?>, String> getSubTypes() {
-		return subTypes;
-	}
-
-	/**
-	 * Specifies the set of subclasses of this bean class in addition to a string identifier for that subclass.
-	 *
-	 * @see #setSubTypeProperty(String)
-	 * @param subTypes the map of subtype classes to subtype identifier strings.
-	 * @return This object (for method chaining).
-	 */
-	public BeanTransform<T> setSubTypes(LinkedHashMap<Class<?>, String> subTypes) {
-		this.subTypes = subTypes;
-		return this;
-	}
-
-	/**
-	 * Convenience method for adding a single subtype in leu of using {@link #setSubTypes(LinkedHashMap)} in one call.
-	 *
-	 * @see #setSubTypeProperty(String)
-	 * @param c The subtype class.
-	 * @param id The subtype identifier string for the specified subtype class.
-	 * @return This object (for method chaining).
-	 */
-	public BeanTransform<T> addSubType(Class<?> c, String id) {
-		if (subTypes == null)
-			subTypes = new LinkedHashMap<Class<?>, String>();
-		subTypes.put(c, id);
-		return this;
-	}
-
-	/**
-	 * Returns the interface class associated with this class.
-	 *
-	 * @see #setInterfaceClass(Class)
-	 * @return The interface class associated with this class, or <jk>null</jk> if no interface class is associated.
-	 */
-	public Class<?> getInterfaceClass() {
-		return interfaceClass;
-	}
-
-	/**
-	 * Identifies a class to be used as the interface class for this and all subclasses.
-	 * <p>
-	 * 	Functionally equivalent to using the {@link Bean#interfaceClass()} annotation.
-	 * <p>
-	 * 	When specified, only the list of properties defined on the interface class will be used during serialization.
-	 * 	Additional properties on subclasses will be ignored.
-	 * <p class='bcode'>
-	 * 	<jc>// Parent class</jc>
-	 * 	<jk>public abstract class</jk> A {
-	 * 		<jk>public</jk> String <jf>f0</jf> = <js>"f0"</js>;
-	 * 	}
-	 *
-	 * 	<jc>// Sub class</jc>
-	 * 	<jk>public class</jk> A1 <jk>extends</jk> A {
-	 * 		<jk>public</jk> String <jf>f1</jf> = <js>"f1"</js>;
-	 * 	}
-	 *
-	 * 	<jc>// Transform class</jc>
-	 * 	<jk>public class</jk> ATransform <jk>extends</jk> BeanTransform&lt;A&gt; {
-	 * 		<jk>public</jk> ATransform() {
-	 * 			setInterfaceClass(A.<jk>class</jk>);
-	 * 		}
-	 * 	}
-	 *
-	 * 	JsonSerializer s = new JsonSerializer().addTransforms(ATransform.<jk>class</jk>);
-	 * 	A1 a1 = <jk>new</jk> A1();
-	 * 	String r = s.serialize(a1);
-	 * 	<jsm>assertEquals</jsm>(<js>"{f0:'f0'}"</js>, r);  <jc>// Note f1 is not serialized</jc>
-	 * </p>
-	 * <p>
-	 * 	Note that this transform can be used on the parent class so that it transforms to all child classes,
-	 * 		or can be set individually on the child classes.
-	 * <p>
-	 * 	This method is an alternative to using the {@link Bean#interfaceClass()}} annotation.
-	 *
-	 * @param interfaceClass The interface class.
-	 * @return This object (for method chaining).
-	 */
-	public BeanTransform<T> setInterfaceClass(Class<?> interfaceClass) {
-		this.interfaceClass = interfaceClass;
-		return this;
-	}
-
-	/**
-	 * Returns the stop class associated with this class.
-	 *
-	 * @see #setStopClass(Class)
-	 * @return The stop class associated with this class, or <jk>null</jk> if no stop class is associated.
-	 */
-	public Class<?> getStopClass() {
-		return stopClass;
-	}
-
-	/**
-	 * Identifies a stop class for this class and all subclasses.
-	 * <p>
-	 * 	Functionally equivalent to using the {@link Bean#stopClass()} annotation.
-	 * <p>
-	 * 	Identical in purpose to the stop class specified by {@link Introspector#getBeanInfo(Class, Class)}.
-	 * 	Any properties in the stop class or in its baseclasses will be ignored during analysis.
-	 * <p>
-	 * 	For example, in the following class hierarchy, instances of <code>C3</code> will include property <code>p3</code>, but
-	 * 		not <code>p1</code> or <code>p2</code>.
-	 * <p class='bcode'>
-	 * 	<jk>public class</jk> C1 {
-	 * 		<jk>public int</jk> getP1();
-	 * 	}
-	 *
-	 * 	<jk>public class</jk> C2 <jk>extends</jk> C1 {
-	 * 		<jk>public int</jk> getP2();
-	 * 	}
-	 *
-	 * 	<ja>@Bean</ja>(stopClass=C2.<jk>class</jk>)
-	 * 	<jk>public class</jk> C3 <jk>extends</jk> C2 {
-	 * 		<jk>public int</jk> getP3();
-	 * 	}
-	 * </p>
-	 *
-	 * @param stopClass The stop class.
-	 * @return This object (for method chaining).
-	 */
-	public BeanTransform<T> setStopClass(Class<?> stopClass) {
-		this.stopClass = stopClass;
-		return this;
-	}
-
-	/**
-	 * Subclasses can override this property to convert property values to some other
-	 * 	object just before serialization.
-	 *
-	 * @param bean The bean from which the property was read.
-	 * @param name The property name.
-	 * @param value The value just extracted from calling the bean getter.
-	 * @return The value to serialize.  Default is just to return the existing value.
-	 */
-	public Object readProperty(Object bean, String name, Object value) {
-		return value;
-	}
-
-	/**
-	 * Subclasses can override this property to convert property values to some other
-	 * 	object just before calling the bean setter.
-	 *
-	 * @param bean The bean from which the property was read.
-	 * @param name The property name.
-	 * @param value The value just parsed.
-	 * @return <jk>true</jk> if we set the property, <jk>false</jk> if we should allow the
-	 * 	framework to call the setter.
-	 */
-	public boolean writeProperty(Object bean, String name, Object value) {
-		return false;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transform/InterfaceBeanFilter.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/InterfaceBeanFilter.java b/juneau-core/src/main/java/org/apache/juneau/transform/InterfaceBeanFilter.java
new file mode 100644
index 0000000..2e9f95c
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transform/InterfaceBeanFilter.java
@@ -0,0 +1,39 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transform;
+
+import org.apache.juneau.*;
+
+
+/**
+ * Simple bean filter that simply identifies a class to be used as an interface
+ * 	class for all child classes.
+ * <p>
+ * 	These objects are created when you pass in non-<code>Transform</code> classes to {@link ContextFactory#addToProperty(String,Object)},
+ * 		and are equivalent to adding a <code><ja>@Bean</ja>(interfaceClass=Foo.<jk>class</jk>)</code> annotation on the <code>Foo</code> class.
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ * @param <T> The class type that this transform applies to.
+ */
+public class InterfaceBeanFilter<T> extends BeanFilter<T> {
+
+	/**
+	 * Constructor.
+	 *
+	 * @param interfaceClass The class to use as an interface on all child classes.
+	 */
+	public InterfaceBeanFilter(Class<T> interfaceClass) {
+		super(interfaceClass);
+		setInterfaceClass(interfaceClass);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transform/InterfaceBeanTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/InterfaceBeanTransform.java b/juneau-core/src/main/java/org/apache/juneau/transform/InterfaceBeanTransform.java
deleted file mode 100644
index 5f281f3..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transform/InterfaceBeanTransform.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transform;
-
-import org.apache.juneau.*;
-
-
-/**
- * Simple bean transform that simply identifies a class to be used as an interface
- * 	class for all child classes.
- * <p>
- * 	These objects are created when you pass in non-<code>Transform</code> classes to {@link ContextFactory#addToProperty(String,Object)},
- * 		and are equivalent to adding a <code><ja>@Bean</ja>(interfaceClass=Foo.<jk>class</jk>)</code> annotation on the <code>Foo</code> class.
- *
- * @author James Bognar (james.bognar@salesforce.com)
- * @param <T> The class type that this transform applies to.
- */
-public class InterfaceBeanTransform<T> extends BeanTransform<T> {
-
-	/**
-	 * Constructor.
-	 *
-	 * @param interfaceClass The class to use as an interface on all child classes.
-	 */
-	public InterfaceBeanTransform(Class<T> interfaceClass) {
-		super(interfaceClass);
-		setInterfaceClass(interfaceClass);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transform/PojoSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/PojoSwap.java b/juneau-core/src/main/java/org/apache/juneau/transform/PojoSwap.java
new file mode 100644
index 0000000..3bde495
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transform/PojoSwap.java
@@ -0,0 +1,265 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transform;
+
+import java.lang.reflect.*;
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.internal.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.serializer.*;
+
+/**
+ * Used to convert non-serializable objects to a serializable form.
+ *
+ *
+ * <h6 class='topic'>Description</h6>
+ * <p>
+ * 	<code>PojoSwaps</code> are used to extend the functionality of the serializers and parsers to be able to handle POJOs
+ * 	that aren't automatically handled by the serializers or parsers.  For example, JSON does not have a standard
+ * 	representation for rendering dates.  By defining a special {@code Date} swap and associating it with a serializer and
+ * 	parser, you can convert a {@code Date} object to a {@code String} during serialization, and convert that {@code String} object back into
+ * 	a {@code Date} object during parsing.
+ * <p>
+ * 	Swaps MUST declare a public no-arg constructor so that the bean context can instantiate them.
+ * <p>
+ * 	<code>PojoSwaps</code> are associated with instances of {@link BeanContext BeanContexts} by passing the swap class to
+ * 	the {@link CoreApi#addTransforms(Class...)} method.<br>
+ * 	When associated with a bean context, fields of the specified type will automatically be converted when the
+ * 	{@link BeanMap#get(Object)} or {@link BeanMap#put(String, Object)} methods are called.<br>
+ * <p>
+ * 	<code>PojoSwaps</code> have two parameters:
+ * 	<ol>
+ * 		<li>{@code <T>} - The normal representation of an object.
+ * 		<li>{@code <S>} - The swapped representation of an object.
+ * 	</ol>
+ * 	<br>
+ * 	{@link Serializer Serializers} use swaps to convert objects of type T into objects of type S, and on calls to {@link BeanMap#get(Object)}.<br>
+ * 	{@link Parser Parsers} use swaps to convert objects of type S into objects of type T, and on calls to {@link BeanMap#put(String,Object)}.
+ *
+ *
+ * <h6 class='topic'>Swap Class Type {@code <S>}</h6>
+ * <p>
+ * 	The swapped object representation of an object must be an object type that the serializers can
+ * 	natively convert to JSON (or language-specific equivalent).  The list of valid transformed types are as follows...
+ * 	<ul class='spaced-list'>
+ * 		<li>{@link String}
+ * 		<li>{@link Number}
+ * 		<li>{@link Boolean}
+ * 		<li>{@link Collection} containing anything on this list.
+ * 		<li>{@link Map} containing anything on this list.
+ * 		<li>A java bean with properties of anything on this list.
+ * 		<li>An array of anything on this list.
+ * 	</ul>
+ *
+ *
+ * <h6 class='topic'>Normal Class Type {@code <T>}</h6>
+ * <p>
+ * 	The normal object representation of an object.<br>
+ *
+ *
+ * <h6 class='topic'>One-way vs. Two-way Serialization</h6>
+ * <p>
+ * 	Note that while there is a unified interface for handling swaps during both serialization and parsing,
+ * 	in many cases only one of the {@link #swap(Object)} or {@link #unswap(Object, ClassMeta)} methods will be defined
+ * 	because the swap is one-way.  For example, a swap may be defined to convert an {@code Iterator} to a {@code ObjectList}, but
+ * 	it's not possible to unswap an {@code Iterator}.  In that case, the {@code generalize(Object}} method would
+ * 	be implemented, but the {@code narrow(ObjectMap)} object would not, and the swap would be associated on
+ * 	the serializer, but not the parser.  Also, you may choose to serialize objects like {@code Dates} to readable {@code Strings},
+ * 	in which case it's not possible to reparse it back into a {@code Date}, since there is no way for the {@code Parser} to
+ * 	know it's a {@code Date} from just the JSON or XML text.
+ *
+ *
+ * <h6 class='topic'>Additional information</h6>
+ * 	See {@link org.apache.juneau.transform} for more information.
+ *
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ * @param <T> The normal form of the class.
+ * @param <S> The swapped form of the class.
+ */
+public abstract class PojoSwap<T,S> extends Transform {
+
+	/** Represents no transform. */
+	public static class NULL extends PojoSwap<Object,Object> {}
+
+	Class<T> normalClass;
+	Class<S> transformedClass;
+	ClassMeta<S> transformedClassMeta;
+
+	/**
+	 * Constructor.
+	 */
+	@SuppressWarnings("unchecked")
+	protected PojoSwap() {
+		super();
+
+		Class<?> c = this.getClass().getSuperclass();
+		Type t = this.getClass().getGenericSuperclass();
+		while (c != PojoSwap.class) {
+			t = c.getGenericSuperclass();
+			c = c.getSuperclass();
+		}
+
+		// Attempt to determine the T and G classes using reflection.
+		if (t instanceof ParameterizedType) {
+			ParameterizedType pt = (ParameterizedType)t;
+			Type[] pta = pt.getActualTypeArguments();
+			if (pta.length == 2) {
+				Type nType = pta[0];
+				if (nType instanceof Class) {
+					this.normalClass = (Class<T>)nType;
+
+				// <byte[],x> ends up containing a GenericArrayType, so it has to
+				// be handled as a special case.
+				} else if (nType instanceof GenericArrayType) {
+					Class<?> cmpntType = (Class<?>)((GenericArrayType)nType).getGenericComponentType();
+					this.normalClass = (Class<T>)Array.newInstance(cmpntType, 0).getClass();
+
+				// <Class<?>,x> ends up containing a ParameterizedType, so just use the raw type.
+				} else if (nType instanceof ParameterizedType) {
+					this.normalClass = (Class<T>)((ParameterizedType)nType).getRawType();
+
+				} else
+					throw new RuntimeException("Unsupported parameter type: " + nType);
+				if (pta[1] instanceof Class)
+					this.transformedClass = (Class<S>)pta[1];
+				else if (pta[1] instanceof ParameterizedType)
+					this.transformedClass = (Class<S>)((ParameterizedType)pta[1]).getRawType();
+				else
+					throw new RuntimeException("Unexpected transformed class type: " + pta[1].getClass().getName());
+			}
+		}
+	}
+
+	/**
+	 * Constructor for when the normal and transformed classes are already known.
+	 *
+	 * @param normalClass The normal class (cannot be serialized).
+	 * @param transformedClass The transformed class (serializable).
+	 */
+	protected PojoSwap(Class<T> normalClass, Class<S> transformedClass) {
+		this.normalClass = normalClass;
+		this.transformedClass = transformedClass;
+	}
+
+	/**
+	 * If this transform is to be used to serialize non-serializable POJOs, it must implement this method.
+	 * <p>
+	 * 	The object must be converted into one of the following serializable types:
+	 * 	<ul class='spaced-list'>
+	 * 		<li>{@link String}
+	 * 		<li>{@link Number}
+	 * 		<li>{@link Boolean}
+	 * 		<li>{@link Collection} containing anything on this list.
+	 * 		<li>{@link Map} containing anything on this list.
+	 * 		<li>A java bean with properties of anything on this list.
+	 * 		<li>An array of anything on this list.
+	 * 	</ul>
+	 *
+	 * @param o The object to be transformed.
+	 * @return The transformed object.
+	 * @throws SerializeException If a problem occurred trying to convert the output.
+	 */
+	public S swap(T o) throws SerializeException {
+		throw new SerializeException("Generalize method not implemented on transform ''{0}''", this.getClass().getName());
+	}
+
+	/**
+	 * If this transform is to be used to reconstitute POJOs that aren't true Java beans, it must implement this method.
+	 *
+	 * @param f The transformed object.
+	 * @param hint If possible, the parser will try to tell you the object type being created.  For example,
+	 * 	on a serialized date, this may tell you that the object being created must be of type {@code GregorianCalendar}.<br>
+	 * 	This may be <jk>null</jk> if the parser cannot make this determination.
+	 * @return The narrowed object.
+	 * @throws ParseException If this method is not implemented.
+	 */
+	public T unswap(S f, ClassMeta<?> hint) throws ParseException {
+		throw new ParseException("Narrow method not implemented on transform ''{0}''", this.getClass().getName());
+	}
+
+	/**
+	 * Returns the T class, the normalized form of the class.
+	 *
+	 * @return The normal form of this class.
+	 */
+	public Class<T> getNormalClass() {
+		return normalClass;
+	}
+
+	/**
+	 * Returns the G class, the generialized form of the class.
+	 * <p>
+	 * 	Subclasses must override this method if the generialized class is {@code Object},
+	 * 	meaning it can produce multiple generialized forms.
+	 *
+	 * @return The transformed form of this class.
+	 */
+	public Class<S> getTransformedClass() {
+		return transformedClass;
+	}
+
+	/**
+	 * Returns the {@link ClassMeta} of the transformed class type.
+	 * This value is cached for quick lookup.
+	 *
+	 * @return The {@link ClassMeta} of the transformed class type.
+	 */
+	public ClassMeta<S> getTransformedClassMeta() {
+		if (transformedClassMeta == null)
+			transformedClassMeta = beanContext.getClassMeta(transformedClass);
+		return transformedClassMeta;
+	}
+
+	/**
+	 * Checks if the specified object is an instance of the normal class defined on this transform.
+	 *
+	 * @param o The object to check.
+	 * @return <jk>true</jk> if the specified object is a subclass of the normal class defined on this transform.
+	 * 	<jk>null</jk> always return <jk>false</jk>.
+	 */
+	public boolean isNormalObject(Object o) {
+		if (o == null)
+			return false;
+		return ClassUtils.isParentClass(normalClass, o.getClass());
+	}
+
+	/**
+	 * Checks if the specified object is an instance of the transformed class defined on this transform.
+	 *
+	 * @param o The object to check.
+	 * @return <jk>true</jk> if the specified object is a subclass of the transformed class defined on this transform.
+	 * 	<jk>null</jk> always return <jk>false</jk>.
+	 */
+	public boolean isTransformedObject(Object o) {
+		if (o == null)
+			return false;
+		return ClassUtils.isParentClass(transformedClass, o.getClass());
+	}
+
+	//--------------------------------------------------------------------------------
+	// Overridden methods
+	//--------------------------------------------------------------------------------
+
+	@Override /* Transform */
+	public Class<?> forClass() {
+		return normalClass;
+	}
+
+	@Override /* Object */
+	public String toString() {
+		return getClass().getSimpleName() + '<' + getNormalClass().getSimpleName() + "," + getTransformedClass().getSimpleName() + '>';
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transform/PojoTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/PojoTransform.java b/juneau-core/src/main/java/org/apache/juneau/transform/PojoTransform.java
deleted file mode 100644
index 4d41b3f..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transform/PojoTransform.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transform;
-
-import java.lang.reflect.*;
-import java.util.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.internal.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.serializer.*;
-
-/**
- * Used to convert non-serializable objects to a serializable form.
- *
- *
- * <h6 class='topic'>Description</h6>
- * <p>
- * 	<code>PojoTransforms</code> are used to extend the functionality of the serializers and parsers to be able to handle POJOs
- * 	that aren't automatically handled by the serializers or parsers.  For example, JSON does not have a standard
- * 	representation for rendering dates.  By defining a special {@code Date} transform and associating it with a serializer and
- * 	parser, you can convert a {@code Date} object to a {@code String} during serialization, and convert that {@code String} object back into
- * 	a {@code Date} object during parsing.
- * <p>
- * 	Object transforms MUST declare a public no-arg constructor so that the bean context can instantiate them.
- * <p>
- * 	<code>PojoTransforms</code> are associated with instances of {@link BeanContext BeanContexts} by passing the transform class to
- * 	the {@link CoreApi#addTransforms(Class...)} method.<br>
- * 	When associated with a bean context, fields of the specified type will automatically be converted when the
- * 	{@link BeanMap#get(Object)} or {@link BeanMap#put(String, Object)} methods are called.<br>
- * <p>
- * 	<code>PojoTransforms</code> have two parameters:
- * 	<ol>
- * 		<li>{@code <F>} - The transformed representation of an object.
- * 		<li>{@code <T>} - The normal representation of an object.
- * 	</ol>
- * 	<br>
- * 	{@link Serializer Serializers} use object transforms to convert objects of type T into objects of type F, and on calls to {@link BeanMap#get(Object)}.<br>
- * 	{@link Parser Parsers} use object transforms to convert objects of type F into objects of type T, and on calls to {@link BeanMap#put(String,Object)}.
- *
- *
- * <h6 class='topic'>Transformed Class Type {@code <T>}</h6>
- * <p>
- * 	The transformed object representation of an object must be an object type that the serializers can
- * 	natively convert to JSON (or language-specific equivalent).  The list of valid transformed types are as follows...
- * 	<ul class='spaced-list'>
- * 		<li>{@link String}
- * 		<li>{@link Number}
- * 		<li>{@link Boolean}
- * 		<li>{@link Collection} containing anything on this list.
- * 		<li>{@link Map} containing anything on this list.
- * 		<li>A java bean with properties of anything on this list.
- * 		<li>An array of anything on this list.
- * 	</ul>
- *
- *
- * <h6 class='topic'>Normal Class Type {@code <N>}</h6>
- * <p>
- * 	The normal object representation of an object.<br>
- *
- *
- * <h6 class='topic'>One-way vs. Two-way Serialization</h6>
- * <p>
- * 	Note that while there is a unified interface for handling transforming during both serialization and parsing,
- * 	in many cases only one of the {@link #transform(Object)} or {@link #normalize(Object, ClassMeta)} methods will be defined
- * 	because the transform is one-way.  For example, a transform may be defined to convert an {@code Iterator} to a {@code ObjectList}, but
- * 	it's not possible to untransform an {@code Iterator}.  In that case, the {@code generalize(Object}} method would
- * 	be implemented, but the {@code narrow(ObjectMap)} object would not, and the transform would be associated on
- * 	the serializer, but not the parser.  Also, you may choose to serialize objects like {@code Dates} to readable {@code Strings},
- * 	in which case it's not possible to reparse it back into a {@code Date}, since there is no way for the {@code Parser} to
- * 	know it's a {@code Date} from just the JSON or XML text.
- *
- *
- * <h6 class='topic'>Additional information</h6>
- * 	See {@link org.apache.juneau.transform} for more information.
- *
- *
- * @author James Bognar (james.bognar@salesforce.com)
- * @param <N> The normal form of the class.
- * @param <T> The transformed form of the class.
- */
-public abstract class PojoTransform<N,T> extends Transform {
-
-	/** Represents no transform. */
-	public static class NULL extends PojoTransform<Object,Object> {}
-
-	Class<N> normalClass;
-	Class<T> transformedClass;
-	ClassMeta<T> transformedClassMeta;
-
-	/**
-	 * Constructor.
-	 */
-	@SuppressWarnings("unchecked")
-	protected PojoTransform() {
-		super();
-
-		Class<?> c = this.getClass().getSuperclass();
-		Type t = this.getClass().getGenericSuperclass();
-		while (c != PojoTransform.class) {
-			t = c.getGenericSuperclass();
-			c = c.getSuperclass();
-		}
-
-		// Attempt to determine the T and G classes using reflection.
-		if (t instanceof ParameterizedType) {
-			ParameterizedType pt = (ParameterizedType)t;
-			Type[] pta = pt.getActualTypeArguments();
-			if (pta.length == 2) {
-				Type nType = pta[0];
-				if (nType instanceof Class) {
-					this.normalClass = (Class<N>)nType;
-
-				// <byte[],x> ends up containing a GenericArrayType, so it has to
-				// be handled as a special case.
-				} else if (nType instanceof GenericArrayType) {
-					Class<?> cmpntType = (Class<?>)((GenericArrayType)nType).getGenericComponentType();
-					this.normalClass = (Class<N>)Array.newInstance(cmpntType, 0).getClass();
-
-				// <Class<?>,x> ends up containing a ParameterizedType, so just use the raw type.
-				} else if (nType instanceof ParameterizedType) {
-					this.normalClass = (Class<N>)((ParameterizedType)nType).getRawType();
-
-				} else
-					throw new RuntimeException("Unsupported parameter type: " + nType);
-				if (pta[1] instanceof Class)
-					this.transformedClass = (Class<T>)pta[1];
-				else if (pta[1] instanceof ParameterizedType)
-					this.transformedClass = (Class<T>)((ParameterizedType)pta[1]).getRawType();
-				else
-					throw new RuntimeException("Unexpected transformed class type: " + pta[1].getClass().getName());
-			}
-		}
-	}
-
-	/**
-	 * Constructor for when the normal and transformed classes are already known.
-	 *
-	 * @param normalClass The normal class (cannot be serialized).
-	 * @param transformedClass The transformed class (serializable).
-	 */
-	protected PojoTransform(Class<N> normalClass, Class<T> transformedClass) {
-		this.normalClass = normalClass;
-		this.transformedClass = transformedClass;
-	}
-
-	/**
-	 * If this transform is to be used to serialize non-serializable POJOs, it must implement this method.
-	 * <p>
-	 * 	The object must be converted into one of the following serializable types:
-	 * 	<ul class='spaced-list'>
-	 * 		<li>{@link String}
-	 * 		<li>{@link Number}
-	 * 		<li>{@link Boolean}
-	 * 		<li>{@link Collection} containing anything on this list.
-	 * 		<li>{@link Map} containing anything on this list.
-	 * 		<li>A java bean with properties of anything on this list.
-	 * 		<li>An array of anything on this list.
-	 * 	</ul>
-	 *
-	 * @param o The object to be transformed.
-	 * @return The transformed object.
-	 * @throws SerializeException If a problem occurred trying to convert the output.
-	 */
-	public T transform(N o) throws SerializeException {
-		throw new SerializeException("Generalize method not implemented on transform ''{0}''", this.getClass().getName());
-	}
-
-	/**
-	 * If this transform is to be used to reconstitute POJOs that aren't true Java beans, it must implement this method.
-	 *
-	 * @param f The transformed object.
-	 * @param hint If possible, the parser will try to tell you the object type being created.  For example,
-	 * 	on a serialized date, this may tell you that the object being created must be of type {@code GregorianCalendar}.<br>
-	 * 	This may be <jk>null</jk> if the parser cannot make this determination.
-	 * @return The narrowed object.
-	 * @throws ParseException If this method is not implemented.
-	 */
-	public N normalize(T f, ClassMeta<?> hint) throws ParseException {
-		throw new ParseException("Narrow method not implemented on transform ''{0}''", this.getClass().getName());
-	}
-
-	/**
-	 * Returns the T class, the normalized form of the class.
-	 *
-	 * @return The normal form of this class.
-	 */
-	public Class<N> getNormalClass() {
-		return normalClass;
-	}
-
-	/**
-	 * Returns the G class, the generialized form of the class.
-	 * <p>
-	 * 	Subclasses must override this method if the generialized class is {@code Object},
-	 * 	meaning it can produce multiple generialized forms.
-	 *
-	 * @return The transformed form of this class.
-	 */
-	public Class<T> getTransformedClass() {
-		return transformedClass;
-	}
-
-	/**
-	 * Returns the {@link ClassMeta} of the transformed class type.
-	 * This value is cached for quick lookup.
-	 *
-	 * @return The {@link ClassMeta} of the transformed class type.
-	 */
-	public ClassMeta<T> getTransformedClassMeta() {
-		if (transformedClassMeta == null)
-			transformedClassMeta = beanContext.getClassMeta(transformedClass);
-		return transformedClassMeta;
-	}
-
-	/**
-	 * Checks if the specified object is an instance of the normal class defined on this transform.
-	 *
-	 * @param o The object to check.
-	 * @return <jk>true</jk> if the specified object is a subclass of the normal class defined on this transform.
-	 * 	<jk>null</jk> always return <jk>false</jk>.
-	 */
-	public boolean isNormalObject(Object o) {
-		if (o == null)
-			return false;
-		return ClassUtils.isParentClass(normalClass, o.getClass());
-	}
-
-	/**
-	 * Checks if the specified object is an instance of the transformed class defined on this transform.
-	 *
-	 * @param o The object to check.
-	 * @return <jk>true</jk> if the specified object is a subclass of the transformed class defined on this transform.
-	 * 	<jk>null</jk> always return <jk>false</jk>.
-	 */
-	public boolean isTransformedObject(Object o) {
-		if (o == null)
-			return false;
-		return ClassUtils.isParentClass(transformedClass, o.getClass());
-	}
-
-	//--------------------------------------------------------------------------------
-	// Overridden methods
-	//--------------------------------------------------------------------------------
-
-	@Override /* Transform */
-	public Class<?> forClass() {
-		return normalClass;
-	}
-
-	@Override /* Object */
-	public String toString() {
-		return getClass().getSimpleName() + '<' + getNormalClass().getSimpleName() + "," + getTransformedClass().getSimpleName() + '>';
-	}
-}


[4/8] incubator-juneau git commit: Tweak new name 'Transform' into 'BeanFilter' and 'PojoSwap'

Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/DateLongTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/DateLongTransform.java b/juneau-core/src/main/java/org/apache/juneau/transforms/DateLongTransform.java
deleted file mode 100644
index aadc314..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/DateLongTransform.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import java.util.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.transform.*;
-
-/**
- * Transforms {@link Date Dates} to {@link Long Longs}.
- *
- * @author James Bognar (james.bognar@salesforce.com)
- */
-public class DateLongTransform extends PojoTransform<Date,Long> {
-
-	/**
-	 * Converts the specified {@link Date} to a {@link Long}.
-	 */
-	@Override /* PojoTransform */
-	public Long transform(Date o) {
-		return o.getTime();
-	}
-
-	/**
-	 * Converts the specified {@link Long} to a {@link Date}.
-	 */
-	@Override /* PojoTransform */
-	public Date normalize(Long o, ClassMeta<?> hint) throws ParseException {
-		Class<?> c = (hint == null ? java.util.Date.class : hint.getInnerClass());
-		if (c == java.util.Date.class)
-			return new java.util.Date(o);
-		if (c == java.sql.Date.class)
-			return new java.sql.Date(o);
-		if (c == java.sql.Time.class)
-			return new java.sql.Time(o);
-		if (c == java.sql.Timestamp.class)
-			return new java.sql.Timestamp(o);
-		throw new ParseException("DateLongTransform is unable to narrow object of type ''{0}''", c);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/DateMapSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/DateMapSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/DateMapSwap.java
new file mode 100644
index 0000000..4120547
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/DateMapSwap.java
@@ -0,0 +1,56 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.transform.*;
+
+/**
+ * Transforms {@link Date Dates} to {@link Map Maps} of the format <tt>{value:long}</tt>.
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ */
+@SuppressWarnings("rawtypes")
+public class DateMapSwap extends PojoSwap<Date,Map> {
+
+	/**
+	 * Converts the specified {@link Date} to a {@link Map}.
+	 */
+	@Override /* PojoSwap */
+	public Map swap(Date o) {
+		ObjectMap m = new ObjectMap();
+		m.put("time", o.getTime());
+		return m;
+	}
+
+	/**
+	 * Converts the specified {@link Map} to a {@link Date}.
+	 */
+	@Override /* PojoSwap */
+	public Date unswap(Map o, ClassMeta<?> hint) throws ParseException {
+		Class<?> c = (hint == null ? java.util.Date.class : hint.getInnerClass());
+		long l = Long.parseLong(((Map<?,?>)o).get("time").toString());
+		if (c == java.util.Date.class)
+			return new java.util.Date(l);
+		if (c == java.sql.Date.class)
+			return new java.sql.Date(l);
+		if (c == java.sql.Time.class)
+			return new java.sql.Time(l);
+		if (c == java.sql.Timestamp.class)
+			return new java.sql.Timestamp(l);
+		throw new ParseException("DateMapSwap is unable to narrow object of type ''{0}''", c);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/DateMapTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/DateMapTransform.java b/juneau-core/src/main/java/org/apache/juneau/transforms/DateMapTransform.java
deleted file mode 100644
index 3e34b5e..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/DateMapTransform.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import java.util.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.transform.*;
-
-/**
- * Transforms {@link Date Dates} to {@link Map Maps} of the format <tt>{value:long}</tt>.
- *
- * @author James Bognar (james.bognar@salesforce.com)
- */
-@SuppressWarnings("rawtypes")
-public class DateMapTransform extends PojoTransform<Date,Map> {
-
-	/**
-	 * Converts the specified {@link Date} to a {@link Map}.
-	 */
-	@Override /* PojoTransform */
-	public Map transform(Date o) {
-		ObjectMap m = new ObjectMap();
-		m.put("time", o.getTime());
-		return m;
-	}
-
-	/**
-	 * Converts the specified {@link Map} to a {@link Date}.
-	 */
-	@Override /* PojoTransform */
-	public Date normalize(Map o, ClassMeta<?> hint) throws ParseException {
-		Class<?> c = (hint == null ? java.util.Date.class : hint.getInnerClass());
-		long l = Long.parseLong(((Map<?,?>)o).get("time").toString());
-		if (c == java.util.Date.class)
-			return new java.util.Date(l);
-		if (c == java.sql.Date.class)
-			return new java.sql.Date(l);
-		if (c == java.sql.Time.class)
-			return new java.sql.Time(l);
-		if (c == java.sql.Timestamp.class)
-			return new java.sql.Timestamp(l);
-		throw new ParseException("DateMapTransform is unable to narrow object of type ''{0}''", c);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/DateSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/DateSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/DateSwap.java
new file mode 100644
index 0000000..dd66c13
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/DateSwap.java
@@ -0,0 +1,370 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import java.text.*;
+import java.util.*;
+
+import javax.xml.bind.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.internal.*;
+import org.apache.juneau.parser.ParseException;
+import org.apache.juneau.transform.*;
+
+/**
+ * Transforms {@link Date Dates} to {@link String Strings}.
+ *
+ *
+ * <h6 class='topic'>Behavior-specific subclasses</h6>
+ * <p>
+ * 	The following direct subclasses are provided for convenience:
+ * <ul class='spaced-list'>
+ * 	<li>{@link ToString} - Transforms to {@link String Strings} using the {@code Date.toString()} method.
+ * 	<li>{@link ISO8601DT} - Transforms to ISO8601 date-time strings.
+ * 	<li>{@link ISO8601DTP} - Transforms to ISO8601 date-time strings with millisecond precision.
+ * 	<li>{@link ISO8601DTZ} - Same as {@link ISO8601DT}, except always serializes in GMT.
+ * 	<li>{@link ISO8601DTZP} - Same as {@link ISO8601DTZ}, except with millisecond precision.
+ * 	<li>{@link RFC2822DT} - Transforms to RFC2822 date-time strings.
+ * 	<li>{@link RFC2822DTZ} - Same as {@link RFC2822DT}, except always serializes in GMT.
+ * 	<li>{@link RFC2822D} - Transforms to RFC2822 date strings.
+ * 	<li>{@link SimpleDT} - Transforms to simple <js>"yyyy/MM/dd HH:mm:ss"</js> strings.
+ * 	<li>{@link SimpleT} - Transforms to simple <js>"yyyy/MM/dd HH:mm:ss"</js> strings.
+ * 	<li>{@link Medium} - Transforms to {@link DateFormat#MEDIUM} strings.
+ * </ul>
+ *
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ */
+public class DateSwap extends PojoSwap<Date,String> {
+
+	/**
+	 * Transforms {@link Date Dates} to {@link String Strings} using the {@code Date.toString()} method.
+	 * <p>
+	 * <dl>
+	 * 	<dt>Example output:</dt>
+	 * 	<dd>
+	 * <ul>
+	 * 	<li><js>"Wed Jul 04 15:30:45 EST 2001"</js>
+	 * </ul>
+	 * 	</dd>
+	 * </dl>
+	 */
+	public static class ToString extends DateSwap {
+		/** Constructor */
+		public ToString() {
+			super("EEE MMM dd HH:mm:ss zzz yyyy");
+		}
+	}
+
+	/**
+	 * Transforms {@link Date Dates} to ISO8601 date-time strings.
+	 *
+	 * <dl>
+	 * 	<dt>Example output:</dt>
+	 * 	<dd>
+	 * <ul>
+	 * 	<li><js>"2001-07-04T15:30:45-05:00"</js>
+	 * 	<li><js>"2001-07-04T15:30:45Z"</js>
+	 * </ul>
+	 * 	</dd>
+	 * 	<dt>Example input:</dt>
+	 * 	<dd>
+	 * <ul>
+	 * 	<li><js>"2001-07-04T15:30:45-05:00"</js>
+	 * 	<li><js>"2001-07-04T15:30:45Z"</js>
+	 * 	<li><js>"2001-07-04T15:30:45.1Z"</js>
+	 * 	<li><js>"2001-07-04T15:30Z"</js>
+	 * 	<li><js>"2001-07-04"</js>
+	 * 	<li><js>"2001-07"</js>
+	 * 	<li><js>"2001"</js>
+	 * </ul>
+	 * 	</dd>
+	 * </dl>
+	 */
+	public static class ISO8601DT extends DateSwap {
+		private SimpleDateFormat tzFormat = new SimpleDateFormat("Z");
+
+		/** Constructor */
+		public ISO8601DT() {
+			this("yyyy-MM-dd'T'HH:mm:ss");
+		}
+
+		/**
+		 * Constructor with specific pattern.
+		 *
+		 * @param pattern The {@link MessageFormat}-style format string.
+		 */
+		protected ISO8601DT(String pattern) {
+			super(pattern);
+		}
+
+		@Override /* PojoSwap */
+		public Date unswap(String o, ClassMeta<?> hint) throws ParseException {
+			try {
+				if (StringUtils.isEmpty(o))
+					return null;
+				return convert(DatatypeConverter.parseDateTime(o).getTime(), hint);
+			} catch (ParseException e) {
+				throw e;
+			} catch (Exception e) {
+				throw new ParseException(e);
+			}
+		}
+
+		@Override /* PojoSwap */
+		public String swap(Date o) {
+			String s = super.swap(o);
+			String tz = tzFormat.format(o);
+			if (tz.equals("+0000"))
+				return s + "Z";
+			return s + tz.substring(0,3) + ':' + tz.substring(3);
+		}
+	}
+
+	/**
+	 * Same as {@link ISO8601DT} except serializes to millisecond precision.
+	 * <p>
+	 * Example output: <js>"2001-07-04T15:30:45.123-05:00"</js>
+	 */
+	public static class ISO8601DTP extends ISO8601DT {
+
+		/** Constructor */
+		public ISO8601DTP() {
+			super("yyyy-MM-dd'T'HH:mm:ss.SSS");
+		}
+	}
+
+	/**
+	 * Same as {@link ISO8601DT} except serializes to millisecond precision and doesn't include timezone.
+	 * <p>
+	 * Example output: <js>"2001-07-04T15:30:45.123"</js>
+	 */
+	public static class ISO8601DTPNZ extends DateSwap {
+
+		/** Constructor */
+		public ISO8601DTPNZ() {
+			super("yyyy-MM-dd'T'HH:mm:ss.SSS");
+		}
+	}
+
+	/**
+	 * Same as {@link ISO8601DT}, except always serializes in GMT.
+	 * <p>
+	 * Example output:  <js>"2001-07-04T15:30:45Z"</js>
+	 */
+	public static class ISO8601DTZ extends DateSwap {
+
+		/** Constructor */
+		public ISO8601DTZ() {
+			this("yyyy-MM-dd'T'HH:mm:ss'Z'");
+		}
+
+		/**
+		 * Constructor with specific pattern.
+		 *
+		 * @param pattern The {@link MessageFormat}-style format string.
+		 */
+		protected ISO8601DTZ(String pattern) {
+			super(pattern, "GMT");
+		}
+
+		@Override /* PojoSwap */
+		public Date unswap(String o, ClassMeta<?> hint) throws ParseException {
+			try {
+				if (StringUtils.isEmpty(o))
+					return null;
+				return convert(DatatypeConverter.parseDateTime(o).getTime(), hint);
+			} catch (ParseException e) {
+				throw e;
+			} catch (Exception e) {
+				throw new ParseException(e);
+			}
+		}
+	}
+
+	/**
+	 * Same as {@link ISO8601DTZ} except serializes to millisecond precision.
+	 * <p>
+	 * Example output:  <js>"2001-07-04T15:30:45.123Z"</js>
+	 */
+	public static class ISO8601DTZP extends ISO8601DT {
+
+		/** Constructor */
+		public ISO8601DTZP() {
+			super("yyyy-MM-dd'T'HH:mm:ss.SSS");
+		}
+	}
+
+	/**
+	 * Transforms {@link Date Dates} to RFC2822 date-time strings.
+	 */
+	public static class RFC2822DT extends DateSwap {
+		/** Constructor */
+		public RFC2822DT() {
+			super("EEE, dd MMM yyyy HH:mm:ss z");
+		}
+	}
+
+	/**
+	 * Same as {@link RFC2822DT}, except always serializes in GMT.
+	 * <p>
+	 * Example output:  <js>"2001-07-04T15:30:45Z"</js>
+	 */
+	public static class RFC2822DTZ extends DateSwap {
+		/** Constructor */
+		public RFC2822DTZ() {
+			super("EEE, dd MMM yyyy HH:mm:ss z", "GMT");
+		}
+	}
+
+	/**
+	 * Transforms {@link Date Dates} to RFC2822 date strings.
+	 */
+	public static class RFC2822D extends DateSwap {
+		/** Constructor */
+		public RFC2822D() {
+			super("dd MMM yyyy");
+		}
+	}
+
+	/**
+	 * Transforms {@link Date Dates} to simple <js>"yyyy/MM/dd HH:mm:ss"</js> strings.
+	 */
+	public static class SimpleDT extends DateSwap {
+		/** Constructor */
+		public SimpleDT() {
+			super("yyyy/MM/dd HH:mm:ss");
+		}
+	}
+
+	/**
+	 * Transforms {@link Date Dates} to simple <js>"yyyy/MM/dd HH:mm:ss.SSS"</js> strings.
+	 */
+	public static class SimpleDTP extends DateSwap {
+		/** Constructor */
+		public SimpleDTP() {
+			super("yyyy/MM/dd HH:mm:ss.SSS");
+		}
+	}
+
+	/**
+	 * Transforms {@link Date Dates} to simple <js>"HH:mm:ss"</js> strings.
+	 */
+	public static class SimpleT extends DateSwap {
+		/** Constructor */
+		public SimpleT() {
+			super("HH:mm:ss");
+		}
+	}
+
+	/**
+	 * Transforms {@link Date Dates} to simple <js>"HH:mm:ss.SSS"</js> strings.
+	 */
+	public static class SimpleTP extends DateSwap {
+		/** Constructor */
+		public SimpleTP() {
+			super("HH:mm:ss.SSS");
+		}
+	}
+
+	/**
+	 * Transforms {@link Date Dates} to {@link DateFormat#MEDIUM} strings.
+	 */
+	public static class Medium extends DateSwap {
+		/** Constructor */
+		public Medium() {
+			super(DateFormat.getDateInstance(DateFormat.MEDIUM));
+		}
+	}
+
+	/** The formatter to convert dates to Strings. */
+	private DateFormat format;
+
+	/**
+	 * Construct a transform using the specified date format string that will be
+	 * 	used to construct a {@link SimpleDateFormat} that will be used to convert
+	 * 	dates to strings.
+	 *
+	 * @param simpleDateFormat The {@link SimpleDateFormat} pattern.
+	 */
+	public DateSwap(String simpleDateFormat) {
+		this(new SimpleDateFormat(simpleDateFormat));
+	}
+
+	/**
+	 * Construct a transform using the specified date format string that will be
+	 * 	used to construct a {@link SimpleDateFormat} that will be used to convert
+	 * 	dates to strings.
+	 *
+	 * @param simpleDateFormat The {@link SimpleDateFormat} pattern.
+	 * @param timeZone The time zone to associate with the date pattern.
+	 */
+	public DateSwap(String simpleDateFormat, String timeZone) {
+		this(new SimpleDateFormat(simpleDateFormat));
+		format.setTimeZone(TimeZone.getTimeZone(timeZone));
+	}
+
+	/**
+	 * Construct a transform using the specified {@link DateFormat} that will be used to convert
+	 * 	dates to strings.
+	 *
+	 * @param format The format to use to convert dates to strings.
+	 */
+	public DateSwap(DateFormat format) {
+		super();
+		this.format = format;
+	}
+
+	/**
+	 * Converts the specified {@link Date} to a {@link String}.
+	 */
+	@Override /* PojoSwap */
+	public String swap(Date o) {
+		return format.format(o);
+	}
+
+	/**
+	 * Converts the specified {@link String} to a {@link Date}.
+	 */
+	@Override /* PojoSwap */
+	public Date unswap(String o, ClassMeta<?> hint) throws ParseException {
+		try {
+			if (StringUtils.isEmpty(o))
+				return null;
+			Date d = format.parse(o);
+			return convert(d, hint);
+		} catch (ParseException e) {
+			throw e;
+		} catch (Exception e) {
+			throw new ParseException(e);
+		}
+	}
+
+	private static Date convert(Date in, ClassMeta<?> hint) throws Exception {
+		if (in == null)
+			return null;
+		if (hint == null || hint.isInstance(in))
+			return in;
+		Class<?> c = hint.getInnerClass();
+		if (c == java.util.Date.class)
+			return in;
+		if (c == java.sql.Date.class)
+			return new java.sql.Date(in.getTime());
+		if (c == java.sql.Time.class)
+			return new java.sql.Time(in.getTime());
+		if (c == java.sql.Timestamp.class)
+			return new java.sql.Timestamp(in.getTime());
+		throw new ParseException("DateSwap is unable to narrow object of type ''{0}''", c);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/DateTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/DateTransform.java b/juneau-core/src/main/java/org/apache/juneau/transforms/DateTransform.java
deleted file mode 100644
index f38a52b..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/DateTransform.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import java.text.*;
-import java.util.*;
-
-import javax.xml.bind.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.internal.*;
-import org.apache.juneau.parser.ParseException;
-import org.apache.juneau.transform.*;
-
-/**
- * Transforms {@link Date Dates} to {@link String Strings}.
- *
- *
- * <h6 class='topic'>Behavior-specific subclasses</h6>
- * <p>
- * 	The following direct subclasses are provided for convenience:
- * <ul class='spaced-list'>
- * 	<li>{@link ToString} - Transforms to {@link String Strings} using the {@code Date.toString()} method.
- * 	<li>{@link ISO8601DT} - Transforms to ISO8601 date-time strings.
- * 	<li>{@link ISO8601DTP} - Transforms to ISO8601 date-time strings with millisecond precision.
- * 	<li>{@link ISO8601DTZ} - Same as {@link ISO8601DT}, except always serializes in GMT.
- * 	<li>{@link ISO8601DTZP} - Same as {@link ISO8601DTZ}, except with millisecond precision.
- * 	<li>{@link RFC2822DT} - Transforms to RFC2822 date-time strings.
- * 	<li>{@link RFC2822DTZ} - Same as {@link RFC2822DT}, except always serializes in GMT.
- * 	<li>{@link RFC2822D} - Transforms to RFC2822 date strings.
- * 	<li>{@link SimpleDT} - Transforms to simple <js>"yyyy/MM/dd HH:mm:ss"</js> strings.
- * 	<li>{@link SimpleT} - Transforms to simple <js>"yyyy/MM/dd HH:mm:ss"</js> strings.
- * 	<li>{@link Medium} - Transforms to {@link DateFormat#MEDIUM} strings.
- * </ul>
- *
- *
- * @author James Bognar (james.bognar@salesforce.com)
- */
-public class DateTransform extends PojoTransform<Date,String> {
-
-	/**
-	 * Transforms {@link Date Dates} to {@link String Strings} using the {@code Date.toString()} method.
-	 * <p>
-	 * <dl>
-	 * 	<dt>Example output:</dt>
-	 * 	<dd>
-	 * <ul>
-	 * 	<li><js>"Wed Jul 04 15:30:45 EST 2001"</js>
-	 * </ul>
-	 * 	</dd>
-	 * </dl>
-	 */
-	public static class ToString extends DateTransform {
-		/** Constructor */
-		public ToString() {
-			super("EEE MMM dd HH:mm:ss zzz yyyy");
-		}
-	}
-
-	/**
-	 * Transforms {@link Date Dates} to ISO8601 date-time strings.
-	 *
-	 * <dl>
-	 * 	<dt>Example output:</dt>
-	 * 	<dd>
-	 * <ul>
-	 * 	<li><js>"2001-07-04T15:30:45-05:00"</js>
-	 * 	<li><js>"2001-07-04T15:30:45Z"</js>
-	 * </ul>
-	 * 	</dd>
-	 * 	<dt>Example input:</dt>
-	 * 	<dd>
-	 * <ul>
-	 * 	<li><js>"2001-07-04T15:30:45-05:00"</js>
-	 * 	<li><js>"2001-07-04T15:30:45Z"</js>
-	 * 	<li><js>"2001-07-04T15:30:45.1Z"</js>
-	 * 	<li><js>"2001-07-04T15:30Z"</js>
-	 * 	<li><js>"2001-07-04"</js>
-	 * 	<li><js>"2001-07"</js>
-	 * 	<li><js>"2001"</js>
-	 * </ul>
-	 * 	</dd>
-	 * </dl>
-	 */
-	public static class ISO8601DT extends DateTransform {
-		private SimpleDateFormat tzFormat = new SimpleDateFormat("Z");
-
-		/** Constructor */
-		public ISO8601DT() {
-			this("yyyy-MM-dd'T'HH:mm:ss");
-		}
-
-		/**
-		 * Constructor with specific pattern.
-		 *
-		 * @param pattern The {@link MessageFormat}-style format string.
-		 */
-		protected ISO8601DT(String pattern) {
-			super(pattern);
-		}
-
-		@Override /* PojoTransform */
-		public Date normalize(String o, ClassMeta<?> hint) throws ParseException {
-			try {
-				if (StringUtils.isEmpty(o))
-					return null;
-				return convert(DatatypeConverter.parseDateTime(o).getTime(), hint);
-			} catch (ParseException e) {
-				throw e;
-			} catch (Exception e) {
-				throw new ParseException(e);
-			}
-		}
-
-		@Override /* PojoTransform */
-		public String transform(Date o) {
-			String s = super.transform(o);
-			String tz = tzFormat.format(o);
-			if (tz.equals("+0000"))
-				return s + "Z";
-			return s + tz.substring(0,3) + ':' + tz.substring(3);
-		}
-	}
-
-	/**
-	 * Same as {@link ISO8601DT} except serializes to millisecond precision.
-	 * <p>
-	 * Example output: <js>"2001-07-04T15:30:45.123-05:00"</js>
-	 */
-	public static class ISO8601DTP extends ISO8601DT {
-
-		/** Constructor */
-		public ISO8601DTP() {
-			super("yyyy-MM-dd'T'HH:mm:ss.SSS");
-		}
-	}
-
-	/**
-	 * Same as {@link ISO8601DT} except serializes to millisecond precision and doesn't include timezone.
-	 * <p>
-	 * Example output: <js>"2001-07-04T15:30:45.123"</js>
-	 */
-	public static class ISO8601DTPNZ extends DateTransform {
-
-		/** Constructor */
-		public ISO8601DTPNZ() {
-			super("yyyy-MM-dd'T'HH:mm:ss.SSS");
-		}
-	}
-
-	/**
-	 * Same as {@link ISO8601DT}, except always serializes in GMT.
-	 * <p>
-	 * Example output:  <js>"2001-07-04T15:30:45Z"</js>
-	 */
-	public static class ISO8601DTZ extends DateTransform {
-
-		/** Constructor */
-		public ISO8601DTZ() {
-			this("yyyy-MM-dd'T'HH:mm:ss'Z'");
-		}
-
-		/**
-		 * Constructor with specific pattern.
-		 *
-		 * @param pattern The {@link MessageFormat}-style format string.
-		 */
-		protected ISO8601DTZ(String pattern) {
-			super(pattern, "GMT");
-		}
-
-		@Override /* PojoTransform */
-		public Date normalize(String o, ClassMeta<?> hint) throws ParseException {
-			try {
-				if (StringUtils.isEmpty(o))
-					return null;
-				return convert(DatatypeConverter.parseDateTime(o).getTime(), hint);
-			} catch (ParseException e) {
-				throw e;
-			} catch (Exception e) {
-				throw new ParseException(e);
-			}
-		}
-	}
-
-	/**
-	 * Same as {@link ISO8601DTZ} except serializes to millisecond precision.
-	 * <p>
-	 * Example output:  <js>"2001-07-04T15:30:45.123Z"</js>
-	 */
-	public static class ISO8601DTZP extends ISO8601DT {
-
-		/** Constructor */
-		public ISO8601DTZP() {
-			super("yyyy-MM-dd'T'HH:mm:ss.SSS");
-		}
-	}
-
-	/**
-	 * Transforms {@link Date Dates} to RFC2822 date-time strings.
-	 */
-	public static class RFC2822DT extends DateTransform {
-		/** Constructor */
-		public RFC2822DT() {
-			super("EEE, dd MMM yyyy HH:mm:ss z");
-		}
-	}
-
-	/**
-	 * Same as {@link RFC2822DT}, except always serializes in GMT.
-	 * <p>
-	 * Example output:  <js>"2001-07-04T15:30:45Z"</js>
-	 */
-	public static class RFC2822DTZ extends DateTransform {
-		/** Constructor */
-		public RFC2822DTZ() {
-			super("EEE, dd MMM yyyy HH:mm:ss z", "GMT");
-		}
-	}
-
-	/**
-	 * Transforms {@link Date Dates} to RFC2822 date strings.
-	 */
-	public static class RFC2822D extends DateTransform {
-		/** Constructor */
-		public RFC2822D() {
-			super("dd MMM yyyy");
-		}
-	}
-
-	/**
-	 * Transforms {@link Date Dates} to simple <js>"yyyy/MM/dd HH:mm:ss"</js> strings.
-	 */
-	public static class SimpleDT extends DateTransform {
-		/** Constructor */
-		public SimpleDT() {
-			super("yyyy/MM/dd HH:mm:ss");
-		}
-	}
-
-	/**
-	 * Transforms {@link Date Dates} to simple <js>"yyyy/MM/dd HH:mm:ss.SSS"</js> strings.
-	 */
-	public static class SimpleDTP extends DateTransform {
-		/** Constructor */
-		public SimpleDTP() {
-			super("yyyy/MM/dd HH:mm:ss.SSS");
-		}
-	}
-
-	/**
-	 * Transforms {@link Date Dates} to simple <js>"HH:mm:ss"</js> strings.
-	 */
-	public static class SimpleT extends DateTransform {
-		/** Constructor */
-		public SimpleT() {
-			super("HH:mm:ss");
-		}
-	}
-
-	/**
-	 * Transforms {@link Date Dates} to simple <js>"HH:mm:ss.SSS"</js> strings.
-	 */
-	public static class SimpleTP extends DateTransform {
-		/** Constructor */
-		public SimpleTP() {
-			super("HH:mm:ss.SSS");
-		}
-	}
-
-	/**
-	 * Transforms {@link Date Dates} to {@link DateFormat#MEDIUM} strings.
-	 */
-	public static class Medium extends DateTransform {
-		/** Constructor */
-		public Medium() {
-			super(DateFormat.getDateInstance(DateFormat.MEDIUM));
-		}
-	}
-
-	/** The formatter to convert dates to Strings. */
-	private DateFormat format;
-
-	/**
-	 * Construct a transform using the specified date format string that will be
-	 * 	used to construct a {@link SimpleDateFormat} that will be used to convert
-	 * 	dates to strings.
-	 *
-	 * @param simpleDateFormat The {@link SimpleDateFormat} pattern.
-	 */
-	public DateTransform(String simpleDateFormat) {
-		this(new SimpleDateFormat(simpleDateFormat));
-	}
-
-	/**
-	 * Construct a transform using the specified date format string that will be
-	 * 	used to construct a {@link SimpleDateFormat} that will be used to convert
-	 * 	dates to strings.
-	 *
-	 * @param simpleDateFormat The {@link SimpleDateFormat} pattern.
-	 * @param timeZone The time zone to associate with the date pattern.
-	 */
-	public DateTransform(String simpleDateFormat, String timeZone) {
-		this(new SimpleDateFormat(simpleDateFormat));
-		format.setTimeZone(TimeZone.getTimeZone(timeZone));
-	}
-
-	/**
-	 * Construct a transform using the specified {@link DateFormat} that will be used to convert
-	 * 	dates to strings.
-	 *
-	 * @param format The format to use to convert dates to strings.
-	 */
-	public DateTransform(DateFormat format) {
-		super();
-		this.format = format;
-	}
-
-	/**
-	 * Converts the specified {@link Date} to a {@link String}.
-	 */
-	@Override /* PojoTransform */
-	public String transform(Date o) {
-		return format.format(o);
-	}
-
-	/**
-	 * Converts the specified {@link String} to a {@link Date}.
-	 */
-	@Override /* PojoTransform */
-	public Date normalize(String o, ClassMeta<?> hint) throws ParseException {
-		try {
-			if (StringUtils.isEmpty(o))
-				return null;
-			Date d = format.parse(o);
-			return convert(d, hint);
-		} catch (ParseException e) {
-			throw e;
-		} catch (Exception e) {
-			throw new ParseException(e);
-		}
-	}
-
-	private static Date convert(Date in, ClassMeta<?> hint) throws Exception {
-		if (in == null)
-			return null;
-		if (hint == null || hint.isInstance(in))
-			return in;
-		Class<?> c = hint.getInnerClass();
-		if (c == java.util.Date.class)
-			return in;
-		if (c == java.sql.Date.class)
-			return new java.sql.Date(in.getTime());
-		if (c == java.sql.Time.class)
-			return new java.sql.Time(in.getTime());
-		if (c == java.sql.Timestamp.class)
-			return new java.sql.Timestamp(in.getTime());
-		throw new ParseException("DateTransform is unable to narrow object of type ''{0}''", c);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/EnumerationSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/EnumerationSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/EnumerationSwap.java
new file mode 100644
index 0000000..d20fbaa
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/EnumerationSwap.java
@@ -0,0 +1,39 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import java.util.*;
+
+import org.apache.juneau.transform.*;
+
+/**
+ * Transforms {@link Enumeration Enumerations} to {@code List<Object>} objects.
+ * <p>
+ * 	This is a one-way transform, since {@code Enumerations} cannot be reconstituted.
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ */
+@SuppressWarnings({"unchecked","rawtypes"})
+public class EnumerationSwap extends PojoSwap<Enumeration,List> {
+
+	/**
+	 * Converts the specified {@link Enumeration} to a {@link List}.
+	 */
+	@Override /* PojoSwap */
+	public List swap(Enumeration o) {
+		List l = new LinkedList();
+		while (o.hasMoreElements())
+			l.add(o.nextElement());
+		return l;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/EnumerationTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/EnumerationTransform.java b/juneau-core/src/main/java/org/apache/juneau/transforms/EnumerationTransform.java
deleted file mode 100644
index 6c3b124..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/EnumerationTransform.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import java.util.*;
-
-import org.apache.juneau.transform.*;
-
-/**
- * Transforms {@link Enumeration Enumerations} to {@code List<Object>} objects.
- * <p>
- * 	This is a one-way transform, since {@code Enumerations} cannot be reconstituted.
- *
- * @author James Bognar (james.bognar@salesforce.com)
- */
-@SuppressWarnings({"unchecked","rawtypes"})
-public class EnumerationTransform extends PojoTransform<Enumeration,List> {
-
-	/**
-	 * Converts the specified {@link Enumeration} to a {@link List}.
-	 */
-	@Override /* PojoTransform */
-	public List transform(Enumeration o) {
-		List l = new LinkedList();
-		while (o.hasMoreElements())
-			l.add(o.nextElement());
-		return l;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/IteratorSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/IteratorSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/IteratorSwap.java
new file mode 100644
index 0000000..0980577
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/IteratorSwap.java
@@ -0,0 +1,39 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import java.util.*;
+
+import org.apache.juneau.transform.*;
+
+/**
+ * Transforms {@link Iterator Iterators} to {@code List<Object>} objects.
+ * <p>
+ * 	This is a one-way transform, since {@code Iterators} cannot be reconstituted.
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ */
+@SuppressWarnings({"unchecked","rawtypes"})
+public class IteratorSwap extends PojoSwap<Iterator,List> {
+
+	/**
+	 * Converts the specified {@link Iterator} to a {@link List}.
+	 */
+	@Override /* PojoSwap */
+	public List swap(Iterator o) {
+		List l = new LinkedList();
+		while (o.hasNext())
+			l.add(o.next());
+		return l;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/IteratorTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/IteratorTransform.java b/juneau-core/src/main/java/org/apache/juneau/transforms/IteratorTransform.java
deleted file mode 100644
index d5bfa77..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/IteratorTransform.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import java.util.*;
-
-import org.apache.juneau.transform.*;
-
-/**
- * Transforms {@link Iterator Iterators} to {@code List<Object>} objects.
- * <p>
- * 	This is a one-way transform, since {@code Iterators} cannot be reconstituted.
- *
- * @author James Bognar (james.bognar@salesforce.com)
- */
-@SuppressWarnings({"unchecked","rawtypes"})
-public class IteratorTransform extends PojoTransform<Iterator,List> {
-
-	/**
-	 * Converts the specified {@link Iterator} to a {@link List}.
-	 */
-	@Override /* PojoTransform */
-	public List transform(Iterator o) {
-		List l = new LinkedList();
-		while (o.hasNext())
-			l.add(o.next());
-		return l;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/ReaderSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/ReaderSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/ReaderSwap.java
new file mode 100644
index 0000000..f291521
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/ReaderSwap.java
@@ -0,0 +1,112 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import java.io.*;
+
+import org.apache.juneau.html.*;
+import org.apache.juneau.internal.*;
+import org.apache.juneau.json.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.serializer.*;
+import org.apache.juneau.transform.*;
+import org.apache.juneau.xml.*;
+
+/**
+ * Transforms the contents of a {@link Reader} into an {@code Object}.
+ *
+ *
+ * <h6 class='topic'>Description</h6>
+ * <p>
+ * 	The {@code Reader} must contain JSON, Juneau-generated XML (output from {@link XmlSerializer}),
+ * 		or Juneau-generated HTML (output from {@link JsonSerializer}) in order to be parsed correctly.
+ * <p>
+ * 	Useful for serializing models that contain {@code Readers} created by {@code RestCall} instances.
+ * <p>
+ * 	This is a one-way transform, since {@code Readers} cannot be reconstituted.
+ *
+ *
+ * <h6 class='topic'>Behavior-specific subclasses</h6>
+ * <p>
+ * 	The following direct subclasses are provided for convenience:
+ * <ul class='spaced-list'>
+ * 	<li>{@link Json} - Parses JSON text.
+ * 	<li>{@link Xml} - Parses XML text.
+ * 	<li>{@link Html} - Parses HTML text.
+ * 	<li>{@link PlainText} - Parses plain text.
+ * </ul>
+ *
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ */
+public class ReaderSwap extends PojoSwap<Reader,Object> {
+
+	/** Reader transform for reading JSON text. */
+	public static class Json extends ReaderSwap {
+		/** Constructor */
+		public Json() {
+			super(JsonParser.DEFAULT);
+		}
+	}
+
+	/** Reader transform for reading XML text. */
+	public static class Xml extends ReaderSwap {
+		/** Constructor */
+		public Xml() {
+			super(XmlParser.DEFAULT);
+		}
+	}
+
+	/** Reader transform for reading HTML text. */
+	public static class Html extends ReaderSwap {
+		/** Constructor */
+		public Html() {
+			super(HtmlParser.DEFAULT);
+		}
+	}
+
+	/** Reader transform for reading plain text. */
+	public static class PlainText extends ReaderSwap {
+		/** Constructor */
+		public PlainText() {
+			super(null);
+		}
+	}
+
+	/** The parser to use to parse the contents of the Reader. */
+	private ReaderParser parser;
+
+	/**
+	 * @param parser The parser to use to convert the contents of the reader to Java objects.
+	 */
+	public ReaderSwap(ReaderParser parser) {
+		this.parser = parser;
+	}
+
+	/**
+	 * Converts the specified {@link Reader} to an {@link Object} whose type is determined
+	 * by the contents of the reader.
+	 */
+	@Override /* PojoSwap */
+	public Object swap(Reader o) throws SerializeException {
+		try {
+			if (parser == null)
+				return IOUtils.read(o);
+			return parser.parse(o, beanContext.object());
+		} catch (IOException e) {
+			return e.getLocalizedMessage();
+		} catch (Exception e) {
+			throw new SerializeException("ReaderSwap could not transform object of type ''{0}''", o == null ? null : o.getClass().getName()).initCause(e);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/ReaderTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/ReaderTransform.java b/juneau-core/src/main/java/org/apache/juneau/transforms/ReaderTransform.java
deleted file mode 100644
index 77fb532..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/ReaderTransform.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import java.io.*;
-
-import org.apache.juneau.html.*;
-import org.apache.juneau.internal.*;
-import org.apache.juneau.json.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.serializer.*;
-import org.apache.juneau.transform.*;
-import org.apache.juneau.xml.*;
-
-/**
- * Transforms the contents of a {@link Reader} into an {@code Object}.
- *
- *
- * <h6 class='topic'>Description</h6>
- * <p>
- * 	The {@code Reader} must contain JSON, Juneau-generated XML (output from {@link XmlSerializer}),
- * 		or Juneau-generated HTML (output from {@link JsonSerializer}) in order to be parsed correctly.
- * <p>
- * 	Useful for serializing models that contain {@code Readers} created by {@code RestCall} instances.
- * <p>
- * 	This is a one-way transform, since {@code Readers} cannot be reconstituted.
- *
- *
- * <h6 class='topic'>Behavior-specific subclasses</h6>
- * <p>
- * 	The following direct subclasses are provided for convenience:
- * <ul class='spaced-list'>
- * 	<li>{@link Json} - Parses JSON text.
- * 	<li>{@link Xml} - Parses XML text.
- * 	<li>{@link Html} - Parses HTML text.
- * 	<li>{@link PlainText} - Parses plain text.
- * </ul>
- *
- *
- * @author James Bognar (james.bognar@salesforce.com)
- */
-public class ReaderTransform extends PojoTransform<Reader,Object> {
-
-	/** Reader transform for reading JSON text. */
-	public static class Json extends ReaderTransform {
-		/** Constructor */
-		public Json() {
-			super(JsonParser.DEFAULT);
-		}
-	}
-
-	/** Reader transform for reading XML text. */
-	public static class Xml extends ReaderTransform {
-		/** Constructor */
-		public Xml() {
-			super(XmlParser.DEFAULT);
-		}
-	}
-
-	/** Reader transform for reading HTML text. */
-	public static class Html extends ReaderTransform {
-		/** Constructor */
-		public Html() {
-			super(HtmlParser.DEFAULT);
-		}
-	}
-
-	/** Reader transform for reading plain text. */
-	public static class PlainText extends ReaderTransform {
-		/** Constructor */
-		public PlainText() {
-			super(null);
-		}
-	}
-
-	/** The parser to use to parse the contents of the Reader. */
-	private ReaderParser parser;
-
-	/**
-	 * @param parser The parser to use to convert the contents of the reader to Java objects.
-	 */
-	public ReaderTransform(ReaderParser parser) {
-		this.parser = parser;
-	}
-
-	/**
-	 * Converts the specified {@link Reader} to an {@link Object} whose type is determined
-	 * by the contents of the reader.
-	 */
-	@Override /* PojoTransform */
-	public Object transform(Reader o) throws SerializeException {
-		try {
-			if (parser == null)
-				return IOUtils.read(o);
-			return parser.parse(o, beanContext.object());
-		} catch (IOException e) {
-			return e.getLocalizedMessage();
-		} catch (Exception e) {
-			throw new SerializeException("ReaderTransform could not transform object of type ''{0}''", o == null ? null : o.getClass().getName()).initCause(e);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/XMLGregorianCalendarSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/XMLGregorianCalendarSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/XMLGregorianCalendarSwap.java
new file mode 100644
index 0000000..c0d369c
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/XMLGregorianCalendarSwap.java
@@ -0,0 +1,64 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import javax.xml.datatype.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.internal.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.serializer.*;
+import org.apache.juneau.transform.*;
+
+/**
+ * Transforms {@link XMLGregorianCalendar XMLGregorianCalendars} to ISO8601 date-time {@link String Strings}.
+ * <p>
+ * 	Objects are converted to strings using {@link XMLGregorianCalendar#toXMLFormat()}.
+ * <p>
+ * 	Strings are converted to objects using {@link DatatypeFactory#newXMLGregorianCalendar(String)}.
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ */
+public class XMLGregorianCalendarSwap extends PojoSwap<XMLGregorianCalendar,String> {
+
+	private DatatypeFactory dtf;
+
+	/**
+	 * Constructor.
+	 */
+	public XMLGregorianCalendarSwap() {
+		try {
+			this.dtf = DatatypeFactory.newInstance();
+		} catch (DatatypeConfigurationException e) {
+			throw new RuntimeException(e);
+		}
+	}
+
+	/**
+	 * Converts the specified <code>XMLGregorianCalendar</code> to a {@link String}.
+	 */
+	@Override /* PojoSwap */
+	public String swap(XMLGregorianCalendar b) throws SerializeException {
+		return b.toXMLFormat();
+	}
+
+	/**
+	 * Converts the specified {@link String} to an <code>XMLGregorianCalendar</code>.
+	 */
+	@Override /* PojoSwap */
+	public XMLGregorianCalendar unswap(String s, ClassMeta<?> hint) throws ParseException {
+		if (StringUtils.isEmpty(s))
+			return null;
+		return dtf.newXMLGregorianCalendar(s);
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/XMLGregorianCalendarTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/XMLGregorianCalendarTransform.java b/juneau-core/src/main/java/org/apache/juneau/transforms/XMLGregorianCalendarTransform.java
deleted file mode 100644
index ac56984..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/XMLGregorianCalendarTransform.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import javax.xml.datatype.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.internal.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.serializer.*;
-import org.apache.juneau.transform.*;
-
-/**
- * Transforms {@link XMLGregorianCalendar XMLGregorianCalendars} to ISO8601 date-time {@link String Strings}.
- * <p>
- * 	Objects are converted to strings using {@link XMLGregorianCalendar#toXMLFormat()}.
- * <p>
- * 	Strings are converted to objects using {@link DatatypeFactory#newXMLGregorianCalendar(String)}.
- *
- * @author James Bognar (james.bognar@salesforce.com)
- */
-public class XMLGregorianCalendarTransform extends PojoTransform<XMLGregorianCalendar,String> {
-
-	private DatatypeFactory dtf;
-
-	/**
-	 * Constructor.
-	 */
-	public XMLGregorianCalendarTransform() {
-		try {
-			this.dtf = DatatypeFactory.newInstance();
-		} catch (DatatypeConfigurationException e) {
-			throw new RuntimeException(e);
-		}
-	}
-
-	/**
-	 * Converts the specified <code>XMLGregorianCalendar</code> to a {@link String}.
-	 */
-	@Override /* PojoTransform */
-	public String transform(XMLGregorianCalendar b) throws SerializeException {
-		return b.toXMLFormat();
-	}
-
-	/**
-	 * Converts the specified {@link String} to an <code>XMLGregorianCalendar</code>.
-	 */
-	@Override /* PojoTransform */
-	public XMLGregorianCalendar normalize(String s, ClassMeta<?> hint) throws ParseException {
-		if (StringUtils.isEmpty(s))
-			return null;
-		return dtf.newXMLGregorianCalendar(s);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonParser.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonParser.java
index daeddf3..05a4311 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonParser.java
@@ -93,7 +93,7 @@ public class UonParser extends ReaderParser {
 		BeanContext bc = session.getBeanContext();
 		if (nt == null)
 			nt = (ClassMeta<T>)object();
-		PojoTransform<T,Object> transform = (PojoTransform<T,Object>)nt.getPojoTransform();
+		PojoSwap<T,Object> transform = (PojoSwap<T,Object>)nt.getPojoSwap();
 		ClassMeta<?> ft = nt.getTransformedClassMeta();
 
 		Object o = null;
@@ -202,7 +202,7 @@ public class UonParser extends ReaderParser {
 		}
 
 		if (transform != null && o != null)
-			o = transform.normalize(o, nt);
+			o = transform.unswap(o, nt);
 
 		if (outer != null)
 			setParent(nt, o, outer);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonSerializer.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonSerializer.java
index 4c11909..db3c13c 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UonSerializer.java
@@ -274,9 +274,9 @@ public class UonSerializer extends WriterSerializer {
 		addClassAttr = (session.isAddClassAttrs() && ! eType.equals(aType));
 
 		// Transform if necessary
-		PojoTransform transform = aType.getPojoTransform();				// The transform
+		PojoSwap transform = aType.getPojoSwap();				// The transform
 		if (transform != null) {
-			o = transform.transform(o);
+			o = transform.swap(o);
 
 			// If the transform's getTransformedClass() method returns Object, we need to figure out
 			// the actual type now.

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParser.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParser.java
index d759965..9e081c3 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingParser.java
@@ -74,7 +74,7 @@ public class UrlEncodingParser extends UonParser {
 		BeanContext bc = session.getBeanContext();
 		if (nt == null)
 			nt = (ClassMeta<T>)object();
-		PojoTransform<T,Object> transform = (PojoTransform<T,Object>)nt.getPojoTransform();
+		PojoSwap<T,Object> transform = (PojoSwap<T,Object>)nt.getPojoSwap();
 		ClassMeta<?> ft = nt.getTransformedClassMeta();
 
 		int c = r.peek();
@@ -126,7 +126,7 @@ public class UrlEncodingParser extends UonParser {
 		}
 
 		if (transform != null && o != null)
-			o = transform.normalize(o, nt);
+			o = transform.unswap(o, nt);
 
 		if (outer != null)
 			setParent(nt, o, outer);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializer.java b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializer.java
index fd04afb..9b7541d 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/UrlEncodingSerializer.java
@@ -241,9 +241,9 @@ public class UrlEncodingSerializer extends UonSerializer {
 		addClassAttr = (session.isAddClassAttrs());
 
 		// Transform if necessary
-		PojoTransform transform = aType.getPojoTransform();				// The transform
+		PojoSwap transform = aType.getPojoSwap();				// The transform
 		if (transform != null) {
-			o = transform.transform(o);
+			o = transform.swap(o);
 
 			// If the transform's getTransformedClass() method returns Object, we need to figure out
 			// the actual type now.

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html b/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html
index 932c418..f67d1ed 100644
--- a/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html
+++ b/juneau-core/src/main/java/org/apache/juneau/urlencoding/package.html
@@ -110,7 +110,7 @@
 		<li>Multi-dimensional arrays of any type on this list.
 		<li>Java Beans with properties of any type on this list.
 		<li>Classes with standard transformations to and from <code>Strings</code> (e.g. classes containing <code>toString()</code>, <code>fromString()</code>, <code>valueOf()</code>, <code>constructor(String)</code>).
-		<li>Non-serializable classes and properties with associated <code>PojoTransforms</code> that convert them to serializable forms.
+		<li>Non-serializable classes and properties with associated <code>PojoSwaps</code> that convert them to serializable forms.
 	</ul>
 	<p>
 		Refer to <a href='../package-summary.html#PojoCategories' class='doclink'>POJO Categories</a> for a complete definition of supported POJOs.
@@ -215,7 +215,7 @@
 			<li>On classes through the <code><ja>@Bean</ja></code> annotation.
 			<li>On bean properties through the <code><ja>@BeanProperty</ja></code> annotations.
 		</ul>
-		<h6 class='figure'>Example:  A serialized Calendar object using <code>CalendarTransform.RFC2822DTZ</code> transform.</h6>
+		<h6 class='figure'>Example:  A serialized Calendar object using <code>CalendarSwap.RFC2822DTZ</code> transform.</h6>
 		<p class='bcode'>	http://localhost/sample?<xa>a1=<js>Sun~,+03+Mar+1901+09:05:06+GMT</js></p>
 		<p>
 			For more information about transforms, refer to {@link org.apache.juneau.transform}.
@@ -368,7 +368,7 @@
 		<jk>public</jk> URI <jf>uri</jf>;
 		<jk>public</jk> URI <jf>addressBookUri</jf>;
 
-		<ja>@BeanProperty</ja>(transform=CalendarTransform.ISO8601DTZ.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
+		<ja>@BeanProperty</ja>(transform=CalendarSwap.ISO8601DTZ.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
 
 
 		<jc>// Bean constructor (needed by parser)</jc>
@@ -860,7 +860,7 @@
 	URI uri = m.get(URI.<jk>class</jk>, <js>"uri"</js>);
 
 	<jc>// Get a value using a transform.</jc>
-	CalendarTransform transform = <jk>new</jk> CalendarTransform.ISO8601DTZ();
+	CalendarSwap transform = <jk>new</jk> CalendarSwap.ISO8601DTZ();
 	Calendar birthDate = m.get(transform, <js>"birthDate"</js>);
 
 	<jc>// Get the addresses.</jc>

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/xml/XmlParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlParser.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlParser.java
index cebfb1a..f4b27af 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlParser.java
@@ -67,7 +67,7 @@ public class XmlParser extends ReaderParser {
 		BeanContext bc = session.getBeanContext();
 		if (nt == null)
 			nt = (ClassMeta<T>)object();
-		PojoTransform<T,Object> transform = (PojoTransform<T,Object>)nt.getPojoTransform();
+		PojoSwap<T,Object> transform = (PojoSwap<T,Object>)nt.getPojoSwap();
 		ClassMeta<?> ft = nt.getTransformedClassMeta();
 		session.setCurrentClass(ft);
 
@@ -171,7 +171,7 @@ public class XmlParser extends ReaderParser {
 		}
 
 		if (transform != null && o != null)
-			o = transform.normalize(o, nt);
+			o = transform.unswap(o, nt);
 
 		if (outer != null)
 			setParent(nt, o, outer);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializer.java b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializer.java
index ee75f5a..2d9c285 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/XmlSerializer.java
@@ -327,9 +327,9 @@ public class XmlSerializer extends WriterSerializer {
 			gType = aType.getTransformedClassMeta();
 
 			// Transform if necessary
-			PojoTransform transform = aType.getPojoTransform();
+			PojoSwap transform = aType.getPojoSwap();
 			if (transform != null) {
-				o = transform.transform(o);
+				o = transform.swap(o);
 
 				// If the transform's getTransformedClass() method returns Object, we need to figure out
 				// the actual type now.

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/xml/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/xml/package.html b/juneau-core/src/main/java/org/apache/juneau/xml/package.html
index bb0534f..9c7a2a3 100644
--- a/juneau-core/src/main/java/org/apache/juneau/xml/package.html
+++ b/juneau-core/src/main/java/org/apache/juneau/xml/package.html
@@ -852,7 +852,7 @@
 	<jk>public class</jk> Person {
 		
 		<jc>// Bean properties</jc>
-		<ja>@BeanProperty</ja>(transform=CalendarTransform.ISO8601DTZ.<jk>class</jk>) <jk>public</jk> Calendar birthDate;
+		<ja>@BeanProperty</ja>(transform=CalendarSwap.ISO8601DTZ.<jk>class</jk>) <jk>public</jk> Calendar birthDate;
 		...
 		
 		<jc>// Normal constructor</jc>
@@ -1031,7 +1031,7 @@
 		<jk>public</jk> String <jf>name</jf>;
 		<ja>@BeanProperty</ja>(beanUri=<jk>true</jk>) <jk>public</jk> URI <jf>uri</jf>;
 		<jk>public</jk> URI <jf>addressBookUri</jf>;
-		<ja>@BeanProperty</ja>(transform=CalendarTransform.ISO8601DTZ.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
+		<ja>@BeanProperty</ja>(transform=CalendarSwap.ISO8601DTZ.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
 		<jk>public</jk> LinkedList&lt;Address&gt; <jf>addresses</jf> = <jk>new</jk> LinkedList&lt;Address&gt;();
 
 		<jc>// Bean constructor (needed by parser)</jc>
@@ -1711,7 +1711,7 @@
 	URI uri = m.get(URI.<jk>class</jk>, <js>"uri"</js>);
 
 	<jc>// Get a value using a transform.</jc>
-	CalendarTransform transform = <jk>new</jk> CalendarTransform.ISO8601DTZ();
+	CalendarSwap transform = <jk>new</jk> CalendarSwap.ISO8601DTZ();
 	Calendar birthDate = m.get(transform, <js>"birthDate"</js>);
 
 	<jc>// Get the addresses.</jc>


[5/8] incubator-juneau git commit: Tweak new name 'Transform' into 'BeanFilter' and 'PojoSwap'

Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transform/SurrogateSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/SurrogateSwap.java b/juneau-core/src/main/java/org/apache/juneau/transform/SurrogateSwap.java
new file mode 100644
index 0000000..f1164cc
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transform/SurrogateSwap.java
@@ -0,0 +1,207 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transform;
+
+import java.lang.reflect.*;
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.annotation.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.serializer.*;
+
+
+/**
+ * Specialized {@link PojoSwap} for surrogate classes.
+ * <p>
+ * Surrogate classes are used in place of other classes during serialization.
+ * For example, you may want to use a surrogate class to change the names or order of bean
+ * properties on a bean.
+ * <p>
+ * The following is an example of a surrogate class change changes a property name:
+ * <p class='bcode'>
+ * 	<jk>public class</jk> SurrogateClass {
+ * 		<jk>public</jk> String surrogateField;  <jc>// New bean property</jc>
+ *
+ * 		<jk>public</jk> SurrogateClass(NormalClass normalClass) {
+ * 			<jk>this</jk>.surrogateField = normalClass.normalField;
+ * 		}
+ * 	}
+ * </p>
+ * <p>
+ * Optionally, a public static method can be used to untransform a class during parsing:
+ * <p class='bcode'>
+ * 	<jk>public class</jk> SurrogateClass {
+ * 		...
+ * 		<jk>public static</jk> NormalClass <jsm>toNormalClass</jsm>(SurrogateClass surrogateClass) {
+ * 			<jk>return new</jk> NormalClass(surrogateClass.transformedField);
+ * 		}
+ * 	}
+ * </p>
+ * <p>
+ * Surrogate classes must conform to the following:
+ * <ul class='spaced-list'>
+ * 	<li>It must have a one or more public constructors that take in a single parameter whose type is the normal types.
+ * 		(It is possible to define a class as a surrogate for multiple class types by using multiple constructors with
+ * 		different parameter types).
+ * 	<li>It optionally can have a public static method that takes in a single parameter whose type is the transformed type
+ * 		and returns an instance of the normal type.  This is called the untransform method.  The method can be called anything.
+ * 	<li>If an untransform method is present, the class must also contain a no-arg constructor (so that the transformed class
+ * 		can be instantiated by the parser before being converted into the normal class by the untransform method).
+ * </ul>
+ * <p>
+ * Surrogate classes are associated with serializers and parsers using the {@link CoreApi#addTransforms(Class...)} method.
+ * <p class='bcode'>
+ * 	<ja>@Test</ja>
+ * 	<jk>public void</jk> test() <jk>throws</jk> Exception {
+ * 		JsonSerializer s = <jk>new</jk> JsonSerializer.Simple().addTransforms(Surrogate.<jk>class</jk>);
+ * 		JsonParser p = <jk>new</jk> JsonParser().addTransforms(Surrogate.<jk>class</jk>);
+ * 		String r;
+ * 		Normal n = Normal.<jsm>create</jsm>();
+ *
+ * 		r = s.serialize(n);
+ * 		assertEquals(<js>"{f2:'f1'}"</js>, r);
+ *
+ * 		n = p.parse(r, Normal.<jk>class</jk>);
+ * 		assertEquals(<js>"f1"</js>, n.f1);
+ * 	}
+ *
+ * 	<jc>// The normal class</jc>
+ * 	<jk>public class</jk> Normal {
+ * 		<jk>public</jk> String f1;
+ *
+ * 		<jk>public static</jk> Normal <jsm>create</jsm>() {
+ * 			Normal n = <jk>new</jk> Normal();
+ * 			n.f1 = <js>"f1"</js>;
+ * 			<jk>return</jk> n;
+ * 		}
+ * 	}
+ *
+ * 	<jc>// The surrogate class</jc>
+ * 	<jk>public static class</jk> Surrogate {
+ * 		<jk>public</jk> String f2;
+ *
+ * 		<jc>// Surrogate constructor</jc>
+ * 		<jk>public</jk> Surrogate(Normal n) {
+ * 			f2 = n.f1;
+ * 		}
+ *
+ * 		<jc>// Constructor used during parsing (only needed if untransform method specified)</jc>
+ * 		<jk>public</jk> Surrogate() {}
+ *
+ * 		<jc>// Untransform method (optional)</jc>
+ * 		<jk>public static</jk> Normal <jsm>toNormal</jsm>(Surrogate f) {
+ * 			Normal n = <jk>new</jk> Normal();
+ * 			n.f1 = f.f2;
+ * 			<jk>return</jk> n;
+ * 		}
+ * 	}
+ * </p>
+ * <p>
+ * It should be noted that a surrogate class is functionally equivalent to the following {@link PojoSwap} implementation:
+ * <p class='bcode'>
+ * 	<jk>public static class</jk> SurrogateSwap <jk>extends</jk> PojoSwap&lt;Normal,Surrogate&gt; {
+ * 		<jk>public</jk> Surrogate swap(Normal n) <jk>throws</jk> SerializeException {
+ * 			<jk>return new</jk> Surrogate(n);
+ * 		}
+ * 		<jk>public</jk> Normal unswap(Surrogate s, ClassMeta<?> hint) <jk>throws</jk> ParseException {
+ * 			<jk>return</jk> Surrogate.<jsm>toNormal</jsm>(s);
+ * 		}
+ * 	}
+ * </p>
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ * @param <T> The class type that this transform applies to.
+ * @param <F> The transformed class type.
+ */
+public class SurrogateSwap<T,F> extends PojoSwap<T,F> {
+
+	private Constructor<F> constructor;   // public F(T t);
+	private Method untransformMethod;        // public static T valueOf(F f);
+
+	/**
+	 * Constructor.
+	 *
+	 * @param forClass The normal class.
+	 * @param constructor The constructor on the surrogate class that takes the normal class as a parameter.
+	 * @param untransformMethod The static method that converts surrogate objects into normal objects.
+	 */
+	protected SurrogateSwap(Class<T> forClass, Constructor<F> constructor, Method untransformMethod) {
+		super(forClass, constructor.getDeclaringClass());
+		this.constructor = constructor;
+		this.untransformMethod = untransformMethod;
+	}
+
+	/**
+	 * Given the specified surrogate class, return the list of POJO swaps.
+	 * A transform is returned for each public 1-arg constructor found.
+	 * Returns an empty list if no public 1-arg constructors are found.
+	 *
+	 * @param c The surrogate class.
+	 * @return The list of POJO swaps that apply to this class.
+	 */
+	@SuppressWarnings({"unchecked", "rawtypes"})
+	public static List<SurrogateSwap<?,?>> findTransforms(Class<?> c) {
+		List<SurrogateSwap<?,?>> l = new LinkedList<SurrogateSwap<?,?>>();
+		for (Constructor<?> cc : c.getConstructors()) {
+			if (cc.getAnnotation(BeanIgnore.class) == null) {
+				Class<?>[] pt = cc.getParameterTypes();
+
+				// Only constructors with one parameter.
+				// Ignore instance class constructors.
+				if (pt.length == 1 && pt[0] != c.getDeclaringClass()) {
+					int mod = cc.getModifiers();
+					if (Modifier.isPublic(mod)) {  // Only public constructors.
+
+						// Find the untransform method if there is one.
+						Method untransformMethod = null;
+						for (Method m : c.getMethods()) {
+							if (pt[0].equals(m.getReturnType())) {
+								Class<?>[] mpt = m.getParameterTypes();
+								if (mpt.length == 1 && mpt[0].equals(c)) { // Only methods with one parameter and where the return type matches this class.
+									int mod2 = m.getModifiers();
+									if (Modifier.isPublic(mod2) && Modifier.isStatic(mod2))  // Only public static methods.
+										untransformMethod = m;
+								}
+							}
+						}
+
+						l.add(new SurrogateSwap(pt[0], cc, untransformMethod));
+					}
+				}
+			}
+		}
+		return l;
+	}
+
+	@Override /* PojoSwap */
+	public F swap(T o) throws SerializeException {
+		try {
+			return constructor.newInstance(o);
+		} catch (Exception e) {
+			throw new SerializeException(e);
+		}
+	}
+
+	@Override /* PojoSwap */
+	@SuppressWarnings("unchecked")
+	public T unswap(F f, ClassMeta<?> hint) throws ParseException {
+		if (untransformMethod == null)
+			throw new ParseException("static valueOf({0}) method not implement on surrogate class ''{1}''", f.getClass().getName(), getNormalClass().getName());
+		try {
+			return (T)untransformMethod.invoke(null, f);
+		} catch (Exception e) {
+			throw new ParseException(e);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transform/SurrogateTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/SurrogateTransform.java b/juneau-core/src/main/java/org/apache/juneau/transform/SurrogateTransform.java
deleted file mode 100644
index 2472f4f..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transform/SurrogateTransform.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transform;
-
-import java.lang.reflect.*;
-import java.util.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.annotation.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.serializer.*;
-
-
-/**
- * Specialized {@link PojoTransform} for surrogate classes.
- * <p>
- * Surrogate classes are used in place of other classes during serialization.
- * For example, you may want to use a surrogate class to change the names or order of bean
- * properties on a bean.
- * <p>
- * The following is an example of a surrogate class change changes a property name:
- * <p class='bcode'>
- * 	<jk>public class</jk> SurrogateClass {
- * 		<jk>public</jk> String surrogateField;  <jc>// New bean property</jc>
- *
- * 		<jk>public</jk> SurrogateClass(NormalClass normalClass) {
- * 			<jk>this</jk>.surrogateField = normalClass.normalField;
- * 		}
- * 	}
- * </p>
- * <p>
- * Optionally, a public static method can be used to untransform a class during parsing:
- * <p class='bcode'>
- * 	<jk>public class</jk> SurrogateClass {
- * 		...
- * 		<jk>public static</jk> NormalClass <jsm>toNormalClass</jsm>(SurrogateClass surrogateClass) {
- * 			<jk>return new</jk> NormalClass(surrogateClass.transformedField);
- * 		}
- * 	}
- * </p>
- * <p>
- * Surrogate classes must conform to the following:
- * <ul class='spaced-list'>
- * 	<li>It must have a one or more public constructors that take in a single parameter whose type is the normal types.
- * 		(It is possible to define a class as a surrogate for multiple class types by using multiple constructors with
- * 		different parameter types).
- * 	<li>It optionally can have a public static method that takes in a single parameter whose type is the transformed type
- * 		and returns an instance of the normal type.  This is called the untransform method.  The method can be called anything.
- * 	<li>If an untransform method is present, the class must also contain a no-arg constructor (so that the transformed class
- * 		can be instantiated by the parser before being converted into the normal class by the untransform method).
- * </ul>
- * <p>
- * Surrogate classes are associated with serializers and parsers using the {@link CoreApi#addTransforms(Class...)} method.
- * <p class='bcode'>
- * 	<ja>@Test</ja>
- * 	<jk>public void</jk> test() <jk>throws</jk> Exception {
- * 		JsonSerializer s = <jk>new</jk> JsonSerializer.Simple().addTransforms(Surrogate.<jk>class</jk>);
- * 		JsonParser p = <jk>new</jk> JsonParser().addTransforms(Surrogate.<jk>class</jk>);
- * 		String r;
- * 		Normal n = Normal.<jsm>create</jsm>();
- *
- * 		r = s.serialize(n);
- * 		assertEquals(<js>"{f2:'f1'}"</js>, r);
- *
- * 		n = p.parse(r, Normal.<jk>class</jk>);
- * 		assertEquals(<js>"f1"</js>, n.f1);
- * 	}
- *
- * 	<jc>// The normal class</jc>
- * 	<jk>public class</jk> Normal {
- * 		<jk>public</jk> String f1;
- *
- * 		<jk>public static</jk> Normal <jsm>create</jsm>() {
- * 			Normal n = <jk>new</jk> Normal();
- * 			n.f1 = <js>"f1"</js>;
- * 			<jk>return</jk> n;
- * 		}
- * 	}
- *
- * 	<jc>// The surrogate class</jc>
- * 	<jk>public static class</jk> Surrogate {
- * 		<jk>public</jk> String f2;
- *
- * 		<jc>// Surrogate constructor</jc>
- * 		<jk>public</jk> Surrogate(Normal n) {
- * 			f2 = n.f1;
- * 		}
- *
- * 		<jc>// Constructor used during parsing (only needed if untransform method specified)</jc>
- * 		<jk>public</jk> Surrogate() {}
- *
- * 		<jc>// Untransform method (optional)</jc>
- * 		<jk>public static</jk> Normal <jsm>toNormal</jsm>(Surrogate f) {
- * 			Normal n = <jk>new</jk> Normal();
- * 			n.f1 = f.f2;
- * 			<jk>return</jk> n;
- * 		}
- * 	}
- * </p>
- * <p>
- * It should be noted that a surrogate class is functionally equivalent to the following {@link PojoTransform} implementation:
- * <p class='bcode'>
- * 	<jk>public static class</jk> SurrogateTransform <jk>extends</jk> PojoTransform&lt;Normal,Surrogate&gt; {
- * 		<jk>public</jk> Surrogate transform(Normal n) <jk>throws</jk> SerializeException {
- * 			<jk>return new</jk> Surrogate(n);
- * 		}
- * 		<jk>public</jk> Normal normalize(Surrogate s, ClassMeta<?> hint) <jk>throws</jk> ParseException {
- * 			<jk>return</jk> Surrogate.<jsm>toNormal</jsm>(s);
- * 		}
- * 	}
- * </p>
- *
- * @author James Bognar (james.bognar@salesforce.com)
- * @param <T> The class type that this transform applies to.
- * @param <F> The transformed class type.
- */
-public class SurrogateTransform<T,F> extends PojoTransform<T,F> {
-
-	private Constructor<F> constructor;   // public F(T t);
-	private Method untransformMethod;        // public static T valueOf(F f);
-
-	/**
-	 * Constructor.
-	 *
-	 * @param forClass The normal class.
-	 * @param constructor The constructor on the surrogate class that takes the normal class as a parameter.
-	 * @param untransformMethod The static method that converts surrogate objects into normal objects.
-	 */
-	protected SurrogateTransform(Class<T> forClass, Constructor<F> constructor, Method untransformMethod) {
-		super(forClass, constructor.getDeclaringClass());
-		this.constructor = constructor;
-		this.untransformMethod = untransformMethod;
-	}
-
-	/**
-	 * Given the specified surrogate class, return the list of POJO transforms.
-	 * A transform is returned for each public 1-arg constructor found.
-	 * Returns an empty list if no public 1-arg constructors are found.
-	 *
-	 * @param c The surrogate class.
-	 * @return The list of POJO transforms that apply to this class.
-	 */
-	@SuppressWarnings({"unchecked", "rawtypes"})
-	public static List<SurrogateTransform<?,?>> findTransforms(Class<?> c) {
-		List<SurrogateTransform<?,?>> l = new LinkedList<SurrogateTransform<?,?>>();
-		for (Constructor<?> cc : c.getConstructors()) {
-			if (cc.getAnnotation(BeanIgnore.class) == null) {
-				Class<?>[] pt = cc.getParameterTypes();
-
-				// Only constructors with one parameter.
-				// Ignore instance class constructors.
-				if (pt.length == 1 && pt[0] != c.getDeclaringClass()) {
-					int mod = cc.getModifiers();
-					if (Modifier.isPublic(mod)) {  // Only public constructors.
-
-						// Find the untransform method if there is one.
-						Method untransformMethod = null;
-						for (Method m : c.getMethods()) {
-							if (pt[0].equals(m.getReturnType())) {
-								Class<?>[] mpt = m.getParameterTypes();
-								if (mpt.length == 1 && mpt[0].equals(c)) { // Only methods with one parameter and where the return type matches this class.
-									int mod2 = m.getModifiers();
-									if (Modifier.isPublic(mod2) && Modifier.isStatic(mod2))  // Only public static methods.
-										untransformMethod = m;
-								}
-							}
-						}
-
-						l.add(new SurrogateTransform(pt[0], cc, untransformMethod));
-					}
-				}
-			}
-		}
-		return l;
-	}
-
-	@Override /* PojoTransform */
-	public F transform(T o) throws SerializeException {
-		try {
-			return constructor.newInstance(o);
-		} catch (Exception e) {
-			throw new SerializeException(e);
-		}
-	}
-
-	@Override /* PojoTransform */
-	@SuppressWarnings("unchecked")
-	public T normalize(F f, ClassMeta<?> hint) throws ParseException {
-		if (untransformMethod == null)
-			throw new ParseException("static valueOf({0}) method not implement on surrogate class ''{1}''", f.getClass().getName(), getNormalClass().getName());
-		try {
-			return (T)untransformMethod.invoke(null, f);
-		} catch (Exception e) {
-			throw new ParseException(e);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transform/Transform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/Transform.java b/juneau-core/src/main/java/org/apache/juneau/transform/Transform.java
index 3fa17f7..2c72c88 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transform/Transform.java
+++ b/juneau-core/src/main/java/org/apache/juneau/transform/Transform.java
@@ -15,7 +15,7 @@ package org.apache.juneau.transform;
 import org.apache.juneau.*;
 
 /**
- * Parent class for all bean and POJO transforms.
+ * Parent class for all bean and POJO swaps.
  *
  *
  * <h6 class='topic'>Description</h6>
@@ -30,8 +30,8 @@ import org.apache.juneau.*;
  * <p>
  * 	There are 2 subclasses of transforms:
  * <ul class='spaced-list'>
- * 	<li>{@link PojoTransform} - Non-bean transforms for converting POJOs into serializable equivalents.
- * 	<li>{@link BeanTransform} - Bean transforms for configuring how beans are handled.
+ * 	<li>{@link PojoSwap} - Non-bean filters for converting POJOs into serializable equivalents.
+ * 	<li>{@link BeanFilter} - Bean filters for configuring how beans are handled.
  * </ul>
  * <p>
  * 	Transforms are associated with bean contexts (and serializers/parsers) through the {@link ContextFactory#addToProperty(String,Object)}
@@ -51,9 +51,9 @@ public class Transform {
 
 	/** The transform subtype */
 	public static enum TransformType {
-		/** PojoTransform */
+		/** PojoSwap */
 		POJO,
-		/** BeanTransform */
+		/** BeanFilter */
 		BEAN
 	}
 
@@ -63,7 +63,7 @@ public class Transform {
 	/** The bean context that this transform instance belongs to. */
 	protected BeanContext beanContext;
 
-	/** Whether this is a BeanTransform or PojoTransform. */
+	/** Whether this is a BeanFilter or PojoSwap. */
 	protected TransformType type = TransformType.POJO;
 
 	Transform() {}
@@ -93,7 +93,7 @@ public class Transform {
 	}
 
 	/**
-	 * Returns whether this is an instance of {@link PojoTransform} or {@link BeanTransform}.
+	 * Returns whether this is an instance of {@link PojoSwap} or {@link BeanFilter}.
 	 *
 	 * @return The transform type.
 	 */

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transform/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transform/package.html b/juneau-core/src/main/java/org/apache/juneau/transform/package.html
index a94e213..059b769 100644
--- a/juneau-core/src/main/java/org/apache/juneau/transform/package.html
+++ b/juneau-core/src/main/java/org/apache/juneau/transform/package.html
@@ -60,9 +60,9 @@
 <ol class='toc'>
 	<li><p><a class='doclink' href='#Transforms'>Transforms</a></p>
 	<ol>
-		<li><p><a class='doclink' href='#BeanTransforms'>BeanTransform Class</a></p>
-		<li><p><a class='doclink' href='#PojoTransforms'>PojoTransform Class</a></p>
-		<li><p><a class='doclink' href='#PojoTransforms_OneWay'>One-Way PojoTransforms</a></p>
+		<li><p><a class='doclink' href='#BeanFilters'>BeanFilter Class</a></p>
+		<li><p><a class='doclink' href='#PojoSwaps'>PojoSwap Class</a></p>
+		<li><p><a class='doclink' href='#PojoSwaps_OneWay'>One-Way PojoSwaps</a></p>
 		<li><p><a class='doclink' href='#StopClasses'>Stop Classes</a></p>
 		<li><p><a class='doclink' href='#SurrogateClasses'>Surrogate Classes</a></p>
 		<li><p><a class='doclink' href='#ToObjectMaps'>Serializing to ObjectMaps</a></p>
@@ -81,8 +81,8 @@
 	<ul class='spaced-list'>
 		<li>{@link org.apache.juneau.transform.Transform} - Top-level interface for all transforms.
 	<ul class='spaced-list'>
-		<li>{@link org.apache.juneau.transform.BeanTransform} - Transforms that alter the way beans are handled.
-		<li>{@link org.apache.juneau.transform.PojoTransform} - Transforms that transform non-serializable POJOs into serializable POJOs during serialization 
+		<li>{@link org.apache.juneau.transform.BeanFilter} - Transforms that alter the way beans are handled.
+		<li>{@link org.apache.juneau.transform.PojoSwap} - Transforms that swap non-serializable POJOs with serializable POJOs during serialization 
 			(and optionally vis-versa during parsing).
 		</ul>
 	</ul>
@@ -100,15 +100,15 @@
 		<li>{@link org.apache.juneau.server.jaxrs.JuneauProvider#transforms()} - On all serializers and parsers defined on a JAX-RS provider.
 	</ul>
 	<p>
-		Transforms (typically <code>PojoTransforms</code>) can also be associated with classes through the {@link org.apache.juneau.annotation.Transform @Transform} annotation. 
+		Swaps can also be associated with classes through the {@link org.apache.juneau.annotation.Pojo @Pojo} annotation. 
 	</p>
 		
 	<!-- ======================================================================================================== -->
-	<a id="BeanTransforms"></a>
-	<h3 class='topic' onclick='toggle(this)'>1.1 - BeanTransform Class</h3>
+	<a id="BeanFilters"></a>
+	<h3 class='topic' onclick='toggle(this)'>1.1 - BeanFilter Class</h3>
 	<div class='topic'>
 		<p>
-			Bean transforms are used to tailor how Juneau handles bean classes.
+			Bean filters are used to tailor how Juneau handles bean classes.
 			They can be used for the following purposes:
 		</p>
 		<ul class='spaced-list'>
@@ -120,7 +120,7 @@
 		<p>
 			It should be noted that the {@link org.apache.juneau.annotation.Bean @Bean} annotation provides equivalent functionality
 				through annotations.  
-			However, the <code>BeanTransform</code> class allows you to provide the same features when you do
+			However, the <code>BeanFilter</code> class allows you to provide the same features when you do
 				not have access to the source code.
 		<p>
 		<h5 class='topic'>Examples</h5>
@@ -128,13 +128,13 @@
 		<h6 class='topic'>Explicitly specify which properties are visible on a bean class</h6>
 		<p class='bcode'>
 	<jc>// Define transform that orders properties by "age" then "name"</jc>
-	<jk>public class</jk> MyTransform <jk>extends</jk> BeanTransform&lt;Person&gt; {
-		<jk>public</jk> MyTransform() {
+	<jk>public class</jk> MyBeanFilter <jk>extends</jk> BeanFilter&lt;Person&gt; {
+		<jk>public</jk> MyBeanFilter() {
 			setProperties(<js>"age"</js>,<js>"name"</js>);
 		}
 	}
 	
-	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(MyTransform.<jk>class</jk>);
+	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(MyBeanFilter.<jk>class</jk>);
 	Person p = getPerson();
 	String json = s.serialize(p);  <jc>// Prints "{age:45,name:'John Smith'}"</jc>
 		</p>
@@ -151,13 +151,13 @@
 		<h6 class='topic'>Exclude which properties are visible on a bean class</h6>
 		<p class='bcode'>
 	<jc>// Define transform that excludes "name"</jc>
-	<jk>public class</jk> MyTransform <jk>extends</jk> BeanTransform&lt;Person&gt; {
-		<jk>public</jk> MyTransform() {
+	<jk>public class</jk> MyBeanFilter <jk>extends</jk> BeanFilter&lt;Person&gt; {
+		<jk>public</jk> MyBeanFilter() {
 			setExcludeProperties(<js>"name"</js>);
 		}
 	}
 	
-	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(MyTransform.<jk>class</jk>);
+	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(MyBeanFilter.<jk>class</jk>);
 	Person p = getPerson();
 	String json = s.serialize(p);  <jc>// Prints "{age:45}"</jc>
 		</p>
@@ -174,8 +174,8 @@
 		<h6 class='topic'>Define specialized property namers</h6>
 		<p class='bcode'>
 	<jc>// Define transform with our own property namer.</jc>
-	<jk>public class</jk> MyTransform <jk>extends</jk> BeanTransform&lt;Person&gt; {
-		<jk>public</jk> MyTransform() {
+	<jk>public class</jk> MyBeanFilter <jk>extends</jk> BeanFilter&lt;Person&gt; {
+		<jk>public</jk> MyBeanFilter() {
 			setPropertyNamer(UpperCasePropertyNamer.<jk>class</jk>);
 		}
 	}
@@ -190,12 +190,12 @@
 	}
 	
 	<jc>// Serialize to JSON</jc>
-	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(MyTransform.<jk>class</jk>);
+	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(MyBeanFilter.<jk>class</jk>);
 	Person person = getPerson();
 	String json = s.serialize(p);  <jc>// Prints "{AGE:45,NAME:'John Smith'}"</jc>
 	
 	<jc>// Parse back into bean</jc>
-	ReaderParser p = <jk>new</jk> JsonParser().addTransforms(MyTransform.<jk>class</jk>);
+	ReaderParser p = <jk>new</jk> JsonParser().addTransforms(MyBeanFilter.<jk>class</jk>);
 	person = p.parse(json, Person.class); <jc>// Read back into original object</jc>
 		</p>
 		<p>
@@ -238,8 +238,8 @@
 		</p>		
 		<p class='bcode'>
 	<jc>// Define transform with our own property namer.</jc>
-	<jk>public class</jk> MyClassTransform <jk>extends</jk> BeanTransform&lt;MyClass&gt; {
-		<jk>public</jk> MyClassTransform() {
+	<jk>public class</jk> MyBeanFilter <jk>extends</jk> BeanFilter&lt;MyClass&gt; {
+		<jk>public</jk> MyBeanFilter() {
 			setSubTypeProperty(<js>"subType"</js>);
 			addSubType(MyClassBar.<jk>class</jk>, <js>"BAR"</js>);
 			addSubType(MyClassBaz.<jk>class</jk>, <js>"BAZ"</js>);
@@ -252,12 +252,12 @@
 		</p>
 		<p class='bcode'>
 	<jc>// Serialize to JSON</jc>
-	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(MyClassTransform.<jk>class</jk>);
+	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(MyBeanFilter.<jk>class</jk>);
 	MyClass c = <jk>new</jk> MyClassBar();
 	String json = s.serialize(p);  <jc>// Prints "{subType:'BAR',foo:'foo',bar:'bar'}"</jc>
 	
 	<jc>// Parse back into bean</jc>
-	ReaderParser p = <jk>new</jk> JsonParser().addTransforms(MyClassTransform.<jk>class</jk>);
+	ReaderParser p = <jk>new</jk> JsonParser().addTransforms(MyBeanFilter.<jk>class</jk>);
 	c = p.parse(json, MyClass.<jk>class</jk>); <jc>// c is an instance of MyClassBar</jc>
 		</p>	
 		<p>
@@ -290,7 +290,7 @@
 				<code>HttpServletRequest</code> and <code>HttpServletResponse</code>.
 			However, we really only want to serialize the properties defined on those specific APIs, not 
 				vendor-specific methods on the instances of those classes.
-			This can be done through the <code>interfaceClass</code> property of a bean transform.
+			This can be done through the <code>interfaceClass</code> property of a bean filter.
 		</p>
 		<p>
 			For example, let's define the following parent class and subclass:
@@ -312,8 +312,8 @@
 		</p>
 		<p class='bcode'>
 	<jc>// Define transform that limits properties to only those defined on MyClass</jc>
-	<jk>public class</jk> MyClassTransform <jk>extends</jk> BeanTransform&lt;MyClass&gt; {
-		<jk>public</jk> MyClassTransform() {
+	<jk>public class</jk> MyBeanFilter <jk>extends</jk> BeanFilter&lt;MyClass&gt; {
+		<jk>public</jk> MyBeanFilter() {
 			setInterfaceClass(MyClass.<jk>class</jk>);
 		}
 	}
@@ -323,7 +323,7 @@
 		</p>
 		<p class='bcode'>
 	<jc>// Serialize to JSON</jc>
-	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(MyClassTransform.<jk>class</jk>);
+	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(MyBeanFilter.<jk>class</jk>);
 	MyClass c = <jk>new</jk> MyClassBar();
 	String json = s.serialize(p);  <jc>// Prints "{foo:'foo'}"</jc>
 		</p>	
@@ -348,7 +348,7 @@
 		<p>
 			Also, the <code>addTransforms(...)</code> methods will automatically interpret any non-<code>Transform</code> classes
 				passed in as meaning interface classes.  
-			So in the previous example, the <code>BeanTransform</code> class could have been avoided altogether by just 
+			So in the previous example, the <code>BeanFilter</code> class could have been avoided altogether by just 
 				passing in <code>MyClass.<jk>class</jk></code> to the serializer, like so:
 		</p>
 		<p class='bcode'>
@@ -409,40 +409,40 @@
 	</div>
 
 	<!-- ======================================================================================================== -->
-	<a id="PojoTransforms"></a>
-	<h3 class='topic' onclick='toggle(this)'>1.2 - PojoTransform Class</h3>
+	<a id="PojoSwaps"></a>
+	<h3 class='topic' onclick='toggle(this)'>1.2 - PojoSwap Class</h3>
 	<div class='topic'>
 		<p>
-			{@link org.apache.juneau.transform.PojoTransform PojoTransforms} are a critical component of the Juneau architecture.  
+			{@link org.apache.juneau.transform.PojoSwap PojoSwaps} are a critical component of the Juneau architecture.  
 			They allow the Juneau serializers and parsers to be extended to handle virtually any kind of Java object. 
 		</p>
 		<p>
 			As explained in the overview, Juneau has built-in support for serializing and parsing specific kinds of objects, like primitive objects, bean, maps, collections, and arrays.  
 			Other kinds of POJOs, such as {@code Date} objects, cannot be serialized properly, since they are not true beans.  
-			This is where <code>PojoTransforms</code> come into play.
+			This is where <code>PojoSwaps</code> come into play.
 		</p>
 		<p>
-			The purpose of an <code>PojoTransform</code> is to convert a non-serializable object to a serializable surrogate form during serialization, and to optionally convert that surrogate form back into the original object during parsing.
+			The purpose of an <code>PojoSwap</code> is to convert a non-serializable object to a serializable surrogate form during serialization, and to optionally convert that surrogate form back into the original object during parsing.
 		</p>
 		<p>
 			For example, the following transform can be used to convert {@link java.util.Date} objects to ISO8601 strings during serialization, and {@link java.util.Date} objects from ISO8601 string during parsing:
 		</p>
 		<p class='bcode'>
 	<jc>// Sample transform for converting Dates to ISO8601 strings.</jc>
-	<jk>public class</jk> MyDateTransform <jk>extends</jk> PojoTransform&lt;Date,String&gt; {
+	<jk>public class</jk> MyDateSwap <jk>extends</jk> PojoSwap&lt;Date,String&gt; {
 		
 		<jc>// ISO8601 formatter.</jc>
 		<jk>private</jk> DateFormat <jf>format</jf> = <jk>new</jk> SimpleDateFormat(<js>"yyyy-MM-dd'T'HH:mm:ssZ"</js>);
 		
 		<jd>/** Converts a Date object to an ISO8601 string. */</jd>
 		<ja>@Override</ja>
-		<jk>public</jk> String transform(Date o) {
+		<jk>public</jk> String swap(Date o) {
 			<jk>return</jk> <jf>format</jf>.format(o);
 		}
 		
 		<jd>/** Converts an ISO8601 string to a Date object. */</jd>
 		<ja>@Override</ja>
-		<jk>public</jk> Date normalize(String o, ClassMeta&lt;?&gt; hint) <jk>throws</jk> ParseException {
+		<jk>public</jk> Date unswap(String o, ClassMeta&lt;?&gt; hint) <jk>throws</jk> ParseException {
 			<jk>try</jk> {
 				<jk>return</jk> <jf>format</jf>.parse(o);
 			} <jk>catch</jk> (java.text.ParseException e) {
@@ -461,11 +461,11 @@
 	}
 
 	<jc>// Create a new JSON serializer, associate our date transform with it, and serialize a sample bean.</jc>
-	Serializer serializer = <jk>new</jk> JsonSerializer().addTransforms(MyDateTransform.<jk>class</jk>);
+	Serializer serializer = <jk>new</jk> JsonSerializer().addTransforms(MyDateSwap.<jk>class</jk>);
 	String json = serializer.serialize(<jk>new</jk> MyBean());	<jc>// == "{date:'2012-03-03T04:05:06-0500'}"</jc>
 	
 	<jc>// Create a JSON parser, associate our date transform with it, and reconstruct our bean (including the date).</jc>
-	ReaderParser parser = <jk>new</jk> JsonParser().addTransforms(MyDateTransform.<jk>class</jk>);
+	ReaderParser parser = <jk>new</jk> JsonParser().addTransforms(MyDateSwap.<jk>class</jk>);
 	MyBean bean = parser.parse(json, MyBean.<jk>class</jk>);
 	<jk>int</jk> day = bean.<jf>date</jf>.getDay(); 						<jc>// == 3</jc>
 		</p>
@@ -474,7 +474,7 @@
 		</p>
 		<p class='bcode'>
 	<jc>// Create a new bean context and add our transform.</jc>
-	BeanContext beanContext = <jk>new</jk> BeanContext().addTransforms(MyDateTransform.<jk>class</jk>);
+	BeanContext beanContext = <jk>new</jk> BeanContext().addTransforms(MyDateSwap.<jk>class</jk>);
 
 	<jc>// Create a new bean.</jc>
 	MyBean myBean = <jk>new</jk> MyBean();
@@ -492,13 +492,13 @@
 	<jk>int</jk> year = myBean.<jf>date</jf>.getYear(); 								<jc>// == 113</jc>
 		</p>
 		<p>
-			Another example of a <code>PojoTransform</code> is one that converts <code><jk>byte</jk>[]</code> arrays to BASE64-encoded strings:
+			Another example of a <code>PojoSwap</code> is one that converts <code><jk>byte</jk>[]</code> arrays to BASE64-encoded strings:
 		</p>
 		<p class='bcode'>
-	<jk>public class</jk> ByteArrayBase64Transform <jk>extends</jk> PojoTransform&lt;<jk>byte</jk>[],String&gt; {
+	<jk>public class</jk> ByteArrayBase64Swap <jk>extends</jk> PojoSwap&lt;<jk>byte</jk>[],String&gt; {
 	
 		<ja>@Override</ja>
-		<jk>public</jk> String transform(<jk>byte</jk>[] b) <jk>throws</jk> SerializeException {
+		<jk>public</jk> String swap(<jk>byte</jk>[] b) <jk>throws</jk> SerializeException {
 			<jk>try</jk> {
 				ByteArrayOutputStream baos = <jk>new</jk> ByteArrayOutputStream();
 				OutputStream b64os = MimeUtility.encode(baos, <js>"base64"</js>);
@@ -511,7 +511,7 @@
 		}
 		
 		<ja>@Override</ja>
-		<jk>public byte</jk>[] normalize(String s, ClassMeta&lt;?&gt; hint) <jk>throws</jk> ParseException {
+		<jk>public byte</jk>[] unswap(String s, ClassMeta&lt;?&gt; hint) <jk>throws</jk> ParseException {
 			<jk>try</jk> {
 				<jk>byte</jk>[] b = s.getBytes();
 				ByteArrayInputStream bais = <jk>new</jk> ByteArrayInputStream(b);
@@ -532,8 +532,8 @@
 		</p>
 		<p class='bcode'>
 	<jc>// Create a JSON serializer and register the BASE64 encoding transform with it.</jc>
-	Serializer serializer = <jk>new</jk> JsonSerializer().addTransforms(ByteArrayBase64Transform.<jk>class</jk>);
-	ReaderParser parser = <jk>new</jk> JsonParser().addTransforms(ByteArrayBase64Transform.<jk>class</jk>);
+	Serializer serializer = <jk>new</jk> JsonSerializer().addTransforms(ByteArrayBase64Swap.<jk>class</jk>);
+	ReaderParser parser = <jk>new</jk> JsonParser().addTransforms(ByteArrayBase64Swap.<jk>class</jk>);
 	
 	<jk>byte</jk>[] a1 = {1,2,3};
 	String s1 = serializer.serialize(a1);		<jc>// Produces "'AQID'"</jc>
@@ -548,13 +548,13 @@
 			The following are a list of out-of-the-box transforms:
 		</p>
 		<ul class='spaced-list'>
-			<li>{@link org.apache.juneau.transforms.ByteArrayBase64Transform} - Converts byte arrays to BASE64 encoded strings.
-			<li>{@link org.apache.juneau.transforms.CalendarTransform} - Transforms for converting <code>Calendar</code> objects to various date format strings.
-			<li>{@link org.apache.juneau.transforms.DateTransform} - Transforms for converting <code>Date</code> objects to various date format strings.
-			<li>{@link org.apache.juneau.transforms.EnumerationTransform} - Transforms for converting <code>Enumeration</code> objects to arrays.
-			<li>{@link org.apache.juneau.transforms.IteratorTransform} - Transforms for converting <code>Iterator</code> objects to arrays.
-			<li>{@link org.apache.juneau.transforms.ReaderTransform} - Transforms for converting <code>Readers</code> to objects before serialization.
-			<li>{@link org.apache.juneau.transforms.XMLGregorianCalendarTransform} - Transforms for converting <code>XMLGregorianCalendar</code> objects to ISO8601 strings.
+			<li>{@link org.apache.juneau.transforms.ByteArrayBase64Swap} - Converts byte arrays to BASE64 encoded strings.
+			<li>{@link org.apache.juneau.transforms.CalendarSwap} - Transforms for converting <code>Calendar</code> objects to various date format strings.
+			<li>{@link org.apache.juneau.transforms.DateSwap} - Transforms for converting <code>Date</code> objects to various date format strings.
+			<li>{@link org.apache.juneau.transforms.EnumerationSwap} - Transforms for converting <code>Enumeration</code> objects to arrays.
+			<li>{@link org.apache.juneau.transforms.IteratorSwap} - Transforms for converting <code>Iterator</code> objects to arrays.
+			<li>{@link org.apache.juneau.transforms.ReaderSwap} - Transforms for converting <code>Readers</code> to objects before serialization.
+			<li>{@link org.apache.juneau.transforms.XMLGregorianCalendarSwap} - Transforms for converting <code>XMLGregorianCalendar</code> objects to ISO8601 strings.
 		</ul>
 		
 		<h6 class='topic'>Valid transformed class types</h6>
@@ -565,23 +565,23 @@
 	
 
 	<!-- ======================================================================================================== -->
-	<a id="PojoTransforms_OneWay"></a>
-	<h3 class='topic' onclick='toggle(this)'>1.3 - One-Way PojoTransforms</h3>
+	<a id="PojoSwaps_OneWay"></a>
+	<h3 class='topic' onclick='toggle(this)'>1.3 - One-Way PojoSwaps</h3>
 	<div class='topic'>
 		<p>
 			In the previous section, we defined two-way transforms, meaning transforms where the original objects could be reconstructing during parsing.  However, there are certain kinds of POJOs that we may want to support for serializing, but that are not possible to reconstruct during parsing.  For these, we can use one-way object transforms.
 		</p>
 		<p>
-			A one-way object transform is simply an object transform that only implements the {@code transform()} method.  The {@code normalize()} method is simply left unimplemented.
+			A one-way object transform is simply an object transform that only implements the {@code swap()} method.  The {@code unswap()} method is simply left unimplemented.
 		</p>
 		<p>
 			An example of a one-way transform would be one that allows {@code Iterators} to be serialized as JSON arrays.  It can make sense to be able to render {@code Iterators} as arrays, but in general it's not possible to reconstruct an {@code Iterator} during parsing. 
 		</p>
 		<p class='bcode'>
-	<jk>public class</jk> IteratorTransform <jk>extends</jk> PojoTransform&lt;Iterator,List&gt; {
+	<jk>public class</jk> IteratorSwap <jk>extends</jk> PojoSwap&lt;Iterator,List&gt; {
 		
 		<ja>@Override</ja>
-		<jk>public</jk> List transform(Iterator o) {
+		<jk>public</jk> List swap(Iterator o) {
 			List l = <jk>new</jk> LinkedList();
 			<jk>while</jk> (o.hasNext())
 				l.add(o.next());
@@ -594,7 +594,7 @@
 		</p>
 		<p class='bcode'>
 	<jc>// Create a JSON serializer that can serialize Iterators.</jc>
-	Serializer serializer = <jk>new</jk> JsonSerializer().addTransforms(IteratorTransform.<jk>class</jk>);
+	Serializer serializer = <jk>new</jk> JsonSerializer().addTransforms(IteratorSwap.<jk>class</jk>);
 	
 	<jc>// Construct an iterator we want to serialize.</jc>
 	Iterator iterator = <jk>new</jk> ObjectList(1,2,3).iterator();
@@ -603,7 +603,7 @@
 	String s = serializer.serialize(iterator);		<jc>// Produces "[1,2,3]"</jc>
 	
 	<jc>// Try to parse it.</jc>
-	ReaderParser parser = <jk>new</jk> JsonParser().addTransforms(IteratorTransform.<jk>class</jk>);
+	ReaderParser parser = <jk>new</jk> JsonParser().addTransforms(IteratorSwap.<jk>class</jk>);
 	iterator = parser.parse(s, Iterator.<jk>class</jk>);		<jc>// Throws ParseException!!!</jc>
 		</p>
 	</div>
@@ -636,8 +636,8 @@
 		</p>
 		<p class='bcode'>
 	<jc>// Define transform that limits properties to only those defined on MyClass</jc>
-	<jk>public class</jk> MyClassTransform <jk>extends</jk> BeanTransform&lt;MyClass&gt; {
-		<jk>public</jk> MyClassTransform() {
+	<jk>public class</jk> MyBeanFilter <jk>extends</jk> BeanFilter&lt;MyClass&gt; {
+		<jk>public</jk>  MyBeanFilter() {
 			setInterfaceClass(MyClass.<jk>class</jk>);
 		}
 	}
@@ -647,7 +647,7 @@
 		</p>
 		<p class='bcode'>
 	<jc>// Serialize to JSON</jc>
-	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(MyClassTransform.<jk>class</jk>);
+	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(MyBeanFilter.<jk>class</jk>);
 	MyClass c = <jk>new</jk> MyClassBar();
 	String json = s.serialize(p);  <jc>// Prints "{foo:'foo'}"</jc>
 		</p>	
@@ -671,7 +671,7 @@
 		</p>
 		<p>
 			Also, the <code>addTransforms()</code> methods will automatically interpret any non-Transform classes passed in as meaning interface classes. 
-			So in the previous example, the <code>BeanTransform</code> class could have been avoided altogether by just passing in <code>MyClass.<jk>class</jk></code> to the serializer, like so:
+			So in the previous example, the <code>BeanFilter</code> class could have been avoided altogether by just passing in <code>MyClass.<jk>class</jk></code> to the serializer, like so:
 		</p>
 		<p class='bcode'>
 	<jc>// Serialize to JSON</jc>
@@ -684,7 +684,7 @@
 	<h3 class='topic' onclick='toggle(this)'>1.5 - Surrogate Classes</h3>
 	<div class='topic'>
 		<p>
-			Surrogate classes are very similar in concept to one-way <code>PojoTransforms</code> except they represent a simpler syntax.
+			Surrogate classes are very similar in concept to one-way <code>PojoSwaps</code> except they represent a simpler syntax.
 		</p>
 		<p>
 			For example, let's say we want to be able to serialize the following class, but it's not serializable for some reason (for example, there are no
@@ -695,17 +695,17 @@
 	}
 		</p>
 		<p>
-			This could be solved with the following <code>PojoTransform</code>.
+			This could be solved with the following <code>PojoSwap</code>.
 		</p>
 		<p class='bcode'>
 	<jk>public class</jk> MySerializableSurrogate {
 		<jk>public</jk> String <jf>foo</jf>;
 	}
 		
-	<jk>public class</jk> MyTransform <jk>extends</jk> PojoTransform&lt;MyNonSerializableClass,MySerializableSurrogate&gt; {
+	<jk>public class</jk> MySwap <jk>extends</jk> PojoSwap&lt;MyNonSerializableClass,MySerializableSurrogate&gt; {
 		
 		<ja>@Override</ja>
-		<jk>public</jk> MySerializableSurrogate transform(MyNonSerializableClass o) {
+		<jk>public</jk> MySerializableSurrogate swap(MyNonSerializableClass o) {
 			MySerializableSurrogate s = <jk>new</jk> MySerializableSurrogate();
 			s.<jf>foo</jf> = o.<jf>foo</jf>;
 			<jk>return</jk> s;

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java
new file mode 100644
index 0000000..03fb6fc
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/BeanStringSwap.java
@@ -0,0 +1,39 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import org.apache.juneau.*;
+import org.apache.juneau.transform.*;
+
+/**
+ * Transforms beans into {@link String Strings} by simply calling the {@link Object#toString()} method.
+ * <p>
+ * 	Allows you to specify classes that should just be converted to {@code Strings} instead of potentially
+ * 	being turned into Maps by the {@link BeanContext} (or worse, throwing {@link BeanRuntimeException BeanRuntimeExceptions}).
+ * <p>
+ * 	This is usually a one-way transform.
+ * 	Beans serialized as strings cannot be reconstituted using a parser unless it is a <a class='doclink' href='../package-summary.html#PojoCategories'>Type 5 POJO</a>.
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ * @param <T> The class type of the bean.
+ */
+public class BeanStringSwap<T> extends PojoSwap<T,String> {
+
+	/**
+	 * Converts the specified bean to a {@link String}.
+	 */
+	@Override /* PojoSwap */
+	public String swap(T o) {
+		return o.toString();
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/BeanStringTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/BeanStringTransform.java b/juneau-core/src/main/java/org/apache/juneau/transforms/BeanStringTransform.java
deleted file mode 100644
index 51ece7d..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/BeanStringTransform.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import org.apache.juneau.*;
-import org.apache.juneau.transform.*;
-
-/**
- * Transforms beans into {@link String Strings} by simply calling the {@link Object#toString()} method.
- * <p>
- * 	Allows you to specify classes that should just be converted to {@code Strings} instead of potentially
- * 	being turned into Maps by the {@link BeanContext} (or worse, throwing {@link BeanRuntimeException BeanRuntimeExceptions}).
- * <p>
- * 	This is usually a one-way transform.
- * 	Beans serialized as strings cannot be reconstituted using a parser unless it is a <a class='doclink' href='../package-summary.html#PojoCategories'>Type 5 POJO</a>.
- *
- * @author James Bognar (james.bognar@salesforce.com)
- * @param <T> The class type of the bean.
- */
-public class BeanStringTransform<T> extends PojoTransform<T,String> {
-
-	/**
-	 * Converts the specified bean to a {@link String}.
-	 */
-	@Override /* PojoTransform */
-	public String transform(T o) {
-		return o.toString();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/ByteArrayBase64Swap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/ByteArrayBase64Swap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/ByteArrayBase64Swap.java
new file mode 100644
index 0000000..5f8e584
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/ByteArrayBase64Swap.java
@@ -0,0 +1,51 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import org.apache.juneau.*;
+import org.apache.juneau.internal.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.serializer.*;
+import org.apache.juneau.transform.*;
+
+/**
+ * Transforms <code><jk>byte</jk>[]</code> arrays to BASE-64 encoded {@link String Strings}.
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ */
+public class ByteArrayBase64Swap extends PojoSwap<byte[],String> {
+
+	/**
+	 * Converts the specified <code><jk>byte</jk>[]</code> to a {@link String}.
+	 */
+	@Override /* PojoSwap */
+	public String swap(byte[] b) throws SerializeException {
+		try {
+			return StringUtils.base64Encode(b);
+		} catch (Exception e) {
+			throw new SerializeException(e);
+		}
+	}
+
+	/**
+	 * Converts the specified {@link String} to a <code><jk>byte</jk>[]</code>.
+	 */
+	@Override /* PojoSwap */
+	public byte[] unswap(String s, ClassMeta<?> hint) throws ParseException {
+		try {
+			return StringUtils.base64Decode(s);
+		} catch (Exception e) {
+			throw new ParseException(e);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/ByteArrayBase64Transform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/ByteArrayBase64Transform.java b/juneau-core/src/main/java/org/apache/juneau/transforms/ByteArrayBase64Transform.java
deleted file mode 100644
index f4f809d..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/ByteArrayBase64Transform.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import org.apache.juneau.*;
-import org.apache.juneau.internal.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.serializer.*;
-import org.apache.juneau.transform.*;
-
-/**
- * Transforms <code><jk>byte</jk>[]</code> arrays to BASE-64 encoded {@link String Strings}.
- *
- * @author James Bognar (james.bognar@salesforce.com)
- */
-public class ByteArrayBase64Transform extends PojoTransform<byte[],String> {
-
-	/**
-	 * Converts the specified <code><jk>byte</jk>[]</code> to a {@link String}.
-	 */
-	@Override /* PojoTransform */
-	public String transform(byte[] b) throws SerializeException {
-		try {
-			return StringUtils.base64Encode(b);
-		} catch (Exception e) {
-			throw new SerializeException(e);
-		}
-	}
-
-	/**
-	 * Converts the specified {@link String} to a <code><jk>byte</jk>[]</code>.
-	 */
-	@Override /* PojoTransform */
-	public byte[] normalize(String s, ClassMeta<?> hint) throws ParseException {
-		try {
-			return StringUtils.base64Decode(s);
-		} catch (Exception e) {
-			throw new ParseException(e);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarLongSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarLongSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarLongSwap.java
new file mode 100644
index 0000000..551c31c
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarLongSwap.java
@@ -0,0 +1,54 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.transform.*;
+
+/**
+ * Transforms {@link Calendar Calendars} to {@link Long Longs} using {@code Calender.getTime().getTime()}.
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ */
+public class CalendarLongSwap extends PojoSwap<Calendar,Long> {
+
+	/**
+	 * Converts the specified {@link Calendar} to a {@link Long}.
+	 */
+	@Override /* PojoSwap */
+	public Long swap(Calendar o) {
+		return o.getTime().getTime();
+	}
+
+	/**
+	 * Converts the specified {@link Long} to a {@link Calendar}.
+	 */
+	@Override /* PojoSwap */
+	@SuppressWarnings("unchecked")
+	public Calendar unswap(Long o, ClassMeta<?> hint) throws ParseException {
+		ClassMeta<? extends Calendar> tt;
+		try {
+			if (hint == null || ! hint.canCreateNewInstance())
+				hint = getBeanContext().getClassMeta(GregorianCalendar.class);
+			tt = (ClassMeta<? extends Calendar>)hint;
+			Calendar c = tt.newInstance();
+			c.setTimeInMillis(o);
+			return c;
+		} catch (Exception e) {
+			throw new ParseException(e);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarLongTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarLongTransform.java b/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarLongTransform.java
deleted file mode 100644
index 48423c0..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarLongTransform.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import java.util.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.transform.*;
-
-/**
- * Transforms {@link Calendar Calendars} to {@link Long Longs} using {@code Calender.getTime().getTime()}.
- *
- * @author James Bognar (james.bognar@salesforce.com)
- */
-public class CalendarLongTransform extends PojoTransform<Calendar,Long> {
-
-	/**
-	 * Converts the specified {@link Calendar} to a {@link Long}.
-	 */
-	@Override /* PojoTransform */
-	public Long transform(Calendar o) {
-		return o.getTime().getTime();
-	}
-
-	/**
-	 * Converts the specified {@link Long} to a {@link Calendar}.
-	 */
-	@Override /* PojoTransform */
-	@SuppressWarnings("unchecked")
-	public Calendar normalize(Long o, ClassMeta<?> hint) throws ParseException {
-		ClassMeta<? extends Calendar> tt;
-		try {
-			if (hint == null || ! hint.canCreateNewInstance())
-				hint = getBeanContext().getClassMeta(GregorianCalendar.class);
-			tt = (ClassMeta<? extends Calendar>)hint;
-			Calendar c = tt.newInstance();
-			c.setTimeInMillis(o);
-			return c;
-		} catch (Exception e) {
-			throw new ParseException(e);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarMapSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarMapSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarMapSwap.java
new file mode 100644
index 0000000..0dcd0d7
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarMapSwap.java
@@ -0,0 +1,62 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.transform.*;
+
+/**
+ * Transforms {@link Calendar Calendars} to {@link Map Maps} of the format <code>{_class:String,value:long}</code>.
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ */
+@SuppressWarnings("rawtypes")
+public class CalendarMapSwap extends PojoSwap<Calendar,Map> {
+
+	/**
+	 * Converts the specified {@link Calendar} to a {@link Map}.
+	 */
+	@Override /* PojoSwap */
+	public Map swap(Calendar o) {
+		ObjectMap m = new ObjectMap();
+		m.put("time", o.getTime().getTime());
+		m.put("timeZone", o.getTimeZone().getID());
+		return m;
+	}
+
+	/**
+	 * Converts the specified {@link Map} to a {@link Calendar}.
+	 */
+	@Override /* PojoSwap */
+	@SuppressWarnings("unchecked")
+	public Calendar unswap(Map o, ClassMeta<?> hint) throws ParseException {
+		ClassMeta<? extends Calendar> tt;
+		try {
+			if (hint == null || ! hint.canCreateNewInstance())
+				hint = getBeanContext().getClassMeta(GregorianCalendar.class);
+			tt = (ClassMeta<? extends Calendar>)hint;
+			long time = Long.parseLong(o.get("time").toString());
+			String timeZone = o.get("timeZone").toString();
+			Date d = new Date(time);
+			Calendar c = tt.newInstance();
+			c.setTime(d);
+			c.setTimeZone(TimeZone.getTimeZone(timeZone));
+			return c;
+		} catch (Exception e) {
+			throw new ParseException(e);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarMapTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarMapTransform.java b/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarMapTransform.java
deleted file mode 100644
index 1582a61..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarMapTransform.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import java.util.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.transform.*;
-
-/**
- * Transforms {@link Calendar Calendars} to {@link Map Maps} of the format <code>{_class:String,value:long}</code>.
- *
- * @author James Bognar (james.bognar@salesforce.com)
- */
-@SuppressWarnings("rawtypes")
-public class CalendarMapTransform extends PojoTransform<Calendar,Map> {
-
-	/**
-	 * Converts the specified {@link Calendar} to a {@link Map}.
-	 */
-	@Override /* PojoTransform */
-	public Map transform(Calendar o) {
-		ObjectMap m = new ObjectMap();
-		m.put("time", o.getTime().getTime());
-		m.put("timeZone", o.getTimeZone().getID());
-		return m;
-	}
-
-	/**
-	 * Converts the specified {@link Map} to a {@link Calendar}.
-	 */
-	@Override /* PojoTransform */
-	@SuppressWarnings("unchecked")
-	public Calendar normalize(Map o, ClassMeta<?> hint) throws ParseException {
-		ClassMeta<? extends Calendar> tt;
-		try {
-			if (hint == null || ! hint.canCreateNewInstance())
-				hint = getBeanContext().getClassMeta(GregorianCalendar.class);
-			tt = (ClassMeta<? extends Calendar>)hint;
-			long time = Long.parseLong(o.get("time").toString());
-			String timeZone = o.get("timeZone").toString();
-			Date d = new Date(time);
-			Calendar c = tt.newInstance();
-			c.setTime(d);
-			c.setTimeZone(TimeZone.getTimeZone(timeZone));
-			return c;
-		} catch (Exception e) {
-			throw new ParseException(e);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarSwap.java
new file mode 100644
index 0000000..62af394
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarSwap.java
@@ -0,0 +1,293 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import java.text.*;
+import java.util.*;
+
+import javax.xml.bind.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.internal.*;
+import org.apache.juneau.parser.ParseException;
+import org.apache.juneau.transform.*;
+
+/**
+ * Transforms {@link Calendar Calendars} to {@link String Strings}.
+ *
+ *
+ * <h6 class='topic'>Behavior-specific subclasses</h6>
+ * <p>
+ * 	The following direct subclasses are provided for convenience:
+ * <ul class='spaced-list'>
+ * 	<li>{@link ToString} - Transforms to {@link String Strings} using the {@code Date.toString()} method.
+ * 	<li>{@link ISO8601DT} - Transforms to ISO8601 date-time strings.
+ * 	<li>{@link ISO8601DTZ} - Same as {@link ISO8601DT}, except always serializes in GMT.
+ * 	<li>{@link RFC2822DT} - Transforms to RFC2822 date-time strings.
+ * 	<li>{@link RFC2822DTZ} - Same as {@link RFC2822DT}, except always serializes in GMT.
+ * 	<li>{@link RFC2822D} - Transforms to RFC2822 date strings.
+ * 	<li>{@link Simple} - Transforms to simple <js>"yyyy/MM/dd HH:mm:ss"</js> strings.
+ * 	<li>{@link Medium} - Transforms to {@link DateFormat#MEDIUM} strings.
+ * </ul>
+ *
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ */
+public class CalendarSwap extends PojoSwap<Calendar,String> {
+
+	private static final TimeZone GMT = TimeZone.getTimeZone("GMT");
+
+	/**
+	 * Transforms {@link Calendar Calendars} to {@link String Strings} using the {@code Date.toString()} method.
+	 *
+	 * <dl>
+	 * 	<dt>Example output:</dt>
+	 * 	<dd>
+	 * 		<ul>
+	 * 			<li><js>"Wed Jul 04 15:30:45 EST 2001"</js>
+	 * 		</ul>
+	 * 	</dd>
+	 * </dl>
+	 */
+	public static class ToString extends CalendarSwap {
+		/** Constructor */
+		public ToString() {
+			super("EEE MMM dd HH:mm:ss zzz yyyy");
+		}
+	}
+
+	/**
+	 * Transforms {@link Calendar Calendars} to ISO8601 date-time strings.
+	 *
+	 * <dl>
+	 * 	<dt>Example output:</dt>
+	 * 	<dd>
+	 * 		<ul>
+	 * 			<li><js>"2001-07-04T15:30:45-05:00"</js>
+	 * 			<li><js>"2001-07-04T15:30:45Z"</js>
+	 * 		</ul>
+	 * 	</dd>
+	 * 	<dt>Example input:</dt>
+	 * 	<dd>
+	 * 		<ul>
+	 * 			<li><js>"2001-07-04T15:30:45-05:00"</js>
+	 * 			<li><js>"2001-07-04T15:30:45Z"</js>
+	 * 			<li><js>"2001-07-04T15:30:45.1Z"</js>
+	 * 			<li><js>"2001-07-04T15:30Z"</js>
+	 * 			<li><js>"2001-07-04"</js>
+	 * 			<li><js>"2001-07"</js>
+	 * 			<li><js>"2001"</js>
+	 *			 </ul>
+	 * 	</dd>
+	 * </dl>
+	 */
+	public static class ISO8601DT extends CalendarSwap {
+
+		/** Constructor */
+		public ISO8601DT() {}
+
+		@Override /* PojoSwap */
+		public Calendar unswap(String o, ClassMeta<?> hint) throws ParseException {
+			try {
+				if (StringUtils.isEmpty(o))
+					return null;
+				return convert(DatatypeConverter.parseDateTime(o), hint);
+			} catch (Exception e) {
+				throw new ParseException(e);
+			}
+		}
+
+		@Override /* PojoSwap */
+		public String swap(Calendar o) {
+			return DatatypeConverter.printDateTime(o);
+		}
+	}
+
+	/**
+	 * Same as {@link ISO8601DT}, except always serializes in GMT.
+	 * <p>
+	 * Example output: <js>"2001-07-04T15:30:45Z"</js>
+	 */
+	public static class ISO8601DTZ extends CalendarSwap {
+
+		/** Constructor */
+		public ISO8601DTZ() {}
+
+		@Override /* PojoSwap */
+		public Calendar unswap(String o, ClassMeta<?> hint) throws ParseException {
+			try {
+				if (StringUtils.isEmpty(o))
+					return null;
+				return convert(DatatypeConverter.parseDateTime(o), hint);
+			} catch (Exception e) {
+				throw new ParseException(e);
+			}
+		}
+
+		@Override /* PojoSwap */
+		public String swap(Calendar o) {
+			if (o.getTimeZone().getRawOffset() != 0) {
+				Calendar c = Calendar.getInstance(GMT);
+				c.setTime(o.getTime());
+				o = c;
+			}
+			return DatatypeConverter.printDateTime(o);
+		}
+	}
+
+	/**
+	 * Transforms {@link Calendar Calendars} to RFC2822 date-time strings.
+	 */
+	public static class RFC2822DT extends CalendarSwap {
+		/** Constructor */
+		public RFC2822DT() {
+			super("EEE, dd MMM yyyy HH:mm:ss Z");
+		}
+	}
+
+	/**
+	 * Same as {@link RFC2822DT}, except always serializes in GMT.
+	 * <p>
+	 * Example output: <js>"Wed, 31 Jan 2001 12:34:56 +0000"</js>
+	 */
+	public static class RFC2822DTZ extends CalendarSwap {
+		/** Constructor */
+		public RFC2822DTZ() {
+			super("EEE, dd MMM yyyy HH:mm:ss 'GMT'", GMT);
+		}
+	}
+
+	/**
+	 * Transforms {@link Calendar Calendars} to RFC2822 date strings.
+	 */
+	public static class RFC2822D extends CalendarSwap {
+		/** Constructor */
+		public RFC2822D() {
+			super("dd MMM yyyy");
+		}
+	}
+
+	/**
+	 * Transforms {@link Calendar Calendars} to simple <js>"yyyy/MM/dd HH:mm:ss"</js> strings.
+	 */
+	public static class Simple extends CalendarSwap {
+		/** Constructor */
+		public Simple() {
+			super("yyyy/MM/dd HH:mm:ss");
+		}
+	}
+
+	/**
+	 * Transforms {@link Calendar Calendars} to {@link DateFormat#MEDIUM} strings.
+	 */
+	public static class Medium extends CalendarSwap {
+		/** Constructor */
+		public Medium() {
+			super(DateFormat.getDateInstance(DateFormat.MEDIUM));
+		}
+	}
+
+	/** The formatter to convert dates to Strings. */
+	private DateFormat format;
+
+	private TimeZone timeZone;
+
+	/**
+	 * Default constructor.
+	 * <p>
+	 * 	This constructor is used when <code>swap()</code> and <code>unswap()</code> are overridden by subclasses.
+	 */
+	public CalendarSwap() {}
+
+	/**
+	 * Construct a transform using the specified date format string that will be
+	 * 	used to construct a {@link SimpleDateFormat} that will be used to convert
+	 * 	dates to strings.
+	 *
+	 * @param simpleDateFormat The {@link SimpleDateFormat} pattern.
+	 */
+	public CalendarSwap(String simpleDateFormat) {
+		this(new SimpleDateFormat(simpleDateFormat));
+	}
+
+	/**
+	 * Construct a transform using the specified date format string that will be
+	 * 	used to construct a {@link SimpleDateFormat} that will be used to convert
+	 * 	dates to strings.
+	 *
+	 * @param simpleDateFormat The {@link SimpleDateFormat} pattern.
+	 * @param timeZone The time zone to associate with the date pattern.
+	 */
+	public CalendarSwap(String simpleDateFormat, TimeZone timeZone) {
+		this(new SimpleDateFormat(simpleDateFormat));
+		format.setTimeZone(timeZone);
+		this.timeZone = timeZone;
+	}
+
+	/**
+	 * Construct a transform using the specified {@link DateFormat} that will be used to convert
+	 * 	dates to strings.
+	 *
+	 * @param format The format to use to convert dates to strings.
+	 */
+	public CalendarSwap(DateFormat format) {
+		super();
+		this.format = format;
+	}
+
+	/**
+	 * Converts the specified {@link Calendar} to a {@link String}.
+	 */
+	@Override /* PojoSwap */
+	public String swap(Calendar o) {
+		DateFormat df = format;
+		TimeZone tz1 = o.getTimeZone();
+		TimeZone tz2 = format.getTimeZone();
+		if (timeZone == null && ! tz1.equals(tz2)) {
+			df = (DateFormat)format.clone();
+			df.setTimeZone(tz1);
+		}
+		return df.format(o.getTime());
+	}
+
+	/**
+	 * Converts the specified {@link String} to a {@link Calendar}.
+	 */
+	@Override /* PojoSwap */
+	public Calendar unswap(String o, ClassMeta<?> hint) throws ParseException {
+		try {
+			if (StringUtils.isEmpty(o))
+				return null;
+			return convert(format.parse(o), hint);
+		} catch (Exception e) {
+			throw new ParseException(e);
+		}
+	}
+
+	private static Calendar convert(Calendar in, ClassMeta<?> hint) throws Exception {
+		if (hint.isInstance(in) || ! hint.canCreateNewInstance())
+			return in;
+		Calendar c = (Calendar)hint.newInstance();
+		c.setTime(in.getTime());
+		c.setTimeZone(in.getTimeZone());
+		return c;
+	}
+
+	private static Calendar convert(Date in, ClassMeta<?> hint) throws Exception {
+		if (hint == null || ! hint.canCreateNewInstance())
+			hint = BeanContext.DEFAULT.getClassMeta(GregorianCalendar.class);
+		Calendar c = (Calendar)hint.newInstance();
+		c.setTime(in);
+		return c;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarTransform.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarTransform.java b/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarTransform.java
deleted file mode 100644
index 6847dca..0000000
--- a/juneau-core/src/main/java/org/apache/juneau/transforms/CalendarTransform.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import java.text.*;
-import java.util.*;
-
-import javax.xml.bind.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.internal.*;
-import org.apache.juneau.parser.ParseException;
-import org.apache.juneau.transform.*;
-
-/**
- * Transforms {@link Calendar Calendars} to {@link String Strings}.
- *
- *
- * <h6 class='topic'>Behavior-specific subclasses</h6>
- * <p>
- * 	The following direct subclasses are provided for convenience:
- * <ul class='spaced-list'>
- * 	<li>{@link ToString} - Transforms to {@link String Strings} using the {@code Date.toString()} method.
- * 	<li>{@link ISO8601DT} - Transforms to ISO8601 date-time strings.
- * 	<li>{@link ISO8601DTZ} - Same as {@link ISO8601DT}, except always serializes in GMT.
- * 	<li>{@link RFC2822DT} - Transforms to RFC2822 date-time strings.
- * 	<li>{@link RFC2822DTZ} - Same as {@link RFC2822DT}, except always serializes in GMT.
- * 	<li>{@link RFC2822D} - Transforms to RFC2822 date strings.
- * 	<li>{@link Simple} - Transforms to simple <js>"yyyy/MM/dd HH:mm:ss"</js> strings.
- * 	<li>{@link Medium} - Transforms to {@link DateFormat#MEDIUM} strings.
- * </ul>
- *
- *
- * @author James Bognar (james.bognar@salesforce.com)
- */
-public class CalendarTransform extends PojoTransform<Calendar,String> {
-
-	private static final TimeZone GMT = TimeZone.getTimeZone("GMT");
-
-	/**
-	 * Transforms {@link Calendar Calendars} to {@link String Strings} using the {@code Date.toString()} method.
-	 *
-	 * <dl>
-	 * 	<dt>Example output:</dt>
-	 * 	<dd>
-	 * 		<ul>
-	 * 			<li><js>"Wed Jul 04 15:30:45 EST 2001"</js>
-	 * 		</ul>
-	 * 	</dd>
-	 * </dl>
-	 */
-	public static class ToString extends CalendarTransform {
-		/** Constructor */
-		public ToString() {
-			super("EEE MMM dd HH:mm:ss zzz yyyy");
-		}
-	}
-
-	/**
-	 * Transforms {@link Calendar Calendars} to ISO8601 date-time strings.
-	 *
-	 * <dl>
-	 * 	<dt>Example output:</dt>
-	 * 	<dd>
-	 * 		<ul>
-	 * 			<li><js>"2001-07-04T15:30:45-05:00"</js>
-	 * 			<li><js>"2001-07-04T15:30:45Z"</js>
-	 * 		</ul>
-	 * 	</dd>
-	 * 	<dt>Example input:</dt>
-	 * 	<dd>
-	 * 		<ul>
-	 * 			<li><js>"2001-07-04T15:30:45-05:00"</js>
-	 * 			<li><js>"2001-07-04T15:30:45Z"</js>
-	 * 			<li><js>"2001-07-04T15:30:45.1Z"</js>
-	 * 			<li><js>"2001-07-04T15:30Z"</js>
-	 * 			<li><js>"2001-07-04"</js>
-	 * 			<li><js>"2001-07"</js>
-	 * 			<li><js>"2001"</js>
-	 *			 </ul>
-	 * 	</dd>
-	 * </dl>
-	 */
-	public static class ISO8601DT extends CalendarTransform {
-
-		/** Constructor */
-		public ISO8601DT() {}
-
-		@Override /* PojoTransform */
-		public Calendar normalize(String o, ClassMeta<?> hint) throws ParseException {
-			try {
-				if (StringUtils.isEmpty(o))
-					return null;
-				return convert(DatatypeConverter.parseDateTime(o), hint);
-			} catch (Exception e) {
-				throw new ParseException(e);
-			}
-		}
-
-		@Override /* PojoTransform */
-		public String transform(Calendar o) {
-			return DatatypeConverter.printDateTime(o);
-		}
-	}
-
-	/**
-	 * Same as {@link ISO8601DT}, except always serializes in GMT.
-	 * <p>
-	 * Example output: <js>"2001-07-04T15:30:45Z"</js>
-	 */
-	public static class ISO8601DTZ extends CalendarTransform {
-
-		/** Constructor */
-		public ISO8601DTZ() {}
-
-		@Override /* PojoTransform */
-		public Calendar normalize(String o, ClassMeta<?> hint) throws ParseException {
-			try {
-				if (StringUtils.isEmpty(o))
-					return null;
-				return convert(DatatypeConverter.parseDateTime(o), hint);
-			} catch (Exception e) {
-				throw new ParseException(e);
-			}
-		}
-
-		@Override /* PojoTransform */
-		public String transform(Calendar o) {
-			if (o.getTimeZone().getRawOffset() != 0) {
-				Calendar c = Calendar.getInstance(GMT);
-				c.setTime(o.getTime());
-				o = c;
-			}
-			return DatatypeConverter.printDateTime(o);
-		}
-	}
-
-	/**
-	 * Transforms {@link Calendar Calendars} to RFC2822 date-time strings.
-	 */
-	public static class RFC2822DT extends CalendarTransform {
-		/** Constructor */
-		public RFC2822DT() {
-			super("EEE, dd MMM yyyy HH:mm:ss Z");
-		}
-	}
-
-	/**
-	 * Same as {@link RFC2822DT}, except always serializes in GMT.
-	 * <p>
-	 * Example output: <js>"Wed, 31 Jan 2001 12:34:56 +0000"</js>
-	 */
-	public static class RFC2822DTZ extends CalendarTransform {
-		/** Constructor */
-		public RFC2822DTZ() {
-			super("EEE, dd MMM yyyy HH:mm:ss 'GMT'", GMT);
-		}
-	}
-
-	/**
-	 * Transforms {@link Calendar Calendars} to RFC2822 date strings.
-	 */
-	public static class RFC2822D extends CalendarTransform {
-		/** Constructor */
-		public RFC2822D() {
-			super("dd MMM yyyy");
-		}
-	}
-
-	/**
-	 * Transforms {@link Calendar Calendars} to simple <js>"yyyy/MM/dd HH:mm:ss"</js> strings.
-	 */
-	public static class Simple extends CalendarTransform {
-		/** Constructor */
-		public Simple() {
-			super("yyyy/MM/dd HH:mm:ss");
-		}
-	}
-
-	/**
-	 * Transforms {@link Calendar Calendars} to {@link DateFormat#MEDIUM} strings.
-	 */
-	public static class Medium extends CalendarTransform {
-		/** Constructor */
-		public Medium() {
-			super(DateFormat.getDateInstance(DateFormat.MEDIUM));
-		}
-	}
-
-	/** The formatter to convert dates to Strings. */
-	private DateFormat format;
-
-	private TimeZone timeZone;
-
-	/**
-	 * Default constructor.
-	 * <p>
-	 * 	This constructor is used when <code>transform()</code> and <code>normalize()</code> are overridden by subclasses.
-	 */
-	public CalendarTransform() {}
-
-	/**
-	 * Construct a transform using the specified date format string that will be
-	 * 	used to construct a {@link SimpleDateFormat} that will be used to convert
-	 * 	dates to strings.
-	 *
-	 * @param simpleDateFormat The {@link SimpleDateFormat} pattern.
-	 */
-	public CalendarTransform(String simpleDateFormat) {
-		this(new SimpleDateFormat(simpleDateFormat));
-	}
-
-	/**
-	 * Construct a transform using the specified date format string that will be
-	 * 	used to construct a {@link SimpleDateFormat} that will be used to convert
-	 * 	dates to strings.
-	 *
-	 * @param simpleDateFormat The {@link SimpleDateFormat} pattern.
-	 * @param timeZone The time zone to associate with the date pattern.
-	 */
-	public CalendarTransform(String simpleDateFormat, TimeZone timeZone) {
-		this(new SimpleDateFormat(simpleDateFormat));
-		format.setTimeZone(timeZone);
-		this.timeZone = timeZone;
-	}
-
-	/**
-	 * Construct a transform using the specified {@link DateFormat} that will be used to convert
-	 * 	dates to strings.
-	 *
-	 * @param format The format to use to convert dates to strings.
-	 */
-	public CalendarTransform(DateFormat format) {
-		super();
-		this.format = format;
-	}
-
-	/**
-	 * Converts the specified {@link Calendar} to a {@link String}.
-	 */
-	@Override /* PojoTransform */
-	public String transform(Calendar o) {
-		DateFormat df = format;
-		TimeZone tz1 = o.getTimeZone();
-		TimeZone tz2 = format.getTimeZone();
-		if (timeZone == null && ! tz1.equals(tz2)) {
-			df = (DateFormat)format.clone();
-			df.setTimeZone(tz1);
-		}
-		return df.format(o.getTime());
-	}
-
-	/**
-	 * Converts the specified {@link String} to a {@link Calendar}.
-	 */
-	@Override /* PojoTransform */
-	public Calendar normalize(String o, ClassMeta<?> hint) throws ParseException {
-		try {
-			if (StringUtils.isEmpty(o))
-				return null;
-			return convert(format.parse(o), hint);
-		} catch (Exception e) {
-			throw new ParseException(e);
-		}
-	}
-
-	private static Calendar convert(Calendar in, ClassMeta<?> hint) throws Exception {
-		if (hint.isInstance(in) || ! hint.canCreateNewInstance())
-			return in;
-		Calendar c = (Calendar)hint.newInstance();
-		c.setTime(in.getTime());
-		c.setTimeZone(in.getTimeZone());
-		return c;
-	}
-
-	private static Calendar convert(Date in, ClassMeta<?> hint) throws Exception {
-		if (hint == null || ! hint.canCreateNewInstance())
-			hint = BeanContext.DEFAULT.getClassMeta(GregorianCalendar.class);
-		Calendar c = (Calendar)hint.newInstance();
-		c.setTime(in);
-		return c;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/transforms/DateLongSwap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/transforms/DateLongSwap.java b/juneau-core/src/main/java/org/apache/juneau/transforms/DateLongSwap.java
new file mode 100644
index 0000000..06c0310
--- /dev/null
+++ b/juneau-core/src/main/java/org/apache/juneau/transforms/DateLongSwap.java
@@ -0,0 +1,52 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.transform.*;
+
+/**
+ * Transforms {@link Date Dates} to {@link Long Longs}.
+ *
+ * @author James Bognar (james.bognar@salesforce.com)
+ */
+public class DateLongSwap extends PojoSwap<Date,Long> {
+
+	/**
+	 * Converts the specified {@link Date} to a {@link Long}.
+	 */
+	@Override /* PojoSwap */
+	public Long swap(Date o) {
+		return o.getTime();
+	}
+
+	/**
+	 * Converts the specified {@link Long} to a {@link Date}.
+	 */
+	@Override /* PojoSwap */
+	public Date unswap(Long o, ClassMeta<?> hint) throws ParseException {
+		Class<?> c = (hint == null ? java.util.Date.class : hint.getInnerClass());
+		if (c == java.util.Date.class)
+			return new java.util.Date(o);
+		if (c == java.sql.Date.class)
+			return new java.sql.Date(o);
+		if (c == java.sql.Time.class)
+			return new java.sql.Time(o);
+		if (c == java.sql.Timestamp.class)
+			return new java.sql.Timestamp(o);
+		throw new ParseException("DateLongSwap is unable to narrow object of type ''{0}''", c);
+	}
+}


[7/8] incubator-juneau git commit: Tweak new name 'Transform' into 'BeanFilter' and 'PojoSwap'

Posted by ja...@apache.org.
Tweak new name 'Transform' into 'BeanFilter' and 'PojoSwap'

Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau/commit/0ce0e663
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/0ce0e663
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/0ce0e663

Branch: refs/heads/master
Commit: 0ce0e663e9cffc90c7ba5c6a4c953036255e84f5
Parents: a6ba780
Author: jamesbognar <ja...@gmail.com>
Authored: Sat Aug 27 10:14:33 2016 -0400
Committer: jamesbognar <ja...@gmail.com>
Committed: Sat Aug 27 11:29:35 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/juneau/client/package.html  |   2 +-
 .../java/org/apache/juneau/BeanContext.java     |  86 +--
 .../main/java/org/apache/juneau/BeanMap.java    |  18 +-
 .../java/org/apache/juneau/BeanMapEntry.java    |  10 +-
 .../main/java/org/apache/juneau/BeanMeta.java   |  16 +-
 .../org/apache/juneau/BeanPropertyMeta.java     |  42 +-
 .../main/java/org/apache/juneau/ClassMeta.java  |  46 +-
 .../java/org/apache/juneau/ContextFactory.java  |  12 +-
 .../main/java/org/apache/juneau/ObjectMap.java  |   8 +-
 .../java/org/apache/juneau/annotation/Bean.java |  10 +-
 .../apache/juneau/annotation/BeanProperty.java  |   4 +-
 .../java/org/apache/juneau/annotation/Pojo.java |  18 +-
 .../org/apache/juneau/dto/atom/CommonEntry.java |   2 +-
 .../java/org/apache/juneau/dto/atom/Entry.java  |   2 +-
 .../org/apache/juneau/dto/cognos/Column.java    |  10 +-
 .../org/apache/juneau/dto/cognos/DataSet.java   |   6 +-
 .../org/apache/juneau/dto/cognos/package.html   |   4 +-
 .../apache/juneau/dto/jsonschema/Schema.java    |  48 +-
 .../java/org/apache/juneau/html/HtmlParser.java |   4 +-
 .../juneau/html/HtmlSchemaDocSerializer.java    |   2 +-
 .../org/apache/juneau/html/HtmlSerializer.java  |  22 +-
 .../org/apache/juneau/internal/HashCode.java    |   4 +-
 .../apache/juneau/internal/JuneauLogger.java    |   8 +-
 .../java/org/apache/juneau/jena/RdfParser.java  |   4 +-
 .../org/apache/juneau/jena/RdfSerializer.java   |   4 +-
 .../java/org/apache/juneau/jena/package.html    |  16 +-
 .../java/org/apache/juneau/json/JsonParser.java |   4 +-
 .../juneau/json/JsonSchemaSerializer.java       |   2 +-
 .../org/apache/juneau/json/JsonSerializer.java  |   4 +-
 .../java/org/apache/juneau/json/package.html    |  22 +-
 .../apache/juneau/msgpack/MsgPackParser.java    |   4 +-
 .../juneau/msgpack/MsgPackSerializer.java       |   4 +-
 .../main/java/org/apache/juneau/package.html    |   6 +-
 .../java/org/apache/juneau/parser/Parser.java   |   8 +-
 .../org/apache/juneau/parser/ParserGroup.java   |   4 +-
 .../juneau/plaintext/PlainTextParser.java       |   2 +-
 .../juneau/plaintext/PlainTextSerializer.java   |   2 +-
 .../juneau/serializer/SerializerGroup.java      |   4 +-
 .../juneau/serializer/SerializerSession.java    |   4 +-
 .../juneau/transform/AnnotationBeanFilter.java  |  70 ++
 .../transform/AnnotationBeanTransform.java      |  70 --
 .../org/apache/juneau/transform/BeanFilter.java | 526 ++++++++++++++
 .../apache/juneau/transform/BeanTransform.java  | 526 --------------
 .../juneau/transform/InterfaceBeanFilter.java   |  39 ++
 .../transform/InterfaceBeanTransform.java       |  39 --
 .../org/apache/juneau/transform/PojoSwap.java   | 265 +++++++
 .../apache/juneau/transform/PojoTransform.java  | 265 -------
 .../apache/juneau/transform/SurrogateSwap.java  | 207 ++++++
 .../juneau/transform/SurrogateTransform.java    | 207 ------
 .../org/apache/juneau/transform/Transform.java  |  14 +-
 .../org/apache/juneau/transform/package.html    | 136 ++--
 .../juneau/transforms/BeanStringSwap.java       |  39 ++
 .../juneau/transforms/BeanStringTransform.java  |  39 --
 .../juneau/transforms/ByteArrayBase64Swap.java  |  51 ++
 .../transforms/ByteArrayBase64Transform.java    |  51 --
 .../juneau/transforms/CalendarLongSwap.java     |  54 ++
 .../transforms/CalendarLongTransform.java       |  54 --
 .../juneau/transforms/CalendarMapSwap.java      |  62 ++
 .../juneau/transforms/CalendarMapTransform.java |  62 --
 .../apache/juneau/transforms/CalendarSwap.java  | 293 ++++++++
 .../juneau/transforms/CalendarTransform.java    | 293 --------
 .../apache/juneau/transforms/DateLongSwap.java  |  52 ++
 .../juneau/transforms/DateLongTransform.java    |  52 --
 .../apache/juneau/transforms/DateMapSwap.java   |  56 ++
 .../juneau/transforms/DateMapTransform.java     |  56 --
 .../org/apache/juneau/transforms/DateSwap.java  | 370 ++++++++++
 .../apache/juneau/transforms/DateTransform.java | 370 ----------
 .../juneau/transforms/EnumerationSwap.java      |  39 ++
 .../juneau/transforms/EnumerationTransform.java |  39 --
 .../apache/juneau/transforms/IteratorSwap.java  |  39 ++
 .../juneau/transforms/IteratorTransform.java    |  39 --
 .../apache/juneau/transforms/ReaderSwap.java    | 112 +++
 .../juneau/transforms/ReaderTransform.java      | 112 ---
 .../transforms/XMLGregorianCalendarSwap.java    |  64 ++
 .../XMLGregorianCalendarTransform.java          |  64 --
 .../apache/juneau/urlencoding/UonParser.java    |   4 +-
 .../juneau/urlencoding/UonSerializer.java       |   4 +-
 .../juneau/urlencoding/UrlEncodingParser.java   |   4 +-
 .../urlencoding/UrlEncodingSerializer.java      |   4 +-
 .../org/apache/juneau/urlencoding/package.html  |   8 +-
 .../java/org/apache/juneau/xml/XmlParser.java   |   4 +-
 .../org/apache/juneau/xml/XmlSerializer.java    |   4 +-
 .../java/org/apache/juneau/xml/package.html     |   6 +-
 juneau-core/src/main/java/overview.html         | 108 +--
 .../java/org/apache/juneau/BeanConfigTest.java  |  28 +-
 .../java/org/apache/juneau/BeanFilterTest.java  | 145 ++++
 .../java/org/apache/juneau/BeanMapTest.java     |   4 +-
 .../org/apache/juneau/BeanTransformTest.java    | 145 ----
 .../java/org/apache/juneau/ClassMetaTest.java   | 160 ++---
 .../org/apache/juneau/DataConversionTest.java   |   2 +-
 .../java/org/apache/juneau/PojoSwapTest.java    |  57 ++
 .../org/apache/juneau/PojoTransformTest.java    |  57 --
 .../test/java/org/apache/juneau/TestUtils.java  |   4 +-
 .../juneau/a/rttests/RoundTripBeanMapsTest.java |  70 +-
 .../juneau/a/rttests/RoundTripMapsTest.java     |   6 +-
 .../a/rttests/RoundTripTransformBeansTest.java  |  42 +-
 .../java/org/apache/juneau/html/HtmlTest.java   |  16 +-
 .../org/apache/juneau/jena/RdfParserTest.java   |   4 +-
 .../juneau/transforms/BeanFilterTest.java       | 205 ++++++
 .../apache/juneau/transforms/BeanMapTest.java   |  14 +-
 .../juneau/transforms/BeanTransformTest.java    | 205 ------
 .../transforms/ByteArrayBase64SwapTest.java     | 172 +++++
 .../ByteArrayBase64TransformTest.java           | 172 -----
 .../juneau/transforms/CalendarSwapTest.java     | 697 +++++++++++++++++++
 .../transforms/CalendarTransformTest.java       | 697 -------------------
 .../juneau/transforms/DateFilterTest.java       |  20 +-
 .../juneau/transforms/EnumerationSwapTest.java  |  36 +
 .../transforms/EnumerationTransformTest.java    |  36 -
 .../juneau/transforms/IteratorSwapTest.java     |  38 +
 .../transforms/IteratorTransformTest.java       |  38 -
 .../juneau/transforms/ReaderFilterTest.java     |   4 +-
 .../org/apache/juneau/utils/PojoQueryTest.java  |   4 +-
 .../apache/juneau/utils/StringUtilsTest.java    |   2 +-
 .../resources/DirectoryResource.java            |   2 +-
 .../microservice/resources/LogsResource.java    |   6 +-
 .../samples/addressbook/CreatePerson.java       |   2 +-
 .../juneau/samples/addressbook/Person.java      |   2 +-
 .../server/samples/RequestEchoResource.java     |   2 +-
 .../server/samples/UrlEncodedFormResource.java  |   2 +-
 .../addressbook/AddressBookResource.java        |   6 +-
 .../server/samples/AddressBookResourceTest.java |   6 +-
 .../SampleRemoteableServicesResourceTest.java   |   2 +-
 .../apache/juneau/server/samples/TestUtils.java |   4 +-
 juneau-server-test/.classpath                   |  79 +--
 .../server/TestBeanContextProperties.java       |   6 +-
 .../apache/juneau/server/TestInheritance.java   |  18 +-
 .../org/apache/juneau/server/TestMessages.java  |   6 +-
 .../org/apache/juneau/server/TestParams.java    |   2 +-
 .../apache/juneau/server/TestTransforms.java    |  44 +-
 .../juneau/server/TestTransformsParent.java     |   2 +-
 .../juneau/server/TestClientVersionTest.java    |  14 +-
 .../org/apache/juneau/server/TestUtils.java     |   2 +-
 .../org/apache/juneau/server/RestServlet.java   |   6 +-
 .../juneau/server/annotation/RestMethod.java    |   2 +-
 .../juneau/server/annotation/RestResource.java  |   2 +-
 .../server/converters/Introspectable.java       |   4 +-
 .../juneau/server/converters/Queryable.java     |   4 +-
 .../juneau/server/converters/Traversable.java   |   4 +-
 .../juneau/server/jaxrs/JuneauProvider.java     |   2 +-
 .../java/org/apache/juneau/server/package.html  |  18 +-
 140 files changed, 4390 insertions(+), 4389 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-client/src/main/java/org/apache/juneau/client/package.html
----------------------------------------------------------------------
diff --git a/juneau-client/src/main/java/org/apache/juneau/client/package.html b/juneau-client/src/main/java/org/apache/juneau/client/package.html
index c5d2478..7fb2581 100755
--- a/juneau-client/src/main/java/org/apache/juneau/client/package.html
+++ b/juneau-client/src/main/java/org/apache/juneau/client/package.html
@@ -185,7 +185,7 @@
 		.getResponse(Boolean.<jk>class</jk>);
 			
 	<jc>// GET request, getting a filtered object</jc>
-	client.getParser().addTransforms(CalendarTransform.<jsf>ISO8601</jsf>.<jk>class</jk>);
+	client.getParser().addTransforms(CalendarSwap.<jsf>ISO8601</jsf>.<jk>class</jk>);
 	Calendar birthDate = client.doGet(<js>"http://localhost:9080/sample/addressBook/0/birthDate"</js>)
 		.getResponse(GregorianCalendar.<jk>class</jk>);
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/BeanContext.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanContext.java b/juneau-core/src/main/java/org/apache/juneau/BeanContext.java
index 9027d57..f32e46e 100644
--- a/juneau-core/src/main/java/org/apache/juneau/BeanContext.java
+++ b/juneau-core/src/main/java/org/apache/juneau/BeanContext.java
@@ -164,10 +164,10 @@ import org.apache.juneau.transform.Transform;
  * 	{@link Transform Transforms} are used to tailor how beans and non-beans are handled.<br>
  * 	There are two subclasses of transforms:
  * 	<ol class='spaced-list'>
- * 		<li>{@link BeanTransform} - Allows you to tailor handling of bean classes.
+ * 		<li>{@link BeanFilter} - Allows you to tailor handling of bean classes.
  * 			This class can be considered a programmatic equivalent to the {@link Bean} annotation when
  * 			annotating classes are not possible (e.g. you don't have access to the source).
- * 		<li>{@link PojoTransform} - Allows you to convert objects to serializable forms.
+ * 		<li>{@link PojoSwap} - Allows you to convert objects to serializable forms.
  * 	</ol>
  * <p>
  * 	See {@link org.apache.juneau.transform} for more information.
@@ -396,14 +396,14 @@ public class BeanContext extends Context {
 	 * <p>
 	 * There are two category of classes that can be passed in through this method:
 	 * <ul class='spaced-list'>
-	 * 	<li>Subclasses of {@link PojoTransform} and {@link BeanTransform}.
+	 * 	<li>Subclasses of {@link PojoSwap} and {@link BeanFilter}.
 	 * 	<li>Any other class.
 	 * </ul>
 	 * <p>
 	 * When <code>Transform</code> classes are specified, they identify objects that need to be
 	 * 	transformed into some other type during serialization (and optionally the reverse during parsing).
 	 * <p>
-	 * When non-<code>Transform</code> classes are specified, they are wrapped inside {@link BeanTransform BeanTransforms}.
+	 * When non-<code>Transform</code> classes are specified, they are wrapped inside {@link BeanFilter BeanFilters}.
 	 * For example, if you have an interface <code>IFoo</code> and a subclass <code>Foo</code>, and you
 	 * 	only want properties defined on <code>IFoo</code> to be visible as bean properties for <code>Foo</code> objects,
 	 * 	you can simply pass in <code>IFoo.<jk>class</jk></code> to this method.
@@ -512,8 +512,8 @@ public class BeanContext extends Context {
 
 	final Class<?>[] notBeanClasses;
 	final String[] notBeanPackageNames, notBeanPackagePrefixes;
-	final BeanTransform<?>[] beanTransforms;
-	final PojoTransform<?,?>[] pojoTransforms;
+	final BeanFilter<?>[] beanFilters;
+	final PojoSwap<?,?>[] pojoSwaps;
 	final Map<Class<?>,Class<?>> implClasses;
 	final Class<?>[] implKeyClasses, implValueClasses;
 	final ClassLoader classLoader;
@@ -578,17 +578,17 @@ public class BeanContext extends Context {
 		notBeanPackageNames = l1.toArray(new String[l1.size()]);
 		notBeanPackagePrefixes = l2.toArray(new String[l2.size()]);
 
-		LinkedList<BeanTransform<?>> lbf = new LinkedList<BeanTransform<?>>();
-		LinkedList<PojoTransform<?,?>> lpf = new LinkedList<PojoTransform<?,?>>();
+		LinkedList<BeanFilter<?>> lbf = new LinkedList<BeanFilter<?>>();
+		LinkedList<PojoSwap<?,?>> lpf = new LinkedList<PojoSwap<?,?>>();
  		for (Class<?> c : pm.get(BEAN_transforms, Class[].class, new Class[0])) {
 			if (isParentClass(Transform.class, c)) {
 				try {
-					if (isParentClass(BeanTransform.class, c)) {
-						BeanTransform<?> f = (BeanTransform<?>)c.newInstance();
+					if (isParentClass(BeanFilter.class, c)) {
+						BeanFilter<?> f = (BeanFilter<?>)c.newInstance();
 						//f.setBeanContext(this);
 						lbf.add(f);
-					} else if (isParentClass(PojoTransform.class, c)) {
-						PojoTransform<?,?> f = (PojoTransform<?,?>)c.newInstance();
+					} else if (isParentClass(PojoSwap.class, c)) {
+						PojoSwap<?,?> f = (PojoSwap<?,?>)c.newInstance();
 						f.setBeanContext(this);
 						lpf.add(f);
 					}
@@ -597,22 +597,22 @@ public class BeanContext extends Context {
 				}
 			} else {
  				if (! c.getClass().isInterface()) {
-					List<SurrogateTransform<?,?>> l = SurrogateTransform.findTransforms(c);
+					List<SurrogateSwap<?,?>> l = SurrogateSwap.findTransforms(c);
 					if (! l.isEmpty()) {
-						for (SurrogateTransform<?,?> f : l) {
+						for (SurrogateSwap<?,?> f : l) {
 							f.setBeanContext(this);
 							lpf.add(f);
 						}
 						continue;
 					}
 				}
-				BeanTransform<?> f = new InterfaceBeanTransform(c);
+				BeanFilter<?> f = new InterfaceBeanFilter(c);
 				f.setBeanContext(this);
 				lbf.add(f);
 			}
 		}
- 		beanTransforms = lbf.toArray(new BeanTransform[0]);
- 		pojoTransforms = lpf.toArray(new PojoTransform[0]);
+ 		beanFilters = lbf.toArray(new BeanFilter[0]);
+ 		pojoSwaps = lpf.toArray(new PojoSwap[0]);
 
  		implClasses = new TreeMap<Class<?>,Class<?>>(new ClassComparator());
  		Map<Class,Class> m = pm.getMap(BEAN_implClasses, Class.class, Class.class, null);
@@ -872,7 +872,7 @@ public class BeanContext extends Context {
 			T o = (T)m.newBean(outer);
 			if (o == null) {
 				// Beans with subtypes won't be instantiated until the sub type property is specified.
-				if (cm.beanTransform != null && cm.beanTransform.getSubTypeProperty() != null)
+				if (cm.beanFilter != null && cm.beanFilter.getSubTypeProperty() != null)
 					return null;
 				throw new BeanRuntimeException(c, "Class does not have a no-arg constructor.");
 			}
@@ -942,8 +942,8 @@ public class BeanContext extends Context {
 
 		// If this is an array, then we want it wrapped in an uncached ClassMeta object.
 		// Note that if it has a pojo transform, we still want to cache it so that
-		// we can cache something like byte[] with ByteArrayBase64Transform.
-		if (c.isArray() && findPojoTransform(c) == null)
+		// we can cache something like byte[] with ByteArrayBase64Swap.
+		if (c.isArray() && findPojoSwap(c) == null)
 			return new ClassMeta(c, this);
 
 		// This can happen if we have transforms defined against String or Object.
@@ -1410,46 +1410,46 @@ public class BeanContext extends Context {
 	}
 
 	/**
-	 * Returns the {@link PojoTransform} associated with the specified class, or <jk>null</jk> if there is no
+	 * Returns the {@link PojoSwap} associated with the specified class, or <jk>null</jk> if there is no
 	 * pojo transform associated with the class.
 	 *
 	 * @param <T> The class associated with the transform.
 	 * @param c The class associated with the transform.
 	 * @return The transform associated with the class, or null if there is no association.
 	 */
-	protected <T> PojoTransform findPojoTransform(Class<T> c) {
+	protected <T> PojoSwap findPojoSwap(Class<T> c) {
 		// Note:  On first
 		if (c != null)
-			for (PojoTransform f : pojoTransforms)
+			for (PojoSwap f : pojoSwaps)
 				if (isParentClass(f.forClass(), c))
 					return f;
 		return null;
 	}
 
 	/**
-	 * Checks whether a class has a {@link PojoTransform} associated with it in this bean context.
+	 * Checks whether a class has a {@link PojoSwap} associated with it in this bean context.
 	 * @param c The class to check.
-	 * @return <jk>true</jk> if the specified class or one of its subclasses has a {@link PojoTransform} associated with it.
+	 * @return <jk>true</jk> if the specified class or one of its subclasses has a {@link PojoSwap} associated with it.
 	 */
-	protected boolean hasChildPojoTransforms(Class<?> c) {
+	protected boolean hasChildPojoSwaps(Class<?> c) {
 		if (c != null)
-			for (PojoTransform f : pojoTransforms)
+			for (PojoSwap f : pojoSwaps)
 				if (isParentClass(c, f.forClass()))
 					return true;
 		return false;
 	}
 
 	/**
-	 * Returns the {@link BeanTransform} associated with the specified class, or <jk>null</jk> if there is no
-	 * bean transform associated with the class.
+	 * Returns the {@link BeanFilter} associated with the specified class, or <jk>null</jk> if there is no
+	 * bean filter associated with the class.
 	 *
 	 * @param <T> The class associated with the transform.
 	 * @param c The class associated with the transform.
 	 * @return The transform associated with the class, or null if there is no association.
 	 */
-	protected <T> BeanTransform findBeanTransform(Class<T> c) {
+	protected <T> BeanFilter findBeanFilter(Class<T> c) {
 		if (c != null)
-			for (BeanTransform f : beanTransforms)
+			for (BeanFilter f : beanFilters)
 				if (isParentClass(f.forClass(), c))
 					return f;
 		return null;
@@ -1569,19 +1569,19 @@ public class BeanContext extends Context {
 	 * 		<tr><th>Convert to type</th><th>Valid input value types</th><th>Notes</th></tr>
 	 * 		<tr>
 	 * 			<td>
-	 * 				A class that is the normal type of a registered {@link PojoTransform}.
+	 * 				A class that is the normal type of a registered {@link PojoSwap}.
 	 * 			</td>
 	 * 			<td>
-	 * 				A value whose class matches the transformed type of that registered {@link PojoTransform}.
+	 * 				A value whose class matches the transformed type of that registered {@link PojoSwap}.
 	 * 			</td>
 	 * 			<td>&nbsp;</td>
 	 * 		</tr>
 	 * 		<tr>
 	 * 			<td>
-	 * 				A class that is the transformed type of a registered {@link PojoTransform}.
+	 * 				A class that is the transformed type of a registered {@link PojoSwap}.
 	 * 			</td>
 	 * 			<td>
-	 * 				A value whose class matches the normal type of that registered {@link PojoTransform}.
+	 * 				A value whose class matches the normal type of that registered {@link PojoSwap}.
 	 * 			</td>
 	 * 			<td>&nbsp;</td>
 	 * 		</tr>
@@ -1734,19 +1734,19 @@ public class BeanContext extends Context {
 			if (tc == Class.class)
 				return (T)(classLoader.loadClass(value.toString()));
 
-			if (type.getPojoTransform() != null) {
-				PojoTransform f = type.getPojoTransform();
+			if (type.getPojoSwap() != null) {
+				PojoSwap f = type.getPojoSwap();
 				Class<?> nc = f.getNormalClass(), fc = f.getTransformedClass();
 				if (isParentClass(nc, tc) && isParentClass(fc, value.getClass()))
-					return (T)f.normalize(value, type);
+					return (T)f.unswap(value, type);
 			}
 
 			ClassMeta<?> vt = getClassMetaForObject(value);
-			if (vt.getPojoTransform() != null) {
-				PojoTransform f = vt.getPojoTransform();
+			if (vt.getPojoSwap() != null) {
+				PojoSwap f = vt.getPojoSwap();
 				Class<?> nc = f.getNormalClass(), fc = f.getTransformedClass();
 				if (isParentClass(nc, vt.getInnerClass()) && isParentClass(fc, tc))
-					return (T)f.transform(value);
+					return (T)f.swap(value);
 			}
 
 			if (type.isPrimitive()) {
@@ -2055,8 +2055,8 @@ public class BeanContext extends Context {
 			.append("ignoreInvocationExceptionsOnGetters", ignoreInvocationExceptionsOnGetters)
 			.append("ignoreInvocationExceptionsOnSetters", ignoreInvocationExceptionsOnSetters)
 			.append("useJavaBeanIntrospector", useJavaBeanIntrospector)
-			.append("beanTransforms", beanTransforms)
-			.append("pojoTransforms", pojoTransforms)
+			.append("beanFilters", beanFilters)
+			.append("pojoSwaps", pojoSwaps)
 			.append("notBeanClasses", notBeanClasses)
 			.append("implClasses", implClasses)
 			.append("sortProperties", sortProperties);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/BeanMap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanMap.java b/juneau-core/src/main/java/org/apache/juneau/BeanMap.java
index 6150526..d796367 100644
--- a/juneau-core/src/main/java/org/apache/juneau/BeanMap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/BeanMap.java
@@ -42,12 +42,12 @@ import org.apache.juneau.xml.annotation.*;
  * 			by the {@link java.beans.BeanInfo} class (i.e. ordered by definition in the class).
  * 	</ul>
  * 	<br>
- * 	The order can also be overridden through the use of a {@link BeanTransform}.
+ * 	The order can also be overridden through the use of a {@link BeanFilter}.
  *
  *
- * <h6 class='topic'>POJO transforms</h6>
+ * <h6 class='topic'>POJO swaps</h6>
  * <p>
- * 	If {@link PojoTransform PojoTransforms} are defined on the class types of the properties of this bean or the bean properties themselves, the
+ * 	If {@link PojoSwap PojoSwaps} are defined on the class types of the properties of this bean or the bean properties themselves, the
  * 	{@link #get(Object)} and {@link #put(String, Object)} methods will automatically
  * 	transform the property value to and from the serialized form.
  *
@@ -178,10 +178,10 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
 	/**
 	 * Sets a property on the bean.
 	 * <p>
-	 * If there is a {@link PojoTransform} associated with this bean property or bean property type class, then
+	 * If there is a {@link PojoSwap} associated with this bean property or bean property type class, then
 	 * 	you must pass in a transformed value.
 	 * For example, if the bean property type class is a {@link Date} and the bean property has the
-	 * 	{@link org.apache.juneau.transforms.DateTransform.ISO8601DT} transform associated with it through the
+	 * 	{@link org.apache.juneau.transforms.DateSwap.ISO8601DT} transform associated with it through the
 	 * 	{@link BeanProperty#transform() @BeanProperty.transform()} annotation, the value being passed in must be
 	 * 	a String containing an ISO8601 date-time string value.
 	 *
@@ -193,7 +193,7 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
 	 * 	Person p = <jk>new</jk> Person();
 	 *
 	 * 	<jc>// Create a bean context and add the ISO8601 date-time transform</jc>
-	 * 	BeanContext beanContext = <jk>new</jk> BeanContext().addTransform(DateTransform.ISO8601DT.<jk>class</jk>);
+	 * 	BeanContext beanContext = <jk>new</jk> BeanContext().addTransform(DateSwap.ISO8601DT.<jk>class</jk>);
 	 *
 	 * 	<jc>// Wrap our bean in a bean map</jc>
 	 * 	BeanMap&lt;Person&gt; b = beanContext.forBean(p);
@@ -264,10 +264,10 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
 	/**
 	 * Gets a property on the bean.
 	 * <p>
-	 * If there is a {@link PojoTransform} associated with this bean property or bean property type class, then
+	 * If there is a {@link PojoSwap} associated with this bean property or bean property type class, then
 	 * 	this method will return the transformed value.
 	 * For example, if the bean property type class is a {@link Date} and the bean property has the
-	 * 	{@link org.apache.juneau.transforms.DateTransform.ISO8601DT} transform associated with it through the
+	 * 	{@link org.apache.juneau.transforms.DateSwap.ISO8601DT} transform associated with it through the
 	 * 	{@link BeanProperty#transform() @BeanProperty.transform()} annotation, this method will return a String
 	 * 	containing an ISO8601 date-time string value.
 	 *
@@ -280,7 +280,7 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
 	 * 	p.setBirthDate(<jk>new</jk> Date(1, 2, 3, 4, 5, 6));
 	 *
 	 * 	<jc>// Create a bean context and add the ISO8601 date-time transform</jc>
-	 * 	BeanContext beanContext = <jk>new</jk> BeanContext().addTransform(DateTransform.ISO8601DT.<jk>class</jk>);
+	 * 	BeanContext beanContext = <jk>new</jk> BeanContext().addTransform(DateSwap.ISO8601DT.<jk>class</jk>);
 	 *
 	 * 	<jc>// Wrap our bean in a bean map</jc>
 	 * 	BeanMap&lt;Person&gt; b = beanContext.forBean(p);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/BeanMapEntry.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanMapEntry.java b/juneau-core/src/main/java/org/apache/juneau/BeanMapEntry.java
index 7e6910d..67b949f 100644
--- a/juneau-core/src/main/java/org/apache/juneau/BeanMapEntry.java
+++ b/juneau-core/src/main/java/org/apache/juneau/BeanMapEntry.java
@@ -36,7 +36,7 @@ import org.apache.juneau.transform.*;
  * 	<jc>// Set the property value</jc>
  * 	birthDate.setValue(<jk>new</jk> Date(1, 2, 3, 4, 5, 6));
  *
- * 	<jc>// Or if the DateTransform.DEFAULT_ISO8601DT is registered with the bean context, set a transformed value</jc>
+ * 	<jc>// Or if the DateSwap.DEFAULT_ISO8601DT is registered with the bean context, set a transformed value</jc>
  * 	birthDate.setValue(<js>"'1901-03-03T04:05:06-5000'"</js>);
  * </p>
  *
@@ -65,10 +65,10 @@ public class BeanMapEntry implements Map.Entry<String,Object> {
 	/**
 	 * Returns the value of this property.
 	 * <p>
-	 * If there is a {@link PojoTransform} associated with this bean property or bean property type class, then
+	 * If there is a {@link PojoSwap} associated with this bean property or bean property type class, then
 	 * 	this method will return the transformed value.
 	 * For example, if the bean property type class is a {@link Date} and the bean property has the
-	 * 	{@link org.apache.juneau.transforms.DateTransform.ISO8601DT} transform associated with it through the
+	 * 	{@link org.apache.juneau.transforms.DateSwap.ISO8601DT} transform associated with it through the
 	 * 	{@link BeanProperty#transform() @BeanProperty.transform()} annotation, this method will return a String
 	 * 	containing an ISO8601 date-time string value.
 	 */
@@ -84,10 +84,10 @@ public class BeanMapEntry implements Map.Entry<String,Object> {
 	 * <p>
 	 * If the property is a bean type {@code X}, then the value can either be an {@code X} or a {@code Map}.
 	 * <p>
-	 * If there is a {@link PojoTransform} associated with this bean property or bean property type class, then
+	 * If there is a {@link PojoSwap} associated with this bean property or bean property type class, then
 	 * 	you must pass in a transformed value.
 	 * For example, if the bean property type class is a {@link Date} and the bean property has the
-	 * 	{@link org.apache.juneau.transforms.DateTransform.ISO8601DT} transform associated with it through the
+	 * 	{@link org.apache.juneau.transforms.DateSwap.ISO8601DT} transform associated with it through the
 	 * 	{@link BeanProperty#transform() @BeanProperty.transform()} annotation, the value being passed in must be
 	 * 	a String containing an ISO8601 date-time string value.
 	 *

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/BeanMeta.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanMeta.java b/juneau-core/src/main/java/org/apache/juneau/BeanMeta.java
index 1eb9123..78f72a3 100644
--- a/juneau-core/src/main/java/org/apache/juneau/BeanMeta.java
+++ b/juneau-core/src/main/java/org/apache/juneau/BeanMeta.java
@@ -34,7 +34,7 @@ import org.apache.juneau.utils.*;
  * <h6 class='topic'>Description</h6>
  * <p>
  * 	Uses introspection to find all the properties associated with this class.  If the {@link Bean @Bean} annotation
- * 	is present on the class, or the class has a {@link BeanTransform} registered with it in the bean context,
+ * 	is present on the class, or the class has a {@link BeanFilter} registered with it in the bean context,
  * 	then that information is used to determine the properties on the class.
  * 	Otherwise, the {@code BeanInfo} functionality in Java is used to determine the properties on the class.
  *
@@ -52,7 +52,7 @@ import org.apache.juneau.utils.*;
  * 			</ul>
  * 	</ul>
  * 	<br>
- * 	The order can also be overridden through the use of an {@link BeanTransform}.
+ * 	The order can also be overridden through the use of an {@link BeanFilter}.
  *
  *
  * @param <T> The class type that this metadata applies to.
@@ -79,8 +79,8 @@ public class BeanMeta<T> {
 	/** The bean context that created this metadata object. */
 	protected BeanContext ctx;
 
-	/** Optional bean transform associated with the target class. */
-	protected BeanTransform<? extends T> transform;
+	/** Optional bean filter associated with the target class. */
+	protected BeanFilter<? extends T> transform;
 
 	/** Type variables implemented by this bean. */
 	protected Map<Class<?>,Class<?>[]> typeVarImpls;
@@ -106,9 +106,9 @@ public class BeanMeta<T> {
 	 *
 	 * @param classMeta The target class.
 	 * @param ctx The bean context that created this object.
-	 * @param transform Optional bean transform associated with the target class.  Can be <jk>null</jk>.
+	 * @param transform Optional bean filter associated with the target class.  Can be <jk>null</jk>.
 	 */
-	protected BeanMeta(final ClassMeta<T> classMeta, BeanContext ctx, org.apache.juneau.transform.BeanTransform<? extends T> transform) {
+	protected BeanMeta(final ClassMeta<T> classMeta, BeanContext ctx, org.apache.juneau.transform.BeanFilter<? extends T> transform) {
 		this.classMeta = classMeta;
 		this.ctx = ctx;
 		this.transform = transform;
@@ -325,14 +325,14 @@ public class BeanMeta<T> {
 			// If a transform is defined, look for inclusion and exclusion lists.
 			if (transform != null) {
 
-				// Eliminated excluded properties if BeanTransform.excludeKeys is specified.
+				// Eliminated excluded properties if BeanFilter.excludeKeys is specified.
 				String[] includeKeys = transform.getProperties();
 				String[] excludeKeys = transform.getExcludeProperties();
 				if (excludeKeys != null) {
 					for (String k : excludeKeys)
 						properties.remove(k);
 
-				// Only include specified properties if BeanTransform.includeKeys is specified.
+				// Only include specified properties if BeanFilter.includeKeys is specified.
 				// Note that the order must match includeKeys.
 				} else if (includeKeys != null) {
 					Map<String,BeanPropertyMeta> properties2 = new LinkedHashMap<String,BeanPropertyMeta>();

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/BeanPropertyMeta.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/BeanPropertyMeta.java b/juneau-core/src/main/java/org/apache/juneau/BeanPropertyMeta.java
index 1cdd8ea..e017939 100644
--- a/juneau-core/src/main/java/org/apache/juneau/BeanPropertyMeta.java
+++ b/juneau-core/src/main/java/org/apache/juneau/BeanPropertyMeta.java
@@ -55,7 +55,7 @@ public class BeanPropertyMeta {
 		rawTypeMeta,                           // The real class type of the bean property.
 		typeMeta;                              // The transformed class type of the bean property.
 	private String[] properties;
-	private PojoTransform transform;      // PojoTransform defined only via @BeanProperty annotation.
+	private PojoSwap transform;      // PojoSwap defined only via @BeanProperty annotation.
 
 	private MetadataMap extMeta = new MetadataMap();  // Extended metadata
 
@@ -130,7 +130,7 @@ public class BeanPropertyMeta {
 	/**
 	 * Returns the {@link ClassMeta} of the class of this property.
 	 * <p>
-	 * If this property or the property type class has a {@link PojoTransform} associated with it, this
+	 * If this property or the property type class has a {@link PojoSwap} associated with it, this
 	 * 	method returns the transformed class meta.
 	 * This matches the class type that is used by the {@link #get(BeanMap)} and {@link #set(BeanMap, Object)} methods.
 	 *
@@ -249,7 +249,7 @@ public class BeanPropertyMeta {
 			rawTypeMeta = f.getClassMeta(p, field.getGenericType(), typeVarImpls);
 			isUri |= (rawTypeMeta.isUri() || field.isAnnotationPresent(org.apache.juneau.annotation.URI.class));
 			if (p != null) {
-				transform = getPropertyPojoTransform(p);
+				transform = getPropertyPojoSwap(p);
 				if (p.properties().length != 0)
 					properties = p.properties();
 				isBeanUri |= p.beanUri();
@@ -263,7 +263,7 @@ public class BeanPropertyMeta {
 			isUri |= (rawTypeMeta.isUri() || getter.isAnnotationPresent(org.apache.juneau.annotation.URI.class));
 			if (p != null) {
 				if (transform == null)
-					transform = getPropertyPojoTransform(p);
+					transform = getPropertyPojoSwap(p);
 				if (properties != null && p.properties().length != 0)
 					properties = p.properties();
 				isBeanUri |= p.beanUri();
@@ -277,7 +277,7 @@ public class BeanPropertyMeta {
 			isUri |= (rawTypeMeta.isUri() || setter.isAnnotationPresent(org.apache.juneau.annotation.URI.class));
 			if (p != null) {
 			if (transform == null)
-				transform = getPropertyPojoTransform(p);
+				transform = getPropertyPojoSwap(p);
 				if (properties != null && p.properties().length != 0)
 					properties = p.properties();
 				isBeanUri |= p.beanUri();
@@ -299,16 +299,16 @@ public class BeanPropertyMeta {
 		return true;
 	}
 
-	private PojoTransform getPropertyPojoTransform(BeanProperty p) throws Exception {
-		Class<? extends PojoTransform> c = p.transform();
-		if (c == PojoTransform.NULL.class)
+	private PojoSwap getPropertyPojoSwap(BeanProperty p) throws Exception {
+		Class<? extends PojoSwap> c = p.transform();
+		if (c == PojoSwap.NULL.class)
 			return null;
 		try {
-			PojoTransform f = c.newInstance();
+			PojoSwap f = c.newInstance();
 			f.setBeanContext(this.beanMeta.ctx);
 			return f;
 		} catch (Exception e) {
-			throw new BeanRuntimeException(this.beanMeta.c, "Could not instantiate PojoTransform ''{0}'' for bean property ''{1}''", c.getName(), this.name).initCause(e);
+			throw new BeanRuntimeException(this.beanMeta.c, "Could not instantiate PojoSwap ''{0}'' for bean property ''{1}''", c.getName(), this.name).initCause(e);
 		}
 	}
 
@@ -383,7 +383,7 @@ public class BeanPropertyMeta {
 	public Object set(BeanMap<?> m, Object value) throws BeanRuntimeException {
 		try {
 			// Comvert to raw form.
-			value = normalize(value);
+			value = unswap(value);
 			BeanContext bc = this.beanMeta.ctx;
 
 		if (m.bean == null) {
@@ -549,7 +549,7 @@ public class BeanPropertyMeta {
 
 			} else {
 				if (transform != null && value != null && isParentClass(transform.getTransformedClass(), value.getClass())) {
-						value = transform.normalize(value, rawTypeMeta);
+						value = transform.unswap(value, rawTypeMeta);
 				} else {
 						value = beanMeta.ctx.convertToType(value, rawTypeMeta);
 					}
@@ -721,31 +721,31 @@ public class BeanPropertyMeta {
 	private Object transform(Object o) throws SerializeException {
 		// First use transform defined via @BeanProperty.
 		if (transform != null)
-			return transform.transform(o);
+			return transform.swap(o);
 		if (o == null)
 			return null;
 		// Otherwise, look it up via bean context.
-		if (rawTypeMeta.hasChildPojoTransforms()) {
+		if (rawTypeMeta.hasChildPojoSwaps()) {
 			Class c = o.getClass();
 			ClassMeta<?> cm = rawTypeMeta.innerClass == c ? rawTypeMeta : beanMeta.ctx.getClassMeta(c);
-			PojoTransform f = cm.getPojoTransform();
+			PojoSwap f = cm.getPojoSwap();
 			if (f != null)
-				return f.transform(o);
+				return f.swap(o);
 		}
 		return o;
 	}
 
-	private Object normalize(Object o) throws ParseException {
+	private Object unswap(Object o) throws ParseException {
 		if (transform != null)
-			return transform.normalize(o, rawTypeMeta);
+			return transform.unswap(o, rawTypeMeta);
 		if (o == null)
 			return null;
-		if (rawTypeMeta.hasChildPojoTransforms()) {
+		if (rawTypeMeta.hasChildPojoSwaps()) {
 			Class c = o.getClass();
 			ClassMeta<?> cm = rawTypeMeta.innerClass == c ? rawTypeMeta : beanMeta.ctx.getClassMeta(c);
-			PojoTransform f = cm.getPojoTransform();
+			PojoSwap f = cm.getPojoSwap();
 			if (f != null)
-				return f.normalize(o, rawTypeMeta);
+				return f.unswap(o, rawTypeMeta);
 		}
 		return o;
 	}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/ClassMeta.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/ClassMeta.java b/juneau-core/src/main/java/org/apache/juneau/ClassMeta.java
index f49b7ad..b4af534 100644
--- a/juneau-core/src/main/java/org/apache/juneau/ClassMeta.java
+++ b/juneau-core/src/main/java/org/apache/juneau/ClassMeta.java
@@ -76,8 +76,8 @@ public final class ClassMeta<T> implements Type {
 	Method namePropertyMethod;                        // The method to set the name on an object (if it has one).
 	Method parentPropertyMethod;                      // The method to set the parent on an object (if it has one).
 	String notABeanReason;                            // If this isn't a bean, the reason why.
-	PojoTransform<T,?> pojoTransform;                       // The object transform associated with this bean (if it has one).
-	BeanTransform<? extends T> beanTransform;               // The bean transform associated with this bean (if it has one).
+	PojoSwap<T,?> pojoSwap;                       // The object transform associated with this bean (if it has one).
+	BeanFilter<? extends T> beanFilter;               // The bean filter associated with this bean (if it has one).
 	boolean
 		isDelegate,                                    // True if this class extends Delegate.
 		isAbstract,                                    // True if this class is abstract.
@@ -86,7 +86,7 @@ public final class ClassMeta<T> implements Type {
 	private MetadataMap extMeta = new MetadataMap();  // Extended metadata
 
 	private Throwable initException;                   // Any exceptions thrown in the init() method.
-	private boolean hasChildPojoTransforms;               // True if this class or any subclass of this class has a PojoTransform associated with it.
+	private boolean hasChildPojoSwaps;               // True if this class or any subclass of this class has a PojoSwap associated with it.
 	private Object primitiveDefault;                   // Default value for primitive type classes.
 	private Map<String,Method> remoteableMethods,      // Methods annotated with @Remoteable.  Contains all public methods if class is annotated with @Remotable.
 		publicMethods;                                 // All public methods, including static methods.
@@ -130,10 +130,10 @@ public final class ClassMeta<T> implements Type {
 			Transform transform = findTransform(beanContext);
 			if (transform != null) {
 				if (transform.getType() == Transform.TransformType.BEAN)
-					beanTransform = (BeanTransform)transform;
+					beanFilter = (BeanFilter)transform;
 				else
-					pojoTransform = (PojoTransform)transform;
-				transformedClassMeta = (pojoTransform == null ? this : beanContext.getClassMeta(pojoTransform.getTransformedClass()));
+					pojoSwap = (PojoSwap)transform;
+				transformedClassMeta = (pojoSwap == null ? this : beanContext.getClassMeta(pojoSwap.getTransformedClass()));
 			}
 			if (transformedClassMeta == null)
 				transformedClassMeta = this;
@@ -144,7 +144,7 @@ public final class ClassMeta<T> implements Type {
 					noArgConstructor = findNoArgConstructor(innerClass, Visibility.PUBLIC);
 			}
 
-			this.hasChildPojoTransforms = beanContext.hasChildPojoTransforms(innerClass);
+			this.hasChildPojoSwaps = beanContext.hasChildPojoSwaps(innerClass);
 
 			Class c = innerClass;
 
@@ -305,7 +305,7 @@ public final class ClassMeta<T> implements Type {
 			// Note that this needs to be done after all other initialization has been done.
 			else if (classCategory == UNKNOWN) {
 
-				BeanMeta newMeta = new BeanMeta(this, beanContext, beanTransform);
+				BeanMeta newMeta = new BeanMeta(this, beanContext, beanFilter);
 				try {
 					notABeanReason = newMeta.init();
 				} catch (RuntimeException e) {
@@ -399,12 +399,12 @@ public final class ClassMeta<T> implements Type {
 	}
 
 	/**
-	 * Returns <jk>true</jk> if this class as subtypes defined through {@link Bean#subTypes} or {@link BeanTransform#getSubTypes()}.
+	 * Returns <jk>true</jk> if this class as subtypes defined through {@link Bean#subTypes} or {@link BeanFilter#getSubTypes()}.
 	 *
 	 * @return <jk>true</jk> if this class has subtypes.
 	 */
 	public boolean hasSubTypes() {
-		return beanTransform != null && beanTransform.getSubTypeProperty() != null;
+		return beanFilter != null && beanFilter.getSubTypeProperty() != null;
 	}
 
 	/**
@@ -418,15 +418,15 @@ public final class ClassMeta<T> implements Type {
 	}
 
 	/**
-	 * Returns <jk>true</jk> if this class or any child classes has a {@link PojoTransform} associated with it.
+	 * Returns <jk>true</jk> if this class or any child classes has a {@link PojoSwap} associated with it.
 	 * <p>
 	 * Used when transforming bean properties to prevent having to look up transforms if we know for certain
 	 * that no transforms are associated with a bean property.
 	 *
-	 * @return <jk>true</jk> if this class or any child classes has a {@link PojoTransform} associated with it.
+	 * @return <jk>true</jk> if this class or any child classes has a {@link PojoSwap} associated with it.
 	 */
-	public boolean hasChildPojoTransforms() {
-		return hasChildPojoTransforms;
+	public boolean hasChildPojoSwaps() {
+		return hasChildPojoSwaps;
 	}
 
 	private Transform findTransform(BeanContext context) {
@@ -442,15 +442,15 @@ public final class ClassMeta<T> implements Type {
 			}
 			if (context == null)
 				return null;
-			Transform f = context.findBeanTransform(innerClass);
+			Transform f = context.findBeanFilter(innerClass);
 			if (f != null)
 				return f;
-			f = context.findPojoTransform(innerClass);
+			f = context.findPojoSwap(innerClass);
 			if (f != null)
 				return f;
 			List<Bean> ba = ReflectionUtils.findAnnotations(Bean.class, innerClass);
 			if (! ba.isEmpty())
-				f = new AnnotationBeanTransform<T>(innerClass, ba);
+				f = new AnnotationBeanFilter<T>(innerClass, ba);
 			return f;
 		} catch (Exception e) {
 			throw new RuntimeException(e);
@@ -524,7 +524,7 @@ public final class ClassMeta<T> implements Type {
 	}
 
 	/**
-	 * Returns the generalized form of this class if there is an {@link PojoTransform} associated with it.
+	 * Returns the generalized form of this class if there is an {@link PojoSwap} associated with it.
 	 *
 	 * @return The transformed class type, or this object if no transform is associated with the class.
 	 */
@@ -803,13 +803,13 @@ public final class ClassMeta<T> implements Type {
 	}
 
 	/**
-	 * Returns the {@link PojoTransform} associated with this class.
+	 * Returns the {@link PojoSwap} associated with this class.
 	 *
-	 * @return The {@link PojoTransform} associated with this class, or <jk>null</jk> if there is no POJO transform
+	 * @return The {@link PojoSwap} associated with this class, or <jk>null</jk> if there is no POJO swap
 	 * 	associated with this class.
 	 */
-	public PojoTransform<T,?> getPojoTransform() {
-		return pojoTransform;
+	public PojoSwap<T,?> getPojoSwap() {
+		return pojoSwap;
 	}
 
 	/**
@@ -895,7 +895,7 @@ public final class ClassMeta<T> implements Type {
 		if (beanMeta == null)
 			return false;
 		// Beans with transforms with subtype properties are assumed to be constructable.
-		if (beanTransform != null && beanTransform.getSubTypeProperty() != null)
+		if (beanFilter != null && beanFilter.getSubTypeProperty() != null)
 			return true;
 		if (beanMeta.constructor == null)
 			return false;

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/ContextFactory.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/ContextFactory.java b/juneau-core/src/main/java/org/apache/juneau/ContextFactory.java
index bc957ca..2c6ab81 100644
--- a/juneau-core/src/main/java/org/apache/juneau/ContextFactory.java
+++ b/juneau-core/src/main/java/org/apache/juneau/ContextFactory.java
@@ -127,7 +127,7 @@ import org.apache.juneau.parser.*;
  * <p>
  * 	Lists are appended to the beginning of the set so that behavior can be overridden.<br>
  * <p>
- * 	For sample, the following code shows the order in which POJO transforms are applied.<br>
+ * 	For sample, the following code shows the order in which POJO swaps are applied.<br>
  * 	In this case, we want F3 and F4 to appear at the beginning of the set so that they
  * 	take precedence over F1 and F2....
  * <p class='bcode'>
@@ -264,7 +264,7 @@ public final class ContextFactory extends Lockable {
 	private static Comparator<Object> PROPERTY_COMPARATOR = new Comparator<Object>() {
 		@Override
 		public int compare(Object o1, Object o2) {
-			return normalize(o1).toString().compareTo(normalize(o2).toString());
+			return unswap(o1).toString().compareTo(unswap(o2).toString());
 		}
 	};
 
@@ -750,8 +750,8 @@ public final class ContextFactory extends Lockable {
 	 */
 	protected static class NormalizingHashCode extends HashCode {
 		@Override /* HashCode */
-		protected Object normalize(Object o) {
-			return ContextFactory.normalize(o);
+		protected Object unswap(Object o) {
+			return ContextFactory.unswap(o);
 		}
 	}
 
@@ -1202,7 +1202,7 @@ public final class ContextFactory extends Lockable {
 	 * @param o The object to normalize.
 	 * @return The normalized object.
 	 */
-	private static final Object normalize(Object o) {
+	private static final Object unswap(Object o) {
 		if (o instanceof Class)
 			return ((Class<?>)o).getName();
 		if (o instanceof Number || o instanceof Boolean)
@@ -1247,7 +1247,7 @@ public final class ContextFactory extends Lockable {
 			}
 			return false;
 		} else {
-			return normalize(o1).equals(normalize(o2));
+			return unswap(o1).equals(unswap(o2));
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java b/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java
index 7bbbc8c..507c827 100644
--- a/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java
@@ -356,12 +356,12 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
 	 * @throws ParseException Thrown by the transform if a problem occurred trying to parse the value.
 	 */
 	@SuppressWarnings({ "rawtypes", "unchecked" })
-	public <T> T get(PojoTransform<T,?> transform, String key) throws ParseException {
+	public <T> T get(PojoSwap<T,?> transform, String key) throws ParseException {
 		Object o = super.get(key);
 		if (o == null)
 			return null;
-		PojoTransform f = transform;
-		return (T)f.normalize(o, null);
+		PojoSwap f = transform;
+		return (T)f.unswap(o, null);
 	}
 
 	/**
@@ -1130,7 +1130,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
 	 * 		<p>
 	 * 			It can also be converted to any type that can be handled by the {@link BeanContext#convertToType(Object, Class)} method.
 	 * 			In this case, the value is specified by an <code>value</code> entry of any type.
-	 * 			For example, if the bean context has a {@link CalendarTransform} associated with it, it can convert a string value to a calendar.
+	 * 			For example, if the bean context has a {@link CalendarSwap} associated with it, it can convert a string value to a calendar.
 	 * 		<p class='bcode'>
 	 * 	{
 	 * 		_class: <js>'java.util.GregorianCalendar'</js>,

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/annotation/Bean.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/annotation/Bean.java b/juneau-core/src/main/java/org/apache/juneau/annotation/Bean.java
index 55b6468..dd436a2 100644
--- a/juneau-core/src/main/java/org/apache/juneau/annotation/Bean.java
+++ b/juneau-core/src/main/java/org/apache/juneau/annotation/Bean.java
@@ -46,7 +46,7 @@ public @interface Bean {
 	 * <p>
 	 * 	The order specified is the same order that the entries will be returned by the {@link BeanMap#entrySet()} and related methods.
 	 * <p>
-	 * 	This annotation is an alternative to using the {@link BeanTransform} class with an implemented {@link BeanTransform#getProperties()} method.
+	 * 	This annotation is an alternative to using the {@link BeanFilter} class with an implemented {@link BeanFilter#getProperties()} method.
 	 *
 	 * <dl>
 	 * 	<dt>Example:</dt>
@@ -84,7 +84,7 @@ public @interface Bean {
 	/**
 	 * Specifies a list of properties that should be excluded from {@link BeanMap#entrySet()}.
 	 * <p>
-	 * 	This annotation is an alternative to using the {@link BeanTransform} class with an implemented {@link BeanTransform#getExcludeProperties()} method.
+	 * 	This annotation is an alternative to using the {@link BeanFilter} class with an implemented {@link BeanFilter#getExcludeProperties()} method.
 	 *
 	 * <dl>
 	 * 	<dt>Example:</dt>
@@ -108,7 +108,7 @@ public @interface Bean {
 	 * 	For example, the {@link PropertyNamerDashedLC} will convert property names to dashed-lowercase, and
 	 * 		these will be used as attribute names in JSON, and element names in XML.
 	 * <p>
-	 * 	This annotation is an alternative to using the {@link BeanTransform} class with an implemented {@link BeanTransform#getPropertyNamer()} method.
+	 * 	This annotation is an alternative to using the {@link BeanFilter} class with an implemented {@link BeanFilter#getPropertyNamer()} method.
 	 *
 	 * <dl>
 	 * 	<dt>Example:</dt>
@@ -170,7 +170,7 @@ public @interface Bean {
 	 * 	<jsm>assertTrue</jsm>(a <jk>instanceof</jk> A1);
 	 * </p>
 	 * <p>
-	 * 	This annotation is an alternative to using the {@link BeanTransform} class with an implemented {@link BeanTransform#getSubTypeProperty()} method.
+	 * 	This annotation is an alternative to using the {@link BeanFilter} class with an implemented {@link BeanFilter#getSubTypeProperty()} method.
 	 */
 	String subTypeProperty() default "";
 
@@ -205,7 +205,7 @@ public @interface Bean {
 	 * 	Note that this annotation can be used on the parent class so that it filters to all child classes,
 	 * 		or can be set individually on the child classes.
 	 * <p>
-	 * 	This annotation is an alternative to using the {@link BeanTransform} class with an implemented {@link BeanTransform#getInterfaceClass()} method.
+	 * 	This annotation is an alternative to using the {@link BeanFilter} class with an implemented {@link BeanFilter#getInterfaceClass()} method.
 	 */
 	Class<?> interfaceClass() default Object.class;
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/annotation/BeanProperty.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/annotation/BeanProperty.java b/juneau-core/src/main/java/org/apache/juneau/annotation/BeanProperty.java
index e9ff331..587da9c 100644
--- a/juneau-core/src/main/java/org/apache/juneau/annotation/BeanProperty.java
+++ b/juneau-core/src/main/java/org/apache/juneau/annotation/BeanProperty.java
@@ -126,14 +126,14 @@ public @interface BeanProperty {
 	 * 	<jk>public class</jk> MyClass {
 	 *
 	 * 		<jc>// During serialization, convert to ISO8601 date-time string.</jc>
-	 * 		<ja>@BeanProperty</ja>(transform=CalendarTransform.ISO8601DT.<jk>class</jk>)
+	 * 		<ja>@BeanProperty</ja>(transform=CalendarSwap.ISO8601DT.<jk>class</jk>)
 	 * 		<jk>public</jk> Calendar getTime();
 	 * 	}
 	 * 		</p>
 	 * 	</dd>
 	 * </dl>
 	 */
-	Class<? extends PojoTransform<?,?>> transform() default PojoTransform.NULL.class;
+	Class<? extends PojoSwap<?,?>> transform() default PojoSwap.NULL.class;
 
 	/**
 	 * Used to limit which child properties are rendered by the serializers.

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java b/juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java
index d4919ee..2027c55 100644
--- a/juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java
+++ b/juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java
@@ -25,7 +25,7 @@ import org.apache.juneau.transform.*;
  * <p>
  * 	Annotation that can be applied to POJOs to associate transforms with them.
  * <p>
- * 	Typically used to associate {@link PojoTransform PojoTransforms} with classes using annotations
+ * 	Typically used to associate {@link PojoSwap PojoSwaps} with classes using annotations
  * 		instead of programatically through a method such as {@link Serializer#addTransforms(Class...)}.
  *
  * <h6 class='topic'>Example</h6>
@@ -33,17 +33,17 @@ import org.apache.juneau.transform.*;
  * 	In this case, a transform is being applied to a bean that will force it to be serialized as a <code>String</code>
  * <p class='bcode'>
  * 	<jc>// Our bean class</jc>
- * 	<ja>@Pojo</ja>(transform=BTransform.<jk>class</jk>)
+ * 	<ja>@Pojo</ja>(transform=BSwap.<jk>class</jk>)
  * 	<jk>public class</jk> B {
  * 		<jk>public</jk> String <jf>f1</jf>;
  * 	}
  *
  * 	<jc>// Our transform to force the bean to be serialized as a String</jc>
- * 	<jk>public class</jk> BTransform <jk>extends</jk> PojoTransform&lt;B,String&gt; {
- * 		<jk>public</jk> String transform(B o) <jk>throws</jk> SerializeException {
+ * 	<jk>public class</jk> BSwap <jk>extends</jk> PojoSwap&lt;B,String&gt; {
+ * 		<jk>public</jk> String swap(B o) <jk>throws</jk> SerializeException {
  * 			<jk>return</jk> o.f1;
  * 		}
- * 		<jk>public</jk> B normalize(String f, ClassMeta&lt;?&gt; hint) <jk>throws</jk> ParseException {
+ * 		<jk>public</jk> B unswap(String f, ClassMeta&lt;?&gt; hint) <jk>throws</jk> ParseException {
  * 			B b1 = <jk>new</jk> B();
  * 			b1.<jf>f1</jf> = f;
  * 			<jk>return</jk> b1;
@@ -65,11 +65,11 @@ import org.apache.juneau.transform.*;
  * <p>
  * 	Note that using this annotation is functionally equivalent to adding transforms to the serializers and parsers:
  * <p class='bcode'>
- * 	WriterSerializer s = <jk>new</jk> JsonSerializer.addTransforms(BTransform.<jk>class</jk>);
- * 	ReaderParser p = <jk>new</jk> JsonParser.addTransforms(BTransform.<jk>class</jk>);
+ * 	WriterSerializer s = <jk>new</jk> JsonSerializer.addTransforms(BSwap.<jk>class</jk>);
+ * 	ReaderParser p = <jk>new</jk> JsonParser.addTransforms(BSwap.<jk>class</jk>);
  * </p>
  * <p>
- * 	It is technically possible to associate a {@link BeanTransform} with a bean class using this annotation.
+ * 	It is technically possible to associate a {@link BeanFilter} with a bean class using this annotation.
  * 	However in practice, it's almost always less code to simply use the {@link Bean @Bean} annotation.
  * </p>
  *
@@ -82,7 +82,7 @@ import org.apache.juneau.transform.*;
 public @interface Pojo {
 
 	/**
-	 * The transform class.
+	 * Associate a {@link PojoSwap} or {@link SurrogateSwap} with this class type.
 	 */
 	Class<? extends Transform> transform() default Transform.NULL.class;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/dto/atom/CommonEntry.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/CommonEntry.java b/juneau-core/src/main/java/org/apache/juneau/dto/atom/CommonEntry.java
index ea60789..821193a 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/CommonEntry.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/CommonEntry.java
@@ -262,7 +262,7 @@ public class CommonEntry extends Common {
 	 *
 	 * @return The update timestamp of this object.
 	 */
-	@BeanProperty(transform=CalendarTransform.ISO8601DT.class)
+	@BeanProperty(transform=CalendarSwap.ISO8601DT.class)
 	public Calendar getUpdated() {
 		return updated;
 	}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java
index 9fc4111..2475372 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/atom/Entry.java
@@ -100,7 +100,7 @@ public class Entry extends CommonEntry {
 	 *
 	 * @return The publish timestamp of this entry.
 	 */
- 	@BeanProperty(transform=CalendarTransform.ISO8601DT.class)
+ 	@BeanProperty(transform=CalendarSwap.ISO8601DT.class)
 	public Calendar getPublished() {
  		return published;
  	}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/dto/cognos/Column.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/cognos/Column.java b/juneau-core/src/main/java/org/apache/juneau/dto/cognos/Column.java
index 020a71b..8356f70 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/cognos/Column.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/cognos/Column.java
@@ -33,7 +33,7 @@ public class Column {
 
 	private String name, type;
 	private Integer length;
-	PojoTransform transform;
+	PojoSwap transform;
 
 	/** Bean constructor. */
 	public Column() {}
@@ -62,7 +62,7 @@ public class Column {
 	}
 
 	/**
-	 * Associates a POJO transform with this column.
+	 * Associates a POJO swap with this column.
 	 * <p>
 	 * 	Typically used to define columns that don't exist on the underlying beans being serialized.
 	 * <p>
@@ -72,9 +72,9 @@ public class Column {
 	 * <p class='bcode'>
 	 * 	Column c = <jk>new</jk> Column(<js>"numAddresses"</js>, <js>"xs:int"</js>)
 	 * 		.addTransform(
-	 * 			<jk>new</jk> PojoTransform<Person,Integer>() {
+	 * 			<jk>new</jk> PojoSwap<Person,Integer>() {
 	 * 				<ja>@Override</ja>
-	 * 				<jk>public</jk> Integer transform(Person p) {
+	 * 				<jk>public</jk> Integer swap(Person p) {
 	 * 					<jk>return</jk> p.<jf>addresses</jf>.size();
 	 * 				}
 	 * 			}
@@ -84,7 +84,7 @@ public class Column {
 	 * @param transform The transform to associate with the column.
 	 * @return This object (for method chaining).
 	 */
-	public Column addTransform(PojoTransform transform) {
+	public Column addTransform(PojoSwap transform) {
 		this.transform = transform;
 		return this;
 	}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java b/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java
index d4a70f2..77c770f 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/cognos/DataSet.java
@@ -58,9 +58,9 @@ import org.apache.juneau.xml.annotation.*;
  * 		<jk>new</jk> Column(<js>"age"</js>, <js>"xs:int"</js>),
  * 		<jk>new</jk> Column(<js>"numAddresses"</js>, <js>"xs:int"</js>)
  * 			.addTransform(
- * 				<jk>new</jk> PojoTransform&ltPerson,Integer&gt;() {
+ * 				<jk>new</jk> PojoSwap&ltPerson,Integer&gt;() {
  * 					<ja>@Override</ja>
- * 					<jk>public</jk> Integer transform(Person p) {
+ * 					<jk>public</jk> Integer swap(Person p) {
  * 						<jk>return</jk> p.<jf>addresses</jf>.size();
  * 					}
  * 				}
@@ -112,7 +112,7 @@ public class DataSet {
 					for (Column col : columns) {
 						Object v;
 						if (col.transform != null)
-							v = col.transform.transform(o2);
+							v = col.transform.swap(o2);
 						else
 							v = m.get(col.getName());
 						r.add(v == null ? null : v.toString());

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/dto/cognos/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/cognos/package.html b/juneau-core/src/main/java/org/apache/juneau/dto/cognos/package.html
index 354fe8d..ed03606 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/cognos/package.html
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/cognos/package.html
@@ -108,9 +108,9 @@
 		<jk>new</jk> Column(<js>"age"</js>, <js>"xs:int"</js>),
 		<jk>new</jk> Column(<js>"numAddresses"</js>, <js>"xs:int"</js>)
 			.addTransform(
-				<jk>new</jk> PojoTransform&lt;Person,Integer&gt;() {
+				<jk>new</jk> PojoSwap&lt;Person,Integer&gt;() {
 					<ja>@Override</ja>
-					<jk>public</jk> Integer transform(Person p) {
+					<jk>public</jk> Integer swap(Person p) {
 						<jk>return</jk> p.<jf>addresses</jf>.size();
 					}
 				}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/dto/jsonschema/Schema.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/dto/jsonschema/Schema.java b/juneau-core/src/main/java/org/apache/juneau/dto/jsonschema/Schema.java
index d63a245..2fbba1d 100644
--- a/juneau-core/src/main/java/org/apache/juneau/dto/jsonschema/Schema.java
+++ b/juneau-core/src/main/java/org/apache/juneau/dto/jsonschema/Schema.java
@@ -218,7 +218,7 @@ public class Schema {
 	 * @return The value of the <property>type</property> property on this bean, or <jk>null</jk> if it is not set.
 	 * 	Can be either a {@link JsonType} or {@link JsonTypeArray} depending on what value was used to set it.
 	 */
-	@BeanProperty(transform=JsonTypeOrJsonTypeArrayTransform.class)
+	@BeanProperty(transform=JsonTypeOrJsonTypeArraySwap.class)
 	public Object getType() {
 		if (typeJsonType != null)
 			return typeJsonType;
@@ -292,15 +292,15 @@ public class Schema {
 	 * </ul>
 	 * Serialization method is a no-op.
 	 */
-	public static class JsonTypeOrJsonTypeArrayTransform extends PojoTransform<Object,Object> {
+	public static class JsonTypeOrJsonTypeArraySwap extends PojoSwap<Object,Object> {
 
-		@Override /* PojoTransform */
-		public Object transform(Object o) throws SerializeException {
+		@Override /* PojoSwap */
+		public Object swap(Object o) throws SerializeException {
 			return o;
 		}
 
-		@Override /* PojoTransform */
-		public Object normalize(Object o, ClassMeta<?> hint) throws ParseException {
+		@Override /* PojoSwap */
+		public Object unswap(Object o, ClassMeta<?> hint) throws ParseException {
 			BeanContext bc = getBeanContext();
 			ClassMeta<?> cm = (o instanceof Collection ? bc.getClassMeta(JsonTypeArray.class) : bc.getClassMeta(JsonType.class));
 			return bc.convertToType(o, cm);
@@ -514,7 +514,7 @@ public class Schema {
 	 * @return The value of the <property>items</property> property on this bean, or <jk>null</jk> if it is not set.
 	 * 	Can be either a {@link Schema} or {@link SchemaArray} depending on what value was used to set it.
 	 */
-	@BeanProperty(transform=SchemaOrSchemaArrayTransform.class)
+	@BeanProperty(transform=SchemaOrSchemaArraySwap.class)
 	public Object getItems() {
 		if (itemsSchema != null)
 			return itemsSchema;
@@ -553,15 +553,15 @@ public class Schema {
 	 * </ul>
 	 * Serialization method is a no-op.
 	 */
-	public static class SchemaOrSchemaArrayTransform extends PojoTransform<Object,Object> {
+	public static class SchemaOrSchemaArraySwap extends PojoSwap<Object,Object> {
 
-		@Override /* PojoTransform */
-		public Object transform(Object o) throws SerializeException {
+		@Override /* PojoSwap */
+		public Object swap(Object o) throws SerializeException {
 			return o;
 		}
 
-		@Override /* PojoTransform */
-		public Object normalize(Object o, ClassMeta<?> hint) throws ParseException {
+		@Override /* PojoSwap */
+		public Object unswap(Object o, ClassMeta<?> hint) throws ParseException {
 			BeanContext bc = getBeanContext();
 			ClassMeta<?> cm = (o instanceof Collection ? bc.getClassMeta(SchemaArray.class) : bc.getClassMeta(Schema.class));
 			return bc.convertToType(o, cm);
@@ -772,7 +772,7 @@ public class Schema {
 	 * @return The value of the <property>additionalItems</property> property on this bean, or <jk>null</jk> if it is not set.
 	 * 	Can be either a {@link Boolean} or {@link SchemaArray} depending on what value was used to set it.
 	 */
-	@BeanProperty(transform=BooleanOrSchemaArrayTransform.class)
+	@BeanProperty(transform=BooleanOrSchemaArraySwap.class)
 	public Object getAdditionalItems() {
 		if (additionalItemsBoolean != null)
 			return additionalItemsBoolean;
@@ -848,15 +848,15 @@ public class Schema {
 	 * </ul>
 	 * Serialization method is a no-op.
 	 */
-	public static class BooleanOrSchemaArrayTransform extends PojoTransform<Object,Object> {
+	public static class BooleanOrSchemaArraySwap extends PojoSwap<Object,Object> {
 
-		@Override /* PojoTransform */
-		public Object transform(Object o) throws SerializeException {
+		@Override /* PojoSwap */
+		public Object swap(Object o) throws SerializeException {
 			return o;
 		}
 
-		@Override /* PojoTransform */
-		public Object normalize(Object o, ClassMeta<?> hint) throws ParseException {
+		@Override /* PojoSwap */
+		public Object unswap(Object o, ClassMeta<?> hint) throws ParseException {
 			BeanContext bc = getBeanContext();
 			ClassMeta<?> cm = (o instanceof Collection ? bc.getClassMeta(SchemaArray.class) : bc.getClassMeta(Boolean.class));
 			return bc.convertToType(o, cm);
@@ -1031,7 +1031,7 @@ public class Schema {
 	 * @return The value of the <property>additionalProperties</property> property on this bean, or <jk>null</jk> if it is not set.
 	 * 	Can be either a {@link Boolean} or {@link SchemaArray} depending on what value was used to set it.
 	 */
-	@BeanProperty(transform=BooleanOrSchemaTransform.class)
+	@BeanProperty(transform=BooleanOrSchemaSwap.class)
 	public Object getAdditionalProperties() {
 		if (additionalPropertiesBoolean != null)
 			return additionalItemsBoolean;
@@ -1093,15 +1093,15 @@ public class Schema {
 	 * </ul>
 	 * Serialization method is a no-op.
 	 */
-	public static class BooleanOrSchemaTransform extends PojoTransform<Object,Object> {
+	public static class BooleanOrSchemaSwap extends PojoSwap<Object,Object> {
 
-		@Override /* PojoTransform */
-		public Object transform(Object o) throws SerializeException {
+		@Override /* PojoSwap */
+		public Object swap(Object o) throws SerializeException {
 			return o;
 		}
 
-		@Override /* PojoTransform */
-		public Object normalize(Object o, ClassMeta<?> hint) throws ParseException {
+		@Override /* PojoSwap */
+		public Object unswap(Object o, ClassMeta<?> hint) throws ParseException {
 			BeanContext bc = getBeanContext();
 			ClassMeta<?> cm = (o instanceof Boolean ? bc.getClassMeta(Boolean.class) : bc.getClassMeta(Schema.class));
 			return bc.convertToType(o, cm);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java
index c8423ce..6cdc4cd 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlParser.java
@@ -72,7 +72,7 @@ public final class HtmlParser extends ReaderParser {
 		BeanContext bc = session.getBeanContext();
 		if (nt == null)
 			nt = (ClassMeta<T>)object();
-		PojoTransform<T,Object> transform = (PojoTransform<T,Object>)nt.getPojoTransform();
+		PojoSwap<T,Object> transform = (PojoSwap<T,Object>)nt.getPojoSwap();
 		ClassMeta<?> ft = nt.getTransformedClassMeta();
 		session.setCurrentClass(ft);
 
@@ -195,7 +195,7 @@ public final class HtmlParser extends ReaderParser {
 
 
 		if (transform != null && o != null)
-			o = transform.normalize(o, nt);
+			o = transform.unswap(o, nt);
 
 		if (outer != null)
 			setParent(nt, o, outer);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
index f30b0bb..0ba6005 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
@@ -116,7 +116,7 @@ public final class HtmlSchemaDocSerializer extends HtmlDocSerializer {
 
 		out.put("type", type);
 		out.put("class", eType.toString());
-		PojoTransform t = eType.getPojoTransform();
+		PojoSwap t = eType.getPojoSwap();
 		if (t != null)
 			out.put("transform", t);
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java
index 47e40cc..664f266 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlSerializer.java
@@ -222,9 +222,9 @@ public class HtmlSerializer extends XmlSerializer {
 				classAttr = aType.toString();
 
 			// Transform if necessary
-			PojoTransform transform = aType.getPojoTransform();
+			PojoSwap transform = aType.getPojoSwap();
 			if (transform != null) {
-				o = transform.transform(o);
+				o = transform.swap(o);
 
 				// If the transforms getTransformedClass() method returns Object, we need to figure out
 				// the actual type now.
@@ -409,9 +409,9 @@ public class HtmlSerializer extends XmlSerializer {
 			for (Object o : c) {
 				ClassMeta<?> cm = bc.getClassMetaForObject(o);
 
-				if (cm != null && cm.getPojoTransform() != null) {
-					PojoTransform f = cm.getPojoTransform();
-					o = f.transform(o);
+				if (cm != null && cm.getPojoSwap() != null) {
+					PojoSwap f = cm.getPojoSwap();
+					o = f.swap(o);
 					cm = cm.getTransformedClassMeta();
 				}
 
@@ -487,9 +487,9 @@ public class HtmlSerializer extends XmlSerializer {
 		if (o1 == null)
 			return null;
 		ClassMeta<?> cm = bc.getClassMetaForObject(o1);
-		if (cm.getPojoTransform() != null) {
-			PojoTransform f = cm.getPojoTransform();
-			o1 = f.transform(o1);
+		if (cm.getPojoSwap() != null) {
+			PojoSwap f = cm.getPojoSwap();
+			o1 = f.swap(o1);
 			cm = cm.getTransformedClassMeta();
 		}
 		if (cm == null || ! (cm.isMap() || cm.isBean()))
@@ -523,9 +523,9 @@ public class HtmlSerializer extends XmlSerializer {
 			if (o == null)
 				continue;
 			cm = bc.getClassMetaForObject(o);
-			if (cm != null && cm.getPojoTransform() != null) {
-				PojoTransform f = cm.getPojoTransform();
-				o = f.transform(o);
+			if (cm != null && cm.getPojoSwap() != null) {
+				PojoSwap f = cm.getPojoSwap();
+				o = f.swap(o);
 				cm = cm.getTransformedClassMeta();
 			}
 			if (prevC.contains(cm))

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java b/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java
index fc1e72b..f25fa09 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/HashCode.java
@@ -42,7 +42,7 @@ public class HashCode {
 	 * @return This object (for method chaining).
 	 */
 	public HashCode add(Object o) {
-		o = normalize(o);
+		o = unswap(o);
 		add(o == null ? 1 : o.hashCode());
 		return this;
 	}
@@ -79,7 +79,7 @@ public class HashCode {
 	 * @param o The object to normalize before getting it's hashcode.
 	 * @return The normalized object.
 	 */
-	protected Object normalize(Object o) {
+	protected Object unswap(Object o) {
 		return o;
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java b/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java
index 4bd90ef..d1c5ccf 100644
--- a/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java
+++ b/juneau-core/src/main/java/org/apache/juneau/internal/JuneauLogger.java
@@ -32,10 +32,10 @@ public class JuneauLogger extends java.util.logging.Logger {
 
 	private static final WriterSerializer serializer = JsonSerializer.DEFAULT_LAX.clone()
 		.addTransforms(
-			CalendarTransform.ISO8601DTZ.class,
-			DateTransform.ISO8601DTZ.class,
-			EnumerationTransform.class,
-			IteratorTransform.class
+			CalendarSwap.ISO8601DTZ.class,
+			DateSwap.ISO8601DTZ.class,
+			EnumerationSwap.class,
+			IteratorSwap.class
 		);
 
 	private static final ConcurrentHashMap<Class<?>,String> rbMap = new ConcurrentHashMap<Class<?>,String>();

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/jena/RdfParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/jena/RdfParser.java b/juneau-core/src/main/java/org/apache/juneau/jena/RdfParser.java
index 6695b0b..3b7ae14 100644
--- a/juneau-core/src/main/java/org/apache/juneau/jena/RdfParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/jena/RdfParser.java
@@ -243,7 +243,7 @@ public class RdfParser extends ReaderParser {
 
 		if (nt == null)
 			nt = (ClassMeta<T>)object();
-		PojoTransform<T,Object> transform = (PojoTransform<T,Object>)nt.getPojoTransform();
+		PojoSwap<T,Object> transform = (PojoSwap<T,Object>)nt.getPojoSwap();
 		ClassMeta<?> ft = nt.getTransformedClassMeta();
 		session.setCurrentClass(ft);
 
@@ -353,7 +353,7 @@ public class RdfParser extends ReaderParser {
 		}
 
 		if (transform != null && o != null)
-			o = transform.normalize(o, nt);
+			o = transform.unswap(o, nt);
 
 		if (outer != null)
 			setParent(nt, o, outer);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/jena/RdfSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/jena/RdfSerializer.java b/juneau-core/src/main/java/org/apache/juneau/jena/RdfSerializer.java
index dc6aa74..5f464e1 100644
--- a/juneau-core/src/main/java/org/apache/juneau/jena/RdfSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/jena/RdfSerializer.java
@@ -180,9 +180,9 @@ public class RdfSerializer extends WriterSerializer {
 			gType = aType.getTransformedClassMeta();
 
 			// Transform if necessary
-			PojoTransform transform = aType.getPojoTransform();
+			PojoSwap transform = aType.getPojoSwap();
 			if (transform != null) {
-				o = transform.transform(o);
+				o = transform.swap(o);
 
 				// If the transforms getTransformedClass() method returns Object, we need to figure out
 				// the actual type now.

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/jena/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/jena/package.html b/juneau-core/src/main/java/org/apache/juneau/jena/package.html
index 5cf96e4..0a25043 100644
--- a/juneau-core/src/main/java/org/apache/juneau/jena/package.html
+++ b/juneau-core/src/main/java/org/apache/juneau/jena/package.html
@@ -119,10 +119,10 @@
 			<code>fromString()</code>, <code>valueOf()</code>, <code>constructor(String)</code>).
 	</ul>
 	<p>
-		In addition to the types shown above, Juneau includes the ability to define transforms to transform non-standard object and 
+		In addition to the types shown above, Juneau includes the ability to define 'swaps' to transform non-standard object and 
 			property types to serializable forms (e.g. to transform <code>Calendars</code> to and from <code>ISO8601</code> strings, 
 			or <code>byte[]</code> arrays to and from base-64 encoded strings).<br>
-		These transforms can be associated with serializers/parsers, or can be associated with classes or bean properties through type and method annotations.
+		These  can be associated with serializers/parsers, or can be associated with classes or bean properties through type and method annotations.
 	</p>
 	<p>
 		Refer to <a href='../package-summary.html#PojoCategories' class='doclink'>POJO Categories</a> for a complete definition of supported POJOs.
@@ -469,16 +469,16 @@
 			<li>Associating transforms at both the class and property level (to convert non-serializable POJOs to serializable forms).
 		</ul>
 		<p>
-			For example, we now add a <code>birthDate</code> property, and associate a transform with it to transform
+			For example, we now add a <code>birthDate</code> property, and associate a swap with it to transform
 				it to an ISO8601 date-time string in GMT time.<br>
 			By default, <code>Calendars</code> are treated as beans by the framework, which is usually not how you want them serialized.<br>
-			Using transforms, we can convert them to standardized string forms.
+			Using swaps, we can convert them to standardized string forms.
 		</p>
 		<p class='bcode'>	
 	<jk>public class</jk> Person {
 		
 		<jc>// Bean properties</jc>
-		<ja>@BeanProperty</ja>(transform=CalendarTransform.ISO8601DTZ.<jk>class</jk>) <jk>public</jk> Calendar birthDate;
+		<ja>@BeanProperty</ja>(transform=CalendarSwap.ISO8601DTZ.<jk>class</jk>) <jk>public</jk> Calendar birthDate;
 		...
 		
 		<jc>// Normal constructor</jc>
@@ -898,9 +898,9 @@
 	<jc>// Get a value convertable from a String.</jc>
 	URI uri = m.get(URI.<jk>class</jk>, <js>"uri"</js>);
 
-	<jc>// Get a value using a transform.</jc>
-	CalendarTransform transform = <jk>new</jk> CalendarTransform.ISO8601DTZ();
-	Calendar birthDate = m.get(transform, <js>"birthDate"</js>);
+	<jc>// Get a value using a swap.</jc>
+	CalendarSwap swap = <jk>new</jk> CalendarSwap.ISO8601DTZ();
+	Calendar birthDate = m.get(swap, <js>"birthDate"</js>);
 
 	<jc>// Get the addresses.</jc>
 	ObjectList addresses = m.getObjectList(<js>"addresses"</js>);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java
index 07d58ef..1930874 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonParser.java
@@ -104,7 +104,7 @@ public final class JsonParser extends ReaderParser {
 		BeanContext bc = session.getBeanContext();
 		if (nt == null)
 			nt = (ClassMeta<T>)object();
-		PojoTransform<T,Object> transform = (PojoTransform<T,Object>)nt.getPojoTransform();
+		PojoSwap<T,Object> transform = (PojoSwap<T,Object>)nt.getPojoSwap();
 		ClassMeta<?> ft = nt.getTransformedClassMeta();
 		session.setCurrentClass(ft);
 		String wrapperAttr = ft.getExtendedMeta(JsonClassMeta.class).getWrapperAttr();
@@ -202,7 +202,7 @@ public final class JsonParser extends ReaderParser {
 			skipWrapperAttrEnd(session, r);
 
 		if (transform != null && o != null)
-			o = transform.normalize(o, nt);
+			o = transform.unswap(o, nt);
 
 		if (outer != null)
 			setParent(nt, o, outer);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java
index a384059..b264762 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java
@@ -112,7 +112,7 @@ public final class JsonSchemaSerializer extends JsonSerializer {
 
 		out.put("type", type);
 		out.put("description", eType.toString());
-		PojoTransform f = eType.getPojoTransform();
+		PojoSwap f = eType.getPojoSwap();
 		if (f != null)
 			out.put("transform", f);
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java
index 2be051e..119c9e4 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/json/JsonSerializer.java
@@ -188,9 +188,9 @@ public class JsonSerializer extends WriterSerializer {
 		addClassAttr = (session.isAddClassAttrs() && ! eType.equals(aType));
 
 		// Transform if necessary
-		PojoTransform transform = aType.getPojoTransform();				// The transform
+		PojoSwap transform = aType.getPojoSwap();				// The transform
 		if (transform != null) {
-			o = transform.transform(o);
+			o = transform.swap(o);
 
 			// If the transform's getTransformedClass() method returns Object, we need to figure out
 			// the actual type now.

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/org/apache/juneau/json/package.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/json/package.html b/juneau-core/src/main/java/org/apache/juneau/json/package.html
index 1c947cb..2012db3 100644
--- a/juneau-core/src/main/java/org/apache/juneau/json/package.html
+++ b/juneau-core/src/main/java/org/apache/juneau/json/package.html
@@ -107,7 +107,7 @@
 		<li>Multi-dimensional arrays of any type on this list.
 		<li>Java Beans with properties of any type on this list.
 		<li>Classes with standard transformations to and from <code>Strings</code> (e.g. classes containing <code>toString()</code>, <code>fromString()</code>, <code>valueOf()</code>, <code>constructor(String)</code>).
-		<li>Non-serializable classes and properties with associated <code>PojoTransforms</code> that convert them to serializable forms.
+		<li>Non-serializable classes and properties with associated <code>PojoSwaps</code> that convert them to serializable forms.
 	</ul>
 	<p>
 		Refer to <a href='../package-summary.html#PojoCategories' class='doclink'>POJO Categories</a> for a complete definition of supported POJOs.
@@ -202,9 +202,9 @@
 			</tr>
 		</table>
 		<p>
-			In addition, transforms can be used to convert non-serializable POJOs into serializable forms, such as converting 
+			In addition, swaps can be used to convert non-serializable POJOs into serializable forms, such as converting 
 				<code>Calendar</code> object to ISO8601 strings, or <code><jk>byte</jk>[]</code> arrays to Base-64 encoded strings.<br>
-			These transforms can be associated at various levels:
+			These swaps can be associated at various levels:
 		</p>
 		<ul class='spaced-list'>
 			<li>On serializer and parser instances to handle all objects of the class type globally.
@@ -307,14 +307,14 @@
 			<li>Hiding bean properties.
 			<li>Specifying the ordering of bean properties.
 			<li>Overriding the names of bean properties.
-			<li>Associating transforms at both the class and property level (to convert non-serializable POJOs to serializable forms).
+			<li>Associating swaps at both the class and property level (to convert non-serializable POJOs to serializable forms).
 		</ul>
 		<p>
-			For example, we now add a <code>birthDate</code> property, and associate a transform with it to transform
+			For example, we now add a <code>birthDate</code> property, and associate a swap with it to transform
 				it to an ISO8601 date-time string in GMT time.<br>
 			We'll also add a couple of <code>URI</code> properties.<br>
 			By default, <code>Calendars</code> are treated as beans by the framework, which is usually not how you want them serialized.<br>
-			Using transforms, we can convert them to standardized string forms.
+			Using swaps, we can convert them to standardized string forms.
 		</p>
 		<p class='bcode'>	
 	<jk>public class</jk> Person {
@@ -324,7 +324,7 @@
 		<jk>public</jk> URI <jf>uri</jf>;
 		<jk>public</jk> URI <jf>addressBookUri</jf>;
 
-		<ja>@BeanProperty</ja>(transform=CalendarTransform.ISO8601DTZ.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
+		<ja>@BeanProperty</ja>(transform=CalendarSwap.ISO8601DTZ.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
 
 
 		<jc>// Bean constructor (needed by parser)</jc>
@@ -487,7 +487,7 @@
 		<jk>public</jk> String <jf>name</jf>;
 		<jk>public</jk> URI <jf>uri</jf>;
 		<jk>public</jk> URI <jf>addressBookUri</jf>;
-		<ja>@BeanProperty</ja>(transform=CalendarTransform.ISO8601DTZ.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
+		<ja>@BeanProperty</ja>(transform=CalendarSwap.ISO8601DTZ.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
 		<jk>public</jk> LinkedList&lt;Address&gt; <jf>addresses</jf> = <jk>new</jk> LinkedList&lt;Address&gt;();
 
 		<jc>// Bean constructor (needed by parser)</jc>
@@ -910,9 +910,9 @@
 	<jc>// Get a value convertable from a String.</jc>
 	URI uri = m.get(URI.<jk>class</jk>, <js>"uri"</js>);
 
-	<jc>// Get a value using a transform.</jc>
-	CalendarTransform transform = <jk>new</jk> CalendarTransform.ISO8601DTZ();
-	Calendar birthDate = m.get(transform, <js>"birthDate"</js>);
+	<jc>// Get a value using a swap.</jc>
+	CalendarSwap swap = <jk>new</jk> CalendarSwap.ISO8601DTZ();
+	Calendar birthDate = m.get(swap, <js>"birthDate"</js>);
 
 	<jc>// Get the addresses.</jc>
 	ObjectList addresses = m.getObjectList(<js>"addresses"</js>);



[3/8] incubator-juneau git commit: Tweak new name 'Transform' into 'BeanFilter' and 'PojoSwap'

Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/main/java/overview.html
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/overview.html b/juneau-core/src/main/java/overview.html
index 8d0c17f..c8163c6 100644
--- a/juneau-core/src/main/java/overview.html
+++ b/juneau-core/src/main/java/overview.html
@@ -422,9 +422,9 @@
 				<td style='text-align:center'>4</td>
 				<td>
 					<b>Transformed objects</b><br>
-					These are objects that are not directly serializable, but have {@link org.apache.juneau.transform.PojoTransform PojoTransforms} associated with them.  
+					These are objects that are not directly serializable, but have {@link org.apache.juneau.transform.PojoSwap PojoSwaps} associated with them.  
 					The purpose of an object transform is to convert an object to another object that is easier to serialize and parse.  
-					For example, the {@link org.apache.juneau.transforms.DateTransform.ISO8601DT} transform can be used to serialize {@link java.util.Date} objects 
+					For example, the {@link org.apache.juneau.transforms.DateSwap.ISO8601DT} transform can be used to serialize {@link java.util.Date} objects 
 						to ISO8601 strings, and parse them back into {@link java.util.Date} objects.
 				</td>
 				<td>&nbsp;</td>
@@ -824,50 +824,50 @@
 	<h4 class='topic' onclick='toggle(this)'>2.7 - Transforms</h4>
 	<div class='topic'>
 		<p>
-			The programmatic equivalent to the annotations are the {@link org.apache.juneau.transform.BeanTransform} and 
-			{@link org.apache.juneau.transform.PojoTransform} classes.  
+			The programmatic equivalent to the annotations are the {@link org.apache.juneau.transform.BeanFilter} and 
+			{@link org.apache.juneau.transform.PojoSwap} classes.  
 		</p>
 		<p>
-			The following example is equivalent to specifying the <l>@Bean</l> annotation in the previous example using a bean transform:
+			The following example is equivalent to specifying the <l>@Bean</l> annotation in the previous example using a bean filter:
 		</p>
 		<p class='bcode'>
 	<jc>// Define transform that returns properties in the following order: "street", "city", "state"</jc>
-	<jk>public class</jk> AddressTransform <jk>extends</jk> BeanTransform&lt;Address&gt; {
-		<jk>public</jk> AddressTransform() {
+	<jk>public class</jk> AddressFilter <jk>extends</jk> BeanFilter&lt;Address&gt; {
+		<jk>public</jk> AddressFilter() {
 			setProperties(<js>"street"</js>,<js>"city"</js>,<js>"state"</js>);
 		}
 	}
 	
-	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(AddressTransform.<jk>class</jk>);
+	WriterSerializer s = <jk>new</jk> JsonSerializer().addTransforms(AddressFilter.<jk>class</jk>);
 	Address a = getAddress();
 	String json = s.serialize(a);  <jc>// Prints "{street:'...',city:'...',state;'...'}"</jc>
 		</p>
 		<p>
-			The {@link org.apache.juneau.transform.PojoTransform} class is a critical component of Juneau that allows serializers and parsers to
+			The {@link org.apache.juneau.transform.PojoSwap} class is a critical component of Juneau that allows serializers and parsers to
 			be able to handle virtually any Java object.
 			Simply put, they can be thought of as 'transformers' that convert non-serializable objects to serializable objects and vice versa.
 		</p>
 		<p>
 			For example, <l>Date</l> objects are not normally serializable.
 			(Technically, they look like beans with getters/setters and so get serialized as such, which typically is not the desired result.)
-			The following POJO transform can be used to represent dates in ISO8601 format:
+			The following POJO swap can be used to represent dates in ISO8601 format:
 		</p>
 		<p class='bcode'>
 	<jc>// Sample transform for converting Dates to ISO8601 strings.</jc>
-	<jk>public class</jk> MyDateTransform <jk>extends</jk> PojoTransform&lt;Date,String&gt; {
+	<jk>public class</jk> MyDateSwap <jk>extends</jk> PojoSwap&lt;Date,String&gt; {
 		
 		<jc>// ISO8601 formatter.</jc>
 		<jk>private</jk> DateFormat <jf>format</jf> = <jk>new</jk> SimpleDateFormat(<js>"yyyy-MM-dd'T'HH:mm:ssZ"</js>);
 		
 		<jd>/** Converts a Date object to an ISO8601 string. */</jd>
 		<ja>@Override</ja>
-		<jk>public</jk> String transform(Date o) {
+		<jk>public</jk> String swap(Date o) {
 			<jk>return</jk> <jf>format</jf>.format(o);
 		}
 		
 		<jd>/** Converts an ISO8601 string to a Date object. */</jd>
 		<ja>@Override</ja>
-		<jk>public</jk> Date normalize(String o, ClassMeta&lt;?&gt; hint) <jk>throws</jk> ParseException {
+		<jk>public</jk> Date unswap(String o, ClassMeta&lt;?&gt; hint) <jk>throws</jk> ParseException {
 			<jk>try</jk> {
 				<jk>return</jk> <jf>format</jf>.parse(o);
 			} <jk>catch</jk> (java.text.ParseException e) {
@@ -886,11 +886,11 @@
 	}
 
 	<jc>// Create a new JSON serializer, associate our date transform with it, and serialize a sample bean.</jc>
-	Serializer serializer = <jk>new</jk> JsonSerializer().addTransforms(MyDateTransform.<jk>class</jk>);
+	Serializer serializer = <jk>new</jk> JsonSerializer().addTransforms(MyDateSwap.<jk>class</jk>);
 	String json = serializer.serialize(<jk>new</jk> MyBean());	<jc>// == "{date:'2012-03-03T04:05:06-0500'}"</jc>
 	
 	<jc>// Create a JSON parser, associate our date transform with it, and reconstruct our bean (including the date).</jc>
-	ReaderParser parser = <jk>new</jk> JsonParser().addTransforms(MyDateTransform.<jk>class</jk>);
+	ReaderParser parser = <jk>new</jk> JsonParser().addTransforms(MyDateSwap.<jk>class</jk>);
 	MyBean bean = parser.parse(json, MyBean.<jk>class</jk>);
 	<jk>int</jk> day = bean.<jf>date</jf>.getDay(); 						<jc>// == 3</jc>
 		</p>
@@ -1245,7 +1245,7 @@
 		<jk>public</jk> URI <jf>addressBookUri</jf>; 
 		<jk>public int</jk> <jf>id</jf>; 
 		<jk>public</jk> String <jf>name</jf>; 
-		<ja>@BeanProperty</ja>(transform=CalendarTransform.Medium.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>; 
+		<ja>@BeanProperty</ja>(transform=CalendarSwap.Medium.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>; 
 		<jk>public</jk> LinkedList&lt;Address&gt; <jf>addresses</jf>; 
 	} 
 	&nbsp;
@@ -2088,7 +2088,7 @@
 		<jk>public static class</jk> FormInputBean { 
 			<jk>public</jk> String aString; 
 			<jk>public int</jk> aNumber; 
-			<ja>@BeanProperty</ja>(transform=CalendarTransform.<jsf>ISO8601DT</jsf>.<jk>class</jk>) 
+			<ja>@BeanProperty</ja>(transform=CalendarSwap.<jsf>ISO8601DT</jsf>.<jk>class</jk>) 
 			<jk>public</jk> Calendar aDate; 
 		} 
 	}		
@@ -2220,7 +2220,7 @@
 			<jc>// Interpret these as their parent classes, not subclasses</jc>
 			HttpServletRequest.<jk>class</jk>, HttpSession.<jk>class</jk>, ServletContext.<jk>class</jk>,
 			<jc>// Add a special transform for Enumerations</jc>
-			EnumerationTransform.<jk>class</jk>
+			EnumerationSwap.<jk>class</jk>
 		}
 	)
 	<jk>public class</jk> RequestEchoResource <jk>extends</jk> Resource {
@@ -2261,14 +2261,14 @@
 		<jc>// You'll just reuse the parent serializer group</jc>
 		SerializerGroup serializerGroup = <jk>super</jk>.createSerializers(properties, transforms);
 		
-		<jc>// Add bean transforms for the HttpServletRequest, HttpSession, and ServletContext objects
+		<jc>// Add bean filters for the HttpServletRequest, HttpSession, and ServletContext objects
 		//		so that you don't show vendor-specific properties on subclasses.
 		// Add Enumeration transform to be able to render the contents of Enumeration properties.
 		// The max depth and detect recursion options prevent any possible runaway serializations.  
 		// This shouldn't happen, but future JEE APIs may introduce deep hierarchies or loops.</jc>
 		serializerGroup
 			.addTransforms(HttpServletRequest.<jk>class</jk>, HttpSession.<jk>class</jk>, ServletContext.<jk>class</jk>)
-			.addTransforms(EnumerationTransform.<jk>class</jk>)
+			.addTransforms(EnumerationSwap.<jk>class</jk>)
 			.setProperty(<jsf>SERIALIZER_maxDepth</jsf>, 10)
 			.setProperty(<jsf>SERIALIZER_detectRecursions</jsf>, <jk>true</jk>);
 			.setProperty(<jsf>HTMLDOC_links</jsf>, <js>"{...}"</js>);
@@ -2522,7 +2522,7 @@
 		<jk>public</jk> URI <jf>addressBookUri</jf>;
 		<jk>public</jk> String <jf>id</jf>;
 		<jk>public</jk> String <jf>name</jf>;
-		<ja>@BeanProperty</ja>(transform=CalendarTransform.Medium.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
+		<ja>@BeanProperty</ja>(transform=CalendarSwap.Medium.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
 		<jk>public</jk> LinkedList&lt;Address&gt; <jf>addresses</jf> = new LinkedList&lt;Address&gt;();
 		
 		<jd>/** Bean constructor - Needed for instantiating on server side */</jd> 
@@ -2566,7 +2566,7 @@
 						resource.  
 					This property has special meaning for the XML and RDF serializizers.  The XML serializer serializes this as a <l>uri</l> attribute instead of an <l>&lt;uri&gt;</l> element, and 
 						the RDF serializer uses this property for the value of the <l>rdf:resource</l> attribute.
-				<li>The <code><ja>@BeanProperty</ja>(transform=CalendarTransform.Medium.<jk>class</jk>)</code> annotation causes the date field to 
+				<li>The <code><ja>@BeanProperty</ja>(transform=CalendarSwap.Medium.<jk>class</jk>)</code> annotation causes the date field to 
 						be serialized in the format <l>"MM dd, yyyy"</l>.
 					This could have also been specified globally on the resource level through the {@link org.apache.juneau.server.annotation.RestResource#properties} annotation.
 			</ul>
@@ -2625,7 +2625,7 @@
 		
 		<jc>// Bean properties</jc>
 		<jk>public</jk> String <jf>name</jf>;
-		<ja>@BeanProperty(</ja>transform=CalendarTransform.Medium.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
+		<ja>@BeanProperty(</ja>transform=CalendarSwap.Medium.<jk>class</jk>) <jk>public</jk> Calendar <jf>birthDate</jf>;
 		<jk>public</jk> LinkedList&lt;CreateAddress&gt; <jf>addresses</jf>;
 		
 		<jd>/** Bean constructor - Needed for instantiating on server side */</jd>
@@ -2900,9 +2900,9 @@
 				<jk>new</jk> Column(<js>"age"</js>, <js>"xs:int"</js>), 
 				<jk>new</jk> Column(<js>"numAddresses"</js>, <js>"xs:int"</js>) 
 				.addTransform( 
-					<jk>new</jk> PojoTransform&lt;Person,Integer&gt;() { 
-						<ja>@Override</ja> /* PojoTransform */ 
-						<jk>public</jk> Integer transform(Person p) { 
+					<jk>new</jk> PojoSwap&lt;Person,Integer&gt;() { 
+						<ja>@Override</ja> /* PojoSwap */ 
+						<jk>public</jk> Integer swap(Person p) { 
 							<jk>return</jk> p.addresses.size(); 
 						} 
 					} 
@@ -4456,25 +4456,25 @@
 		<div class='topic'>
 			<p>
 				The {@link org.apache.juneau.server.annotation.RestResource#transforms()} annotation can be used to add 
-				POJO transforms to all the serializers and parsers registered with a servlet.
+				POJO swaps to all the serializers and parsers registered with a servlet.
 			</p>
 			<p>
-				In this example, you define a POJO transform that converts doubles to localized-format strings using
+				In this example, you define a POJO swap that converts doubles to localized-format strings using
 				the <l>NumberFormat</l> Java class.
 			</p>
 			<p class='bcode'>
 	<ja>@RestResource</ja>(
 		transforms={
-			MyRestService.LongTransform.<jk>class</jk>
+			MyRestService.DoubleSwap.<jk>class</jk>
 		}
 	)
 	<jk>public class</jk> MyRestService <jk>extends</jk> JazzDefaultRestResource {
 	
 		<jk>private static final</jk> NumberFormat <jsf>FORMAT</jsf> = NumberFormat.<jsm>getInstance()</jsm>;
 
-		<jk>public static class</jk> DoubleTransform <jk>extends</jk> PojoTransform&lt;Double,String&gt; {
-			<ja>@Override</ja> <jc>/* PojoTransform */</jc>
-			<jk>public</jk> String transform(Double o) <jk>throws</jk> SerializeException {
+		<jk>public static class</jk> DoubleSwap <jk>extends</jk> PojoSwap&lt;Double,String&gt; {
+			<ja>@Override</ja> <jc>/* PojoSwap */</jc>
+			<jk>public</jk> String swap(Double o) <jk>throws</jk> SerializeException {
 				<jk>return</jk> <jsf>FORMAT</jsf>.format(o);
 			}		
 		}
@@ -4499,7 +4499,7 @@
 	<ja>@Override</ja>
 	<jk>protected</jk> SerializerGroup createSerializers(ObjectMap properties, Class[] transforms) <jk>throws</jk> Exception {
 		SerializerGroup g = <jk>super</jk>.createSerializers(properties, transforms);
-		g.getSerializer(<js>"text/html"</js>).addTransforms(DoubleTransform.<jk>class</jk>); 
+		g.getSerializer(<js>"text/html"</js>).addTransforms(DoubleSwap.<jk>class</jk>); 
 		<jk>return</jk> g;
 	}
 			</p>
@@ -4733,7 +4733,7 @@
 			<li>Parsers can now parse directly from {@link java.io.File Files} and other types.
 				See {@link org.apache.juneau.parser.Parser#parse(Object,ClassMeta)}
 			<li>Parsers will automatically covert numeric input to POJOs that have numeric constructors (e.g. <code>java.util.Date</code>).
-			<li>Renamed 'Filters' to 'Transforms'.  Filters is just too overloaded a term.
+			<li>Renamed 'Filters' to 'BeanFilters' and 'PojoSwaps'.  Filters is just too overloaded a term.
 			<li>Internal utility classes moved to a new <code>org.apache.juneau.internal</code> package.
 				These internal utility classes are not meant for consumption outside the Juneau codebase.
 			<li>New methods on {@link org.apache.juneau.parser.Parser}:
@@ -4749,10 +4749,10 @@
 				</ul>
 			</li>
 			<li>New {@link org.apache.juneau.annotation.Bean#sort() @Bean.sort()} annotation.
-			<li>New methods on {@link org.apache.juneau.transform.BeanTransform}:
+			<li>New methods on {@link org.apache.juneau.transform.BeanFilter}:
 				<ul>
-					<li>{@link org.apache.juneau.transform.BeanTransform#isSortProperties()}
-					<li>{@link org.apache.juneau.transform.BeanTransform#setSortProperties(boolean)}
+					<li>{@link org.apache.juneau.transform.BeanFilter#isSortProperties()}
+					<li>{@link org.apache.juneau.transform.BeanFilter#setSortProperties(boolean)}
 				</ul>
 			</li>
 			<li>Added <ja>@Bean.properties</ja> annotations on various DTO beans to make the ordering consistent
@@ -5037,7 +5037,7 @@
 			<li>New <del><code>StringVar.doResolve(String)</code></del> method.
 			<li>New <del><code>StringVarResolver.DEFAULT</code></del> field.
 			<li>Eliminated dependency on <code>javax.mail.internet.MimeUtility</code> by implementing our own {@link org.apache.juneau.internal.StringUtils#base64Encode(byte[])} method.
-			<li>{@link org.apache.juneau.transforms.CalendarTransform} and {@link org.apache.juneau.transforms.DateTransform} classes now handle blank input better.  Returns <jk>null</jk> instead of throwing an exception.
+			<li>{@link org.apache.juneau.transforms.CalendarSwap} and {@link org.apache.juneau.transforms.DateSwap} classes now handle blank input better.  Returns <jk>null</jk> instead of throwing an exception.
 			<li>{@link org.apache.juneau.html.HtmlDocSerializer} specifies the default CSS location as <code>/servletPath/style.css</code> instead of <code>/servletPath/htdocs/juneau.css</code>.  
 				This coincides with enhancements made in the server code for specifying styles.
 			<li>{@link org.apache.juneau.html.HtmlDocSerializer} wraps output in two div tags instead of one (e.g. <code>&lt;div class='outerdata'&gt;&lt;div class='data' id='data'&gt;...&lt;/div&gt;&lt;/div&gt;</code>).
@@ -6031,11 +6031,11 @@
 			Juno 5.1.0.6 is a moderate update.
 		</p>
 		<ul class='spaced-list'>
-			<li>Simplified API for {@link org.apache.juneau.transform.PojoTransform}.  
-				Since it's rarely used, the <code>beanContext</code> parameter was replaced with a {@link org.apache.juneau.transform.PojoTransform#getBeanContext()} method on
+			<li>Simplified API for {@link org.apache.juneau.transform.PojoSwap}.  
+				Since it's rarely used, the <code>beanContext</code> parameter was replaced with a {@link org.apache.juneau.transform.PojoSwap#getBeanContext()} method on
 				the class.
-			<li>New simplified way of defining POJO filters without needing to extend {@link org.apache.juneau.transform.PojoTransform}.
-				See {@link org.apache.juneau.transform.SurrogateTransform} for details.
+			<li>New simplified way of defining POJO filters without needing to extend {@link org.apache.juneau.transform.PojoSwap}.
+				See {@link org.apache.juneau.transform.SurrogateSwap} for details.
 			<li>New {@link org.apache.juneau.html.annotation.Html @Html} annotation.
 				Will allow the definition of standard XHTML DTOs in future releases.  
 				For now, {@link org.apache.juneau.html.dto.Img} is an example of defining an XHTML element using Juno DTOs.
@@ -6126,8 +6126,8 @@
 			<li>New {@link org.apache.juneau.json.annotation.Json#wrapperAttr() @Json.wrapperAttr()}	annotation that automatically wraps beans and objects in a wrapper
 				attribute when serializing to or parsing from JSON.
 			<li>Changed the default ordering of bean properties to be in parent-to-child class order.
-			<li>New {@link org.apache.juneau.transform.BeanTransform#readProperty(Object,String,Object) readProperty()} and {@link org.apache.juneau.transform.BeanTransform#writeProperty(Object,String,Object) writeProperty()}
-				methods added to {@link org.apache.juneau.transform.BeanTransform} class to allow individualized serialization and parsing behavior on a class-by-class basis.
+			<li>New {@link org.apache.juneau.transform.BeanFilter#readProperty(Object,String,Object) readProperty()} and {@link org.apache.juneau.transform.BeanFilter#writeProperty(Object,String,Object) writeProperty()}
+				methods added to {@link org.apache.juneau.transform.BeanFilter} class to allow individualized serialization and parsing behavior on a class-by-class basis.
 			<li>Eliminated previous restriction where bean subtype attributes had to be listed first in JSON objects when using the {@link org.apache.juneau.annotation.Bean#subTypeProperty()} annotation.
 				The previous behavior was not strictly JSON-compliant since JSON objects are supposed to consist of unordered lists of key/value pairs.
 				While targeted for JSON, the restriction is also lifted for all other parsers.  	
@@ -6346,7 +6346,7 @@
 				New {@link org.apache.juneau.annotation.Bean#stopClass @Bean.stopClass} annotation for specifying stop classes for bean properties.
 			</li>
 			<li>
-				New {@link org.apache.juneau.transform.BeanTransform#setStopClass(Class)} which is the program equivalent to the annotation above.
+				New {@link org.apache.juneau.transform.BeanFilter#setStopClass(Class)} which is the program equivalent to the annotation above.
 			</li>
 			<li>
 				New methods on {@link org.apache.juneau.dto.ResultSetList}:
@@ -6489,7 +6489,7 @@
 				The new class hierarchy is much simpler to understand.
 			</li>
 			<li>
-				Added {@link org.apache.juneau.transforms.XMLGregorianCalendarTransform} to convert these to ISO8601 strings during serialization, and vice versa during parsing.
+				Added {@link org.apache.juneau.transforms.XMLGregorianCalendarSwap} to convert these to ISO8601 strings during serialization, and vice versa during parsing.
 			</li>
 			<li>
 				Added a {@link org.apache.juneau.json.JsonParserContext#JSON_strictMode strict} mode to {@link org.apache.juneau.json.JsonParser}.
@@ -6528,7 +6528,7 @@
 			<li>
 				Revamped the API for filter support:
 				<ul>
-					<li>Updated {@link org.apache.juneau.transform.BeanTransform} class to mirror the {@link org.apache.juneau.annotation.Bean @Bean} annotation.</li>
+					<li>Updated {@link org.apache.juneau.transform.BeanFilter} class to mirror the {@link org.apache.juneau.annotation.Bean @Bean} annotation.</li>
 					<li>Introduced support for bean {@link org.apache.juneau.annotation.Bean#subTypeProperty() subtypes}. </li>
 					<li>Replaced <code><ja>@Bean</ja>(filter=xxx)</code> with new {@link org.apache.juneau.annotation.Transform @Transform} annotation.</li>
 				</ul>
@@ -6548,8 +6548,8 @@
 			<li>
 				New predefined DateFilters with millisecond precision:
 				<ul>
-					<li><code>org.apache.juneau.transforms.DateTransform.ISO8601DTP</code></li>
-					<li><code>org.apache.juneau.transforms.DateTransform.ISO8601DTZP</code></li>
+					<li><code>org.apache.juneau.transforms.DateSwap.ISO8601DTP</code></li>
+					<li><code>org.apache.juneau.transforms.DateSwap.ISO8601DTZP</code></li>
 				</ul>
 			</li>
 		</ul>		
@@ -6686,7 +6686,7 @@
 				Removed <code><ja>@Xml</ja>.valAttr</code> annotation since it's now redundant with <code><ja>@Xml</ja>(format=<jsf>CONTENT</jsf>)</code>.
  			</li>
  			<li>
-				Fixed timezone bug in {@link org.apache.juneau.transforms.CalendarTransform}.
+				Fixed timezone bug in {@link org.apache.juneau.transforms.CalendarSwap}.
 			</li>
  			<li>
 				Simplified <code>Serializer.serialize(Object,Object,SerializerContext)</code> method.
@@ -6992,7 +6992,7 @@
 				New {@link org.apache.juneau.transform} package.
 				<ul>
 					<li>Cleaner class structure.</li>
-					<li>Improved {@link org.apache.juneau.transform.BeanTransform} class for defining property filters on beans.</li>
+					<li>Improved {@link org.apache.juneau.transform.BeanFilter} class for defining property filters on beans.</li>
 					<li>Improved {@link org.apache.juneau.utils.PojoQuery} class for defining filters on objects (previously called <code>ObjectFilter</code>).</li>
          		</ul>
          	</li>
@@ -7033,7 +7033,7 @@
 				<code>JsonMap</code> and <code>JsonList</code> changed to {@link org.apache.juneau.ObjectMap} and {@link org.apache.juneau.ObjectList} to better reflect that they're not limited to just JSON support.
      		</li>
      		<li>
-				Renamed <code>PojoTransform</code> to {@link org.apache.juneau.utils.PojoQuery} to not confuse it with the new Filter API.
+				Renamed <code>PojoSwap</code> to {@link org.apache.juneau.utils.PojoQuery} to not confuse it with the new Filter API.
 			</li>
 		</ul>
 		<h6 class='topic'>REST server API changes</h6>
@@ -7561,8 +7561,8 @@
 				The API for handling non-standard POJOs has been simplified by introducing the concept of a {@link org.apache.juneau.transform.Transform} class, which is associated with the <code>BeanContext</code> class (and thus the Serializer and Parser classes too) through the <code>BeanContext.addTransforms(Class[])</code> method.<br>
 				Two new subclasses of {@link org.apache.juneau.transform.Transform}:
 				<ul>
-					<li>{@link org.apache.juneau.transform.BeanTransform} - Filter POJO beans.</li>
-					<li>{@link org.apache.juneau.transform.PojoTransform} - Filter POJOs that aren't beans.</li>
+					<li>{@link org.apache.juneau.transform.BeanFilter} - Filter POJO beans.</li>
+					<li>{@link org.apache.juneau.transform.PojoSwap} - Filter POJOs that aren't beans.</li>
 				</ul>
 				This new API replaces the previous separate <code>Cast</code> and <code>BeanFilter</code> APIs which were considerably more complicated and puts them under a common API. 
 			</li>

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/BeanConfigTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/BeanConfigTest.java b/juneau-core/src/test/java/org/apache/juneau/BeanConfigTest.java
index e57abba..dab2579 100755
--- a/juneau-core/src/test/java/org/apache/juneau/BeanConfigTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/BeanConfigTest.java
@@ -732,31 +732,31 @@ public class BeanConfigTest {
 		p2.setProperty(BEAN_notBeanPackages_remove, "bar");
 		assertSameCache(p1, p2);
 
-		p1.addTransforms(DummyPojoTransformA.class);
+		p1.addTransforms(DummyPojoSwapA.class);
 		assertDifferentCache(p1, p2);
-		p2.addTransforms(DummyPojoTransformA.class);
+		p2.addTransforms(DummyPojoSwapA.class);
 		assertSameCache(p1, p2);
-		p1.addTransforms(DummyPojoTransformB.class,DummyPojoTransformC.class);  // Order of filters is important!
-		p2.addTransforms(DummyPojoTransformC.class,DummyPojoTransformB.class);
+		p1.addTransforms(DummyPojoSwapB.class,DummyPojoSwapC.class);  // Order of filters is important!
+		p2.addTransforms(DummyPojoSwapC.class,DummyPojoSwapB.class);
 		assertDifferentCache(p1, p2);
 
 		p1 = new JsonParser();
 		p2 = new JsonParser();
-		p1.addTransforms(DummyBeanTransformA.class);
+		p1.addTransforms(DummyBeanFilterA.class);
 		assertDifferentCache(p1, p2);
-		p2.addTransforms(DummyBeanTransformA.class);
+		p2.addTransforms(DummyBeanFilterA.class);
 		assertSameCache(p1, p2);
-		p1.addTransforms(DummyBeanTransformB.class,DummyBeanTransformC.class);  // Order of filters is important!
-		p2.addTransforms(DummyBeanTransformC.class,DummyBeanTransformB.class);
+		p1.addTransforms(DummyBeanFilterB.class,DummyBeanFilterC.class);  // Order of filters is important!
+		p2.addTransforms(DummyBeanFilterC.class,DummyBeanFilterB.class);
 		assertDifferentCache(p1, p2);
 	}
 
-	public static class DummyPojoTransformA extends PojoTransform<A,ObjectMap> {}
-	public static class DummyPojoTransformB extends PojoTransform<B,ObjectMap> {}
-	public static class DummyPojoTransformC extends PojoTransform<C,ObjectMap> {}
-	public static class DummyBeanTransformA extends BeanTransform<A> {}
-	public static class DummyBeanTransformB extends BeanTransform<B> {}
-	public static class DummyBeanTransformC extends BeanTransform<C> {}
+	public static class DummyPojoSwapA extends PojoSwap<A,ObjectMap> {}
+	public static class DummyPojoSwapB extends PojoSwap<B,ObjectMap> {}
+	public static class DummyPojoSwapC extends PojoSwap<C,ObjectMap> {}
+	public static class DummyBeanFilterA extends BeanFilter<A> {}
+	public static class DummyBeanFilterB extends BeanFilter<B> {}
+	public static class DummyBeanFilterC extends BeanFilter<C> {}
 	public static class C {}
 
 	private void assertSameCache(Parser p1, Parser p2) {

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/BeanFilterTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/BeanFilterTest.java b/juneau-core/src/test/java/org/apache/juneau/BeanFilterTest.java
new file mode 100755
index 0000000..b1b1740
--- /dev/null
+++ b/juneau-core/src/test/java/org/apache/juneau/BeanFilterTest.java
@@ -0,0 +1,145 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau;
+
+import static org.junit.Assert.*;
+
+import java.util.*;
+
+import org.apache.juneau.annotation.*;
+import org.apache.juneau.json.*;
+import org.junit.*;
+
+@SuppressWarnings("javadoc")
+public class BeanFilterTest {
+
+	//====================================================================================================
+	// Test sub types
+	//====================================================================================================
+	@Test
+	public void testSubTypes() throws Exception {
+		JsonSerializer s = JsonSerializer.DEFAULT_LAX;
+		JsonParser p = JsonParser.DEFAULT;
+
+		A1 a1 = new A1();
+		a1.f1 = "f1";
+		a1.fb = new B2();
+		((B2)a1.fb).f2 = "f2";
+		String r = s.serialize(a1);
+		assertEquals("{subType:'A1',f0:'f0',fb:{subType:'B2',f0b:'f0b',f2:'f2'},f1:'f1'}", r);
+
+		A a = p.parse(r, A.class);
+		assertTrue(a instanceof A1);
+		assertTrue(a.fb instanceof B2);
+		assertEquals("f1", ((A1)a).f1);
+		assertEquals("f2", ((B2)a.fb).f2);
+
+		// Try out-of-order creation.
+		r = "{f0:'f0',f1:'f1',subType:'A1',fb:{f0b:'f0b',f2:'f2',subType:'B2'}}";
+		a = p.parse(r, A.class);
+		assertTrue(a instanceof A1);
+		assertTrue(a.fb instanceof B2);
+		assertEquals("f1", ((A1)a).f1);
+		assertEquals("f2", ((B2)a.fb).f2);
+	}
+
+	@Bean(
+		subTypeProperty="subType",
+		subTypes={
+			@BeanSubType(type=A1.class, id="A1"),
+			@BeanSubType(type=A2.class, id="A2")
+		}
+	)
+	public static abstract class A {
+		public String f0 = "f0";
+		public B fb;
+	}
+
+	public static class A1 extends A {
+		public String f1;
+	}
+
+	public static class A2 extends A {
+		public String f2;
+	}
+
+	@Bean(
+		subTypeProperty="subType",
+		subTypes={
+			@BeanSubType(type=B1.class, id="B1"),
+			@BeanSubType(type=B2.class, id="B2")
+		}
+	)
+	public static abstract class B {
+		public String f0b = "f0b";
+	}
+
+	public static class B1 extends B {
+		public String f1;
+	}
+
+	public static class B2 extends B {
+		public String f2;
+	}
+
+	//====================================================================================================
+	// Test parent class used as transform
+	//====================================================================================================
+	@Test
+	public void testParentClassTransform() throws Exception {
+		JsonSerializer s = new JsonSerializer.Simple().addTransforms(C1.class);
+
+		C1 c1 = new C2();
+		String r = s.serialize(c1);
+		assertEquals("{f0:'f0'}", r);
+
+		List<C1> l = new LinkedList<C1>();
+		l.add(new C2());
+		r = s.serialize(l);
+		assertEquals("[{f0:'f0'}]", r);
+	}
+
+	public static class C1 {
+		public String f0 = "f0";
+	}
+
+	public static class C2 extends C1 {
+		public String f1 = "f1";
+	}
+
+	//====================================================================================================
+	// Test non-static parent class used as transform
+	//====================================================================================================
+	@Test
+	public void testParentClassTransform2() throws Exception {
+		JsonSerializer s = new JsonSerializer.Simple().addTransforms(D1.class);
+
+		D1 d1 = new D2();
+		String r = s.serialize(d1);
+		assertEquals("{f0:'f0'}", r);
+
+		List<D1> l = new LinkedList<D1>();
+		l.add(new D2());
+		r = s.serialize(l);
+		assertEquals("[{f0:'f0'}]", r);
+	}
+
+	public class D1 {
+		public String f0 = "f0";
+	}
+
+	public class D2 extends D1 {
+		public String f1 = "f1";
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/BeanMapTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/BeanMapTest.java b/juneau-core/src/test/java/org/apache/juneau/BeanMapTest.java
index f7e3b12..b1c4b97 100755
--- a/juneau-core/src/test/java/org/apache/juneau/BeanMapTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/BeanMapTest.java
@@ -1481,11 +1481,11 @@ public class BeanMapTest {
 	}
 
 	//====================================================================================================
-	// testCastToLinkedListUsingTransform - cast() to LinkedList<Calendar> using CalendarTransform
+	// testCastToLinkedListUsingTransform - cast() to LinkedList<Calendar> using CalendarSwap
 	//====================================================================================================
 	@Test
 	public void testCastToLinkedListUsingTransform() throws Exception {
-		BeanContext bc = ContextFactory.create().addTransforms(CalendarTransform.ISO8601DTZ.class).getBeanContext();
+		BeanContext bc = ContextFactory.create().addTransforms(CalendarSwap.ISO8601DTZ.class).getBeanContext();
 
 		// With _class
 		ObjectMap m = new ObjectMap(bc);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/BeanTransformTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/BeanTransformTest.java b/juneau-core/src/test/java/org/apache/juneau/BeanTransformTest.java
deleted file mode 100755
index 0ee689c..0000000
--- a/juneau-core/src/test/java/org/apache/juneau/BeanTransformTest.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau;
-
-import static org.junit.Assert.*;
-
-import java.util.*;
-
-import org.apache.juneau.annotation.*;
-import org.apache.juneau.json.*;
-import org.junit.*;
-
-@SuppressWarnings("javadoc")
-public class BeanTransformTest {
-
-	//====================================================================================================
-	// Test sub types
-	//====================================================================================================
-	@Test
-	public void testSubTypes() throws Exception {
-		JsonSerializer s = JsonSerializer.DEFAULT_LAX;
-		JsonParser p = JsonParser.DEFAULT;
-
-		A1 a1 = new A1();
-		a1.f1 = "f1";
-		a1.fb = new B2();
-		((B2)a1.fb).f2 = "f2";
-		String r = s.serialize(a1);
-		assertEquals("{subType:'A1',f0:'f0',fb:{subType:'B2',f0b:'f0b',f2:'f2'},f1:'f1'}", r);
-
-		A a = p.parse(r, A.class);
-		assertTrue(a instanceof A1);
-		assertTrue(a.fb instanceof B2);
-		assertEquals("f1", ((A1)a).f1);
-		assertEquals("f2", ((B2)a.fb).f2);
-
-		// Try out-of-order creation.
-		r = "{f0:'f0',f1:'f1',subType:'A1',fb:{f0b:'f0b',f2:'f2',subType:'B2'}}";
-		a = p.parse(r, A.class);
-		assertTrue(a instanceof A1);
-		assertTrue(a.fb instanceof B2);
-		assertEquals("f1", ((A1)a).f1);
-		assertEquals("f2", ((B2)a.fb).f2);
-	}
-
-	@Bean(
-		subTypeProperty="subType",
-		subTypes={
-			@BeanSubType(type=A1.class, id="A1"),
-			@BeanSubType(type=A2.class, id="A2")
-		}
-	)
-	public static abstract class A {
-		public String f0 = "f0";
-		public B fb;
-	}
-
-	public static class A1 extends A {
-		public String f1;
-	}
-
-	public static class A2 extends A {
-		public String f2;
-	}
-
-	@Bean(
-		subTypeProperty="subType",
-		subTypes={
-			@BeanSubType(type=B1.class, id="B1"),
-			@BeanSubType(type=B2.class, id="B2")
-		}
-	)
-	public static abstract class B {
-		public String f0b = "f0b";
-	}
-
-	public static class B1 extends B {
-		public String f1;
-	}
-
-	public static class B2 extends B {
-		public String f2;
-	}
-
-	//====================================================================================================
-	// Test parent class used as transform
-	//====================================================================================================
-	@Test
-	public void testParentClassTransform() throws Exception {
-		JsonSerializer s = new JsonSerializer.Simple().addTransforms(C1.class);
-
-		C1 c1 = new C2();
-		String r = s.serialize(c1);
-		assertEquals("{f0:'f0'}", r);
-
-		List<C1> l = new LinkedList<C1>();
-		l.add(new C2());
-		r = s.serialize(l);
-		assertEquals("[{f0:'f0'}]", r);
-	}
-
-	public static class C1 {
-		public String f0 = "f0";
-	}
-
-	public static class C2 extends C1 {
-		public String f1 = "f1";
-	}
-
-	//====================================================================================================
-	// Test non-static parent class used as transform
-	//====================================================================================================
-	@Test
-	public void testParentClassTransform2() throws Exception {
-		JsonSerializer s = new JsonSerializer.Simple().addTransforms(D1.class);
-
-		D1 d1 = new D2();
-		String r = s.serialize(d1);
-		assertEquals("{f0:'f0'}", r);
-
-		List<D1> l = new LinkedList<D1>();
-		l.add(new D2());
-		r = s.serialize(l);
-		assertEquals("[{f0:'f0'}]", r);
-	}
-
-	public class D1 {
-		public String f0 = "f0";
-	}
-
-	public class D2 extends D1 {
-		public String f1 = "f1";
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/ClassMetaTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/ClassMetaTest.java b/juneau-core/src/test/java/org/apache/juneau/ClassMetaTest.java
index 16daad9..d6a8dcd 100755
--- a/juneau-core/src/test/java/org/apache/juneau/ClassMetaTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/ClassMetaTest.java
@@ -121,148 +121,148 @@ public class ClassMetaTest {
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertFalse(ooo.hasChildPojoTransforms());
-		assertFalse(hi1.hasChildPojoTransforms());
-		assertFalse(hc1.hasChildPojoTransforms());
-		assertFalse(hi2.hasChildPojoTransforms());
-		assertFalse(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertNull(hi1.getPojoTransform());
-		assertNull(hc1.getPojoTransform());
-		assertNull(hi2.getPojoTransform());
-		assertNull(hc2.getPojoTransform());
+		assertFalse(ooo.hasChildPojoSwaps());
+		assertFalse(hi1.hasChildPojoSwaps());
+		assertFalse(hc1.hasChildPojoSwaps());
+		assertFalse(hi2.hasChildPojoSwaps());
+		assertFalse(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertNull(hi1.getPojoSwap());
+		assertNull(hc1.getPojoSwap());
+		assertNull(hi2.getPojoSwap());
+		assertNull(hc2.getPojoSwap());
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), HI1.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), HC1.class);
 		assertEquals(hi2.getTransformedClassMeta().getInnerClass(), HI2.class);
 		assertEquals(hc2.getTransformedClassMeta().getInnerClass(), HC2.class);
 
-		bc = ContextFactory.create().addTransforms(HI1Transform.class).getBeanContext();
+		bc = ContextFactory.create().addTransforms(HI1Swap.class).getBeanContext();
 		ooo = bc.getClassMeta(Object.class);
 		hi1 = bc.getClassMeta(HI1.class);
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertTrue(ooo.hasChildPojoTransforms());
-		assertTrue(hi1.hasChildPojoTransforms());
-		assertFalse(hc1.hasChildPojoTransforms());
-		assertFalse(hi2.hasChildPojoTransforms());
-		assertFalse(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertEquals(hi1.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hc1.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hi2.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hc2.getPojoTransform().getClass(), HI1Transform.class);
+		assertTrue(ooo.hasChildPojoSwaps());
+		assertTrue(hi1.hasChildPojoSwaps());
+		assertFalse(hc1.hasChildPojoSwaps());
+		assertFalse(hi2.hasChildPojoSwaps());
+		assertFalse(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertEquals(hi1.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hc1.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hi2.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hc2.getPojoSwap().getClass(), HI1Swap.class);
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hi2.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hc2.getTransformedClassMeta().getInnerClass(), Map.class);
 
-		bc = ContextFactory.create().addTransforms(HC1Transform.class).getBeanContext();
+		bc = ContextFactory.create().addTransforms(HC1Swap.class).getBeanContext();
 		ooo = bc.getClassMeta(Object.class);
 		hi1 = bc.getClassMeta(HI1.class);
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertTrue(ooo.hasChildPojoTransforms());
-		assertTrue(hi1.hasChildPojoTransforms());
-		assertTrue(hc1.hasChildPojoTransforms());
-		assertFalse(hi2.hasChildPojoTransforms());
-		assertFalse(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertNull(hi1.getPojoTransform());
-		assertEquals(hc1.getPojoTransform().getClass(), HC1Transform.class);
-		assertNull(hi2.getPojoTransform());
-		assertEquals(hc2.getPojoTransform().getClass(), HC1Transform.class);
+		assertTrue(ooo.hasChildPojoSwaps());
+		assertTrue(hi1.hasChildPojoSwaps());
+		assertTrue(hc1.hasChildPojoSwaps());
+		assertFalse(hi2.hasChildPojoSwaps());
+		assertFalse(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertNull(hi1.getPojoSwap());
+		assertEquals(hc1.getPojoSwap().getClass(), HC1Swap.class);
+		assertNull(hi2.getPojoSwap());
+		assertEquals(hc2.getPojoSwap().getClass(), HC1Swap.class);
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), HI1.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hi2.getTransformedClassMeta().getInnerClass(), HI2.class);
 		assertEquals(hc2.getTransformedClassMeta().getInnerClass(), Map.class);
 
-		bc = ContextFactory.create().addTransforms(HI2Transform.class).getBeanContext();
+		bc = ContextFactory.create().addTransforms(HI2Swap.class).getBeanContext();
 		ooo = bc.getClassMeta(Object.class);
 		hi1 = bc.getClassMeta(HI1.class);
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertTrue(ooo.hasChildPojoTransforms());
-		assertTrue(hi1.hasChildPojoTransforms());
-		assertFalse(hc1.hasChildPojoTransforms());
-		assertTrue(hi2.hasChildPojoTransforms());
-		assertFalse(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertNull(hi1.getPojoTransform());
-		assertNull(hc1.getPojoTransform());
-		assertEquals(hi2.getPojoTransform().getClass(), HI2Transform.class);
-		assertEquals(hc2.getPojoTransform().getClass(), HI2Transform.class);
+		assertTrue(ooo.hasChildPojoSwaps());
+		assertTrue(hi1.hasChildPojoSwaps());
+		assertFalse(hc1.hasChildPojoSwaps());
+		assertTrue(hi2.hasChildPojoSwaps());
+		assertFalse(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertNull(hi1.getPojoSwap());
+		assertNull(hc1.getPojoSwap());
+		assertEquals(hi2.getPojoSwap().getClass(), HI2Swap.class);
+		assertEquals(hc2.getPojoSwap().getClass(), HI2Swap.class);
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), HI1.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), HC1.class);
 		assertEquals(hi2.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hc2.getTransformedClassMeta().getInnerClass(), Map.class);
 
-		bc = ContextFactory.create().addTransforms(HC2Transform.class).getBeanContext();
+		bc = ContextFactory.create().addTransforms(HC2Swap.class).getBeanContext();
 		ooo = bc.getClassMeta(Object.class);
 		hi1 = bc.getClassMeta(HI1.class);
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertTrue(ooo.hasChildPojoTransforms());
-		assertTrue(hi1.hasChildPojoTransforms());
-		assertTrue(hc1.hasChildPojoTransforms());
-		assertTrue(hi2.hasChildPojoTransforms());
-		assertTrue(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertNull(hi1.getPojoTransform());
-		assertNull(hc1.getPojoTransform());
-		assertNull(hi2.getPojoTransform());
-		assertEquals(hc2.getPojoTransform().getClass(), HC2Transform.class);
+		assertTrue(ooo.hasChildPojoSwaps());
+		assertTrue(hi1.hasChildPojoSwaps());
+		assertTrue(hc1.hasChildPojoSwaps());
+		assertTrue(hi2.hasChildPojoSwaps());
+		assertTrue(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertNull(hi1.getPojoSwap());
+		assertNull(hc1.getPojoSwap());
+		assertNull(hi2.getPojoSwap());
+		assertEquals(hc2.getPojoSwap().getClass(), HC2Swap.class);
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), HI1.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), HC1.class);
 		assertEquals(hi2.getTransformedClassMeta().getInnerClass(), HI2.class);
 		assertEquals(hc2.getTransformedClassMeta().getInnerClass(), Map.class);
 
-		bc = ContextFactory.create().addTransforms(HI1Transform.class,HC1Transform.class,HI2Transform.class,HC2Transform.class).getBeanContext();
+		bc = ContextFactory.create().addTransforms(HI1Swap.class,HC1Swap.class,HI2Swap.class,HC2Swap.class).getBeanContext();
 		ooo = bc.getClassMeta(Object.class);
 		hi1 = bc.getClassMeta(HI1.class);
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertTrue(ooo.hasChildPojoTransforms());
-		assertTrue(hi1.hasChildPojoTransforms());
-		assertTrue(hc1.hasChildPojoTransforms());
-		assertTrue(hi2.hasChildPojoTransforms());
-		assertTrue(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertEquals(hi1.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hc1.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hi2.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hc2.getPojoTransform().getClass(), HI1Transform.class);
+		assertTrue(ooo.hasChildPojoSwaps());
+		assertTrue(hi1.hasChildPojoSwaps());
+		assertTrue(hc1.hasChildPojoSwaps());
+		assertTrue(hi2.hasChildPojoSwaps());
+		assertTrue(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertEquals(hi1.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hc1.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hi2.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hc2.getPojoSwap().getClass(), HI1Swap.class);
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hi2.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hc2.getTransformedClassMeta().getInnerClass(), Map.class);
 
-		bc = ContextFactory.create().addTransforms(HC2Transform.class,HI2Transform.class,HC1Transform.class,HI1Transform.class).getBeanContext();
+		bc = ContextFactory.create().addTransforms(HC2Swap.class,HI2Swap.class,HC1Swap.class,HI1Swap.class).getBeanContext();
 		ooo = bc.getClassMeta(Object.class);
 		hi1 = bc.getClassMeta(HI1.class);
 		hc1 = bc.getClassMeta(HC1.class);
 		hi2 = bc.getClassMeta(HI2.class);
 		hc2 = bc.getClassMeta(HC2.class);
-		assertTrue(ooo.hasChildPojoTransforms());
-		assertTrue(hi1.hasChildPojoTransforms());
-		assertTrue(hc1.hasChildPojoTransforms());
-		assertTrue(hi2.hasChildPojoTransforms());
-		assertTrue(hc2.hasChildPojoTransforms());
-		assertNull(ooo.getPojoTransform());
-		assertEquals(hi1.getPojoTransform().getClass(), HI1Transform.class);
-		assertEquals(hc1.getPojoTransform().getClass(), HC1Transform.class);
-		assertEquals(hi2.getPojoTransform().getClass(), HI2Transform.class);
-		assertEquals(hc2.getPojoTransform().getClass(), HC2Transform.class);
+		assertTrue(ooo.hasChildPojoSwaps());
+		assertTrue(hi1.hasChildPojoSwaps());
+		assertTrue(hc1.hasChildPojoSwaps());
+		assertTrue(hi2.hasChildPojoSwaps());
+		assertTrue(hc2.hasChildPojoSwaps());
+		assertNull(ooo.getPojoSwap());
+		assertEquals(hi1.getPojoSwap().getClass(), HI1Swap.class);
+		assertEquals(hc1.getPojoSwap().getClass(), HC1Swap.class);
+		assertEquals(hi2.getPojoSwap().getClass(), HI2Swap.class);
+		assertEquals(hc2.getPojoSwap().getClass(), HC2Swap.class);
 		assertEquals(ooo.getTransformedClassMeta().getInnerClass(), Object.class);
 		assertEquals(hi1.getTransformedClassMeta().getInnerClass(), Map.class);
 		assertEquals(hc1.getTransformedClassMeta().getInnerClass(), Map.class);
@@ -274,8 +274,8 @@ public class ClassMetaTest {
 	public class HC1 implements HI1 {}
 	public interface HI2 extends HI1 {}
 	public class HC2 extends HC1 implements HI2 {}
-	public static class HC1Transform extends PojoTransform<HC1,Map> {}
-	public static class HI1Transform extends PojoTransform<HI1,Map> {}
-	public static class HC2Transform extends PojoTransform<HC2,Map> {}
-	public static class HI2Transform extends PojoTransform<HI2,Map> {}
+	public static class HC1Swap extends PojoSwap<HC1,Map> {}
+	public static class HI1Swap extends PojoSwap<HI1,Map> {}
+	public static class HC2Swap extends PojoSwap<HC2,Map> {}
+	public static class HI2Swap extends PojoSwap<HI2,Map> {}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/DataConversionTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/DataConversionTest.java b/juneau-core/src/test/java/org/apache/juneau/DataConversionTest.java
index 44b64c3..0c30966 100755
--- a/juneau-core/src/test/java/org/apache/juneau/DataConversionTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/DataConversionTest.java
@@ -134,7 +134,7 @@ public class DataConversionTest {
 	@Test
 	public void testObjectTransforms() throws Exception {
 		String s = "Jan 12, 2001";
-		BeanContext bc = ContextFactory.create().addTransforms(CalendarTransform.Medium.class).getBeanContext();
+		BeanContext bc = ContextFactory.create().addTransforms(CalendarSwap.Medium.class).getBeanContext();
 		Calendar c = bc.convertToType(s, GregorianCalendar.class);
 		assertEquals(2001, c.get(Calendar.YEAR));
 		c = bc.convertToType(s, Calendar.class);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/PojoSwapTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/PojoSwapTest.java b/juneau-core/src/test/java/org/apache/juneau/PojoSwapTest.java
new file mode 100755
index 0000000..3867a34
--- /dev/null
+++ b/juneau-core/src/test/java/org/apache/juneau/PojoSwapTest.java
@@ -0,0 +1,57 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau;
+
+import static org.junit.Assert.*;
+
+import org.apache.juneau.json.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.serializer.*;
+import org.apache.juneau.transform.*;
+import org.junit.*;
+
+@SuppressWarnings("javadoc")
+public class PojoSwapTest {
+
+	//====================================================================================================
+	// Test same type
+	// If you define a PojoSwap<String,String> filter, then it should be invoked on all strings.
+	//====================================================================================================
+	@Test
+	public void testSameType() throws Exception {
+		JsonSerializer s = JsonSerializer.DEFAULT_LAX.clone().addTransforms(ATransform.class);
+		JsonParser p = JsonParser.DEFAULT.clone().addTransforms(ATransform.class);
+		String r;
+
+		r = s.serialize("foobar");
+		assertEquals("'xfoobarx'", r);
+		r = p.parse(r, String.class);
+		assertEquals("foobar", r);
+
+		ObjectMap m = new ObjectMap("{foo:'bar'}");
+		r = s.serialize(m);
+		assertEquals("{xfoox:'xbarx'}", r);
+	}
+
+	public static class ATransform extends PojoSwap<String,String> {
+		@Override
+		public String swap(String o) throws SerializeException {
+			return "x" + o + "x";
+		}
+
+		@Override
+		public String unswap(String f, ClassMeta<?> hint) throws ParseException {
+			return f.substring(1, f.length()-1);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/PojoTransformTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/PojoTransformTest.java b/juneau-core/src/test/java/org/apache/juneau/PojoTransformTest.java
deleted file mode 100755
index 737adee..0000000
--- a/juneau-core/src/test/java/org/apache/juneau/PojoTransformTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau;
-
-import static org.junit.Assert.*;
-
-import org.apache.juneau.json.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.serializer.*;
-import org.apache.juneau.transform.*;
-import org.junit.*;
-
-@SuppressWarnings("javadoc")
-public class PojoTransformTest {
-
-	//====================================================================================================
-	// Test same type
-	// If you define a PojoTransform<String,String> filter, then it should be invoked on all strings.
-	//====================================================================================================
-	@Test
-	public void testSameType() throws Exception {
-		JsonSerializer s = JsonSerializer.DEFAULT_LAX.clone().addTransforms(ATransform.class);
-		JsonParser p = JsonParser.DEFAULT.clone().addTransforms(ATransform.class);
-		String r;
-
-		r = s.serialize("foobar");
-		assertEquals("'xfoobarx'", r);
-		r = p.parse(r, String.class);
-		assertEquals("foobar", r);
-
-		ObjectMap m = new ObjectMap("{foo:'bar'}");
-		r = s.serialize(m);
-		assertEquals("{xfoox:'xbarx'}", r);
-	}
-
-	public static class ATransform extends PojoTransform<String,String> {
-		@Override
-		public String transform(String o) throws SerializeException {
-			return "x" + o + "x";
-		}
-
-		@Override
-		public String normalize(String f, ClassMeta<?> hint) throws ParseException {
-			return f.substring(1, f.length()-1);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/TestUtils.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/TestUtils.java b/juneau-core/src/test/java/org/apache/juneau/TestUtils.java
index 2194571..18379cc 100755
--- a/juneau-core/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-core/src/test/java/org/apache/juneau/TestUtils.java
@@ -52,10 +52,10 @@ public class TestUtils {
 
 
 	private static JsonSerializer js2 = new JsonSerializer.Simple()
-		.addTransforms(IteratorTransform.class, EnumerationTransform.class);
+		.addTransforms(IteratorSwap.class, EnumerationSwap.class);
 
 	private static JsonSerializer js3 = new JsonSerializer.Simple()
-		.addTransforms(IteratorTransform.class, EnumerationTransform.class)
+		.addTransforms(IteratorSwap.class, EnumerationSwap.class)
 		.setProperty(BEAN_sortProperties, true);
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java b/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java
index 8fa5506..743c543 100755
--- a/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java
@@ -219,14 +219,14 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 	//====================================================================================================
 	@Test
 	public void testSubTypesUsingAnnotation() throws Exception {
-		JsonSerializer js = JsonSerializer.DEFAULT_LAX.clone().addTransforms(XMLGregorianCalendarTransform.class);
+		JsonSerializer js = JsonSerializer.DEFAULT_LAX.clone().addTransforms(XMLGregorianCalendarSwap.class);
 
 		// Skip validation-only tests
 		if (isValidationOnly())
 			return;
 
-		Serializer s = getSerializer().clone().addTransforms(XMLGregorianCalendarTransform.class);
-		Parser p = getParser().clone().addTransforms(XMLGregorianCalendarTransform.class);
+		Serializer s = getSerializer().clone().addTransforms(XMLGregorianCalendarSwap.class);
+		Parser p = getParser().clone().addTransforms(XMLGregorianCalendarSwap.class);
 
 		B1 b1 = B1.create();
 		Object r = s.serialize(b1);
@@ -290,18 +290,18 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 	}
 
 	//====================================================================================================
-	// Test @Bean(subTypes=xxx) using BeanTransform
+	// Test @Bean(subTypes=xxx) using BeanFilter
 	//====================================================================================================
 	@Test
-	public void testSubTypesUsingBeanTransform() throws Exception {
-		JsonSerializer js = JsonSerializer.DEFAULT_LAX.clone().addTransforms(XMLGregorianCalendarTransform.class);
+	public void testSubTypesUsingBeanFilter() throws Exception {
+		JsonSerializer js = JsonSerializer.DEFAULT_LAX.clone().addTransforms(XMLGregorianCalendarSwap.class);
 
 		// Skip validation-only tests
 		if (isValidationOnly())
 			return;
 
-		Serializer s = getSerializer().clone().addTransforms(CTransform.class, XMLGregorianCalendarTransform.class);
-		Parser p = getParser().clone().addTransforms(CTransform.class, XMLGregorianCalendarTransform.class);
+		Serializer s = getSerializer().clone().addTransforms(CTransform.class, XMLGregorianCalendarSwap.class);
+		Parser p = getParser().clone().addTransforms(CTransform.class, XMLGregorianCalendarSwap.class);
 
 		C1 c1 = C1.create();
 		Object r = s.serialize(c1);
@@ -356,7 +356,7 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 		}
 	}
 
-	public static class CTransform extends BeanTransform<C> {
+	public static class CTransform extends BeanFilter<C> {
 		public CTransform() {
 			setSubTypeProperty("subType");
 			addSubType(C1.class, "C1");
@@ -414,16 +414,16 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 
 
 	//====================================================================================================
-	// Test @Bean(subTypes=xxx) with real bean property using BeanTransform
+	// Test @Bean(subTypes=xxx) with real bean property using BeanFilter
 	//====================================================================================================
 	@Test
-	public void testSubTypePropertyWithRealPropertyUsingBeanTransform() throws Exception {
+	public void testSubTypePropertyWithRealPropertyUsingBeanFilter() throws Exception {
 		// Skip validation-only tests
 		if (isValidationOnly())
 			return;
 
-		Serializer s = getSerializer().clone().addTransforms(CATransform.class);
-		Parser p = getParser().clone().addTransforms(CATransform.class);
+		Serializer s = getSerializer().clone().addTransforms(CAFilter.class);
+		Parser p = getParser().clone().addTransforms(CAFilter.class);
 
 		CA1 c1 = CA1.create();
 		Object r = s.serialize(c1);
@@ -453,8 +453,8 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 		public String f2;
 	}
 
-	public static class CATransform extends BeanTransform<CA> {
-		public CATransform() {
+	public static class CAFilter extends BeanFilter<CA> {
+		public CAFilter() {
 			setSubTypeProperty("subType");
 			addSubType(CA1.class, "CA1");
 			addSubType(CA2.class, "CA2");
@@ -492,18 +492,18 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 	}
 
 	//====================================================================================================
-	// Test @Bean(properties=xxx) using BeanTransform
+	// Test @Bean(properties=xxx) using BeanFilter
 	//====================================================================================================
 	@Test
 	public void testPropertiesUsingTransform() throws Exception {
-		JsonSerializer js = JsonSerializer.DEFAULT_LAX.clone().addTransforms(D2Transform.class);
+		JsonSerializer js = JsonSerializer.DEFAULT_LAX.clone().addTransforms(D2Filter.class);
 
 		// Skip validation-only tests
 		if (isValidationOnly())
 			return;
 
-		Serializer s = getSerializer().clone().addTransforms(D2Transform.class);
-		Parser p = getParser().clone().addTransforms(D2Transform.class);
+		Serializer s = getSerializer().clone().addTransforms(D2Filter.class);
+		Parser p = getParser().clone().addTransforms(D2Filter.class);
 
 		D2 d = new D2().init();
 		Object r = s.serialize(d);
@@ -521,8 +521,8 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 			return this;
 		}
 	}
-	public static class D2Transform extends BeanTransform<D2> {
-		public D2Transform() {
+	public static class D2Filter extends BeanFilter<D2> {
+		public D2Filter() {
 			setProperties("f3","f2");
 		}
 	}
@@ -557,7 +557,7 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 	}
 
 	//====================================================================================================
-	// Test @Bean(excludeProperties=xxx) using BeanTransform
+	// Test @Bean(excludeProperties=xxx) using BeanFilter
 	//====================================================================================================
 	@Test
 	public void testExcludePropertiesUsingTransform() throws Exception {
@@ -565,8 +565,8 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 		if (isValidationOnly())
 			return;
 
-		Serializer s = getSerializer().clone().addTransforms(E2Transform.class);
-		Parser p = getParser().clone().addTransforms(E2Transform.class);
+		Serializer s = getSerializer().clone().addTransforms(E2Filter.class);
+		Parser p = getParser().clone().addTransforms(E2Filter.class);
 
 		E2 e = new E2().init();
 		Object r = s.serialize(e);
@@ -583,8 +583,8 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 			return this;
 		}
 	}
-	public static class E2Transform extends BeanTransform<E2> {
-		public E2Transform() {
+	public static class E2Filter extends BeanFilter<E2> {
+		public E2Filter() {
 			setExcludeProperties("f2");
 		}
 	}
@@ -622,7 +622,7 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 	}
 
 	//====================================================================================================
-	// Test @Bean(interfaceClass=xxx) using BeanTransform
+	// Test @Bean(interfaceClass=xxx) using BeanFilter
 	//====================================================================================================
 	@Test
 	public void testInterfaceClassUsingTransform() throws Exception {
@@ -636,8 +636,8 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 			return;
 
 		// --- Transform defined on parent class ---
-		s = getSerializer().clone().addTransforms(FB1Transform.class);
-		p = getParser().clone().addTransforms(FB1Transform.class);
+		s = getSerializer().clone().addTransforms(FB1Filter.class);
+		p = getParser().clone().addTransforms(FB1Filter.class);
 
 		t = new FB2().init();
 		r = s.serialize(t);
@@ -645,8 +645,8 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 		assertObjectEquals("{f1:'f1'}", t);
 
 		// --- Transform defined on child class class ---
-		s = getSerializer().clone().addTransforms(FB2Transform.class);
-		p = getParser().clone().addTransforms(FB2Transform.class);
+		s = getSerializer().clone().addTransforms(FB2Filter.class);
+		p = getParser().clone().addTransforms(FB2Filter.class);
 
 		t = new FB2().init();
 		r = s.serialize(t);
@@ -675,13 +675,13 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
 			return this;
 		}
 	}
-	public static class FB1Transform extends BeanTransform<FB1> {
-		public FB1Transform() {
+	public static class FB1Filter extends BeanFilter<FB1> {
+		public FB1Filter() {
 			setInterfaceClass(FB1.class);
 		}
 	}
-	public static class FB2Transform extends BeanTransform<FB2> {
-		public FB2Transform() {
+	public static class FB2Filter extends BeanFilter<FB2> {
+		public FB2Filter() {
 			setInterfaceClass(FB1.class);
 		}
 	}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripMapsTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripMapsTest.java b/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripMapsTest.java
index 3b1bf5a..66c2118 100755
--- a/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripMapsTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripMapsTest.java
@@ -42,9 +42,9 @@ public class RoundTripMapsTest extends RoundTripTest {
 	@Override /* RoundTripTest */
 	public Class<?>[] getTransforms() {
 		return new Class<?>[]{
-			ByteArrayBase64Transform.class,
-			DateTransform.ISO8601DTZ.class,
-			CalendarLongTransform.class,
+			ByteArrayBase64Swap.class,
+			DateSwap.ISO8601DTZ.class,
+			CalendarLongSwap.class,
 		};
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeansTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeansTest.java b/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeansTest.java
index 8433862..3f3fc0d 100755
--- a/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeansTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeansTest.java
@@ -46,9 +46,9 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 	@Test
 	public void testTransformBeans1() throws Exception {
 		Class<?>[] f = {
-			ByteArrayBase64Transform.class,
-			CalendarTransform.ISO8601DTZ.class,
-			DateTransform.ISO8601DTZ.class
+			ByteArrayBase64Swap.class,
+			CalendarSwap.ISO8601DTZ.class,
+			DateSwap.ISO8601DTZ.class
 		};
 		s.addTransforms(f);
 		if (p != null)
@@ -56,7 +56,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		A t = new A().init();
 		t = roundTrip(t, A.class);
 
-		// ByteArrayBase64Transform
+		// ByteArrayBase64Swap
 		assertEquals(3, t.fByte[3]);
 		assertNull(t.fnByte);
 		assertEquals(5, t.faByte[2][1]);
@@ -65,7 +65,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		assertEquals(6, t.fmByte.get("bar")[2]);
 		assertNull(t.fmByte.get("baz"));
 
-		// CalendarTransform
+		// CalendarSwap
 		t.fCalendar.setTimeZone(TimeZone.getTimeZone("GMT"));
 		assertEquals(2001, t.fCalendar.get(Calendar.YEAR));
 		assertEquals(01, t.fCalendar.get(Calendar.MONTH));
@@ -84,7 +84,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		assertNull(t.fnCalendar);
 		assertNull(t.fn2Calendar);
 
-		// DateTransform
+		// DateSwap
 		assertEquals(1000, t.fDate.getTime());
 		assertNull(t.fnDate);
 		assertEquals(3000, t.faDate[2].getTime());
@@ -96,7 +96,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 
 	public static class A {
 
-		// Test ByteArrayBase64Transform
+		// Test ByteArrayBase64Swap
 		public byte[] fByte;
 		public byte[] fnByte;
 		public byte[][] faByte;
@@ -166,9 +166,9 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 	@Test
 	public void testTransformBeans2() throws Exception {
 		Class<?>[] f = {
-			ByteArrayBase64Transform.class,
-			CalendarTransform.Medium.class,
-			DateTransform.RFC2822DT.class,
+			ByteArrayBase64Swap.class,
+			CalendarSwap.Medium.class,
+			DateSwap.RFC2822DT.class,
 		};
 		s.addTransforms(f);
 		if (p != null)
@@ -176,7 +176,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		A t = new A().init();
 		t = roundTrip(t, A.class);
 
-		// ByteArrayBase64Transform
+		// ByteArrayBase64Swap
 		assertEquals(3, t.fByte[3]);
 		assertNull(t.fnByte);
 		assertEquals(5, t.faByte[2][1]);
@@ -185,7 +185,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		assertEquals(6, t.fmByte.get("bar")[2]);
 		assertNull(t.fmByte.get("baz"));
 
-		// CalendarTransform
+		// CalendarSwap
 		t.fCalendar.setTimeZone(TimeZone.getTimeZone("GMT"));
 		assertEquals(2001, t.fCalendar.get(Calendar.YEAR));
 		assertEquals(01, t.fCalendar.get(Calendar.MONTH));
@@ -206,7 +206,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		assertNull(t.fnCalendar);
 		assertNull(t.fn2Calendar);
 
-		// DateTransform
+		// DateSwap
 		assertEquals(1000, t.fDate.getTime());
 		assertNull(t.fnDate);
 		assertEquals(3000, t.faDate[2].getTime());
@@ -233,13 +233,13 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		public String f1;
 	}
 
-	public static class BTransform extends PojoTransform<B,String> {
-		@Override /* PojoTransform */
-		public String transform(B o) throws SerializeException {
+	public static class BTransform extends PojoSwap<B,String> {
+		@Override /* PojoSwap */
+		public String swap(B o) throws SerializeException {
 			return o.f1;
 		}
-		@Override /* PojoTransform */
-		public B normalize(String f, ClassMeta<?> hint) throws ParseException {
+		@Override /* PojoSwap */
+		public B unswap(String f, ClassMeta<?> hint) throws ParseException {
 			B b1 = new B();
 			b1.f1 = f;
 			return b1;
@@ -247,7 +247,7 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 	}
 
 	//====================================================================================================
-	// testXMLGregorianCalendar - Test XMLGregorianCalendarTransform class.
+	// testXMLGregorianCalendar - Test XMLGregorianCalendarSwap class.
 	//====================================================================================================
 	@Test
 	public void testXMLGregorianCalendar() throws Exception {
@@ -258,8 +258,8 @@ public class RoundTripTransformBeansTest extends RoundTripTest {
 		GregorianCalendar gc = new GregorianCalendar();
 		XMLGregorianCalendar c = DatatypeFactory.newInstance().newXMLGregorianCalendar(gc);
 
-		Serializer s = getSerializer().clone().addTransforms(XMLGregorianCalendarTransform.class);
-		Parser p = getParser().clone().addTransforms(XMLGregorianCalendarTransform.class);
+		Serializer s = getSerializer().clone().addTransforms(XMLGregorianCalendarSwap.class);
+		Parser p = getParser().clone().addTransforms(XMLGregorianCalendarSwap.class);
 
 		Object r = s.serialize(c);
 		XMLGregorianCalendar c2 = p.parse(r, XMLGregorianCalendar.class);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/html/HtmlTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/html/HtmlTest.java b/juneau-core/src/test/java/org/apache/juneau/html/HtmlTest.java
index 79c8748..a988ea2 100755
--- a/juneau-core/src/test/java/org/apache/juneau/html/HtmlTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/html/HtmlTest.java
@@ -100,26 +100,26 @@ public class HtmlTest {
 		public String f2 = "f2";
 	}
 
-	@Pojo(transform=A4Transform.class)
+	@Pojo(transform=A4Swap.class)
 	public static class A4 {
 		public String f2 = "f2";
 	}
 
-	public static class A4Transform extends PojoTransform<A4,A1> {
-		@Override /* PojoTransform */
-		public A1 transform(A4 o) throws SerializeException {
+	public static class A4Swap extends PojoSwap<A4,A1> {
+		@Override /* PojoSwap */
+		public A1 swap(A4 o) throws SerializeException {
 			return new A1();
 		}
 	}
 
-	@Pojo(transform=A5Transform.class)
+	@Pojo(transform=A5Swap.class)
 	public static class A5 {
 		public String f2 = "f2";
 	}
 
-	public static class A5Transform extends PojoTransform<A5,ObjectMap> {
-		@Override /* PojoTransform */
-		public ObjectMap transform(A5 o) {
+	public static class A5Swap extends PojoSwap<A5,ObjectMap> {
+		@Override /* PojoSwap */
+		public ObjectMap swap(A5 o) {
 			return new ObjectMap().append("f1", "f1");
 		}
 	}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/jena/RdfParserTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/jena/RdfParserTest.java b/juneau-core/src/test/java/org/apache/juneau/jena/RdfParserTest.java
index f185979..24c9479 100755
--- a/juneau-core/src/test/java/org/apache/juneau/jena/RdfParserTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/jena/RdfParserTest.java
@@ -106,7 +106,7 @@ public class RdfParserTest {
 		public String f2;
 		@BeanProperty(beanUri=true) public URI f3;
 		public URI f4a, f4b;
-		@BeanProperty(transform=CalendarTransform.ISO8601DTZ.class) public Calendar f5;
+		@BeanProperty(transform=CalendarSwap.ISO8601DTZ.class) public Calendar f5;
 		public LinkedList<A1> f6 = new LinkedList<A1>();
 
 		public A init() throws Exception {
@@ -131,7 +131,7 @@ public class RdfParserTest {
 		public String f2;
 		@BeanProperty(beanUri=true) public URI f3;
 		public URI f4a, f4b;
-		@BeanProperty(transform=CalendarTransform.ISO8601DTZ.class) public Calendar f5;
+		@BeanProperty(transform=CalendarSwap.ISO8601DTZ.class) public Calendar f5;
 
 		public A1 init() throws Exception {
 			f1 = 1;

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/transforms/BeanFilterTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/BeanFilterTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/BeanFilterTest.java
new file mode 100755
index 0000000..ec2da25
--- /dev/null
+++ b/juneau-core/src/test/java/org/apache/juneau/transforms/BeanFilterTest.java
@@ -0,0 +1,205 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import static org.apache.juneau.TestUtils.*;
+import static org.junit.Assert.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.annotation.*;
+import org.junit.*;
+
+@SuppressWarnings("javadoc")
+public class BeanFilterTest {
+
+	//====================================================================================================
+	// Transformed interfaces
+	//====================================================================================================
+	@Test
+	public void testTransformedInterfaces() throws Exception {
+		BeanContext bc;
+		BeanMap<A3> bm;
+
+		bc = ContextFactory.create().addTransforms(A1.class).getBeanContext();
+		bm = bc.newBeanMap(A3.class);
+		assertEquals("f1", bm.get("f1"));
+		assertNull(bm.get("f2"));
+		assertNull(bm.get("f3"));
+
+		bc = ContextFactory.create().addTransforms(A2.class).getBeanContext();
+		bm = bc.newBeanMap(A3.class);
+		assertEquals("f1", bm.get("f1"));
+		assertEquals("f2", bm.get("f2"));
+		assertNull(bm.get("f3"));
+	}
+
+	public static interface A1 {
+		public String getF1();
+	}
+
+	public static interface A2 extends A1 {
+		public String getF2();
+	}
+
+	public static class A3 implements A2 {
+		@Override /* A1 */
+		public String getF1() {
+			return "f1";
+		}
+		@Override /* A2 */
+		public String getF2() {
+			return "f2";
+		}
+		public String getF3() {
+			return "f3";
+		}
+	}
+
+	//====================================================================================================
+	// Transformed abstract classes
+	//====================================================================================================
+	@Test
+	public void testTransformedAbstractClasses() throws Exception {
+		BeanContext bc;
+		BeanMap<Test2> bm;
+
+		bc = ContextFactory.create().addTransforms(B1.class).getBeanContext();
+		bm = bc.newBeanMap(Test2.class);
+		assertEquals("f1", bm.get("f1"));
+		assertNull(bm.get("f2"));
+		assertNull(bm.get("f3"));
+
+		bc = ContextFactory.create().addTransforms(B2.class).getBeanContext();
+		bm = bc.newBeanMap(Test2.class);
+		assertEquals("f1", bm.get("f1"));
+		assertEquals("f2", bm.get("f2"));
+		assertNull(bm.get("f3"));
+	}
+
+	public abstract static class B1 {
+		public abstract String getF1();
+	}
+
+	public abstract static class B2 extends B1 {
+		@Override /* B1 */
+		public abstract String getF1();
+		public abstract String getF2();
+	}
+
+	public static class Test2 extends B2 {
+		@Override /* B1 */
+		public String getF1() {
+			return "f1";
+		}
+		@Override /* B2 */
+		public String getF2() {
+			return "f2";
+		}
+		public String getF3() {
+			return "f3";
+		}
+	}
+
+	//====================================================================================================
+	// Transformed with stop classes
+	//====================================================================================================
+	@Test
+	public void testTransformedWithStopClass() throws Exception {
+		C3 c3 = new C3();
+		assertObjectEquals("{f3:3,p3:3}", c3);
+	}
+
+	public class C1 {
+		public int f1 = 1;
+		public int getP1() { return 1; }
+	}
+
+	public class C2 extends C1 {
+		public int f2 = 2;
+		public int getP2() { return 2; }
+	}
+
+	@Bean(stopClass=C2.class)
+	public class C3 extends C2 {
+		public int f3 = 3;
+		public int getP3() { return 3; }
+	}
+
+	@Test
+	public void testTransformedWithStopClassOnParentClass() throws Exception {
+		D3 d3 = new D3();
+		assertObjectEquals("{f3:3,p3:3}", d3);
+	}
+
+	public class D1 {
+		public int f1 = 1;
+		public int getP1() { return 1; }
+	}
+
+	@Bean(stopClass=D2.class)
+	public class D2 extends D1 {
+		public int f2 = 2;
+		public int getP2() { return 2; }
+	}
+
+	public class D3 extends D2 {
+		public int f3 = 3;
+		public int getP3() { return 3; }
+	}
+
+	@Test
+	public void testTransformedWithStopClassOnParentClassWithOverriddenAnnotation() throws Exception {
+		E3 e3 = new E3();
+		assertObjectEquals("{f3:3,p3:3}", e3);
+	}
+
+	public class E1 {
+		public int f1 = 1;
+		public int getP1() { return 1; }
+	}
+
+	@Bean(stopClass=E2.class)
+	public class E2 extends E1 {
+		public int f2 = 2;
+		public int getP2() { return 2; }
+	}
+
+	@Bean(excludeProperties={"foo"})
+	public class E3 extends E2 {
+		public int f3 = 3;
+		public int getP3() { return 3; }
+	}
+
+	@Test
+	public void testTransformedWithStopClassesAtMulitpleLevels() throws Exception {
+		F3 e3 = new F3();
+		assertObjectEquals("{f3:3,p3:3}", e3);
+	}
+
+	@Bean(stopClass=F1.class)
+	public class F1 {
+		public int f1 = 1;
+		public int getP1() { return 1; }
+	}
+
+	public class F2 extends F1 {
+		public int f2 = 2;
+		public int getP2() { return 2; }
+	}
+
+	@Bean(stopClass=F2.class)
+	public class F3 extends F2 {
+		public int f3 = 3;
+		public int getP3() { return 3; }
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/transforms/BeanMapTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/BeanMapTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/BeanMapTest.java
index edda28e..e3f5942 100755
--- a/juneau-core/src/test/java/org/apache/juneau/transforms/BeanMapTest.java
+++ b/juneau-core/src/test/java/org/apache/juneau/transforms/BeanMapTest.java
@@ -26,7 +26,7 @@ public class BeanMapTest {
 	//====================================================================================================
 	@Test
 	public void testFilteredEntry() throws Exception {
-		BeanContext bc = ContextFactory.create().addTransforms(ByteArrayBase64Transform.class).getBeanContext();
+		BeanContext bc = ContextFactory.create().addTransforms(ByteArrayBase64Swap.class).getBeanContext();
 		BeanMap<A> m = bc.forBean(new A());
 
 		assertEquals("AQID", m.get("f1"));
@@ -81,16 +81,16 @@ public class BeanMapTest {
 		public String f2;
 	}
 
-	public static class B1Filter extends PojoTransform<B1,ObjectMap> {
-		@Override /* PojoTransform */
-		public ObjectMap transform(B1 b1) {
+	public static class B1Filter extends PojoSwap<B1,ObjectMap> {
+		@Override /* PojoSwap */
+		public ObjectMap swap(B1 b1) {
 			return new ObjectMap().append("type", "b1").append("f1", b1.f1);
 		}
 	}
 
-	public static class B2Filter extends PojoTransform<B2,ObjectMap> {
-		@Override /* PojoTransform */
-		public ObjectMap transform(B2 b2) {
+	public static class B2Filter extends PojoSwap<B2,ObjectMap> {
+		@Override /* PojoSwap */
+		public ObjectMap swap(B2 b2) {
 			return new ObjectMap().append("type", "b2").append("f1", b2.f1);
 		}
 	}


[8/8] incubator-juneau git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-juneau.git

Posted by ja...@apache.org.
Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-juneau.git

Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau/commit/cb4a4f2a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/cb4a4f2a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/cb4a4f2a

Branch: refs/heads/master
Commit: cb4a4f2a5b0c7b570b08a217f4786024191c84a6
Parents: 0ce0e66 ee27361
Author: jamesbognar <ja...@gmail.com>
Authored: Sat Aug 27 11:37:34 2016 -0400
Committer: jamesbognar <ja...@gmail.com>
Committed: Sat Aug 27 11:38:05 2016 -0400

----------------------------------------------------------------------
 juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/cb4a4f2a/juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java
----------------------------------------------------------------------
diff --cc juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java
index 2027c55,16ec115..c417341
--- a/juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java
+++ b/juneau-core/src/main/java/org/apache/juneau/annotation/Pojo.java
@@@ -82,7 -82,7 +82,7 @@@ import org.apache.juneau.transform.*
  public @interface Pojo {
  
  	/**
- 	 * Associate a {@link PojoSwap} or {@link SurrogateSwap} with this class type.
 -	 * The transform class.
++	 * Associate a {@link PojoSwap} or {@link SurrogateSwap} with this class type. 
  	 */
  	Class<? extends Transform> transform() default Transform.NULL.class;
  }


[2/8] incubator-juneau git commit: Tweak new name 'Transform' into 'BeanFilter' and 'PojoSwap'

Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/transforms/BeanTransformTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/BeanTransformTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/BeanTransformTest.java
deleted file mode 100755
index baea57a..0000000
--- a/juneau-core/src/test/java/org/apache/juneau/transforms/BeanTransformTest.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import static org.apache.juneau.TestUtils.*;
-import static org.junit.Assert.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.annotation.*;
-import org.junit.*;
-
-@SuppressWarnings("javadoc")
-public class BeanTransformTest {
-
-	//====================================================================================================
-	// Transformed interfaces
-	//====================================================================================================
-	@Test
-	public void testTransformedInterfaces() throws Exception {
-		BeanContext bc;
-		BeanMap<A3> bm;
-
-		bc = ContextFactory.create().addTransforms(A1.class).getBeanContext();
-		bm = bc.newBeanMap(A3.class);
-		assertEquals("f1", bm.get("f1"));
-		assertNull(bm.get("f2"));
-		assertNull(bm.get("f3"));
-
-		bc = ContextFactory.create().addTransforms(A2.class).getBeanContext();
-		bm = bc.newBeanMap(A3.class);
-		assertEquals("f1", bm.get("f1"));
-		assertEquals("f2", bm.get("f2"));
-		assertNull(bm.get("f3"));
-	}
-
-	public static interface A1 {
-		public String getF1();
-	}
-
-	public static interface A2 extends A1 {
-		public String getF2();
-	}
-
-	public static class A3 implements A2 {
-		@Override /* A1 */
-		public String getF1() {
-			return "f1";
-		}
-		@Override /* A2 */
-		public String getF2() {
-			return "f2";
-		}
-		public String getF3() {
-			return "f3";
-		}
-	}
-
-	//====================================================================================================
-	// Transformed abstract classes
-	//====================================================================================================
-	@Test
-	public void testTransformedAbstractClasses() throws Exception {
-		BeanContext bc;
-		BeanMap<Test2> bm;
-
-		bc = ContextFactory.create().addTransforms(B1.class).getBeanContext();
-		bm = bc.newBeanMap(Test2.class);
-		assertEquals("f1", bm.get("f1"));
-		assertNull(bm.get("f2"));
-		assertNull(bm.get("f3"));
-
-		bc = ContextFactory.create().addTransforms(B2.class).getBeanContext();
-		bm = bc.newBeanMap(Test2.class);
-		assertEquals("f1", bm.get("f1"));
-		assertEquals("f2", bm.get("f2"));
-		assertNull(bm.get("f3"));
-	}
-
-	public abstract static class B1 {
-		public abstract String getF1();
-	}
-
-	public abstract static class B2 extends B1 {
-		@Override /* B1 */
-		public abstract String getF1();
-		public abstract String getF2();
-	}
-
-	public static class Test2 extends B2 {
-		@Override /* B1 */
-		public String getF1() {
-			return "f1";
-		}
-		@Override /* B2 */
-		public String getF2() {
-			return "f2";
-		}
-		public String getF3() {
-			return "f3";
-		}
-	}
-
-	//====================================================================================================
-	// Transformed with stop classes
-	//====================================================================================================
-	@Test
-	public void testTransformedWithStopClass() throws Exception {
-		C3 c3 = new C3();
-		assertObjectEquals("{f3:3,p3:3}", c3);
-	}
-
-	public class C1 {
-		public int f1 = 1;
-		public int getP1() { return 1; }
-	}
-
-	public class C2 extends C1 {
-		public int f2 = 2;
-		public int getP2() { return 2; }
-	}
-
-	@Bean(stopClass=C2.class)
-	public class C3 extends C2 {
-		public int f3 = 3;
-		public int getP3() { return 3; }
-	}
-
-	@Test
-	public void testTransformedWithStopClassOnParentClass() throws Exception {
-		D3 d3 = new D3();
-		assertObjectEquals("{f3:3,p3:3}", d3);
-	}
-
-	public class D1 {
-		public int f1 = 1;
-		public int getP1() { return 1; }
-	}
-
-	@Bean(stopClass=D2.class)
-	public class D2 extends D1 {
-		public int f2 = 2;
-		public int getP2() { return 2; }
-	}
-
-	public class D3 extends D2 {
-		public int f3 = 3;
-		public int getP3() { return 3; }
-	}
-
-	@Test
-	public void testTransformedWithStopClassOnParentClassWithOverriddenAnnotation() throws Exception {
-		E3 e3 = new E3();
-		assertObjectEquals("{f3:3,p3:3}", e3);
-	}
-
-	public class E1 {
-		public int f1 = 1;
-		public int getP1() { return 1; }
-	}
-
-	@Bean(stopClass=E2.class)
-	public class E2 extends E1 {
-		public int f2 = 2;
-		public int getP2() { return 2; }
-	}
-
-	@Bean(excludeProperties={"foo"})
-	public class E3 extends E2 {
-		public int f3 = 3;
-		public int getP3() { return 3; }
-	}
-
-	@Test
-	public void testTransformedWithStopClassesAtMulitpleLevels() throws Exception {
-		F3 e3 = new F3();
-		assertObjectEquals("{f3:3,p3:3}", e3);
-	}
-
-	@Bean(stopClass=F1.class)
-	public class F1 {
-		public int f1 = 1;
-		public int getP1() { return 1; }
-	}
-
-	public class F2 extends F1 {
-		public int f2 = 2;
-		public int getP2() { return 2; }
-	}
-
-	@Bean(stopClass=F2.class)
-	public class F3 extends F2 {
-		public int f3 = 3;
-		public int getP3() { return 3; }
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/transforms/ByteArrayBase64SwapTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/ByteArrayBase64SwapTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/ByteArrayBase64SwapTest.java
new file mode 100755
index 0000000..0e3c90d
--- /dev/null
+++ b/juneau-core/src/test/java/org/apache/juneau/transforms/ByteArrayBase64SwapTest.java
@@ -0,0 +1,172 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import static org.apache.juneau.serializer.SerializerContext.*;
+import static org.junit.Assert.*;
+
+import java.util.*;
+
+import org.apache.juneau.a.rttests.*;
+import org.apache.juneau.json.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.serializer.*;
+import org.junit.*;
+
+@SuppressWarnings({"unchecked","hiding","serial","javadoc"})
+public class ByteArrayBase64SwapTest extends RoundTripTest {
+
+	public ByteArrayBase64SwapTest(String label, Serializer s, Parser p, int flags) throws Exception {
+		super(label, s, p, flags);
+	}
+
+	@Override /* RoundTripTest */
+	public Class<?>[] getTransforms() {
+		return new Class<?>[] {
+			ByteArrayBase64Swap.class
+		};
+	}
+
+	//====================================================================================================
+	// testPrimitiveArrays
+	//====================================================================================================
+	@Test
+	public void testPrimitiveArrays() throws Exception {
+		WriterSerializer s = new JsonSerializer.Simple().addTransforms(ByteArrayBase64Swap.class).setProperty(SERIALIZER_trimNullProperties, false);
+
+		byte[] a1 = {1,2,3};
+		assertEquals("'AQID'", s.serialize(a1));
+		a1 = roundTrip(a1, byte[].class);
+		assertEquals(1, a1[0]);
+
+		byte[][] a2 = {{1,2,3},{4,5,6},null};
+		assertEquals("['AQID','BAUG',null]", s.serialize(a2));
+		a2 = roundTrip(a2, byte[][].class);
+		assertEquals(1, a2[0][0]);
+		assertNull(a2[2]);
+
+		byte[] a3 = null;
+		assertEquals("null", s.serialize(a3));
+		a3 = roundTrip(a3, byte[].class);
+		assertNull(a3);
+
+		if (p == null)
+			return;
+
+		List<byte[]> fl = new ArrayList<byte[]>() {{
+			add(new byte[]{1,2,3});
+			add(new byte[]{4,5,6});
+			add(null);
+		}};
+		assertEquals("['AQID','BAUG',null]", s.serialize(fl));
+		fl = roundTrip(fl, p.getBeanContext().getCollectionClassMeta(List.class, byte[].class));
+		assertEquals(1, fl.get(0)[0]);
+		assertEquals(5, fl.get(1)[1]);
+		assertNull(fl.get(2));
+
+		Map<String,byte[]> fm = new LinkedHashMap<String,byte[]>() {{
+			put("foo", new byte[]{1,2,3});
+			put("bar", null);
+			put(null, new byte[]{4,5,6});
+			put("null", new byte[]{7,8,9});
+		}};
+		fm = roundTrip(fm, p.getBeanContext().getMapClassMeta(Map.class, String.class, byte[].class));
+		assertEquals(1, fm.get("foo")[0]);
+		assertNull(fm.get(1));
+		assertEquals(5, fm.get(null)[1]);
+		assertEquals(8, fm.get("null")[1]);
+	}
+
+	//====================================================================================================
+	// testBean
+	//====================================================================================================
+	@Test
+	public void testBean() throws Exception {
+		A t = new A().init();
+		t = roundTrip(t, A.class);
+		assertEquals(1, t.f1[0]);
+		assertEquals(4, t.f2[1][0]);
+		assertNull(t.f2[2]);
+		assertNull(t.f3);
+		assertEquals(1, t.fl.get(0)[0]);
+		assertNull(t.fl.get(2));
+		assertEquals(1, t.fm.get("foo")[0]);
+		assertNull(t.fm.get("bar"));
+		assertEquals(4, t.fm.get(null)[0]);
+		assertEquals(1, t.flb.get(0).fl.get(0)[0]);
+		assertNull(t.flb.get(1));
+		assertEquals(1, t.fmb.get("foo").fl.get(0)[0]);
+		assertNull(t.fmb.get("bar"));
+	}
+
+	public static class A {
+		public byte[] f1;
+		public byte[][] f2;
+		public byte[] f3;
+		public List<byte[]> fl;
+		public Map<String,byte[]> fm;
+		public List<B> flb;
+		public Map<String,B> fmb;
+
+		public A init() {
+			f1 = new byte[]{1,2,3};
+			f2 = new byte[][]{{1,2,3},{4,5,6},null};
+			f3 = null;
+			fl = new ArrayList<byte[]>() {{
+				add(new byte[]{1,2,3});
+				add(new byte[]{4,5,6});
+				add(null);
+			}};
+			fm = new LinkedHashMap<String,byte[]>() {{
+				put("foo", new byte[]{1,2,3});
+				put("bar", null);
+				put(null, new byte[]{4,5,6});
+			}};
+			flb = new ArrayList<B>() {{
+				add(new B().init());
+				add(null);
+			}};
+			fmb = new LinkedHashMap<String,B>() {{
+				put("foo", new B().init());
+				put("bar", null);
+				put(null, new B().init());
+			}};
+			return this;
+		}
+	}
+
+	public static class B {
+		public byte[] f1;
+		public byte[][] f2;
+		public byte[] f3;
+		public List<byte[]> fl;
+		public Map<String,byte[]> fm;
+
+		public B init() {
+			f1 = new byte[]{1,2,3};
+			f2 = new byte[][]{{1,2,3},{4,5,6},null};
+			f3 = null;
+			fl = new ArrayList<byte[]>() {{
+				add(new byte[]{1,2,3});
+				add(new byte[]{4,5,6});
+				add(null);
+			}};
+			fm = new LinkedHashMap<String,byte[]>() {{
+				put("foo", new byte[]{1,2,3});
+				put("bar", null);
+				put(null, new byte[]{4,5,6});
+			}};
+			return this;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/transforms/ByteArrayBase64TransformTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/ByteArrayBase64TransformTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/ByteArrayBase64TransformTest.java
deleted file mode 100755
index 00e79d1..0000000
--- a/juneau-core/src/test/java/org/apache/juneau/transforms/ByteArrayBase64TransformTest.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import static org.apache.juneau.serializer.SerializerContext.*;
-import static org.junit.Assert.*;
-
-import java.util.*;
-
-import org.apache.juneau.a.rttests.*;
-import org.apache.juneau.json.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.serializer.*;
-import org.junit.*;
-
-@SuppressWarnings({"unchecked","hiding","serial","javadoc"})
-public class ByteArrayBase64TransformTest extends RoundTripTest {
-
-	public ByteArrayBase64TransformTest(String label, Serializer s, Parser p, int flags) throws Exception {
-		super(label, s, p, flags);
-	}
-
-	@Override /* RoundTripTest */
-	public Class<?>[] getTransforms() {
-		return new Class<?>[] {
-			ByteArrayBase64Transform.class
-		};
-	}
-
-	//====================================================================================================
-	// testPrimitiveArrays
-	//====================================================================================================
-	@Test
-	public void testPrimitiveArrays() throws Exception {
-		WriterSerializer s = new JsonSerializer.Simple().addTransforms(ByteArrayBase64Transform.class).setProperty(SERIALIZER_trimNullProperties, false);
-
-		byte[] a1 = {1,2,3};
-		assertEquals("'AQID'", s.serialize(a1));
-		a1 = roundTrip(a1, byte[].class);
-		assertEquals(1, a1[0]);
-
-		byte[][] a2 = {{1,2,3},{4,5,6},null};
-		assertEquals("['AQID','BAUG',null]", s.serialize(a2));
-		a2 = roundTrip(a2, byte[][].class);
-		assertEquals(1, a2[0][0]);
-		assertNull(a2[2]);
-
-		byte[] a3 = null;
-		assertEquals("null", s.serialize(a3));
-		a3 = roundTrip(a3, byte[].class);
-		assertNull(a3);
-
-		if (p == null)
-			return;
-
-		List<byte[]> fl = new ArrayList<byte[]>() {{
-			add(new byte[]{1,2,3});
-			add(new byte[]{4,5,6});
-			add(null);
-		}};
-		assertEquals("['AQID','BAUG',null]", s.serialize(fl));
-		fl = roundTrip(fl, p.getBeanContext().getCollectionClassMeta(List.class, byte[].class));
-		assertEquals(1, fl.get(0)[0]);
-		assertEquals(5, fl.get(1)[1]);
-		assertNull(fl.get(2));
-
-		Map<String,byte[]> fm = new LinkedHashMap<String,byte[]>() {{
-			put("foo", new byte[]{1,2,3});
-			put("bar", null);
-			put(null, new byte[]{4,5,6});
-			put("null", new byte[]{7,8,9});
-		}};
-		fm = roundTrip(fm, p.getBeanContext().getMapClassMeta(Map.class, String.class, byte[].class));
-		assertEquals(1, fm.get("foo")[0]);
-		assertNull(fm.get(1));
-		assertEquals(5, fm.get(null)[1]);
-		assertEquals(8, fm.get("null")[1]);
-	}
-
-	//====================================================================================================
-	// testBean
-	//====================================================================================================
-	@Test
-	public void testBean() throws Exception {
-		A t = new A().init();
-		t = roundTrip(t, A.class);
-		assertEquals(1, t.f1[0]);
-		assertEquals(4, t.f2[1][0]);
-		assertNull(t.f2[2]);
-		assertNull(t.f3);
-		assertEquals(1, t.fl.get(0)[0]);
-		assertNull(t.fl.get(2));
-		assertEquals(1, t.fm.get("foo")[0]);
-		assertNull(t.fm.get("bar"));
-		assertEquals(4, t.fm.get(null)[0]);
-		assertEquals(1, t.flb.get(0).fl.get(0)[0]);
-		assertNull(t.flb.get(1));
-		assertEquals(1, t.fmb.get("foo").fl.get(0)[0]);
-		assertNull(t.fmb.get("bar"));
-	}
-
-	public static class A {
-		public byte[] f1;
-		public byte[][] f2;
-		public byte[] f3;
-		public List<byte[]> fl;
-		public Map<String,byte[]> fm;
-		public List<B> flb;
-		public Map<String,B> fmb;
-
-		public A init() {
-			f1 = new byte[]{1,2,3};
-			f2 = new byte[][]{{1,2,3},{4,5,6},null};
-			f3 = null;
-			fl = new ArrayList<byte[]>() {{
-				add(new byte[]{1,2,3});
-				add(new byte[]{4,5,6});
-				add(null);
-			}};
-			fm = new LinkedHashMap<String,byte[]>() {{
-				put("foo", new byte[]{1,2,3});
-				put("bar", null);
-				put(null, new byte[]{4,5,6});
-			}};
-			flb = new ArrayList<B>() {{
-				add(new B().init());
-				add(null);
-			}};
-			fmb = new LinkedHashMap<String,B>() {{
-				put("foo", new B().init());
-				put("bar", null);
-				put(null, new B().init());
-			}};
-			return this;
-		}
-	}
-
-	public static class B {
-		public byte[] f1;
-		public byte[][] f2;
-		public byte[] f3;
-		public List<byte[]> fl;
-		public Map<String,byte[]> fm;
-
-		public B init() {
-			f1 = new byte[]{1,2,3};
-			f2 = new byte[][]{{1,2,3},{4,5,6},null};
-			f3 = null;
-			fl = new ArrayList<byte[]>() {{
-				add(new byte[]{1,2,3});
-				add(new byte[]{4,5,6});
-				add(null);
-			}};
-			fm = new LinkedHashMap<String,byte[]>() {{
-				put("foo", new byte[]{1,2,3});
-				put("bar", null);
-				put(null, new byte[]{4,5,6});
-			}};
-			return this;
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/transforms/CalendarSwapTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/CalendarSwapTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/CalendarSwapTest.java
new file mode 100755
index 0000000..4ed72cc
--- /dev/null
+++ b/juneau-core/src/test/java/org/apache/juneau/transforms/CalendarSwapTest.java
@@ -0,0 +1,697 @@
+/***************************************************************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations under the License.
+ ***************************************************************************************************************************/
+package org.apache.juneau.transforms;
+
+import static org.apache.juneau.jena.RdfCommonContext.*;
+import static org.apache.juneau.serializer.SerializerContext.*;
+import static org.junit.Assert.*;
+
+import java.net.*;
+import java.text.*;
+import java.util.*;
+
+import javax.xml.bind.*;
+
+import org.apache.juneau.annotation.*;
+import org.apache.juneau.html.*;
+import org.apache.juneau.jena.*;
+import org.apache.juneau.json.*;
+import org.apache.juneau.parser.*;
+import org.apache.juneau.serializer.*;
+import org.apache.juneau.transform.*;
+import org.apache.juneau.urlencoding.*;
+import org.apache.juneau.xml.*;
+import org.junit.*;
+
+@SuppressWarnings("javadoc")
+public class CalendarSwapTest {
+
+	private static Calendar testDate = new GregorianCalendar(TimeZone.getTimeZone("PST"));
+	static {
+		testDate.setTimeInMillis(0);
+		testDate.set(1901, 2, 3, 10, 11, 12);
+	}
+
+	private RdfSerializer getRdfSerializer() {
+		return new RdfSerializer()
+			.setProperty(SERIALIZER_quoteChar, '\'')
+			.setProperty(SERIALIZER_useIndentation, false)
+			.setProperty(RDF_rdfxml_allowBadUris, true)
+			.setProperty(RDF_rdfxml_showDoctypeDeclaration, false)
+			.setProperty(RDF_rdfxml_showXmlDeclaration, false);
+	}
+
+	private String stripRdf(String s) {
+		return s.replaceFirst("<rdf:RDF[^>]+>\\s*", "").replaceAll("</rdf:RDF>$", "").trim().replaceAll("[\\r\\n]", "");
+	}
+
+	//====================================================================================================
+	// testTimezone - Make sure timezone on calendar is preserved.
+	//====================================================================================================
+	@Test
+	public void testTimezone() throws Exception {
+		PojoSwap<Calendar,String> f;
+		String s;
+		Calendar c;
+
+		//--------------------
+		// ISO8601DT
+		//--------------------
+		f = new CalendarSwap.ISO8601DT();
+
+		s = "2001-01-31T12:34:56Z";
+		c = DatatypeConverter.parseDateTime(s);
+		assertEquals(s, f.swap(c));
+
+		s = "2001-01-31T09:34:56-03:00";
+		c = DatatypeConverter.parseDateTime(s);
+		assertEquals(s, f.swap(c));
+
+		s = "2001-01-31T06:34:56-06:00";
+		c = DatatypeConverter.parseDateTime(s);
+		assertEquals(s, f.swap(c));
+
+
+		//--------------------
+		// ISO8601DTZ
+		//--------------------
+		f = new CalendarSwap.ISO8601DTZ();
+
+		s = "2001-01-31T12:34:56Z";
+		c = DatatypeConverter.parseDateTime(s);
+		assertEquals(s, f.swap(c));
+
+		s = "2001-01-31T09:34:56-03:00";
+		c = DatatypeConverter.parseDateTime(s);
+		assertEquals("2001-01-31T12:34:56Z", f.swap(c));
+
+		s = "2001-01-31T06:34:56-06:00";
+		c = DatatypeConverter.parseDateTime(s);
+		assertEquals("2001-01-31T12:34:56Z", f.swap(c));
+
+		//--------------------
+		// RFC2822DTZ
+		//--------------------
+		f = new CalendarSwap.RFC2822DT();
+
+		s = "2001-01-31T12:34:56Z";
+		c = DatatypeConverter.parseDateTime(s);
+		assertEquals("Wed, 31 Jan 2001 12:34:56 +0000", f.swap(c));
+
+		s = "2001-01-31T09:34:56-03:00";
+		c = DatatypeConverter.parseDateTime(s);
+		assertEquals("Wed, 31 Jan 2001 09:34:56 -0300", f.swap(c));
+
+		s = "2001-01-31T06:34:56-06:00";
+		c = DatatypeConverter.parseDateTime(s);
+		assertEquals("Wed, 31 Jan 2001 06:34:56 -0600", f.swap(c));
+
+		//--------------------
+		// RFC2822DTZ
+		//--------------------
+		f = new CalendarSwap.RFC2822DTZ();
+
+		s = "2001-01-31T12:34:56Z";
+		c = DatatypeConverter.parseDateTime(s);
+		assertEquals("Wed, 31 Jan 2001 12:34:56 GMT", f.swap(c));
+
+		s = "2001-01-31T09:34:56-03:00";
+		c = DatatypeConverter.parseDateTime(s);
+		assertEquals("Wed, 31 Jan 2001 12:34:56 GMT", f.swap(c));
+
+		s = "2001-01-31T06:34:56-06:00";
+		c = DatatypeConverter.parseDateTime(s);
+		assertEquals("Wed, 31 Jan 2001 12:34:56 GMT", f.swap(c));
+	}
+
+
+	//====================================================================================================
+	// testDefaultStringJson - DEFAULT_STRING, JSON
+	//====================================================================================================
+	@Test
+	public void testDefaultStringJson() throws Exception {
+		Class<?> f = CalendarSwap.ToString.class;
+		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
+		ReaderParser p = new JsonParser().addTransforms(f);
+		doTest(s, p, true, "'Sun Mar 03 10:11:12 PST 1901'");
+	}
+
+	//====================================================================================================
+	// testDefaultStringXml - DEFAULT_STRING, XML
+	//====================================================================================================
+	@Test
+	public void testDefaultStringXml() throws Exception {
+		Class<?> f = CalendarSwap.ToString.class;
+		WriterSerializer s = new XmlSerializer.SimpleSq().addTransforms(f);
+		ReaderParser p = new XmlParser().addTransforms(f);
+		doTest(s, p, true, "<string>Sun Mar 03 10:11:12 PST 1901</string>");
+	}
+
+	//====================================================================================================
+	// testDefaultStringHtml - DEFAULT_STRING, HTML
+	//====================================================================================================
+	@Test
+	public void testDefaultStringHtml() throws Exception {
+		Class<?> f = CalendarSwap.ToString.class;
+		WriterSerializer s = new HtmlSerializer().addTransforms(f);
+		ReaderParser p = new HtmlParser().addTransforms(f);
+		doTest(s, p, true, "<string>Sun Mar 03 10:11:12 PST 1901</string>");
+	}
+
+	//====================================================================================================
+	// testDefaultStringUrlParam - DEFAULT_STRING, UON
+	//====================================================================================================
+	@Test
+	public void testDefaultStringUon() throws Exception {
+		Class<?> f = CalendarSwap.ToString.class;
+		WriterSerializer s = new UonSerializer.Encoding().addTransforms(f);
+		ReaderParser p = UonParser.DEFAULT_DECODING.clone().addTransforms(f);
+		doTest(s, p, true, "Sun+Mar+03+10:11:12+PST+1901");
+	}
+
+	//====================================================================================================
+	// testDefaultStringUrlParam - DEFAULT_STRING, URL-ENCODING
+	//====================================================================================================
+	@Test
+	public void testDefaultStringUrlEncoding() throws Exception {
+		Class<?> f = CalendarSwap.ToString.class;
+		WriterSerializer s = new UrlEncodingSerializer().addTransforms(f);
+		ReaderParser p = UrlEncodingParser.DEFAULT.clone().addTransforms(f);
+		doTest(s, p, true, "_value=Sun+Mar+03+10:11:12+PST+1901");
+	}
+
+	//====================================================================================================
+	// testDefaultStringRdfXml - DEFAULT_STRING, RDF/XML
+	//====================================================================================================
+	@Test
+	public void testDefaultStringRdfXml() throws Exception {
+		Class<?> f = CalendarSwap.ToString.class;
+		WriterSerializer s = getRdfSerializer().addTransforms(f);
+		ReaderParser p = new RdfParser.Xml().addTransforms(f);
+		doTest(s, p, true, "<rdf:Description><j:value>Sun Mar 03 10:11:12 PST 1901</j:value></rdf:Description>");
+	}
+
+	//====================================================================================================
+	// testISO8601DTJson - DEFAULT_ISO8601DT, JSON
+	//====================================================================================================
+	@Test
+	public void testISO8601DTJson() throws Exception {
+		Class<?> f = CalendarSwap.ISO8601DT.class;
+		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
+		ReaderParser p = new JsonParser().addTransforms(f);
+		String x = "'1901-03-03T10:11:12-08:00'";
+		doTest(s, p, true, x);
+	}
+
+	//====================================================================================================
+	// testISO8601DTXml - DEFAULT_ISO8601DT, XML
+	//====================================================================================================
+	@Test
+	public void testISO8601DTXml() throws Exception {
+		Class<?> f = CalendarSwap.ISO8601DT.class;
+		WriterSerializer s = new XmlSerializer.SimpleSq().addTransforms(f);
+		ReaderParser p = new XmlParser().addTransforms(f);
+		doTest(s, p, true, "<string>1901-03-03T10:11:12-08:00</string>");
+	}
+
+	//====================================================================================================
+	// testISO8601DTHtml - DEFAULT_ISO8601DT, HTML
+	//====================================================================================================
+	@Test
+	public void testISO8601DTHtml() throws Exception {
+		Class<?> f = CalendarSwap.ISO8601DT.class;
+		WriterSerializer s = new HtmlSerializer().addTransforms(f);
+		ReaderParser p = new HtmlParser().addTransforms(f);
+		doTest(s, p, true, "<string>1901-03-03T10:11:12-08:00</string>");
+	}
+
+	//====================================================================================================
+	// testISO8601DTUrlParam - DEFAULT_ISO8601DT, UON
+	//====================================================================================================
+	@Test
+	public void testISO8601DTUon() throws Exception {
+		Class<?> f = CalendarSwap.ISO8601DT.class;
+		WriterSerializer s = new UonSerializer().addTransforms(f);
+		ReaderParser p = new UonParser().addTransforms(f);
+		doTest(s, p, true, "1901-03-03T10:11:12-08:00");
+	}
+
+	//====================================================================================================
+	// testISO8601DTUrlParam - DEFAULT_ISO8601DT, URL-ENCODING
+	//====================================================================================================
+	@Test
+	public void testISO8601DTUrlEncoding() throws Exception {
+		Class<?> f = CalendarSwap.ISO8601DT.class;
+		WriterSerializer s = new UrlEncodingSerializer().addTransforms(f);
+		ReaderParser p = new UrlEncodingParser().addTransforms(f);
+		doTest(s, p, true, "_value=1901-03-03T10:11:12-08:00");
+	}
+
+	//====================================================================================================
+	// testISO8601DTRdfXml - DEFAULT_ISO8601DT, RDF/XML
+	//====================================================================================================
+	@Test
+	public void testISO8601DTRdfXml() throws Exception {
+		Class<?> f = CalendarSwap.ISO8601DT.class;
+		WriterSerializer s = getRdfSerializer().addTransforms(f);
+		ReaderParser p = new RdfParser.Xml().addTransforms(f);
+		doTest(s, p, true, "<rdf:Description><j:value>1901-03-03T10:11:12-08:00</j:value></rdf:Description>");
+	}
+
+	//====================================================================================================
+	// testRFC2822DTJson - DEFAULT_RFC2822DT, JSON
+	//====================================================================================================
+	@Test
+	public void testRFC2822DTJson() throws Exception {
+		Class<?> f = CalendarSwap.RFC2822DTZ.class;
+		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
+		ReaderParser p = new JsonParser().addTransforms(f);
+		doTest(s, p, true, "'Sun, 03 Mar 1901 18:11:12 GMT'");
+	}
+
+	//====================================================================================================
+	// testRFC2822DTXml - DEFAULT_RFC2822DT, XML
+	//====================================================================================================
+	@Test
+	public void testRFC2822DTXml() throws Exception {
+		Class<?> f = CalendarSwap.RFC2822DTZ.class;
+		WriterSerializer s = new XmlSerializer.SimpleSq().addTransforms(f);
+		ReaderParser p = new XmlParser().addTransforms(f);
+		doTest(s, p, true, "<string>Sun, 03 Mar 1901 18:11:12 GMT</string>");
+	}
+
+	//====================================================================================================
+	// testRFC2822DTHtml - DEFAULT_RFC2822DT, HTML
+	//====================================================================================================
+	@Test
+	public void testRFC2822DTHtml() throws Exception {
+		Class<?> f = CalendarSwap.RFC2822DTZ.class;
+		WriterSerializer s = new HtmlSerializer().addTransforms(f);
+		ReaderParser p = new HtmlParser().addTransforms(f);
+		doTest(s, p, true, "<string>Sun, 03 Mar 1901 18:11:12 GMT</string>");
+	}
+
+	//====================================================================================================
+	// testRFC2822DTUrlParam - DEFAULT_RFC2822DT, UON
+	//====================================================================================================
+	@Test
+	public void testRFC2822DTUon() throws Exception {
+		Class<?> f = CalendarSwap.RFC2822DTZ.class;
+		WriterSerializer s = new UonSerializer.Encoding().addTransforms(f);
+		ReaderParser p = UonParser.DEFAULT_DECODING.clone().addTransforms(f);
+		doTest(s, p, true, "Sun,+03+Mar+1901+18:11:12+GMT");
+	}
+
+	//====================================================================================================
+	// testRFC2822DTUrlParam - DEFAULT_RFC2822DT, URL-ENCODING
+	//====================================================================================================
+	@Test
+	public void testRFC2822DTUrlEncoding() throws Exception {
+		Class<?> f = CalendarSwap.RFC2822DTZ.class;
+		WriterSerializer s = new UrlEncodingSerializer().addTransforms(f);
+		ReaderParser p = UrlEncodingParser.DEFAULT.clone().addTransforms(f);
+		doTest(s, p, true, "_value=Sun,+03+Mar+1901+18:11:12+GMT");
+	}
+
+	//====================================================================================================
+	// testRFC2822DTRdfXml - DEFAULT_RFC2822DT, RDF/XML
+	//====================================================================================================
+	@Test
+	public void testRFC2822DTRdfXml() throws Exception {
+		Class<?> f = CalendarSwap.RFC2822DTZ.class;
+		WriterSerializer s = getRdfSerializer().addTransforms(f);
+		ReaderParser p = new RdfParser.Xml().addTransforms(f);
+		doTest(s, p, true, "<rdf:Description><j:value>Sun, 03 Mar 1901 18:11:12 GMT</j:value></rdf:Description>");
+	}
+
+	//====================================================================================================
+	// testDefaultLongJson - DEFAULT_LONG, JSON
+	//====================================================================================================
+	@Test
+	public void testDefaultLongJson() throws Exception {
+		Class<?> f = CalendarLongSwap.class;
+		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
+		ReaderParser p = new JsonParser().addTransforms(f);
+		doTest(s, p, true, "-2172116928000");
+	}
+
+	//====================================================================================================
+	// testDefaultLongXml - DEFAULT_LONG, XML
+	//====================================================================================================
+	@Test
+	public void testDefaultLongXml() throws Exception {
+		Class<?> f = CalendarLongSwap.class;
+		WriterSerializer s = new XmlSerializer.SimpleSq().addTransforms(f);
+		ReaderParser p = new XmlParser().addTransforms(f);
+		doTest(s, p, true, "<number>-2172116928000</number>");
+	}
+
+	//====================================================================================================
+	// testDefaultLongHtml - DEFAULT_LONG, HTML
+	//====================================================================================================
+	@Test
+	public void testDefaultLongHtml() throws Exception {
+		Class<?> f = CalendarLongSwap.class;
+		WriterSerializer s = new HtmlSerializer().addTransforms(f);
+		ReaderParser p = new HtmlParser().addTransforms(f);
+		doTest(s, p, true, "<number>-2172116928000</number>");
+	}
+
+	//====================================================================================================
+	// testDefaultLongUrlParam - DEFAULT_LONG, UON
+	//====================================================================================================
+	@Test
+	public void testDefaultLongUon() throws Exception {
+		Class<?> f = CalendarLongSwap.class;
+		WriterSerializer s = UonSerializer.DEFAULT_SIMPLE.clone().addTransforms(f);
+		ReaderParser p = new UonParser().addTransforms(f);
+		doTest(s, p, true, "-2172116928000");
+	}
+
+	//====================================================================================================
+	// testDefaultLongUrlParam - DEFAULT_LONG, URL-ENCODING
+	//====================================================================================================
+	@Test
+	public void testDefaultLongUrlEncoding() throws Exception {
+		Class<?> f = CalendarLongSwap.class;
+		WriterSerializer s = UrlEncodingSerializer.DEFAULT_SIMPLE.clone().addTransforms(f);
+		ReaderParser p = new UrlEncodingParser().addTransforms(f);
+		doTest(s, p, true, "_value=-2172116928000");
+	}
+
+	//====================================================================================================
+	// testDefaultLongRdfXml - DEFAULT_LONG, RDF/XML
+	//====================================================================================================
+	@Test
+	public void testDefaultLongRdfXml() throws Exception {
+		Class<?> f = CalendarLongSwap.class;
+		WriterSerializer s = getRdfSerializer().addTransforms(f);
+		ReaderParser p = new RdfParser.Xml().addTransforms(f);
+		doTest(s, p, true, "<rdf:Description><j:value>-2172116928000</j:value></rdf:Description>");
+	}
+
+	//====================================================================================================
+	// testDefaultMapJson - DEFAULT_MAP, JSON
+	//====================================================================================================
+	@Test
+	public void testDefaultMapJson() throws Exception {
+		Class<?> f = CalendarMapSwap.class;
+		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
+		ReaderParser p = new JsonParser().addTransforms(f);
+		doTest(s, p, true, "{time:-2172116928000,timeZone:'PST'}");
+	}
+
+	//====================================================================================================
+	// testDefaultMapXml - DEFAULT_MAP, XML
+	//====================================================================================================
+	@Test
+	public void testDefaultMapXml() throws Exception {
+		Class<?> f = CalendarMapSwap.class;
+		WriterSerializer s = new XmlSerializer.SimpleXmlJsonSq().addTransforms(f);
+		ReaderParser p = new XmlParser().addTransforms(f);
+		doTest(s, p, true, "<object><time type='number'>-2172116928000</time><timeZone>PST</timeZone></object>");
+	}
+
+	//====================================================================================================
+	// testDefaultMapHtml - DEFAULT_MAP, HTML
+	//====================================================================================================
+	@Test
+	public void testDefaultMapHtml() throws Exception {
+		Class<?> f = CalendarMapSwap.class;
+		WriterSerializer s = new HtmlSerializer.Sq().addTransforms(f);
+		ReaderParser p = new HtmlParser().addTransforms(f);
+		doTest(s, p, true, "<table type='object'><tr><th><string>key</string></th><th><string>value</string></th></tr><tr><td><string>time</string></td><td><number>-2172116928000</number></td></tr><tr><td><string>timeZone</string></td><td><string>PST</string></td></tr></table>");
+	}
+
+	//====================================================================================================
+	// testDefaultMapUrlParam - DEFAULT_MAP, UON
+	//====================================================================================================
+	@Test
+	public void testDefaultMapUon() throws Exception {
+		Class<?> f = CalendarMapSwap.class;
+		WriterSerializer s = UonSerializer.DEFAULT_SIMPLE.clone().addTransforms(f);
+		ReaderParser p = new UonParser().addTransforms(f);
+		doTest(s, p, true, "(time=-2172116928000,timeZone=PST)");
+	}
+
+	//====================================================================================================
+	// testDefaultMapUrlParam - DEFAULT_MAP, URL-ENCODING
+	//====================================================================================================
+	@Test
+	public void testDefaultMapUrlEncoding() throws Exception {
+		Class<?> f = CalendarMapSwap.class;
+		WriterSerializer s = UrlEncodingSerializer.DEFAULT_SIMPLE.clone().addTransforms(f);
+		ReaderParser p = new UrlEncodingParser().addTransforms(f);
+		doTest(s, p, true, "time=-2172116928000&timeZone=PST");
+	}
+
+	//====================================================================================================
+	// testDefaultMapRdfXml - DEFAULT_MAP, RDF/XML
+	//====================================================================================================
+	@Test
+	public void testDefaultMapRdfXml() throws Exception {
+		Class<?> f = CalendarMapSwap.class;
+		WriterSerializer s = getRdfSerializer().addTransforms(f);
+		ReaderParser p = new RdfParser.Xml().addTransforms(f);
+		doTest(s, p, true, "<rdf:Description><jp:time>-2172116928000</jp:time><jp:timeZone>PST</jp:timeZone></rdf:Description>");
+	}
+
+	//====================================================================================================
+	// testDefaultMediumJson - DEFAULT_MEDIUM, JSON
+	//====================================================================================================
+	@Test
+	public void testDefaultMediumJson() throws Exception {
+		Class<?> f = CalendarSwap.Medium.class;
+		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
+		ReaderParser p = new JsonParser().addTransforms(f);
+		doTest(s, p, false, "'Mar 3, 1901'");
+	}
+
+	//====================================================================================================
+	// testDefaultMediumXml - DEFAULT_MEDIUM, XML
+	//====================================================================================================
+	@Test
+	public void testDefaultMediumXml() throws Exception {
+		Class<?> f = CalendarSwap.Medium.class;
+		WriterSerializer s = new XmlSerializer.SimpleSq().addTransforms(f);
+		ReaderParser p = new XmlParser().addTransforms(f);
+		doTest(s, p, false, "<string>Mar 3, 1901</string>");
+	}
+
+	//====================================================================================================
+	// testDefaultMediumHtml - DEFAULT_MEDIUM, HTML
+	//====================================================================================================
+	@Test
+	public void testDefaultMediumHtml() throws Exception {
+		Class<?> f = CalendarSwap.Medium.class;
+		WriterSerializer s = new HtmlSerializer().addTransforms(f);
+		ReaderParser p = new HtmlParser().addTransforms(f);
+		doTest(s, p, false, "<string>Mar 3, 1901</string>");
+	}
+
+	//====================================================================================================
+	// testDefaultMediumUrlParam - DEFAULT_MEDIUM, UON
+	//====================================================================================================
+	@Test
+	public void testDefaultMediumUon() throws Exception {
+		Class<?> f = CalendarSwap.Medium.class;
+		WriterSerializer s = new UonSerializer.Encoding().addTransforms(f);
+		ReaderParser p = UonParser.DEFAULT_DECODING.clone().addTransforms(f);
+		doTest(s, p, false, "Mar+3,+1901");
+	}
+
+	//====================================================================================================
+	// testDefaultMediumUrlParam - DEFAULT_MEDIUM, URL-ENCODING
+	//====================================================================================================
+	@Test
+	public void testDefaultMediumUrlEncoding() throws Exception {
+		Class<?> f = CalendarSwap.Medium.class;
+		WriterSerializer s = new UrlEncodingSerializer().addTransforms(f);
+		ReaderParser p = UrlEncodingParser.DEFAULT.clone().addTransforms(f);
+		doTest(s, p, false, "_value=Mar+3,+1901");
+	}
+
+	//====================================================================================================
+	// testDefaultMediumRdfXml - DEFAULT_MEDIUM, RDF/XML
+	//====================================================================================================
+	@Test
+	public void testDefaultMediumRdfXml() throws Exception {
+		Class<?> f = CalendarSwap.Medium.class;
+		WriterSerializer s = getRdfSerializer().addTransforms(f);
+		ReaderParser p = new RdfParser.Xml().addTransforms(f);
+		doTest(s, p, false, "<rdf:Description><j:value>Mar 3, 1901</j:value></rdf:Description>");
+	}
+
+	//====================================================================================================
+	// Test 7a - BeanProperty.filter, JSON
+	//====================================================================================================
+	@Test
+	public void testBeanProperyFilterJson() throws Exception {
+		WriterSerializer s = JsonSerializer.DEFAULT_LAX;
+		ReaderParser p = JsonParser.DEFAULT;
+
+		Calendar c = testDate;
+		A t = new A(c);
+		String json = s.serialize(t);
+		assertEquals("{d1:'1901-03-03T18:11:12Z',d2:'Sun, 03 Mar 1901 18:11:12 GMT',d3:-2172116928000}", json);
+		t = p.parse(json, A.class);
+		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
+	}
+
+	//====================================================================================================
+	// Test 7b - BeanProperty.filter, XML
+	//====================================================================================================
+	@Test
+	public void testBeanProperyFilterXml() throws Exception {
+		WriterSerializer s = XmlSerializer.DEFAULT_SIMPLE_SQ;
+		ReaderParser p = XmlParser.DEFAULT;
+
+		Calendar c = testDate;
+		A t = new A(c);
+		String xml = s.serialize(t);
+		assertEquals("<object><d1>1901-03-03T18:11:12Z</d1><d2>Sun, 03 Mar 1901 18:11:12 GMT</d2><d3>-2172116928000</d3></object>", xml);
+		t = p.parse(xml, A.class);
+		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
+	}
+
+	//====================================================================================================
+	// Test 7c - BeanProperty.filter, HTML
+	//====================================================================================================
+	@Test
+	public void testBeanProperyFilterHtml() throws Exception {
+		WriterSerializer s = HtmlSerializer.DEFAULT_SQ;
+		ReaderParser p = HtmlParser.DEFAULT;
+
+		Calendar c = testDate;
+		A t = new A(c);
+		String html = s.serialize(t);
+		assertEquals("<table type='object'><tr><th><string>key</string></th><th><string>value</string></th></tr><tr><td><string>d1</string></td><td><string>1901-03-03T18:11:12Z</string></td></tr><tr><td><string>d2</string></td><td><string>Sun, 03 Mar 1901 18:11:12 GMT</string></td></tr><tr><td><string>d3</string></td><td><number>-2172116928000</number></td></tr></table>", html);
+		t = p.parse(html, A.class);
+		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
+	}
+
+	//====================================================================================================
+	// Test 7d - BeanProperty.filter, UON
+	//====================================================================================================
+	@Test
+	public void testBeanProperyFilterUon() throws Exception {
+		WriterSerializer s = UonSerializer.DEFAULT_SIMPLE_ENCODING;
+		ReaderParser p = UonParser.DEFAULT;
+		ReaderParser pe = UonParser.DEFAULT_DECODING;
+
+		Calendar c = testDate;
+		A t = new A(c);
+		String url = s.serialize(t);
+		assertEquals("(d1=1901-03-03T18:11:12Z,d2=Sun~,+03+Mar+1901+18:11:12+GMT,d3=-2172116928000)", url);
+		t = pe.parse(url, A.class);
+		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
+		url = URLDecoder.decode(url, "UTF-8");
+		t = p.parse(url, A.class);
+		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
+	}
+
+	//====================================================================================================
+	// Test 7d - BeanProperty.filter, URL-ENCODING
+	//====================================================================================================
+	@Test
+	public void testBeanProperyFilterUrlEncoding() throws Exception {
+		WriterSerializer s = UrlEncodingSerializer.DEFAULT_SIMPLE;
+		ReaderParser p = UrlEncodingParser.DEFAULT;
+
+		Calendar c = testDate;
+		A t = new A(c);
+		String url = s.serialize(t);
+		assertEquals("d1=1901-03-03T18:11:12Z&d2=Sun,+03+Mar+1901+18:11:12+GMT&d3=-2172116928000", url);
+		t = p.parse(url, A.class);
+		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
+		url = URLDecoder.decode(url, "UTF-8");
+		t = p.parse(url, A.class);
+		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
+		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
+	}
+
+	//====================================================================================================
+	// Test 7f - BeanProperty.filter, RDF/XML
+	//====================================================================================================
+	@Test
+	public void testBeanProperyFilterRdfXmlWithNs() throws Exception {
+		WriterSerializer s = getRdfSerializer();
+
+		Calendar c = testDate;
+		A t = new A(c);
+		String rdf = stripRdf(s.serialize(t));
+		assertEquals("<rdf:Description><jp:d1>1901-03-03T18:11:12Z</jp:d1><jp:d2>Sun, 03 Mar 1901 18:11:12 GMT</jp:d2><jp:d3>-2172116928000</jp:d3></rdf:Description>", rdf);
+	}
+
+	@Bean(sort=true)
+	public static class A {
+		@BeanProperty(transform=CalendarSwap.ISO8601DTZ.class)
+		public Calendar d1;
+		private Calendar d2, d3;
+		public A(Calendar date) {
+			d1 = d2 = d3 = date;
+		}
+
+		public A() {}
+
+		@BeanProperty(transform=CalendarSwap.RFC2822DTZ.class)
+		public Calendar getD2() {
+			return d2;
+		}
+		public void setD2(Calendar d2) {
+			this.d2 = d2;
+		}
+
+		public Calendar getD3() {
+			return d3;
+		}
+		@BeanProperty(transform=CalendarLongSwap.class)
+		public void setD3(Calendar d3) {
+			this.d3 = d3;
+		}
+	}
+
+	private void doTest(WriterSerializer s, ReaderParser p, boolean doTestTimeToo, String expected) throws Exception {
+		Calendar d;
+		String actual;
+
+		SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
+		sdf.setTimeZone(TimeZone.getTimeZone("PST"));
+		actual = s.serialize(testDate);
+		String a = (s instanceof RdfSerializer ? stripRdf(actual) : actual);
+		assertEquals(expected, a);
+		d = p.parse(actual, GregorianCalendar.class);
+		d.setTimeZone(TimeZone.getTimeZone("PST"));
+		assertEquals(1901, d.get(Calendar.YEAR));
+		assertEquals(2, d.get(Calendar.MONTH));
+//		assertEquals(3, d.get(Calendar.DATE));
+		if (doTestTimeToo) {
+			assertEquals(10, d.get(Calendar.HOUR));
+			assertEquals(11, d.get(Calendar.MINUTE));
+			assertEquals(12, d.get(Calendar.SECOND));
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/0ce0e663/juneau-core/src/test/java/org/apache/juneau/transforms/CalendarTransformTest.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/test/java/org/apache/juneau/transforms/CalendarTransformTest.java b/juneau-core/src/test/java/org/apache/juneau/transforms/CalendarTransformTest.java
deleted file mode 100755
index bb7ff75..0000000
--- a/juneau-core/src/test/java/org/apache/juneau/transforms/CalendarTransformTest.java
+++ /dev/null
@@ -1,697 +0,0 @@
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations under the License.
- ***************************************************************************************************************************/
-package org.apache.juneau.transforms;
-
-import static org.apache.juneau.jena.RdfCommonContext.*;
-import static org.apache.juneau.serializer.SerializerContext.*;
-import static org.junit.Assert.*;
-
-import java.net.*;
-import java.text.*;
-import java.util.*;
-
-import javax.xml.bind.*;
-
-import org.apache.juneau.annotation.*;
-import org.apache.juneau.html.*;
-import org.apache.juneau.jena.*;
-import org.apache.juneau.json.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.serializer.*;
-import org.apache.juneau.transform.*;
-import org.apache.juneau.urlencoding.*;
-import org.apache.juneau.xml.*;
-import org.junit.*;
-
-@SuppressWarnings("javadoc")
-public class CalendarTransformTest {
-
-	private static Calendar testDate = new GregorianCalendar(TimeZone.getTimeZone("PST"));
-	static {
-		testDate.setTimeInMillis(0);
-		testDate.set(1901, 2, 3, 10, 11, 12);
-	}
-
-	private RdfSerializer getRdfSerializer() {
-		return new RdfSerializer()
-			.setProperty(SERIALIZER_quoteChar, '\'')
-			.setProperty(SERIALIZER_useIndentation, false)
-			.setProperty(RDF_rdfxml_allowBadUris, true)
-			.setProperty(RDF_rdfxml_showDoctypeDeclaration, false)
-			.setProperty(RDF_rdfxml_showXmlDeclaration, false);
-	}
-
-	private String stripRdf(String s) {
-		return s.replaceFirst("<rdf:RDF[^>]+>\\s*", "").replaceAll("</rdf:RDF>$", "").trim().replaceAll("[\\r\\n]", "");
-	}
-
-	//====================================================================================================
-	// testTimezone - Make sure timezone on calendar is preserved.
-	//====================================================================================================
-	@Test
-	public void testTimezone() throws Exception {
-		PojoTransform<Calendar,String> f;
-		String s;
-		Calendar c;
-
-		//--------------------
-		// ISO8601DT
-		//--------------------
-		f = new CalendarTransform.ISO8601DT();
-
-		s = "2001-01-31T12:34:56Z";
-		c = DatatypeConverter.parseDateTime(s);
-		assertEquals(s, f.transform(c));
-
-		s = "2001-01-31T09:34:56-03:00";
-		c = DatatypeConverter.parseDateTime(s);
-		assertEquals(s, f.transform(c));
-
-		s = "2001-01-31T06:34:56-06:00";
-		c = DatatypeConverter.parseDateTime(s);
-		assertEquals(s, f.transform(c));
-
-
-		//--------------------
-		// ISO8601DTZ
-		//--------------------
-		f = new CalendarTransform.ISO8601DTZ();
-
-		s = "2001-01-31T12:34:56Z";
-		c = DatatypeConverter.parseDateTime(s);
-		assertEquals(s, f.transform(c));
-
-		s = "2001-01-31T09:34:56-03:00";
-		c = DatatypeConverter.parseDateTime(s);
-		assertEquals("2001-01-31T12:34:56Z", f.transform(c));
-
-		s = "2001-01-31T06:34:56-06:00";
-		c = DatatypeConverter.parseDateTime(s);
-		assertEquals("2001-01-31T12:34:56Z", f.transform(c));
-
-		//--------------------
-		// RFC2822DTZ
-		//--------------------
-		f = new CalendarTransform.RFC2822DT();
-
-		s = "2001-01-31T12:34:56Z";
-		c = DatatypeConverter.parseDateTime(s);
-		assertEquals("Wed, 31 Jan 2001 12:34:56 +0000", f.transform(c));
-
-		s = "2001-01-31T09:34:56-03:00";
-		c = DatatypeConverter.parseDateTime(s);
-		assertEquals("Wed, 31 Jan 2001 09:34:56 -0300", f.transform(c));
-
-		s = "2001-01-31T06:34:56-06:00";
-		c = DatatypeConverter.parseDateTime(s);
-		assertEquals("Wed, 31 Jan 2001 06:34:56 -0600", f.transform(c));
-
-		//--------------------
-		// RFC2822DTZ
-		//--------------------
-		f = new CalendarTransform.RFC2822DTZ();
-
-		s = "2001-01-31T12:34:56Z";
-		c = DatatypeConverter.parseDateTime(s);
-		assertEquals("Wed, 31 Jan 2001 12:34:56 GMT", f.transform(c));
-
-		s = "2001-01-31T09:34:56-03:00";
-		c = DatatypeConverter.parseDateTime(s);
-		assertEquals("Wed, 31 Jan 2001 12:34:56 GMT", f.transform(c));
-
-		s = "2001-01-31T06:34:56-06:00";
-		c = DatatypeConverter.parseDateTime(s);
-		assertEquals("Wed, 31 Jan 2001 12:34:56 GMT", f.transform(c));
-	}
-
-
-	//====================================================================================================
-	// testDefaultStringJson - DEFAULT_STRING, JSON
-	//====================================================================================================
-	@Test
-	public void testDefaultStringJson() throws Exception {
-		Class<?> f = CalendarTransform.ToString.class;
-		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
-		ReaderParser p = new JsonParser().addTransforms(f);
-		doTest(s, p, true, "'Sun Mar 03 10:11:12 PST 1901'");
-	}
-
-	//====================================================================================================
-	// testDefaultStringXml - DEFAULT_STRING, XML
-	//====================================================================================================
-	@Test
-	public void testDefaultStringXml() throws Exception {
-		Class<?> f = CalendarTransform.ToString.class;
-		WriterSerializer s = new XmlSerializer.SimpleSq().addTransforms(f);
-		ReaderParser p = new XmlParser().addTransforms(f);
-		doTest(s, p, true, "<string>Sun Mar 03 10:11:12 PST 1901</string>");
-	}
-
-	//====================================================================================================
-	// testDefaultStringHtml - DEFAULT_STRING, HTML
-	//====================================================================================================
-	@Test
-	public void testDefaultStringHtml() throws Exception {
-		Class<?> f = CalendarTransform.ToString.class;
-		WriterSerializer s = new HtmlSerializer().addTransforms(f);
-		ReaderParser p = new HtmlParser().addTransforms(f);
-		doTest(s, p, true, "<string>Sun Mar 03 10:11:12 PST 1901</string>");
-	}
-
-	//====================================================================================================
-	// testDefaultStringUrlParam - DEFAULT_STRING, UON
-	//====================================================================================================
-	@Test
-	public void testDefaultStringUon() throws Exception {
-		Class<?> f = CalendarTransform.ToString.class;
-		WriterSerializer s = new UonSerializer.Encoding().addTransforms(f);
-		ReaderParser p = UonParser.DEFAULT_DECODING.clone().addTransforms(f);
-		doTest(s, p, true, "Sun+Mar+03+10:11:12+PST+1901");
-	}
-
-	//====================================================================================================
-	// testDefaultStringUrlParam - DEFAULT_STRING, URL-ENCODING
-	//====================================================================================================
-	@Test
-	public void testDefaultStringUrlEncoding() throws Exception {
-		Class<?> f = CalendarTransform.ToString.class;
-		WriterSerializer s = new UrlEncodingSerializer().addTransforms(f);
-		ReaderParser p = UrlEncodingParser.DEFAULT.clone().addTransforms(f);
-		doTest(s, p, true, "_value=Sun+Mar+03+10:11:12+PST+1901");
-	}
-
-	//====================================================================================================
-	// testDefaultStringRdfXml - DEFAULT_STRING, RDF/XML
-	//====================================================================================================
-	@Test
-	public void testDefaultStringRdfXml() throws Exception {
-		Class<?> f = CalendarTransform.ToString.class;
-		WriterSerializer s = getRdfSerializer().addTransforms(f);
-		ReaderParser p = new RdfParser.Xml().addTransforms(f);
-		doTest(s, p, true, "<rdf:Description><j:value>Sun Mar 03 10:11:12 PST 1901</j:value></rdf:Description>");
-	}
-
-	//====================================================================================================
-	// testISO8601DTJson - DEFAULT_ISO8601DT, JSON
-	//====================================================================================================
-	@Test
-	public void testISO8601DTJson() throws Exception {
-		Class<?> f = CalendarTransform.ISO8601DT.class;
-		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
-		ReaderParser p = new JsonParser().addTransforms(f);
-		String x = "'1901-03-03T10:11:12-08:00'";
-		doTest(s, p, true, x);
-	}
-
-	//====================================================================================================
-	// testISO8601DTXml - DEFAULT_ISO8601DT, XML
-	//====================================================================================================
-	@Test
-	public void testISO8601DTXml() throws Exception {
-		Class<?> f = CalendarTransform.ISO8601DT.class;
-		WriterSerializer s = new XmlSerializer.SimpleSq().addTransforms(f);
-		ReaderParser p = new XmlParser().addTransforms(f);
-		doTest(s, p, true, "<string>1901-03-03T10:11:12-08:00</string>");
-	}
-
-	//====================================================================================================
-	// testISO8601DTHtml - DEFAULT_ISO8601DT, HTML
-	//====================================================================================================
-	@Test
-	public void testISO8601DTHtml() throws Exception {
-		Class<?> f = CalendarTransform.ISO8601DT.class;
-		WriterSerializer s = new HtmlSerializer().addTransforms(f);
-		ReaderParser p = new HtmlParser().addTransforms(f);
-		doTest(s, p, true, "<string>1901-03-03T10:11:12-08:00</string>");
-	}
-
-	//====================================================================================================
-	// testISO8601DTUrlParam - DEFAULT_ISO8601DT, UON
-	//====================================================================================================
-	@Test
-	public void testISO8601DTUon() throws Exception {
-		Class<?> f = CalendarTransform.ISO8601DT.class;
-		WriterSerializer s = new UonSerializer().addTransforms(f);
-		ReaderParser p = new UonParser().addTransforms(f);
-		doTest(s, p, true, "1901-03-03T10:11:12-08:00");
-	}
-
-	//====================================================================================================
-	// testISO8601DTUrlParam - DEFAULT_ISO8601DT, URL-ENCODING
-	//====================================================================================================
-	@Test
-	public void testISO8601DTUrlEncoding() throws Exception {
-		Class<?> f = CalendarTransform.ISO8601DT.class;
-		WriterSerializer s = new UrlEncodingSerializer().addTransforms(f);
-		ReaderParser p = new UrlEncodingParser().addTransforms(f);
-		doTest(s, p, true, "_value=1901-03-03T10:11:12-08:00");
-	}
-
-	//====================================================================================================
-	// testISO8601DTRdfXml - DEFAULT_ISO8601DT, RDF/XML
-	//====================================================================================================
-	@Test
-	public void testISO8601DTRdfXml() throws Exception {
-		Class<?> f = CalendarTransform.ISO8601DT.class;
-		WriterSerializer s = getRdfSerializer().addTransforms(f);
-		ReaderParser p = new RdfParser.Xml().addTransforms(f);
-		doTest(s, p, true, "<rdf:Description><j:value>1901-03-03T10:11:12-08:00</j:value></rdf:Description>");
-	}
-
-	//====================================================================================================
-	// testRFC2822DTJson - DEFAULT_RFC2822DT, JSON
-	//====================================================================================================
-	@Test
-	public void testRFC2822DTJson() throws Exception {
-		Class<?> f = CalendarTransform.RFC2822DTZ.class;
-		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
-		ReaderParser p = new JsonParser().addTransforms(f);
-		doTest(s, p, true, "'Sun, 03 Mar 1901 18:11:12 GMT'");
-	}
-
-	//====================================================================================================
-	// testRFC2822DTXml - DEFAULT_RFC2822DT, XML
-	//====================================================================================================
-	@Test
-	public void testRFC2822DTXml() throws Exception {
-		Class<?> f = CalendarTransform.RFC2822DTZ.class;
-		WriterSerializer s = new XmlSerializer.SimpleSq().addTransforms(f);
-		ReaderParser p = new XmlParser().addTransforms(f);
-		doTest(s, p, true, "<string>Sun, 03 Mar 1901 18:11:12 GMT</string>");
-	}
-
-	//====================================================================================================
-	// testRFC2822DTHtml - DEFAULT_RFC2822DT, HTML
-	//====================================================================================================
-	@Test
-	public void testRFC2822DTHtml() throws Exception {
-		Class<?> f = CalendarTransform.RFC2822DTZ.class;
-		WriterSerializer s = new HtmlSerializer().addTransforms(f);
-		ReaderParser p = new HtmlParser().addTransforms(f);
-		doTest(s, p, true, "<string>Sun, 03 Mar 1901 18:11:12 GMT</string>");
-	}
-
-	//====================================================================================================
-	// testRFC2822DTUrlParam - DEFAULT_RFC2822DT, UON
-	//====================================================================================================
-	@Test
-	public void testRFC2822DTUon() throws Exception {
-		Class<?> f = CalendarTransform.RFC2822DTZ.class;
-		WriterSerializer s = new UonSerializer.Encoding().addTransforms(f);
-		ReaderParser p = UonParser.DEFAULT_DECODING.clone().addTransforms(f);
-		doTest(s, p, true, "Sun,+03+Mar+1901+18:11:12+GMT");
-	}
-
-	//====================================================================================================
-	// testRFC2822DTUrlParam - DEFAULT_RFC2822DT, URL-ENCODING
-	//====================================================================================================
-	@Test
-	public void testRFC2822DTUrlEncoding() throws Exception {
-		Class<?> f = CalendarTransform.RFC2822DTZ.class;
-		WriterSerializer s = new UrlEncodingSerializer().addTransforms(f);
-		ReaderParser p = UrlEncodingParser.DEFAULT.clone().addTransforms(f);
-		doTest(s, p, true, "_value=Sun,+03+Mar+1901+18:11:12+GMT");
-	}
-
-	//====================================================================================================
-	// testRFC2822DTRdfXml - DEFAULT_RFC2822DT, RDF/XML
-	//====================================================================================================
-	@Test
-	public void testRFC2822DTRdfXml() throws Exception {
-		Class<?> f = CalendarTransform.RFC2822DTZ.class;
-		WriterSerializer s = getRdfSerializer().addTransforms(f);
-		ReaderParser p = new RdfParser.Xml().addTransforms(f);
-		doTest(s, p, true, "<rdf:Description><j:value>Sun, 03 Mar 1901 18:11:12 GMT</j:value></rdf:Description>");
-	}
-
-	//====================================================================================================
-	// testDefaultLongJson - DEFAULT_LONG, JSON
-	//====================================================================================================
-	@Test
-	public void testDefaultLongJson() throws Exception {
-		Class<?> f = CalendarLongTransform.class;
-		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
-		ReaderParser p = new JsonParser().addTransforms(f);
-		doTest(s, p, true, "-2172116928000");
-	}
-
-	//====================================================================================================
-	// testDefaultLongXml - DEFAULT_LONG, XML
-	//====================================================================================================
-	@Test
-	public void testDefaultLongXml() throws Exception {
-		Class<?> f = CalendarLongTransform.class;
-		WriterSerializer s = new XmlSerializer.SimpleSq().addTransforms(f);
-		ReaderParser p = new XmlParser().addTransforms(f);
-		doTest(s, p, true, "<number>-2172116928000</number>");
-	}
-
-	//====================================================================================================
-	// testDefaultLongHtml - DEFAULT_LONG, HTML
-	//====================================================================================================
-	@Test
-	public void testDefaultLongHtml() throws Exception {
-		Class<?> f = CalendarLongTransform.class;
-		WriterSerializer s = new HtmlSerializer().addTransforms(f);
-		ReaderParser p = new HtmlParser().addTransforms(f);
-		doTest(s, p, true, "<number>-2172116928000</number>");
-	}
-
-	//====================================================================================================
-	// testDefaultLongUrlParam - DEFAULT_LONG, UON
-	//====================================================================================================
-	@Test
-	public void testDefaultLongUon() throws Exception {
-		Class<?> f = CalendarLongTransform.class;
-		WriterSerializer s = UonSerializer.DEFAULT_SIMPLE.clone().addTransforms(f);
-		ReaderParser p = new UonParser().addTransforms(f);
-		doTest(s, p, true, "-2172116928000");
-	}
-
-	//====================================================================================================
-	// testDefaultLongUrlParam - DEFAULT_LONG, URL-ENCODING
-	//====================================================================================================
-	@Test
-	public void testDefaultLongUrlEncoding() throws Exception {
-		Class<?> f = CalendarLongTransform.class;
-		WriterSerializer s = UrlEncodingSerializer.DEFAULT_SIMPLE.clone().addTransforms(f);
-		ReaderParser p = new UrlEncodingParser().addTransforms(f);
-		doTest(s, p, true, "_value=-2172116928000");
-	}
-
-	//====================================================================================================
-	// testDefaultLongRdfXml - DEFAULT_LONG, RDF/XML
-	//====================================================================================================
-	@Test
-	public void testDefaultLongRdfXml() throws Exception {
-		Class<?> f = CalendarLongTransform.class;
-		WriterSerializer s = getRdfSerializer().addTransforms(f);
-		ReaderParser p = new RdfParser.Xml().addTransforms(f);
-		doTest(s, p, true, "<rdf:Description><j:value>-2172116928000</j:value></rdf:Description>");
-	}
-
-	//====================================================================================================
-	// testDefaultMapJson - DEFAULT_MAP, JSON
-	//====================================================================================================
-	@Test
-	public void testDefaultMapJson() throws Exception {
-		Class<?> f = CalendarMapTransform.class;
-		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
-		ReaderParser p = new JsonParser().addTransforms(f);
-		doTest(s, p, true, "{time:-2172116928000,timeZone:'PST'}");
-	}
-
-	//====================================================================================================
-	// testDefaultMapXml - DEFAULT_MAP, XML
-	//====================================================================================================
-	@Test
-	public void testDefaultMapXml() throws Exception {
-		Class<?> f = CalendarMapTransform.class;
-		WriterSerializer s = new XmlSerializer.SimpleXmlJsonSq().addTransforms(f);
-		ReaderParser p = new XmlParser().addTransforms(f);
-		doTest(s, p, true, "<object><time type='number'>-2172116928000</time><timeZone>PST</timeZone></object>");
-	}
-
-	//====================================================================================================
-	// testDefaultMapHtml - DEFAULT_MAP, HTML
-	//====================================================================================================
-	@Test
-	public void testDefaultMapHtml() throws Exception {
-		Class<?> f = CalendarMapTransform.class;
-		WriterSerializer s = new HtmlSerializer.Sq().addTransforms(f);
-		ReaderParser p = new HtmlParser().addTransforms(f);
-		doTest(s, p, true, "<table type='object'><tr><th><string>key</string></th><th><string>value</string></th></tr><tr><td><string>time</string></td><td><number>-2172116928000</number></td></tr><tr><td><string>timeZone</string></td><td><string>PST</string></td></tr></table>");
-	}
-
-	//====================================================================================================
-	// testDefaultMapUrlParam - DEFAULT_MAP, UON
-	//====================================================================================================
-	@Test
-	public void testDefaultMapUon() throws Exception {
-		Class<?> f = CalendarMapTransform.class;
-		WriterSerializer s = UonSerializer.DEFAULT_SIMPLE.clone().addTransforms(f);
-		ReaderParser p = new UonParser().addTransforms(f);
-		doTest(s, p, true, "(time=-2172116928000,timeZone=PST)");
-	}
-
-	//====================================================================================================
-	// testDefaultMapUrlParam - DEFAULT_MAP, URL-ENCODING
-	//====================================================================================================
-	@Test
-	public void testDefaultMapUrlEncoding() throws Exception {
-		Class<?> f = CalendarMapTransform.class;
-		WriterSerializer s = UrlEncodingSerializer.DEFAULT_SIMPLE.clone().addTransforms(f);
-		ReaderParser p = new UrlEncodingParser().addTransforms(f);
-		doTest(s, p, true, "time=-2172116928000&timeZone=PST");
-	}
-
-	//====================================================================================================
-	// testDefaultMapRdfXml - DEFAULT_MAP, RDF/XML
-	//====================================================================================================
-	@Test
-	public void testDefaultMapRdfXml() throws Exception {
-		Class<?> f = CalendarMapTransform.class;
-		WriterSerializer s = getRdfSerializer().addTransforms(f);
-		ReaderParser p = new RdfParser.Xml().addTransforms(f);
-		doTest(s, p, true, "<rdf:Description><jp:time>-2172116928000</jp:time><jp:timeZone>PST</jp:timeZone></rdf:Description>");
-	}
-
-	//====================================================================================================
-	// testDefaultMediumJson - DEFAULT_MEDIUM, JSON
-	//====================================================================================================
-	@Test
-	public void testDefaultMediumJson() throws Exception {
-		Class<?> f = CalendarTransform.Medium.class;
-		WriterSerializer s = new JsonSerializer.Simple().addTransforms(f);
-		ReaderParser p = new JsonParser().addTransforms(f);
-		doTest(s, p, false, "'Mar 3, 1901'");
-	}
-
-	//====================================================================================================
-	// testDefaultMediumXml - DEFAULT_MEDIUM, XML
-	//====================================================================================================
-	@Test
-	public void testDefaultMediumXml() throws Exception {
-		Class<?> f = CalendarTransform.Medium.class;
-		WriterSerializer s = new XmlSerializer.SimpleSq().addTransforms(f);
-		ReaderParser p = new XmlParser().addTransforms(f);
-		doTest(s, p, false, "<string>Mar 3, 1901</string>");
-	}
-
-	//====================================================================================================
-	// testDefaultMediumHtml - DEFAULT_MEDIUM, HTML
-	//====================================================================================================
-	@Test
-	public void testDefaultMediumHtml() throws Exception {
-		Class<?> f = CalendarTransform.Medium.class;
-		WriterSerializer s = new HtmlSerializer().addTransforms(f);
-		ReaderParser p = new HtmlParser().addTransforms(f);
-		doTest(s, p, false, "<string>Mar 3, 1901</string>");
-	}
-
-	//====================================================================================================
-	// testDefaultMediumUrlParam - DEFAULT_MEDIUM, UON
-	//====================================================================================================
-	@Test
-	public void testDefaultMediumUon() throws Exception {
-		Class<?> f = CalendarTransform.Medium.class;
-		WriterSerializer s = new UonSerializer.Encoding().addTransforms(f);
-		ReaderParser p = UonParser.DEFAULT_DECODING.clone().addTransforms(f);
-		doTest(s, p, false, "Mar+3,+1901");
-	}
-
-	//====================================================================================================
-	// testDefaultMediumUrlParam - DEFAULT_MEDIUM, URL-ENCODING
-	//====================================================================================================
-	@Test
-	public void testDefaultMediumUrlEncoding() throws Exception {
-		Class<?> f = CalendarTransform.Medium.class;
-		WriterSerializer s = new UrlEncodingSerializer().addTransforms(f);
-		ReaderParser p = UrlEncodingParser.DEFAULT.clone().addTransforms(f);
-		doTest(s, p, false, "_value=Mar+3,+1901");
-	}
-
-	//====================================================================================================
-	// testDefaultMediumRdfXml - DEFAULT_MEDIUM, RDF/XML
-	//====================================================================================================
-	@Test
-	public void testDefaultMediumRdfXml() throws Exception {
-		Class<?> f = CalendarTransform.Medium.class;
-		WriterSerializer s = getRdfSerializer().addTransforms(f);
-		ReaderParser p = new RdfParser.Xml().addTransforms(f);
-		doTest(s, p, false, "<rdf:Description><j:value>Mar 3, 1901</j:value></rdf:Description>");
-	}
-
-	//====================================================================================================
-	// Test 7a - BeanProperty.filter, JSON
-	//====================================================================================================
-	@Test
-	public void testBeanProperyFilterJson() throws Exception {
-		WriterSerializer s = JsonSerializer.DEFAULT_LAX;
-		ReaderParser p = JsonParser.DEFAULT;
-
-		Calendar c = testDate;
-		A t = new A(c);
-		String json = s.serialize(t);
-		assertEquals("{d1:'1901-03-03T18:11:12Z',d2:'Sun, 03 Mar 1901 18:11:12 GMT',d3:-2172116928000}", json);
-		t = p.parse(json, A.class);
-		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
-	}
-
-	//====================================================================================================
-	// Test 7b - BeanProperty.filter, XML
-	//====================================================================================================
-	@Test
-	public void testBeanProperyFilterXml() throws Exception {
-		WriterSerializer s = XmlSerializer.DEFAULT_SIMPLE_SQ;
-		ReaderParser p = XmlParser.DEFAULT;
-
-		Calendar c = testDate;
-		A t = new A(c);
-		String xml = s.serialize(t);
-		assertEquals("<object><d1>1901-03-03T18:11:12Z</d1><d2>Sun, 03 Mar 1901 18:11:12 GMT</d2><d3>-2172116928000</d3></object>", xml);
-		t = p.parse(xml, A.class);
-		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
-	}
-
-	//====================================================================================================
-	// Test 7c - BeanProperty.filter, HTML
-	//====================================================================================================
-	@Test
-	public void testBeanProperyFilterHtml() throws Exception {
-		WriterSerializer s = HtmlSerializer.DEFAULT_SQ;
-		ReaderParser p = HtmlParser.DEFAULT;
-
-		Calendar c = testDate;
-		A t = new A(c);
-		String html = s.serialize(t);
-		assertEquals("<table type='object'><tr><th><string>key</string></th><th><string>value</string></th></tr><tr><td><string>d1</string></td><td><string>1901-03-03T18:11:12Z</string></td></tr><tr><td><string>d2</string></td><td><string>Sun, 03 Mar 1901 18:11:12 GMT</string></td></tr><tr><td><string>d3</string></td><td><number>-2172116928000</number></td></tr></table>", html);
-		t = p.parse(html, A.class);
-		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
-	}
-
-	//====================================================================================================
-	// Test 7d - BeanProperty.filter, UON
-	//====================================================================================================
-	@Test
-	public void testBeanProperyFilterUon() throws Exception {
-		WriterSerializer s = UonSerializer.DEFAULT_SIMPLE_ENCODING;
-		ReaderParser p = UonParser.DEFAULT;
-		ReaderParser pe = UonParser.DEFAULT_DECODING;
-
-		Calendar c = testDate;
-		A t = new A(c);
-		String url = s.serialize(t);
-		assertEquals("(d1=1901-03-03T18:11:12Z,d2=Sun~,+03+Mar+1901+18:11:12+GMT,d3=-2172116928000)", url);
-		t = pe.parse(url, A.class);
-		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
-		url = URLDecoder.decode(url, "UTF-8");
-		t = p.parse(url, A.class);
-		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
-	}
-
-	//====================================================================================================
-	// Test 7d - BeanProperty.filter, URL-ENCODING
-	//====================================================================================================
-	@Test
-	public void testBeanProperyFilterUrlEncoding() throws Exception {
-		WriterSerializer s = UrlEncodingSerializer.DEFAULT_SIMPLE;
-		ReaderParser p = UrlEncodingParser.DEFAULT;
-
-		Calendar c = testDate;
-		A t = new A(c);
-		String url = s.serialize(t);
-		assertEquals("d1=1901-03-03T18:11:12Z&d2=Sun,+03+Mar+1901+18:11:12+GMT&d3=-2172116928000", url);
-		t = p.parse(url, A.class);
-		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
-		url = URLDecoder.decode(url, "UTF-8");
-		t = p.parse(url, A.class);
-		assertEquals(t.d1.getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD2().getTime().getTime(), c.getTime().getTime());
-		assertEquals(t.getD3().getTime().getTime(), c.getTime().getTime());
-	}
-
-	//====================================================================================================
-	// Test 7f - BeanProperty.filter, RDF/XML
-	//====================================================================================================
-	@Test
-	public void testBeanProperyFilterRdfXmlWithNs() throws Exception {
-		WriterSerializer s = getRdfSerializer();
-
-		Calendar c = testDate;
-		A t = new A(c);
-		String rdf = stripRdf(s.serialize(t));
-		assertEquals("<rdf:Description><jp:d1>1901-03-03T18:11:12Z</jp:d1><jp:d2>Sun, 03 Mar 1901 18:11:12 GMT</jp:d2><jp:d3>-2172116928000</jp:d3></rdf:Description>", rdf);
-	}
-
-	@Bean(sort=true)
-	public static class A {
-		@BeanProperty(transform=CalendarTransform.ISO8601DTZ.class)
-		public Calendar d1;
-		private Calendar d2, d3;
-		public A(Calendar date) {
-			d1 = d2 = d3 = date;
-		}
-
-		public A() {}
-
-		@BeanProperty(transform=CalendarTransform.RFC2822DTZ.class)
-		public Calendar getD2() {
-			return d2;
-		}
-		public void setD2(Calendar d2) {
-			this.d2 = d2;
-		}
-
-		public Calendar getD3() {
-			return d3;
-		}
-		@BeanProperty(transform=CalendarLongTransform.class)
-		public void setD3(Calendar d3) {
-			this.d3 = d3;
-		}
-	}
-
-	private void doTest(WriterSerializer s, ReaderParser p, boolean doTestTimeToo, String expected) throws Exception {
-		Calendar d;
-		String actual;
-
-		SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
-		sdf.setTimeZone(TimeZone.getTimeZone("PST"));
-		actual = s.serialize(testDate);
-		String a = (s instanceof RdfSerializer ? stripRdf(actual) : actual);
-		assertEquals(expected, a);
-		d = p.parse(actual, GregorianCalendar.class);
-		d.setTimeZone(TimeZone.getTimeZone("PST"));
-		assertEquals(1901, d.get(Calendar.YEAR));
-		assertEquals(2, d.get(Calendar.MONTH));
-//		assertEquals(3, d.get(Calendar.DATE));
-		if (doTestTimeToo) {
-			assertEquals(10, d.get(Calendar.HOUR));
-			assertEquals(11, d.get(Calendar.MINUTE));
-			assertEquals(12, d.get(Calendar.SECOND));
-		}
-	}
-}
\ No newline at end of file