package pt.link.utils.xml;

import org.exolab.castor.xml.UnmarshalListener;

public class CustomUnmarshalListener implements UnmarshalListener {
	/* (non-Javadoc)
	 * @see org.exolab.castor.xml.UnmarshalListener#attributesProcessed(java.lang.Object)
	 */
	public void attributesProcessed(Object object) {
		// TODO Auto-generated method stub
		System.out.println("*");
		
	}

	/* (non-Javadoc)
	 * @see org.exolab.castor.xml.UnmarshalListener#fieldAdded(java.lang.String, java.lang.Object, java.lang.Object)
	 */
	public void fieldAdded(String fieldName, Object parent, Object child) {
		// TODO Auto-generated method stub
		//System.out.println("*" + fieldName +"," + parent.getClass().getName() + "," + child.getClass().getName());
		
		System.out.println(fieldName + " is " + child);
	}

	/* (non-Javadoc)
	 * @see org.exolab.castor.xml.UnmarshalListener#initialized(java.lang.Object)
	 */
	public void initialized(Object object) {
		// TODO Auto-generated method stub
		System.out.println("*" + object.getClass().getName()+ "*");
	}

	/* (non-Javadoc)
	 * @see org.exolab.castor.xml.UnmarshalListener#unmarshalled(java.lang.Object)
	 */
	public void unmarshalled(Object object) {
		System.out.println("listener" + this.getClass().getName() + ":" + object.getClass().getName());
		//throw new RuntimeException("");
	}

}
