DLESE Tools
v1.6.0

org.dlese.dpc.ndr.reader
Class AgentReader

java.lang.Object
  extended by org.dlese.dpc.ndr.reader.NdrObjectReader
      extended by org.dlese.dpc.ndr.reader.AgentReader

public class AgentReader
extends NdrObjectReader

Extension of NdrObjectReader for accessing properties, dataStreams, and relationships of NDR Agent Objects.

More Info:

  • 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

    Author:
    ostwald

    Field Summary
     
    Fields inherited from class org.dlese.dpc.ndr.reader.NdrObjectReader
    createdDate, doc, dsFormats, handle, lastModifiedDate, nativeDataStreamFormat, nsContext, objectType
     
    Constructor Summary
    AgentReader(Document response)
              Constructor for the AgentReader object with provided response (to ndr "get" call)
    AgentReader(String handle)
              Constructor for the AgentReader with provided handle
     
    Method Summary
    protected  void agentInit()
               
     List getAggregators()
              Gets the aggregators that are related to this Agent via the aggregatorFor relationship.
     String getIdentifier()
              Gets the identifier attribute of the AgentReader object
     String getIdentifierType()
              Returns one of "HOST", "URL", "OTHER", depending on what form of id is present in the object.
     List getMetadataProviders()
              Gets the metadataProviders that are related to this Agent via the metadataProviderFor relationship.
     boolean isAuthorizedToChange()
              Returns true if the configured NCS_AGENT is authorized to change this agent.
    protected static void pp(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
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    AgentReader

    public AgentReader(String handle)
                throws Exception
    Constructor for the AgentReader with provided handle

    Parameters:
    handle - handle to Agent object in the NDR
    Throws:
    Exception - NOT YET DOCUMENTED

    AgentReader

    public AgentReader(Document response)
                throws Exception
    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 Detail

    getIdentifier

    public String getIdentifier()
    Gets the identifier attribute of the AgentReader object

    Returns:
    The identifier value

    getIdentifierType

    public String getIdentifierType()
    Returns one of "HOST", "URL", "OTHER", depending on what form of id is present in the object.

    Returns:
    The identifierType value

    agentInit

    protected void agentInit()
                      throws Exception
    Throws:
    Exception

    isAuthorizedToChange

    public boolean isAuthorizedToChange()
    Returns true if the configured NCS_AGENT is authorized to change this agent.

    Returns:
    The authorizedToChange value

    getMetadataProviders

    public List getMetadataProviders()
                              throws Exception
    Gets the metadataProviders that are related to this Agent via the metadataProviderFor relationship.

    Returns:
    The metadataProviders value
    Throws:
    Exception - NOT YET DOCUMENTED

    getAggregators

    public List getAggregators()
                        throws Exception
    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(Node node)

    DLESE Tools
    v1.6.0