jadex.xml.bean.BeanAccessInfo 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.bean;
/**
* Java bean attribute meta information.
*/
public class BeanAccessInfo
{
//-------- attributes --------
/** The field/method for the read process for writing a value in the read process. */
protected Object storehelp;
/** The write field/method for reading a Java value in the write process. */
protected Object fetchhelp;
/** The map name (if it should be put in map). */
protected String mapname; // todo: exploit also for writing?!
/** The getter method for getting the key for a map access (if not supplied the xmlname will be used). */
protected Object keyhelp;
/** The key source. */
protected boolean keyfromparent;
//-------- constructors --------
/**
* Create a new bean access info.
*/
public BeanAccessInfo(String mapname)
{
this(null, null, mapname, null);
}
/**
* Create a new bean access info.
*/
public BeanAccessInfo(Object storehelp, Object fetchhelp)
{
this(storehelp, fetchhelp, null, null);
}
/**
* Create a new bean access info.
*/
public BeanAccessInfo(Object storehelp, Object fetchhelp, String mapname, Object keyhelp)
{
this(storehelp, fetchhelp, mapname, keyhelp, false);
}
/**
* Create a new bean access info.
*/
public BeanAccessInfo(Object storehelp, Object fetchhelp, String mapname, Object keyhelp, boolean keyfromparent)
{
this.storehelp = storehelp;
this.fetchhelp = fetchhelp;
this.mapname = mapname;
this.keyhelp = keyhelp;
this.keyfromparent = keyfromparent;
}
//-------- methods --------
/**
* Get the storehelp.
* @return The storehelp.
*/
public Object getStoreHelp()
{
return this.storehelp;
}
/**
* Get the fetchhelp.
* @return The fetchhelp.
*/
public Object getFetchHelp()
{
return this.fetchhelp;
}
/**
* Set the map name.
* For attributes that should be mapped to a map.
* @return The mapname.
*/
public String getMapName()
{
return this.mapname;
}
/**
* Get the keyhelp.
* @return The keyhelp.
*/
public Object getKeyHelp()
{
return this.keyhelp;
}
/**
* Get the keyfromparent.
* @return The keyfromparent.
*/
public boolean isKeyFromParent()
{
return this.keyfromparent;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy