de.unidu.is.annotation.rework.backend.proxy
Class AnnotationRequestMessage

java.lang.Object
  extended byde.unidu.is.annotation.rework.backend.proxy.AnnotationRequestMessage

public class AnnotationRequestMessage
extends java.lang.Object

AnnotationRequestMessage.java Tools to create and read annotation request messages

Author:
Marc Lechtenfeld

Field Summary
private static java.lang.String ARGUMENT_ELEMENT_NAME
          Element name of method arguments
private static java.lang.String LISTENERID_ELEMENT_NAME
          Element name of method arguments
static java.lang.String METHOD_addAnnotations
          Method name
static java.lang.String METHOD_addAnnotationType
          Method name
static java.lang.String METHOD_getAnnotation
          Method name
static java.lang.String METHOD_getAnnotationOntology
          Method name
static java.lang.String METHOD_getAnnotations
          Method name
static java.lang.String METHOD_getAnnotationsRdql
          Method name
static java.lang.String METHOD_getAnnotationThread
          Method name
static java.lang.String METHOD_indexAllAnnotations
          Method name
static java.lang.String METHOD_modifyAnnotations
          Method name
static java.lang.String METHOD_removeAnnotation
          Method name
static java.lang.String RESPONSE_ELEMENT_NAME
          Element name of the root element of the response message
private static java.lang.String RETURN_ELEMENT_NAME
          Name of the return value element
 
Constructor Summary
AnnotationRequestMessage()
           
 
Method Summary
static java.lang.String createRequestMessage(java.lang.String methodName, java.lang.String[] args, java.lang.String responseId)
          Creates a XML serialization with method name, arguments and listender id
static java.lang.String createResponseMessage(java.lang.String returnValue, java.lang.String responseId)
          Creates a response message with a result value
static java.lang.String getListenerId(org.w3c.dom.Document messageDoc)
          Returns the listener id
static java.lang.String getMethodArgument(org.w3c.dom.Document messageDoc, int paramIndex)
          Returns argument paramIndex of the method call
static java.lang.String getReturnValue(java.lang.String responseMessage)
          Returns the return-value in a response message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESPONSE_ELEMENT_NAME

public static final java.lang.String RESPONSE_ELEMENT_NAME
Element name of the root element of the response message

See Also:
Constant Field Values

ARGUMENT_ELEMENT_NAME

private static final java.lang.String ARGUMENT_ELEMENT_NAME
Element name of method arguments

See Also:
Constant Field Values

LISTENERID_ELEMENT_NAME

private static final java.lang.String LISTENERID_ELEMENT_NAME
Element name of method arguments

See Also:
Constant Field Values

RETURN_ELEMENT_NAME

private static final java.lang.String RETURN_ELEMENT_NAME
Name of the return value element

See Also:
Constant Field Values

METHOD_addAnnotations

public static final java.lang.String METHOD_addAnnotations
Method name

See Also:
Constant Field Values

METHOD_modifyAnnotations

public static final java.lang.String METHOD_modifyAnnotations
Method name

See Also:
Constant Field Values

METHOD_removeAnnotation

public static final java.lang.String METHOD_removeAnnotation
Method name

See Also:
Constant Field Values

METHOD_addAnnotationType

public static final java.lang.String METHOD_addAnnotationType
Method name

See Also:
Constant Field Values

METHOD_getAnnotation

public static final java.lang.String METHOD_getAnnotation
Method name

See Also:
Constant Field Values

METHOD_getAnnotationThread

public static final java.lang.String METHOD_getAnnotationThread
Method name

See Also:
Constant Field Values

METHOD_getAnnotations

public static final java.lang.String METHOD_getAnnotations
Method name

See Also:
Constant Field Values

METHOD_getAnnotationsRdql

public static final java.lang.String METHOD_getAnnotationsRdql
Method name

See Also:
Constant Field Values

METHOD_getAnnotationOntology

public static final java.lang.String METHOD_getAnnotationOntology
Method name

See Also:
Constant Field Values

METHOD_indexAllAnnotations

public static final java.lang.String METHOD_indexAllAnnotations
Method name

See Also:
Constant Field Values
Constructor Detail

AnnotationRequestMessage

public AnnotationRequestMessage()
Method Detail

createRequestMessage

public static java.lang.String createRequestMessage(java.lang.String methodName,
                                                    java.lang.String[] args,
                                                    java.lang.String responseId)
Creates a XML serialization with method name, arguments and listender id

Parameters:
methodName - Name of the method to call
args - Arguments of the method to call
Returns:
XML serialization

getMethodArgument

public static java.lang.String getMethodArgument(org.w3c.dom.Document messageDoc,
                                                 int paramIndex)
Returns argument paramIndex of the method call

Parameters:
messageDoc - Message
paramIndex - Argument index
Returns:
Argument

getListenerId

public static java.lang.String getListenerId(org.w3c.dom.Document messageDoc)
Returns the listener id

Parameters:
messageDoc - Document
Returns:
Listener id

createResponseMessage

public static java.lang.String createResponseMessage(java.lang.String returnValue,
                                                     java.lang.String responseId)
Creates a response message with a result value

Parameters:
returnValue - Response (Return value of the method)
Returns:
Message (XML serialization)

getReturnValue

public static java.lang.String getReturnValue(java.lang.String responseMessage)
Returns the return-value in a response message

Parameters:
responseMessage - XML serialization
Returns:
return-value
See Also:
#createRequestMessage(String, String[])