at.ac.tuwien.infosys.sm4all.copal.api.event.xml.publisher
Class SourceID

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.event.xml.RequiredAttributeUnmarshaller<String>
      extended by at.ac.tuwien.infosys.sm4all.copal.api.event.xml.publisher.SourceID
All Implemented Interfaces:
Marshaller<ContextPublisher>, Unmarshaller<String>

public class SourceID
extends RequiredAttributeUnmarshaller<String>
implements Marshaller<ContextPublisher>

Command that marshalls and unmarshalls source ID of a ContextPublisher into/from an Element.

Author:
sanjin

Constructor Summary
SourceID(Element element)
          Creates instance of ContextPublisher source ID marshaller and unmarshaller which uses specified Element to marshal and/or unmarshal the source ID.
 
Method Summary
 void marshal(ContextPublisher publisher)
          Sets the sourceID attribute of specified Element to source ID of specified ContextPublisher.
protected  String valueOf(String value)
          Converts specified String value of the required attribute to desired class.
 
Methods inherited from class at.ac.tuwien.infosys.sm4all.copal.api.event.xml.RequiredAttributeUnmarshaller
unmarshal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceID

public SourceID(Element element)
Creates instance of ContextPublisher source ID marshaller and unmarshaller which uses specified Element to marshal and/or unmarshal the source ID.

Parameters:
element - the Element used for marshalling and unmarshalling.
Throws:
NullPointerException - if specified Element is null.
Method Detail

valueOf

protected String valueOf(String value)
Description copied from class: RequiredAttributeUnmarshaller
Converts specified String value of the required attribute to desired class.

Specified by:
valueOf in class RequiredAttributeUnmarshaller<String>
Parameters:
value - the String value of the required attribute.
Returns:
the required attribute as instance of the desired class.

marshal

public void marshal(ContextPublisher publisher)
Sets the sourceID attribute of specified Element to source ID of specified ContextPublisher.

Specified by:
marshal in interface Marshaller<ContextPublisher>
Parameters:
publisher - the ContextPublisher.
Throws:
NullPointerException - if specified ContextPublisher is null.


Copyright © 2010 Distributed Systems Group, Vienna University of Technology. All Rights Reserved.