You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by sc...@apache.org on 2008/01/03 17:27:00 UTC
svn commit: r608547 -
/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMOutputFormat.java
Author: scheu
Date: Thu Jan 3 08:26:59 2008
New Revision: 608547
URL: http://svn.apache.org/viewvc?rev=608547&view=rev
Log:
WSCOMMONS-287
Contributor:Rich Scheuerle
Add getProperty, setProperty, containsKey methods to OMOutputFormat. This will
make it easier to extend this class.
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMOutputFormat.java
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMOutputFormat.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMOutputFormat.java?rev=608547&r1=608546&r2=608547&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMOutputFormat.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMOutputFormat.java Thu Jan 3 08:26:59 2008
@@ -24,6 +24,8 @@
import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAP12Constants;
+import java.util.HashMap;
+
/**
* Formats options for OM Output.
@@ -49,8 +51,44 @@
private boolean ignoreXMLDeclaration = false;
private boolean autoCloseWriter = false;
+ HashMap map = null; // Map of generic properties
+
public OMOutputFormat() {
+ }
+
+ /**
+ * @param key String
+ * @return property or null
+ */
+ public Object getProperty(String key) {
+ if (map == null) {
+ return null;
+ }
+ return map.get(key);
+ }
+
+ /**
+ * @param key String
+ * @param value Object
+ * @return old value or null
+ */
+ public Object setProperty(String key, Object value) {
+ if (map == null) {
+ map = new HashMap();
+ }
+ return map.put(key, value);
+ }
+
+ /**
+ * @param key
+ * @return true if known key
+ */
+ public boolean containsKey(String key) {
+ if (map == null) {
+ return false;
+ }
+ return map.containsKey(key);
}
public boolean isOptimized() {
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org