jadex.xml.writer.IObjectWriterHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-serialization-xml Show documentation
Show all versions of jadex-serialization-xml Show documentation
Jadex XML is an XML data binding framework for Java and also for other representations. The main idea of Jadex XML is that neither the XML-Schema on the one side nor the Java classes on the other side should define other binding. Instead, a separate mapping between both is used as a mediation. This allows designing the XML representation independent of the Java side but still being able to connect both as desired.
This idea was first put forward by the JiBX data binding framework. Jadex XML pushes it further by combining it with the configuration by exception principle. The framework can detect obvious correspondences between both sides automatically and only needs configuration information when translations are necessary. The configuration information is currently specified directly in form of Java configuration classes.
package jadex.xml.writer;
import jadex.xml.IContext;
import jadex.xml.IPreProcessor;
import jadex.xml.TypeInfo;
import jadex.xml.stax.QName;
/**
* Interface for an object writer handler.
* Has the task to generate write information for an object.
*/
public interface IObjectWriterHandler
{
/**
* Get the most specific mapping info.
* @param tag The tag.
* @param fullpath The full path.
* @return The most specific mapping info.
*/
public TypeInfo getTypeInfo(Object object, QName[] fullpath, IContext context);
/**
* Get the tag name for an object.
*/
public QName getTagName(Object object, IContext context);
/**
* Get the tag with namespace.
*/
public QName getTagWithPrefix(QName tag, IContext context);
/**
* Get all subobjects of an object.
* @param object The object.
* @param typeinfo The Typeinfo.
*/
public WriteObjectInfo getObjectWriteInfo(Object object, TypeInfo typeinfo, IContext context) throws Exception;
/**
* Get the pre-processor.
* @return The pre-processor
*/
public IPreProcessor[] getPreProcessors(Object object, Object typeinfo);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy