public class NdrRequest extends SimpleNdrRequest
NDRConnection
.
Builds the inputXML parameter that is sent as part a POST request.Modifier and Type | Field and Description |
---|---|
protected InputXML |
inputXML
NOT YET DOCUMENTED
|
protected NDRConstants.NDRObjectType |
objectType
NOT YET DOCUMENTED
|
protected java.lang.String |
payload |
handle, requestAgent, verb, verbose
Constructor and Description |
---|
NdrRequest()
Constructor for the NdrRequest object
|
NdrRequest(java.lang.String verb)
Constructor for the NdrRequest object with specified verb.
|
NdrRequest(java.lang.String verb,
java.lang.String handle)
Constructor for the NdrRequest object with specified verb and handle.
|
Modifier and Type | Method and Description |
---|---|
void |
addCommand(java.lang.String type,
org.dom4j.Element element)
Adds a command represented as an Element of the specified type.
|
void |
addCommand(java.lang.String type,
org.dom4j.Element element,
java.lang.String action)
Adds a command represented as an Element of the specified type and with the
specified action.
|
void |
addCommand(java.lang.String type,
java.lang.String prop,
java.lang.String value)
Adds a command specified as a prop and value pair of the specified type.
|
void |
addCommand(java.lang.String type,
java.lang.String prop,
java.lang.String value,
java.lang.String action)
Adds a command specified as a prop and value pair of the specified type and
action.
|
void |
addDataStreamCmd(java.lang.String format,
org.dom4j.Element content)
Adds a datastream command to the data component with given datastream of
specified format (e.g., "ndsl_dc");
|
void |
addDataStreamCmd(java.lang.String format,
org.dom4j.Element content,
java.lang.String action)
Adds a datastream command to the data component with given datastream of
specified format (e.g., "ndsl_dc");
|
void |
addDCStreamCmd(org.dom4j.Element oai_dc)
Adds a feature to the DCStreamCmd attribute of the NdrRequest object
|
void |
addDleseCommand(java.lang.String type,
java.lang.String prop,
java.lang.String value)
Adds a feature to the DleseCommand attribute of the NdrRequest object
|
void |
addDleseCommand(java.lang.String type,
java.lang.String prop,
java.lang.String value,
java.lang.String action)
Adds a feature to the DleseCommand attribute of the NdrRequest object
|
void |
addNativeDataStreamCmd(java.lang.String format,
org.dom4j.Element content) |
void |
addNativeDataStreamCmd(java.lang.String format,
org.dom4j.Element content,
java.lang.String action) |
void |
addNcsPropertyCmd(java.lang.String prop,
java.lang.String value)
Adds a property command with the specified property belonging to the dlese
namespace.
|
void |
addNcsPropertyCmd(java.lang.String prop,
java.lang.String value,
java.lang.String action)
Adds a property command with the specified property belonging to the dlese
namespace.
|
void |
addNcsRelationshipCmd(java.lang.String prop,
java.lang.String value)
Adds a feature to the NcsRelationshipCmd attribute of the NdrRequest object
|
void |
addNcsRelationshipCmd(java.lang.String prop,
java.lang.String value,
java.lang.String action)
Adds a property command with the specified property belonging to the dlese
namespace.
|
void |
addOaiVisibilityCmd(NDRConstants.OAIVisibilty visibility)
Adds a feature to the OaiVisibilityCmd attribute of the NdrRequest object
|
void |
addOaiVisibilityCmd(NDRConstants.OAIVisibilty visibility,
java.lang.String action)
Adds a feature to the OaiVisibilityCmd attribute of the NdrRequest object
|
void |
addQualifiedCommand(org.dom4j.Namespace namespace,
java.lang.String type,
java.lang.String prop,
java.lang.String value)
Adds a feature to the QualifiedCommand attribute of the NdrRequest object
|
void |
addQualifiedCommand(org.dom4j.Namespace namespace,
java.lang.String type,
java.lang.String prop,
java.lang.String value,
java.lang.String action)
Adds a feature to the QualifiedCommand attribute of the NdrRequest object
|
void |
addServiceDescriptionCmd(org.dom4j.Element content)
Adds a serviceDescription command to the data element.
|
void |
addServiceDescriptionCmd(org.dom4j.Element content,
java.lang.String action)
Adds a feature to the ServiceDescriptionCmd attribute of the NdrRequest
object
|
void |
addStateCmd(NDRConstants.ObjectState state)
Adds a feature to the StateCmd attribute of the NdrRequest object
|
void |
addStateCmd(NDRConstants.ObjectState state,
java.lang.String action)
Adds a feature to the StateCmd attribute of the NdrRequest object
|
protected InputXMLComponent |
getComponent(java.lang.String type)
Gets the component of specified type ("property", "data", "relationship"
from the InfoXML instance, if it exists.
|
InputXML |
getInputXML()
Gets the
inputXML attribute of the NdrRequest object, which stores
the commands for this request. |
protected NDRConnection |
getNDRConnection(java.lang.String path,
java.lang.String inputXMLStr)
Creates connection and adds payload in the form of inputXML parameter.
|
NDRConstants.NDRObjectType |
getObjectType()
Gets the objectType attribute of the NdrRequest object
|
protected java.lang.String |
getPayload()
A human readable representation of the XMLInput payload of the request.
|
void |
report(java.lang.String path)
NOT YET DOCUMENTED
|
void |
setDataInfoStream(java.lang.String format,
org.dom4j.Element info)
Sets the dataInfoStream attribute of the NdrRequest object
|
void |
setObjectType(NDRConstants.NDRObjectType objectType)
Sets the objectType attribute of the NdrRequest object
|
InfoXML |
submit()
NOT YET DOCUMENTED
|
InfoXML |
submit(java.lang.String inputXMLStr)
NOT YET DOCUMENTED
|
getDebug, getHandle, getNDRConnection, getRequestAgent, getVerb, getVerbose, makePath, pp, prtln, prtlnErr, report, setDebug, setHandle, setRequestAgent, setVerb, setVerbose
protected InputXML inputXML
protected NDRConstants.NDRObjectType objectType
protected java.lang.String payload
public NdrRequest()
public NdrRequest(java.lang.String verb)
verb
- NOT YET DOCUMENTEDpublic NdrRequest(java.lang.String verb, java.lang.String handle)
verb
- NOT YET DOCUMENTEDhandle
- NOT YET DOCUMENTEDpublic InputXML getInputXML()
inputXML
attribute of the NdrRequest object, which stores
the commands for this request.protected java.lang.String getPayload()
public void setObjectType(NDRConstants.NDRObjectType objectType)
objectType
- The new objectType valuepublic NDRConstants.NDRObjectType getObjectType()
protected InputXMLComponent getComponent(java.lang.String type) throws java.lang.Exception
type
- NOT YET DOCUMENTEDjava.lang.Exception
- If inputXML does not exist or the specified type is
unknownpublic void addCommand(java.lang.String type, org.dom4j.Element element)
type
- command type ("property", "relationship", or "data")element
- command represented as Element.public void addCommand(java.lang.String type, org.dom4j.Element element, java.lang.String action)
type
- The feature to be added to the Command attributeelement
- The feature to be added to the Command attributeaction
- specifies command action ("delete", "add")public void addCommand(java.lang.String type, java.lang.String prop, java.lang.String value)
type
- The feature to be added to the Command attributeprop
- The feature to be added to the Command attributevalue
- The feature to be added to the Command attributepublic void addCommand(java.lang.String type, java.lang.String prop, java.lang.String value, java.lang.String action)
type
- The feature to be added to the Command attributeprop
- The feature to be added to the Command attributevalue
- The feature to be added to the Command attributeaction
- The feature to be added to the Command attributepublic void addNcsPropertyCmd(java.lang.String prop, java.lang.String value)
prop
- The feature to be added to the NcsProperty attributevalue
- The feature to be added to the NcsProperty attributepublic void addNcsPropertyCmd(java.lang.String prop, java.lang.String value, java.lang.String action)
prop
- The feature to be added to the NcsProperty attributevalue
- The feature to be added to the NcsProperty attributeaction
- The feature to be added to the NcsProperty attributepublic void addNcsRelationshipCmd(java.lang.String prop, java.lang.String value)
prop
- The feature to be added to the NcsRelationshipCmd attributevalue
- The feature to be added to the NcsRelationshipCmd attributepublic void addNcsRelationshipCmd(java.lang.String prop, java.lang.String value, java.lang.String action)
prop
- The feature to be added to the NcsProperty attributevalue
- The feature to be added to the NcsProperty attributeaction
- The feature to be added to the NcsProperty attributepublic void addDleseCommand(java.lang.String type, java.lang.String prop, java.lang.String value)
type
- The feature to be added to the DleseCommand attributeprop
- The feature to be added to the DleseCommand attributevalue
- The feature to be added to the DleseCommand attributepublic void addDleseCommand(java.lang.String type, java.lang.String prop, java.lang.String value, java.lang.String action)
type
- The feature to be added to the DleseCommand attributeprop
- The feature to be added to the DleseCommand attributevalue
- The feature to be added to the DleseCommand attributeaction
- The feature to be added to the DleseCommand attributepublic void addQualifiedCommand(org.dom4j.Namespace namespace, java.lang.String type, java.lang.String prop, java.lang.String value)
namespace
- The feature to be added to the QualifiedCommand attributetype
- The feature to be added to the QualifiedCommand attributeprop
- The feature to be added to the QualifiedCommand attributevalue
- The feature to be added to the QualifiedCommand attributepublic void addQualifiedCommand(org.dom4j.Namespace namespace, java.lang.String type, java.lang.String prop, java.lang.String value, java.lang.String action)
namespace
- The feature to be added to the QualifiedCommand attributetype
- The feature to be added to the QualifiedCommand attributeprop
- The feature to be added to the QualifiedCommand attributevalue
- The feature to be added to the QualifiedCommand attributeaction
- The feature to be added to the QualifiedCommand attributepublic void addNativeDataStreamCmd(java.lang.String format, org.dom4j.Element content) throws java.lang.Exception
java.lang.Exception
public void addNativeDataStreamCmd(java.lang.String format, org.dom4j.Element content, java.lang.String action) throws java.lang.Exception
java.lang.Exception
public void addDataStreamCmd(java.lang.String format, org.dom4j.Element content) throws java.lang.Exception
format
- format of the datastreamcontent
- datastream represented as Elementjava.lang.Exception
- If inputXML does not exist or content element is nullpublic void addDataStreamCmd(java.lang.String format, org.dom4j.Element content, java.lang.String action) throws java.lang.Exception
format
- The feature to be added to the DataStreamCmd
attributecontent
- The feature to be added to the DataStreamCmd
attributeaction
- The feature to be added to the DataStreamCmd
attributejava.lang.Exception
- If inputXML does not exist or content element is nullpublic void setDataInfoStream(java.lang.String format, org.dom4j.Element info) throws java.lang.Exception
format
- The new dataInfoStream valueinfo
- The new dataInfoStream valuejava.lang.Exception
- NOT YET DOCUMENTEDpublic void addServiceDescriptionCmd(org.dom4j.Element content) throws java.lang.Exception
content
- ServiceDescription as Elementjava.lang.Exception
- if inputXML does not existpublic void addStateCmd(NDRConstants.ObjectState state)
state
- The feature to be added to the StateCmd attributepublic void addStateCmd(NDRConstants.ObjectState state, java.lang.String action)
state
- The feature to be added to the StateCmd attributeaction
- The feature to be added to the StateCmd attributepublic void addOaiVisibilityCmd(NDRConstants.OAIVisibilty visibility)
visibility
- The feature to be added to the OaiVisibilityCmd
attributepublic void addOaiVisibilityCmd(NDRConstants.OAIVisibilty visibility, java.lang.String action)
visibility
- The feature to be added to the OaiVisibilityCmd
attributeaction
- The feature to be added to the OaiVisibilityCmd
attributepublic void addServiceDescriptionCmd(org.dom4j.Element content, java.lang.String action) throws java.lang.Exception
content
- The feature to be added to the ServiceDescriptionCmd
attributeaction
- The feature to be added to the ServiceDescriptionCmd
attributejava.lang.Exception
- if inputXML does not existpublic void addDCStreamCmd(org.dom4j.Element oai_dc) throws java.lang.Exception
oai_dc
- The feature to be added to the DCStreamCmd attributejava.lang.Exception
- NOT YET DOCUMENTEDprotected NDRConnection getNDRConnection(java.lang.String path, java.lang.String inputXMLStr) throws java.lang.Exception
Payload is the request objects's inputXML attribute, which is overidden by the inputXMLStr parameter if present. This allows a caller to create an inputXMLStr external to the request, which is helpful in debugging.
path
- NOT YET DOCUMENTEDinputXMLStr
- NOT YET DOCUMENTEDjava.lang.Exception
- NOT YET DOCUMENTEDpublic InfoXML submit() throws java.lang.Exception
submit
in class SimpleNdrRequest
java.lang.Exception
- NOT YET DOCUMENTEDpublic InfoXML submit(java.lang.String inputXMLStr) throws java.lang.Exception
submit
in class SimpleNdrRequest
inputXMLStr
- NOT YET DOCUMENTEDjava.lang.Exception
- NOT YET DOCUMENTEDpublic void report(java.lang.String path)