|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.ndr.request.SimpleNdrRequest org.dlese.dpc.ndr.request.NdrRequest
public class NdrRequest
Class to communiate directly with NDR via NDRConnection
.
Builds the inputXML parameter that is sent as part a POST request.
Field Summary | |
---|---|
protected InputXML |
inputXML
NOT YET DOCUMENTED |
protected NDRConstants.NDRObjectType |
objectType
NOT YET DOCUMENTED |
protected String |
payload
|
Fields inherited from class org.dlese.dpc.ndr.request.SimpleNdrRequest |
---|
handle, requestAgent, verb, verbose |
Constructor Summary | |
---|---|
NdrRequest()
Constructor for the NdrRequest object |
|
NdrRequest(String verb)
Constructor for the NdrRequest object with specified verb. |
|
NdrRequest(String verb,
String handle)
Constructor for the NdrRequest object with specified verb and handle. |
Method Summary | |
---|---|
void |
addCommand(String type,
Element element)
Adds a command represented as an Element of the specified type. |
void |
addCommand(String type,
Element element,
String action)
Adds a command represented as an Element of the specified type and with the specified action. |
void |
addCommand(String type,
String prop,
String value)
Adds a command specified as a prop and value pair of the specified type. |
void |
addCommand(String type,
String prop,
String value,
String action)
Adds a command specified as a prop and value pair of the specified type and action. |
void |
addDataStreamCmd(String format,
Element content)
Adds a datastream command to the data component with given datastream of specified format (e.g., "ndsl_dc"); |
void |
addDataStreamCmd(String format,
Element content,
String action)
Adds a datastream command to the data component with given datastream of specified format (e.g., "ndsl_dc"); |
void |
addDCStreamCmd(Element oai_dc)
Adds a feature to the DCStreamCmd attribute of the NdrRequest object |
void |
addDleseCommand(String type,
String prop,
String value)
Adds a feature to the DleseCommand attribute of the NdrRequest object |
void |
addDleseCommand(String type,
String prop,
String value,
String action)
Adds a feature to the DleseCommand attribute of the NdrRequest object |
void |
addNativeDataStreamCmd(String format,
Element content)
|
void |
addNativeDataStreamCmd(String format,
Element content,
String action)
|
void |
addNcsPropertyCmd(String prop,
String value)
Adds a property command with the specified property belonging to the dlese namespace. |
void |
addNcsPropertyCmd(String prop,
String value,
String action)
Adds a property command with the specified property belonging to the dlese namespace. |
void |
addNcsRelationshipCmd(String prop,
String value)
Adds a feature to the NcsRelationshipCmd attribute of the NdrRequest object |
void |
addNcsRelationshipCmd(String prop,
String value,
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,
String action)
Adds a feature to the OaiVisibilityCmd attribute of the NdrRequest object |
void |
addQualifiedCommand(Namespace namespace,
String type,
String prop,
String value)
Adds a feature to the QualifiedCommand attribute of the NdrRequest object |
void |
addQualifiedCommand(Namespace namespace,
String type,
String prop,
String value,
String action)
Adds a feature to the QualifiedCommand attribute of the NdrRequest object |
void |
addServiceDescriptionCmd(Element content)
Adds a serviceDescription command to the data element. |
void |
addServiceDescriptionCmd(Element content,
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,
String action)
Adds a feature to the StateCmd attribute of the NdrRequest object |
protected InputXMLComponent |
getComponent(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(String path,
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 String |
getPayload()
A human readable representation of the XMLInput payload of the request. |
void |
report(String path)
NOT YET DOCUMENTED |
void |
setDataInfoStream(String format,
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(String inputXMLStr)
NOT YET DOCUMENTED |
Methods inherited from class org.dlese.dpc.ndr.request.SimpleNdrRequest |
---|
getDebug, getHandle, getNDRConnection, getRequestAgent, getVerb, getVerbose, makePath, pp, prtln, prtlnErr, report, setDebug, setHandle, setRequestAgent, setVerb, setVerbose |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected InputXML inputXML
protected NDRConstants.NDRObjectType objectType
protected String payload
Constructor Detail |
---|
public NdrRequest()
public NdrRequest(String verb)
verb
- NOT YET DOCUMENTEDpublic NdrRequest(String verb, String handle)
verb
- NOT YET DOCUMENTEDhandle
- NOT YET DOCUMENTEDMethod Detail |
---|
public InputXML getInputXML()
inputXML
attribute of the NdrRequest object, which stores
the commands for this request.
protected String getPayload()
public void setObjectType(NDRConstants.NDRObjectType objectType)
objectType
- The new objectType valuepublic NDRConstants.NDRObjectType getObjectType()
protected InputXMLComponent getComponent(String type) throws Exception
type
- NOT YET DOCUMENTED
Exception
- If inputXML does not exist or the specified type is
unknownpublic void addCommand(String type, Element element)
type
- command type ("property", "relationship", or "data")element
- command represented as Element.public void addCommand(String type, Element element, 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(String type, String prop, 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(String type, String prop, String value, 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(String prop, String value)
prop
- The feature to be added to the NcsProperty attributevalue
- The feature to be added to the NcsProperty attributepublic void addNcsPropertyCmd(String prop, String value, 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(String prop, String value)
prop
- The feature to be added to the NcsRelationshipCmd attributevalue
- The feature to be added to the NcsRelationshipCmd attributepublic void addNcsRelationshipCmd(String prop, String value, 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(String type, String prop, 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(String type, String prop, String value, 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(Namespace namespace, String type, String prop, 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(Namespace namespace, String type, String prop, String value, 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(String format, Element content) throws Exception
Exception
public void addNativeDataStreamCmd(String format, Element content, String action) throws Exception
Exception
public void addDataStreamCmd(String format, Element content) throws Exception
format
- format of the datastreamcontent
- datastream represented as Element
Exception
- If inputXML does not exist or content element is nullpublic void addDataStreamCmd(String format, Element content, String action) throws 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
attribute
Exception
- If inputXML does not exist or content element is nullpublic void setDataInfoStream(String format, Element info) throws Exception
format
- The new dataInfoStream valueinfo
- The new dataInfoStream value
Exception
- NOT YET DOCUMENTEDpublic void addServiceDescriptionCmd(Element content) throws Exception
content
- ServiceDescription as Element
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, 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, String action)
visibility
- The feature to be added to the OaiVisibilityCmd
attributeaction
- The feature to be added to the OaiVisibilityCmd
attributepublic void addServiceDescriptionCmd(Element content, String action) throws Exception
content
- The feature to be added to the ServiceDescriptionCmd
attributeaction
- The feature to be added to the ServiceDescriptionCmd
attribute
Exception
- if inputXML does not existpublic void addDCStreamCmd(Element oai_dc) throws Exception
oai_dc
- The feature to be added to the DCStreamCmd attribute
Exception
- NOT YET DOCUMENTEDprotected NDRConnection getNDRConnection(String path, String inputXMLStr) throws 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 DOCUMENTED
Exception
- NOT YET DOCUMENTEDpublic InfoXML submit() throws Exception
submit
in class SimpleNdrRequest
Exception
- NOT YET DOCUMENTEDpublic InfoXML submit(String inputXMLStr) throws Exception
submit
in class SimpleNdrRequest
inputXMLStr
- NOT YET DOCUMENTED
Exception
- NOT YET DOCUMENTEDpublic void report(String path)
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |