/*
   * (non-Javadoc)
   *
   * @see com.csc.muthur.server.model.event.AbstractEvent#getDataBlockElement()
   */
  public Element getDataBlockElement() {

    Element dataBlockElement = new Element(EventAttributeName.dataBlock.toString());

    if (dataObject != null) {

      Element dataObjectAsXMLElement = new Element(EventAttributeName.dataObjectAsXML.toString());

      dataBlockElement.addContent(dataObjectAsXMLElement);

      // let the sub-class add the specific data elements for that class
      //

      dataObject.buildDataObjectAsXMLElement(dataObjectAsXMLElement);
    }

    Element nextEle =
        new Element(EventAttributeName.dataType.toString()).setText(dataType.toString());

    dataBlockElement.addContent(nextEle);

    nextEle =
        new Element(EventAttributeName.federationExecutionModelHandle.toString())
            .setText(getFederationExecutionModelHandle());

    dataBlockElement.addContent(nextEle);

    return dataBlockElement;
  }
 /*
  * (non-Javadoc)
  *
  * @see java.lang.Object#hashCode()
  */
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = super.hashCode();
   result = prime * result + ((dataObject == null) ? 0 : dataObject.hashCode());
   result = prime * result + ((dataType == null) ? 0 : dataType.hashCode());
   result =
       prime * result
           + ((getFederationExecutionModelHandle() == null)
               ? 0
               : getFederationExecutionModelHandle().hashCode());
   return result;
 }
  /*
   * (non-Javadoc)
   *
   * @see
   * com.csc.muthur.server.model.event.AbstractEvent#newElement(java.lang.String
   * , java.lang.String)
   */
  @Override
  public void newElement(String elementName, String elementValue) {

    if ((elementValue != null) && (elementValue.length() > 0)) {

      if (elementName.equalsIgnoreCase(EventAttributeName.dataType.toString())) {
        dataType = DataTypeEnum.valueOf(elementValue);
      } else if (elementName.equalsIgnoreCase(
          EventAttributeName.federationExecutionModelHandle.toString())) {
        setFederationExecutionModelHandle(elementValue);
      }
    }
  }
 /*
  * (non-Javadoc)
  *
  * @see java.lang.Object#equals(java.lang.Object)
  */
 @Override
 public boolean equals(Object obj) {
   if (this == obj) {
     return true;
   }
   if (!super.equals(obj)) {
     return false;
   }
   if (getClass() != obj.getClass()) {
     return false;
   }
   UpdateObjectRequest other = (UpdateObjectRequest) obj;
   if (dataObject == null) {
     if (other.dataObject != null) {
       return false;
     }
   } else if (!dataObject.equals(other.dataObject)) {
     return false;
   }
   if (dataType == null) {
     if (other.dataType != null) {
       return false;
     }
   } else if (!dataType.equals(other.dataType)) {
     return false;
   }
   if (getFederationExecutionModelHandle() == null) {
     if (other.getFederationExecutionModelHandle() != null) {
       return false;
     }
   } else if (!getFederationExecutionModelHandle()
       .equals(other.getFederationExecutionModelHandle())) {
     return false;
   }
   return true;
 }