package
com.example.product.catalog;
import
java.util.ArrayList;
import
java.util.List;
import
javax.xml.bind.annotation.XmlAccessType;
import
javax.xml.bind.annotation.XmlAccessorType;
import
javax.xml.bind.annotation.XmlAttribute;
import
javax.xml.bind.annotation.XmlElement;
import
javax.xml.bind.annotation.XmlRootElement;
import
javax.xml.bind.annotation.XmlType;
import
javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import
javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
import
javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
*
*/
@XmlAccessorType
(XmlAccessType.FIELD)
@XmlType
(name =
""
, propOrder = {
"specifications"
,
"options"
,
"price"
,
"notes"
})
@XmlRootElement
(name =
"PRODUCT"
)
public
class
PRODUCT {
@XmlAttribute
(name =
"NAME"
)
@XmlJavaTypeAdapter
(NormalizedStringAdapter.
class
)
protected
String name;
@XmlAttribute
(name =
"CATEGORY"
)
@XmlJavaTypeAdapter
(CollapsedStringAdapter.
class
)
protected
String category;
@XmlAttribute
(name =
"PARTNUM"
)
@XmlJavaTypeAdapter
(NormalizedStringAdapter.
class
)
protected
String partnum;
@XmlAttribute
(name =
"PLANT"
)
@XmlJavaTypeAdapter
(CollapsedStringAdapter.
class
)
protected
String plant;
@XmlAttribute
(name =
"INVENTORY"
)
@XmlJavaTypeAdapter
(CollapsedStringAdapter.
class
)
protected
String inventory;
@XmlElement
(name =
"SPECIFICATIONS"
, required =
true
)
protected
List<SPECIFICATIONS> specifications;
@XmlElement
(name =
"OPTIONS"
)
protected
OPTIONS options;
@XmlElement
(name =
"PRICE"
, required =
true
)
protected
List<PRICE> price;
@XmlElement
(name =
"NOTES"
)
protected
String notes;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public
String getNAME() {
return
name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public
void
setNAME(String value) {
this
.name = value;
}
/**
* Gets the value of the category property.
*
* @return
* possible object is
* {@link String }
*
*/
public
String getCATEGORY() {
if
(category ==
null
) {
return
"HandTool"
;
}
else
{
return
category;
}
}
/**
* Sets the value of the category property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public
void
setCATEGORY(String value) {
this
.category = value;
}
/**
* Gets the value of the partnum property.
*
* @return
* possible object is
* {@link String }
*
*/
public
String getPARTNUM() {
return
partnum;
}
/**
* Sets the value of the partnum property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public
void
setPARTNUM(String value) {
this
.partnum = value;
}
/**
* Gets the value of the plant property.
*
* @return
* possible object is
* {@link String }
*
*/
public
String getPLANT() {
if
(plant ==
null
) {
return
"Chicago"
;
}
else
{
return
plant;
}
}
/**
* Sets the value of the plant property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public
void
setPLANT(String value) {
this
.plant = value;
}
/**
* Gets the value of the inventory property.
*
* @return
* possible object is
* {@link String }
*
*/
public
String getINVENTORY() {
if
(inventory ==
null
) {
return
"InStock"
;
}
else
{
return
inventory;
}
}
/**
* Sets the value of the inventory property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public
void
setINVENTORY(String value) {
this
.inventory = value;
}
/**
* Gets the value of the specifications property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the specifications property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSPECIFICATIONS().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SPECIFICATIONS }
*
*
*/
public
List<SPECIFICATIONS> getSPECIFICATIONS() {
if
(specifications ==
null
) {
specifications =
new
ArrayList<SPECIFICATIONS>();
}
return
this
.specifications;
}
/**
* Gets the value of the options property.
*
* @return
* possible object is
* {@link OPTIONS }
*
*/
public
OPTIONS getOPTIONS() {
return
options;
}
/**
* Sets the value of the options property.
*
* @param value
* allowed object is
* {@link OPTIONS }
*
*/
public
void
setOPTIONS(OPTIONS value) {
this
.options = value;
}
/**
* Gets the value of the price property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the price property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getPRICE().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link PRICE }
*
*
*/
public
List<PRICE> getPRICE() {
if
(price ==
null
) {
price =
new
ArrayList<PRICE>();
}
return
this
.price;
}
/**
* Gets the value of the notes property.
*
* @return
* possible object is
* {@link String }
*
*/
public
String getNOTES() {
return
notes;
}
/**
* Sets the value of the notes property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public
void
setNOTES(String value) {
this
.notes = value;
}
}