SDARTS

edu.columbia.cs.sdarts.dbselection.util
Class Subcol

java.lang.Object
  |
  +--edu.columbia.cs.sdarts.dbselection.util.Subcol

public class Subcol
extends java.lang.Object

This class represents a subcollection (also called collection). This class can be instantiated from an XML doc Element subcol or it can be created from all it's memebers, including serverURL, subcolName, subcolDesc

This class is used by DBSelectionServer to write subcol info to client, also used by web client to parse this info


Field Summary
 double score
           
 java.lang.String serverURL
           
 java.lang.String subcolDesc
           
 java.lang.String subcolName
           
 
Constructor Summary
Subcol(org.jdom.Element sce)
          constructor, takes a element, whose name is subcol, parse it and get back all the members, with all namespace ignored.
Subcol(java.lang.String url, java.lang.String name, java.lang.String desc, double s)
          construct a Subcol given a server url url, a subcol Name name, a subcol description desc, and a ranking score s.
 
Method Summary
 org.jdom.Element toElement()
          returns an Element representation of this subcol with default name "subcol"
 org.jdom.Element toElement(java.lang.String name)
          given a name for the Element, returns an Element representation of this subcol
 java.lang.String toXML()
          returns a xml string representation of this subcol, with the default element name "subcol"
 java.lang.String toXML(java.lang.String name)
          returns a xml string representation of this subcol, with the element name given as name.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverURL

public java.lang.String serverURL

subcolName

public java.lang.String subcolName

subcolDesc

public java.lang.String subcolDesc

score

public double score
Constructor Detail

Subcol

public Subcol(org.jdom.Element sce)
constructor, takes a element, whose name is subcol, parse it and get back all the members, with all namespace ignored.

This is used to parse info from sdarts server.

Parameters:
sce - the element with name "subcol" to be parsed

Subcol

public Subcol(java.lang.String url,
              java.lang.String name,
              java.lang.String desc,
              double s)
construct a Subcol given a server url url, a subcol Name name, a subcol description desc, and a ranking score s.

this method is used to write out to xml string

Parameters:
url - the server url for this collection
name - the collection name
desc - the description of this collection
s - the ranking score of this collection
Method Detail

toElement

public org.jdom.Element toElement(java.lang.String name)
given a name for the Element, returns an Element representation of this subcol
Parameters:
name - specify a name for the element, defaults "subcol"
Returns:
the element created.

toElement

public org.jdom.Element toElement()
returns an Element representation of this subcol with default name "subcol"
Returns:
the element created.

toXML

public java.lang.String toXML(java.lang.String name)
returns a xml string representation of this subcol, with the element name given as name.
Parameters:
name - the name of the element which enclose all the members
Returns:
the string

toXML

public java.lang.String toXML()
returns a xml string representation of this subcol, with the default element name "subcol"
Returns:
the string

SDARTS

Sdarts Homepage