org.openanzo.atom.json
Class JSONWriter
java.lang.Object
org.apache.abdera.util.AbstractNamedWriter
org.openanzo.atom.json.JSONWriter
- All Implemented Interfaces:
- org.apache.abdera.writer.NamedWriter, org.apache.abdera.writer.Writer
public class JSONWriter
- extends org.apache.abdera.util.AbstractNamedWriter
- implements org.apache.abdera.writer.NamedWriter
NOTE: This class is being used temporarily as we wait for this
class in the Apache Abdera project to be fixed. This class was
written by Elias Torres while he was still in the Adtech group over
the summer of 2006.
- Author:
- Elias Torres (eliast@us.ibm.com)
|
Field Summary |
static java.lang.String[] |
FORMATS
|
static java.lang.String |
NAME
|
|
Method Summary |
java.lang.String |
getName()
|
static org.json.JSONObject |
toJSON(org.apache.abdera.model.Entry entry)
|
static org.json.JSONObject |
toJSON(org.apache.abdera.model.Feed feed)
|
static java.lang.Object |
toJSON(java.lang.Object object)
|
static org.json.JSONObject |
toJSON(org.apache.abdera.model.Service service)
|
java.lang.Object |
write(org.apache.abdera.model.Base base)
|
void |
writeTo(org.apache.abdera.model.Base base,
java.io.OutputStream out)
|
void |
writeTo(org.apache.abdera.model.Base base,
java.io.Writer out)
|
| Methods inherited from class org.apache.abdera.util.AbstractNamedWriter |
getOutputFormats, outputsFormat |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.abdera.writer.NamedWriter |
getOutputFormats, outputsFormat |
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
FORMATS
public static final java.lang.String[] FORMATS
JSONWriter
public JSONWriter()
getName
public java.lang.String getName()
- Specified by:
getName in interface org.apache.abdera.writer.NamedWriter- Overrides:
getName in class org.apache.abdera.util.AbstractNamedWriter
write
public java.lang.Object write(org.apache.abdera.model.Base base)
throws java.io.IOException
- Specified by:
write in interface org.apache.abdera.writer.Writer
- Throws:
java.io.IOException
writeTo
public void writeTo(org.apache.abdera.model.Base base,
java.io.OutputStream out)
throws java.io.IOException
- Specified by:
writeTo in interface org.apache.abdera.writer.Writer
- Throws:
java.io.IOException
writeTo
public void writeTo(org.apache.abdera.model.Base base,
java.io.Writer out)
throws java.io.IOException
- Specified by:
writeTo in interface org.apache.abdera.writer.Writer
- Throws:
java.io.IOException
toJSON
public static java.lang.Object toJSON(java.lang.Object object)
throws java.lang.Exception
- Throws:
java.lang.Exception
toJSON
public static org.json.JSONObject toJSON(org.apache.abdera.model.Entry entry)
throws java.lang.Exception
- Throws:
java.lang.Exception
toJSON
public static org.json.JSONObject toJSON(org.apache.abdera.model.Feed feed)
throws java.lang.Exception
- Throws:
java.lang.Exception
toJSON
public static org.json.JSONObject toJSON(org.apache.abdera.model.Service service)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.