Package org.dlese.dpc.ndr.reader
Class AgentReader
java.lang.Object
org.dlese.dpc.ndr.reader.NdrObjectReader
org.dlese.dpc.ndr.reader.AgentReader
Extension of NdrObjectReader for accessing properties, dataStreams, and
relationships of NDR Agent Objects. Agent overview: http://wiki.nsdl.org/index.php/Community:NDR/ObjectTypes#Agent
Agent data model: http://wiki.nsdl.org/index.php/Community:NCore/Model/Objects/Agent
Agent API requests: http://wiki.nsdl.org/index.php/Community:NDR/APIRequestsByObject#Agent_requests
More Info:
- Author:
- ostwald
-
Field Summary
Fields inherited from class org.dlese.dpc.ndr.reader.NdrObjectReader
createdDate, doc, dsFormats, handle, lastModifiedDate, nativeDataStreamFormat, nsContext, objectType -
Constructor Summary
ConstructorsConstructorDescriptionAgentReader(String handle) Constructor for the AgentReader with provided handleAgentReader(org.dom4j.Document response) Constructor for the AgentReader object with provided response (to ndr "get" call) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGets the aggregators that are related to this Agent via the aggregatorFor relationship.Gets the identifier attribute of the AgentReader objectReturns one of "HOST", "URL", "OTHER", depending on what form of id is present in the object.Gets the metadataProviders that are related to this Agent via the metadataProviderFor relationship.booleanReturns true if the configured NCS_AGENT is authorized to change this agent.protected static voidpp(org.dom4j.Node node) Methods inherited from class org.dlese.dpc.ndr.reader.NdrObjectReader
getCanonicalNsdlDcDataStream, getCreated, getCreatedDate, getDataStream, getDataStream, getDocument, getFormats, getHandle, getLastModified, getLastModifiedDate, getNativeDataStream, getNativeDataStream, getNode, getNodes, getNodeText, getNsContext, getObjectType, getProperty, getPropertyValues, getRelationship, getRelationshipValues, getState, getXPath, initDataStreams, setDebug
-
Constructor Details
-
AgentReader
Constructor for the AgentReader with provided handle- Parameters:
handle- handle to Agent object in the NDR- Throws:
Exception- NOT YET DOCUMENTED
-
AgentReader
Constructor for the AgentReader object with provided response (to ndr "get" call)- Parameters:
response- a dom4j.Document reperesentation of ndr GET response.- Throws:
Exception- NOT YET DOCUMENTED
-
-
Method Details
-
getIdentifier
Gets the identifier attribute of the AgentReader object- Returns:
- The identifier value
-
getIdentifierType
Returns one of "HOST", "URL", "OTHER", depending on what form of id is present in the object.- Returns:
- The identifierType value
-
agentInit
- Throws:
Exception
-
isAuthorizedToChange
public boolean isAuthorizedToChange()Returns true if the configured NCS_AGENT is authorized to change this agent.- Returns:
- The authorizedToChange value
-
getMetadataProviders
Gets the metadataProviders that are related to this Agent via the metadataProviderFor relationship.- Returns:
- The metadataProviders value
- Throws:
Exception- NOT YET DOCUMENTED
-
getAggregators
Gets the aggregators that are related to this Agent via the aggregatorFor relationship.- Returns:
- The aggregators value
- Throws:
Exception- NOT YET DOCUMENTED
-
pp
protected static void pp(org.dom4j.Node node)
-