All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jadex.xml.SubobjectInfo Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 3.0.117
Show newest version
package jadex.xml;


/**
 *  Info object for subobjects, i.e. objects that are contained in another object.
 */
public class SubobjectInfo extends AbstractInfo
{
	//-------- attributes --------
	
	/** The access info. */
	protected AccessInfo accessinfo;
	
	/** The subobject converter. */
	protected ISubObjectConverter converter;

	/** The multiplicity. */
	protected boolean multi;

	/** The object info (for writing). */
	protected ObjectInfo objectinfo;
	
	/** The flattening flag. */
	protected Boolean flattening;
	
	//-------- constructors --------
	
	/**
	 *  Create a new subobject info.
	 */
	public SubobjectInfo(XMLInfo xmlinfo, AccessInfo accessinfo)
	{
		this(xmlinfo, accessinfo, null);
	}
	
	/**
	 *  Create a new subobject info.
	 */
	public SubobjectInfo(XMLInfo xmlinfo, AccessInfo accessinfo, ISubObjectConverter converter)
	{
		this(xmlinfo, accessinfo, converter, false);
	}
	
	/**
	 *  Create a new subobject info.
	 */
	public SubobjectInfo(XMLInfo xmlinfo, AccessInfo accessinfo, ISubObjectConverter converter, boolean multi)
	{
		this(xmlinfo, accessinfo, converter, multi, null);
	}
	
	/**
	 *  Create a new subobject info.
	 */
	public SubobjectInfo(XMLInfo xmlinfo, AccessInfo accessinfo, ISubObjectConverter converter, boolean multi, ObjectInfo objectinfo)
	{
		this(xmlinfo, accessinfo, converter, multi, objectinfo, null);
	}
	
	/**
	 *  Create a new subobject info.
	 */
	public SubobjectInfo(XMLInfo xmlinfo, AccessInfo accessinfo, ISubObjectConverter converter, boolean multi, ObjectInfo objectinfo, Boolean flattening)
	{
		super(xmlinfo);
		this.accessinfo = accessinfo;
		this.converter = converter;
		this.multi = multi;
		this.objectinfo = objectinfo;
		this.flattening = flattening;
	}
	
	/**
	 *  Create a new subobject info.
	 */
	public SubobjectInfo(AccessInfo accessinfo)
	{
		this(accessinfo, null);
	}
	
	/**
	 *  Create a new subobject info.
	 */
	public SubobjectInfo(AccessInfo accessinfo, ISubObjectConverter converter)
	{
		this(accessinfo, converter, false);
	}
	
	/**
	 *  Create a new subobject info.
	 */
	public SubobjectInfo(AccessInfo accessinfo, ISubObjectConverter converter, boolean multi)
	{
		this(accessinfo, converter, multi, null);
	}
	
	/**
	 *  Create a new subobject info.
	 */
	public SubobjectInfo(AccessInfo accessinfo, ISubObjectConverter converter, boolean multi, ObjectInfo objectinfo)
	{
		this(new XMLInfo(accessinfo.getXmlObjectNames()), accessinfo, converter, multi, objectinfo);
	}
	
	/**
	 *  Create a new subobject info.
	 */
	public SubobjectInfo(AccessInfo accessinfo, ISubObjectConverter converter, boolean multi, ObjectInfo objectinfo, Boolean flattening)
	{
		this(new XMLInfo(accessinfo.getXmlObjectNames()), accessinfo, converter, multi, objectinfo, flattening);
	}

	
	//-------- methods --------
	
	/**
	 *  Get the link info.
	 *  @return The link info.
	 */
	public AccessInfo getAccessInfo()
	{
		return this.accessinfo;
	}
	
	/**
	 *  Get the converter.
	 *  @return The converter.
	 */
	public ISubObjectConverter getConverter()
	{
		return this.converter;
	}

	/**
	 *  Test if it is a multi subobject.
	 *  @return True, if multi.
	 * /
	public Boolean getMulti()
	{
		return multi;
	}*/
	
	/**
	 *  Test if it is a multi subobject.
	 *  @return True, if multi.
	 */
	public boolean isMulti()
	{
		return multi;
	}
	
	/**
	 *  Get the objectinfo.
	 *  @return The objectinfo.
	 */
	public ObjectInfo getObjectInfo()
	{
		return this.objectinfo;
	}

	/**
	 *  Get the flattening.
	 *  @return The flattening.
	 */
	public Boolean getFlattening()
	{
		return this.flattening;
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy