juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [1/7] incubator-juneau git commit: Tweak new name 'Transform' into 'BeanFilter' and 'PojoSwap'
Date Sat, 27 Aug 2016 14:14:44 GMT
Repository: incubator-juneau
Updated Branches:
  refs/heads/master a6ba7804f -> ee27361d8


http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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/ee27361d/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(); 
 						} 
 					} 


Mime
View raw message