コード例 #1
0
  /** {@inheritDoc} */
  protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
      throws UnmarshallingException {
    RetrievalMethod rm = (RetrievalMethod) parentXMLObject;

    if (childXMLObject instanceof Transforms) {
      rm.setTransforms((Transforms) childXMLObject);
    } else {
      super.processChildElement(parentXMLObject, childXMLObject);
    }
  }
コード例 #2
0
  /** {@inheritDoc} */
  protected void processAttribute(XMLObject xmlObject, Attr attribute)
      throws UnmarshallingException {
    RetrievalMethod rm = (RetrievalMethod) xmlObject;

    if (attribute.getLocalName().equals(RetrievalMethod.URI_ATTRIB_NAME)) {
      rm.setURI(attribute.getValue());
    } else if (attribute.getLocalName().equals(RetrievalMethod.TYPE_ATTRIB_NAME)) {
      rm.setType(attribute.getValue());
    } else {
      super.processAttribute(xmlObject, attribute);
    }
  }