nbi.xmlsec.biocase.protocol
Class Content

java.lang.Object
  extended bynbi.xmlsec.biocase.protocol.ProtocolType
      extended bynbi.xmlsec.biocase.protocol.Content

public class Content
extends ProtocolType

This class wraps the BioCASE protocol element Content. BioCASE content objects are stored in the vector contentObjects.

Since:
Version:
$Revision: 1.7 $
Author:
Lutz Suhrbier

Field Summary
private  Vector contentObjects
          List of content objects
(package private) static Logger logger
           
private  Integer recordCount
          Content attribute recordCount
private  Integer recordDropped
          Content attribute recordDropped
private  Integer recordStart
          Content attribute recordStart
private  Integer totalSearchHits
          Content attribute totalSearchHits
 
Fields inherited from class nbi.xmlsec.biocase.protocol.ProtocolType
protocolURI
 
Constructor Summary
Content(String protocolURI)
          Inits this instance.
 
Method Summary
 void addContentObject(ContentObject content)
          Appends the specified content object to the contents vector.
 ContentObject getContentObject(int index)
          Gets the content object at the specified position
 Vector getContentObjects()
          Gets the contentObjects
 Integer getRecordCount()
          Gets the recordCount
 Integer getRecordDropped()
          Gets the recordDropped
 Integer getRecordStart()
          Gets the recordStart
 Integer getTotalSearchHits()
          Gets the totalSearchHits
 boolean removeContentObject(ContentObject content)
          Removes the specified content object from the content objects vector.
 void setContentObjects(Vector contentObjects)
          Sets contentObjects
 void setRecordCount(Integer recordCount)
          Sets recordCount
 void setRecordDropped(Integer recordDropped)
          Sets recordDropped
 void setRecordStart(Integer recordStart)
          Sets recordStart
 void setTotalSearchHits(Integer totalSearchHits)
          Sets totalSearchHits
 String toString()
           
 void write(ContentHandler out)
          Writes the content to a SAX Stream.
 
Methods inherited from class nbi.xmlsec.biocase.protocol.ProtocolType
getProtocolURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

static Logger logger

recordStart

private Integer recordStart
Content attribute recordStart


recordCount

private Integer recordCount
Content attribute recordCount


recordDropped

private Integer recordDropped
Content attribute recordDropped


totalSearchHits

private Integer totalSearchHits
Content attribute totalSearchHits


contentObjects

private Vector contentObjects
List of content objects

Constructor Detail

Content

public Content(String protocolURI)
Inits this instance.

Parameters:
protocolURI - The protocol version of this instance.
Method Detail

toString

public String toString()

write

public void write(ContentHandler out)
           throws SAXException
Writes the content to a SAX Stream.

Parameters:
out - ContentHandlerto write to.
Throws:
SAXException

addContentObject

public void addContentObject(ContentObject content)
Appends the specified content object to the contents vector. If no content objects exist, a new Vector will be created.

Parameters:
content - content object to be appended.
Returns:
true

removeContentObject

public boolean removeContentObject(ContentObject content)
Removes the specified content object from the content objects vector.

Parameters:
content - content object to be removed.
Returns:
true if the content object vector contained the specified content object.

getContentObject

public ContentObject getContentObject(int index)
Gets the content object at the specified position

Parameters:
index - index of the content object to return
Returns:
content object at the specified index, or null.

getContentObjects

public Vector getContentObjects()
Gets the contentObjects

Returns:
Returns the contentObjects.

setContentObjects

public void setContentObjects(Vector contentObjects)
Sets contentObjects

Parameters:
contentObjects - The contentObjects to set.

getRecordCount

public Integer getRecordCount()
Gets the recordCount

Returns:
Returns the recordCount or null if it is not set.

setRecordCount

public void setRecordCount(Integer recordCount)
Sets recordCount

Parameters:
recordCount - The recordCount to set.

getRecordDropped

public Integer getRecordDropped()
Gets the recordDropped

Returns:
Returns the recordDropped or null if it is not set.

setRecordDropped

public void setRecordDropped(Integer recordDropped)
Sets recordDropped

Parameters:
recordDropped - The recordDropped to set or null.

getRecordStart

public Integer getRecordStart()
Gets the recordStart

Returns:
Returns the recordStart or null if it is not set.

setRecordStart

public void setRecordStart(Integer recordStart)
Sets recordStart

Parameters:
recordStart - The recordStart to set.

getTotalSearchHits

public Integer getTotalSearchHits()
Gets the totalSearchHits

Returns:
Returns the totalSearchHits or null if it is not set.

setTotalSearchHits

public void setTotalSearchHits(Integer totalSearchHits)
Sets totalSearchHits

Parameters:
totalSearchHits - The totalSearchHits to set.


Copyright © 2006 Lutz Suhrbier, Freie Universitšt Berlin. All Rights Reserved.