com.sage.orion.sdata.servlet
Class SDataExternalResponseHelper

java.lang.Object
  extended by com.sage.orion.sdata.servlet.SDataExternalResponseHelper

public class SDataExternalResponseHelper
extends java.lang.Object

Helper class to create SDataExternalResponse object


Constructor Summary
SDataExternalResponseHelper()
           
 
Method Summary
 java.util.List<SDataDiagnosis> getDiagnosisList(org.w3c.dom.Element element)
          returns the SDataDiagnonsis from the entry
 java.lang.String getEntryId(org.w3c.dom.Element entry)
          return the Entry id
 org.w3c.dom.Element getFeedEntry(int entryIndex, org.w3c.dom.Element feed)
          return the field content of the entryIndex'th entry of the feed
 java.lang.String getFeedId(org.w3c.dom.Element feed)
          return the Feed id
 int getFeedItemCount(org.w3c.dom.Element top)
          Gets the number of top level entries in the feed.
 SDataSchema getLinkedSchema(org.w3c.dom.Element element)
          returns the schema element under the schema link of the feed or entry
 java.lang.String getLinkToFirst(org.w3c.dom.Element feed)
          return the href of the "first" link
 java.lang.String getLinkToLast(org.w3c.dom.Element feed)
          return the href of the "last" link
 java.lang.String getLinkToNext(org.w3c.dom.Element feed)
          return the href of the "next" link
 java.lang.String getLinkToPrevious(org.w3c.dom.Element feed)
          return the href of the "previous" link
 java.lang.String getLinkToSelf(org.w3c.dom.Element feed)
          return the href of the "self" link
 java.lang.String getResourceSelector(org.w3c.dom.Element entry)
          return the resource selector from the response
 SDataResourceElement getSDataResourceElement(org.w3c.dom.Element entry)
          Process entry element to create SdataResourceElement
 boolean isEdit(org.w3c.dom.Element entry)
          return true if entry contains edit link
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDataExternalResponseHelper

public SDataExternalResponseHelper()
Method Detail

getLinkToSelf

public java.lang.String getLinkToSelf(org.w3c.dom.Element feed)
return the href of the "self" link

Parameters:
feed -
Returns:
String

getLinkToFirst

public java.lang.String getLinkToFirst(org.w3c.dom.Element feed)
return the href of the "first" link

Parameters:
feed -
Returns:
String

getLinkToPrevious

public java.lang.String getLinkToPrevious(org.w3c.dom.Element feed)
return the href of the "previous" link

Parameters:
feed -
Returns:
String

getLinkToNext

public java.lang.String getLinkToNext(org.w3c.dom.Element feed)
return the href of the "next" link

Parameters:
feed -
Returns:
String

getLinkToLast

public java.lang.String getLinkToLast(org.w3c.dom.Element feed)
return the href of the "last" link

Parameters:
feed -
Returns:
String

getLinkedSchema

public SDataSchema getLinkedSchema(org.w3c.dom.Element element)
                            throws javax.xml.parsers.ParserConfigurationException
returns the schema element under the schema link of the feed or entry

Parameters:
element - element
Returns:
the schema element
Throws:
javax.xml.parsers.ParserConfigurationException - exception

getDiagnosisList

public java.util.List<SDataDiagnosis> getDiagnosisList(org.w3c.dom.Element element)
returns the SDataDiagnonsis from the entry

Parameters:
element - the non-null Element that is the parent to the actual diagnosis elements, either an sdata:diagnoses or an Entry or Feed
Returns:
List of SDataDiagnosis

isEdit

public boolean isEdit(org.w3c.dom.Element entry)
return true if entry contains edit link

Parameters:
entry - entry
Returns:
if link contain edit element

getEntryId

public java.lang.String getEntryId(org.w3c.dom.Element entry)
return the Entry id

Parameters:
entry -
Returns:
entry id

getFeedId

public java.lang.String getFeedId(org.w3c.dom.Element feed)
return the Feed id

Parameters:
feed -
Returns:
feed id

getFeedEntry

public org.w3c.dom.Element getFeedEntry(int entryIndex,
                                        org.w3c.dom.Element feed)
return the field content of the entryIndex'th entry of the feed

Parameters:
entryIndex - the zero-based index of the entry to get
feed - feed
Returns:
feed entry

getResourceSelector

public java.lang.String getResourceSelector(org.w3c.dom.Element entry)
return the resource selector from the response

Parameters:
entry - entry
Returns:
resource selector

getFeedItemCount

public int getFeedItemCount(org.w3c.dom.Element top)
Gets the number of top level entries in the feed.

Parameters:
top - top
Returns:
feed item count

getSDataResourceElement

public SDataResourceElement getSDataResourceElement(org.w3c.dom.Element entry)
Process entry element to create SdataResourceElement

Parameters:
entry - entry
Returns:
process entry element


Copyright © 2011 Sage Software, Inc. All rights reserved.