org.apache.abdera.ext.serializer
Class BaseSerializer

java.lang.Object
  extended by org.apache.abdera.ext.serializer.Serializer
      extended by org.apache.abdera.ext.serializer.BaseSerializer
Direct Known Subclasses:
ElementSerializer, FOMSerializer

public abstract class BaseSerializer
extends Serializer


Field Summary
static String DEFAULT
           
 
Constructor Summary
BaseSerializer()
           
 
Method Summary
static Object eval(AccessibleObject accessor, Object parent)
           
protected abstract  void finish(Object source, ObjectContext objectContext, SerializationContext context, Conventions conventions)
           
protected static QName getQName(AccessibleObject accessor)
           
protected static QName getQName(Attribute attribute)
           
protected static QName getQName(Extension extension)
           
protected  boolean hasAnnotation(AnnotatedElement item, Class<? extends Annotation> annotation)
           
protected abstract  void init(Object source, ObjectContext objectContext, SerializationContext context, Conventions conventions)
           
protected static boolean isUndefined(String value)
           
protected  void process(Object source, ObjectContext objectContext, SerializationContext context, Conventions conventions)
           
 void serialize(Object source, ObjectContext objectContext, SerializationContext context)
          Serializes the given object to the specified writer
static Object[] toArray(Object value)
           
static String toString(Object value)
           
protected  void writeAttributes(Object source, ObjectContext objectContext, SerializationContext context, Conventions conventions)
           
protected  void writeCommon(Object source, ObjectContext objectContext, SerializationContext context, Conventions conventions)
           
protected  boolean writeElement(Class<? extends Annotation> annotation, Serializer serializer, Object source, ObjectContext objectContext, SerializationContext context, Conventions conventions)
           
protected  void writeElement(StreamWriter sw, QName qname, String value)
           
protected  void writeElements(Class<? extends Annotation> annotation, Serializer serializer, Object source, ObjectContext objectContext, SerializationContext context, Conventions conventions)
           
protected  void writeExtensions(Object source, ObjectContext objectContext, SerializationContext context, Conventions conventions)
           
protected  void writeTextValue(Object source, ObjectContext objectContext, SerializationContext context, Conventions conventions)
           
 
Methods inherited from class org.apache.abdera.ext.serializer.Serializer
serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final String DEFAULT
See Also:
Constant Field Values
Constructor Detail

BaseSerializer

public BaseSerializer()
Method Detail

init

protected abstract void init(Object source,
                             ObjectContext objectContext,
                             SerializationContext context,
                             Conventions conventions)

finish

protected abstract void finish(Object source,
                               ObjectContext objectContext,
                               SerializationContext context,
                               Conventions conventions)

process

protected void process(Object source,
                       ObjectContext objectContext,
                       SerializationContext context,
                       Conventions conventions)

serialize

public void serialize(Object source,
                      ObjectContext objectContext,
                      SerializationContext context)
Description copied from class: Serializer
Serializes the given object to the specified writer

Specified by:
serialize in class Serializer

writeTextValue

protected void writeTextValue(Object source,
                              ObjectContext objectContext,
                              SerializationContext context,
                              Conventions conventions)

writeExtensions

protected void writeExtensions(Object source,
                               ObjectContext objectContext,
                               SerializationContext context,
                               Conventions conventions)

writeAttributes

protected void writeAttributes(Object source,
                               ObjectContext objectContext,
                               SerializationContext context,
                               Conventions conventions)

writeElement

protected boolean writeElement(Class<? extends Annotation> annotation,
                               Serializer serializer,
                               Object source,
                               ObjectContext objectContext,
                               SerializationContext context,
                               Conventions conventions)

writeElements

protected void writeElements(Class<? extends Annotation> annotation,
                             Serializer serializer,
                             Object source,
                             ObjectContext objectContext,
                             SerializationContext context,
                             Conventions conventions)

eval

public static Object eval(AccessibleObject accessor,
                          Object parent)

hasAnnotation

protected boolean hasAnnotation(AnnotatedElement item,
                                Class<? extends Annotation> annotation)

writeElement

protected void writeElement(StreamWriter sw,
                            QName qname,
                            String value)

toString

public static String toString(Object value)

toArray

public static Object[] toArray(Object value)

isUndefined

protected static boolean isUndefined(String value)

getQName

protected static QName getQName(AccessibleObject accessor)

getQName

protected static QName getQName(Extension extension)

getQName

protected static QName getQName(Attribute attribute)

writeCommon

protected void writeCommon(Object source,
                           ObjectContext objectContext,
                           SerializationContext context,
                           Conventions conventions)


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.