public class Agency
{
private String agencyID;
private String agencyOther;
private String a_dtype;
private Element element;
public static final String AGENCYCODE_OTHER = "Other";
public static final String AGENCYCODE_COMMERCEONE = "CommerceOne";
public static final String AGENCYCODE_ISO = "ISO";
public static final String AGENCYCODE_EAN = "EAN";
public static final String AGENCYCODE_ASSIGNEDBYSUPPLIER = "AssignedBySupplier";
public static final String AGENCYCODE_ASSIGNEDBYBUYER = "AssignedByBuyer";
public static final String AGENCYCODE_ANSI = "ANSI";
public static final String AGENCYCODE_GBABA = "GBABA";
private static final String AGENCY_ATTRIBUTE_A_DTYPE="%Agency-Dtypes;";
/**
* Creates a Agency Element according to the outer element
*/
private void init()
{
this.element=new XMLElement("Agency");
agencyID = null;
agencyOther = null;
a_dtype = this.AGENCY_ATTRIBUTE_A_DTYPE;
}
/**
* Create an empty Agency element according to the buginfo.dtd
*/
public Agency()
{
//initialize the empty node
this.init();
}
/**
* convert this element to W3c Element format
*/
public Element getElement()
{
if(this.getAgencyID()!=null)
{
this.element.setAttribute("AgencyID",this.getAgencyID());
}
if(this.getAgencyOther()!=null)
{
this.element.setAttribute("AgencyOther",this.agencyOther);
}
if(this.getA_dtype()!=null)
{
this.element.setAttribute("a-dtype",this.a_dtype);
}
return this.element;
}
public void setAgencyID(String newAgencyID)
{
agencyID = newAgencyID;
}
public String getAgencyID()
{
return agencyID;
}
public void setAgencyOther(String newAgencyOther)
{
agencyOther = newAgencyOther;
}
public String getAgencyOther()
{
return agencyOther;
}