Changeset 2155


Ignore:
Timestamp:
2001-03-11T09:27:28+13:00 (23 years ago)
Author:
bas6
Message:

Added comments to NzdlQueryHit, NzdlService, NzdlServiceClient, NzdlConstants. Modified Makefile (make docs) to include: SimpleGraphicalClient and copy image for service package.html

Location:
trunk/java-client
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/java-client/Makefile

    r2119 r2155  
    3636    rm -rf docs
    3737    mkdir docs
    38     javadoc -private -version -author -use -d docs -header "Documentation for the <a href=\"http://www.corba.org/\">CORBA</a> interface to the <a href=\"http://www.nzdl.org/\">NZDL</a>\'s Greenstone Digital Library software." -footer "This software is distributed under the <a href=\"http://www.gnu.org/copyleft/gpl.html\">GPL</a>" -windowtitle  "Greenstone Digital Library Software from the NZDL" -link "http://www.scms.waikato.ac.nz/help/reference/jdk1.2/docs/api/" gnu.getopt org.nzdl.gsdl org.nzdl.gsdl.service org.nzdl.gsdl.util org.nzdl.gsdl.corba.gsdlInterface org.nzdl.gsdl.ptp
    39 
     38    javadoc -private -version -author -use -d docs -header "Documentation for the <a href=\"http://www.corba.org/\">CORBA</a> interface to the <a href=\"http://www.nzdl.org/\">NZDL</a>'s Greenstone Digital Library software." -footer "This software is distributed under the <a href=\"http://www.gnu.org/copyleft/gpl.html\">GPL</a>" -windowtitle  "Greenstone Digital Library Software from the NZDL" -link "http://www.scms.waikato.ac.nz/help/reference/jdk1.2/docs/api/" gnu.getopt org.nzdl.gsdl org.nzdl.gsdl.service org.nzdl.gsdl.util org.nzdl.gsdl.corba.gsdlInterface org.nzdl.gsdl.ptp org.nzdl.gsdl.SimpleGraphicalClient -overview overview.html
     39    cp org/nzdl/gsdl/service/nzdl-service-package.png docs/org/nzdl/gsdl/service/
    4040
    4141clean :
  • trunk/java-client/org/nzdl/gsdl/service/NzdlCollectionInfo.java

    r2145 r2155  
     1/*
     2 *    NzdlCollectionInfo.java
     3 *    Copyright (C) 2001 New Zealand Digital Library Project
     4 *
     5 *    This program is free software; you can redistribute it and/or modify
     6 *    it under the terms of the GNU General Public License as published by
     7 *    the Free Software Foundation; either version 2 of the License, or
     8 *    (at your option) any later version.
     9 *
     10 *    This program is distributed in the hope that it will be useful,
     11 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 *    GNU General Public License for more details.
     14 *
     15 *    You should have received a copy of the GNU General Public License
     16 *    along with this program; if not, write to the Free Software
     17 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     18 */
    119
     20//the package we're in
    221package org.nzdl.gsdl.service;
    322
     
    625import org.nzdl.gsdl.util.*;
    726
     27/**
     28 * An object that stores information on a collection. Information is obtained from
     29 * {@link NzdlService NzdlService.getCollectionInfo(name)}
     30 * Easily interrogated by a user.
     31 *
     32 * @author Stuart Yeates  ([email protected])
     33 * @author Aziz Mahoui    ([email protected])
     34 * @author Gordon Paynter ([email protected])
     35 * @author Dave Nichols   ([email protected])
     36 * @version $Revision$
     37 */
    838public class NzdlCollectionInfo extends Object {
    939
    10   /** */
    1140  private corbaColInfoResponse m_Info = null;
    1241
     42  /**
     43   * Create an instance of NzdlCollectionInfo.
     44   */
    1345  public NzdlCollectionInfo( corbaColInfoResponse _info ) {
    1446    m_Info = _info;
    1547  }
    1648
     49  /**
     50   * Returns the corbaInfoResponse.
     51   */
    1752  public corbaColInfoResponse getInfo(){
    1853    return m_Info;
    1954  }
    2055
    21   /** */
     56  /**
     57   * Returns the name of a collection. <br>
     58   * Pre: Created instance of NzdlCollectionInfo. Used
     59   * {@link NzdlService NzdlService.getCollectionInfo(name)}
     60   * to extract collection information.
     61   * @return A string representing the name of the collection.
     62   */
    2263  public String getName() {
    2364    return NzdlCorbaFactory.toString( m_Info.shoftInfo.name ) ;
    2465  }
    2566
     67  /**
     68   * Returns true if collection is public. <br>
     69   * Pre: Created instance of NzdlCollectionInfo. Used
     70   * {@link NzdlService NzdlService.getCollectionInfo(name)}
     71   * to extract collection information.
     72   * @return Boolean true if collection is public, otherwise returns false.
     73   */
    2674  public boolean isPublic() {
    2775    return m_Info.isPublic;
    2876  }
    2977
     78  /**
     79   * Returns true if collection is a beta version. <br>
     80   * Pre: Created instance of NzdlCollectionInfo. Used
     81   * {@link NzdlService NzdlService.getCollectionInfo(name)}
     82   * to extract collection information.
     83   * @return Boolean true if collection is a beta version, otherwise returns false.
     84   */
    3085  public boolean isBeta() {
    3186    return m_Info.isBeta;
    3287  }
    3388
     89  /**
     90   * Returns an integer representation of build date. <br>
     91   * Pre: Created instance of NzdlCollectionInfo. Used
     92   * {@link NzdlService NzdlService.getCollectionInfo(name)}
     93   * to extract collection information.
     94   * @return Integer representation of date.
     95   */
    3496  public int getBuildDate() {
    3597    return m_Info.buildDate;
    3698  }
    3799
     100  /**
     101   * Returns the number of documents in a collection. <br>
     102   * Pre: Created instance of NzdlCollectionInfo. Used
     103   * {@link NzdlService NzdlService.getCollectionInfo(name)}
     104   * to extract collection information.
     105   * @return An integer representing the number of documents in the collection.
     106   */
    38107  public int getNumOfDocs() {
    39108    return m_Info.numDocs;
    40109  }
    41110
     111  /**
     112   * Returns the number of words in a collection. <br>
     113   * Pre: Created instance of NzdlCollectionInfo. Used
     114   * {@link NzdlService NzdlService.getCollectionInfo(name)}
     115   * to extract collection information.
     116   * @return An integer representing the number of words in the collection.
     117   */
    42118  public int getNumOfWords() {
    43119    return m_Info.numWords;
    44120  }
    45121
     122  /**
     123   * Returns the number of bytes in the collection. <br>
     124   * Pre: Created instance of NzdlCollectionInfo. Used
     125   * {@link NzdlService NzdlService.getCollectionInfo(name)}
     126   * to extract collection information.
     127   * @return An integer representing the number of bytes in the collection.
     128   */
    46129  public int getNumOfBytes() {
    47130    return m_Info.numBytes;
    48131  }
    49132
     133  /**
     134   * Returns a string describing collection details. <br>
     135   * Pre: Created instance of NzdlCollectionInfo. Used
     136   * {@link NzdlService NzdlService.getCollectionInfo(name)}
     137   * to extract collection information.
     138   * @return A string describing collection details such as: collection name;
     139   * isPublic; isBeta; buildDate; numOfDocs; numOfWords; numOfBytes
     140   */
    50141  public String toString() {
    51142    StringBuffer buf = new  StringBuffer(1000);
     
    60151  }
    61152
    62   /** */
     153  /**
     154   * Not currently implemented
     155   */
    63156  public void print() {
    64157    /* [email protected] */
  • trunk/java-client/org/nzdl/gsdl/service/NzdlQueryHit.java

    r2098 r2155  
     1/*
     2 *    NzdlCollectionInfo.java
     3 *    Copyright (C) 2001 New Zealand Digital Library Project
     4 *
     5 *    This program is free software; you can redistribute it and/or modify
     6 *    it under the terms of the GNU General Public License as published by
     7 *    the Free Software Foundation; either version 2 of the License, or
     8 *    (at your option) any later version.
     9 *
     10 *    This program is distributed in the hope that it will be useful,
     11 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 *    GNU General Public License for more details.
     14 *
     15 *    You should have received a copy of the GNU General Public License
     16 *    along with this program; if not, write to the Free Software
     17 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     18 */
    119
     20//the package we're in
    221package org.nzdl.gsdl.service;
    322
    423import java.util.*;
    524
     25/**
     26 * Holds a single result from a query. NzdlQueryHit is used by
     27 * {@link NzdlResponse NzdlResponse} and
     28 * {@link NzdlResultSet NzdlResultSet}
     29 */
    630public class NzdlQueryHit extends java.lang.Object {
    731
     
    1943  private Map m_metaData = null;
    2044
    21   /** */
    22 
     45  /**
     46   * Sets the document ID.
     47   * @param docID a string representaion of the document ID.
     48   */
    2349  public void setDocumentID( String _docID ) {
    2450    m_docID = _docID;
    2551  }
    2652
     53  /**
     54   * Sets the ranking.
     55   * @param the ranking an integer representaion of the the hit's ranking.
     56   */
    2757  public void setRanking( int _ranking ) {
    2858    m_ranking = _ranking;
    2959  }
    3060
     61  /**
     62   * Sets the result number.
     63   * @param resultNum is the integer representation of the result number.
     64   */
    3165  public void setResultNumber( int _resultNum ) {
    3266    m_resultNum = _resultNum;
    3367  }
    3468
     69  /**
     70   * Sets the number of terms matched.
     71   * @param numTermsMatched the number of terms matched.
     72   */
    3573  public void setNumOfTermsMatched( int _numTermsMatched ) {
    3674    m_numTermsMatched = _numTermsMatched;
    3775  }
    3876
     77  /**
     78   * Sets the number of phrases matched.
     79   * @param numPhrasesMatched the number of phrases matched.
     80   */
    3981  public void setNumOfPhrasesMatched( int _numPhrasesMatched ) {
    4082    m_numPhrasesMatched = _numPhrasesMatched;
    4183  }
    4284
     85  /**
     86   * Sets the metedata
     87   * @param metaData the key in the map will be the metaData tag.
     88   * The value for the key will be a Set of strings.
     89   * For example: key = "Author", value = {A. Mahoui, S. Franks}
     90   */
    4391  public void setMetaData( Map _metaData ) {
    4492    m_metaData = _metaData;
    4593  }
    4694
    47   /** */
    48 
     95  /**
     96   * Gets the document ID of the query hit.
     97   * @return document ID in string form.
     98   */
    4999  public String getDocumentID() {
    50100    return m_docID;
    51101  }
    52102
     103  /**
     104   * Gets the ranking of the query hit.
     105   * @return integer representing the hits ranking.
     106   */
    53107  public int getRanking() {
    54108    return m_ranking;
    55109  }
    56110
     111  /**
     112   * Gets the result number of the query hit.
     113   * @return integer representing the result number.
     114   */
    57115  public int getResultNumber() {
    58116    return m_resultNum;
    59117  }
    60118
     119  /**
     120   * Gets the number of terms matched in the hit. A term is an individual word
     121   * in a query phrase.
     122   * @return integer representing the number of terms matched.
     123   */
    61124  public int getNumOfTermsMatched() {
    62125    return m_numTermsMatched;
    63126  }
    64127
     128  /**
     129   * Gets the number of phrases matched in the hit.
     130   * @return integer representing the number of phrases matched.
     131   */
    65132  public int getNumOfPhrasesMatched() {
    66133    return m_numPhrasesMatched;
    67134  }
    68135
     136  /**
     137   * Gets the metaData of the hit document.
     138   * @return a map of the metadata. For example: key = "Author", value =
     139   * {A. Mahoui, S. Franks}
     140   */
    69141  public Map getMetaData() {
    70142    return m_metaData;
    71143  }
    72144
    73   /** returns a set of String objects */
     145  /**
     146  * Gets a set of values for a metatag.
     147  * @param a metatag, such as author.
     148  * @return A set of string values for that metatag.
     149  */
    74150  public Set getMetaDataValues( String _metaTag ) {
    75151    return (Set) m_metaData.get( _metaTag );
    76152  }
    77153
    78   /** returns a set of key (String) objects */
     154  /** Gets the metatags for a hit.
     155   * @return a set of key (String) objects such as Author, Title etc.
     156   */
    79157  public Set getMetaDataTags() {
    80158    return m_metaData.keySet();
    81159  }
    82160
     161  /**
     162   * Gets a collection of metatag values for a hit.
     163   * @return a collection of metatag values.
     164   */
    83165  public Collection getMetaDataValues() {
    84166    return m_metaData.values();
  • trunk/java-client/org/nzdl/gsdl/service/NzdlRequest.java

    r2108 r2155  
    5959   * Creates an instance of NzdlRequest based on a document ID. When serviced
    6060   * by {@link NzdlService NzdlService} this type of request will return
    61    * exactly one document refernce. <br>
     61   * exactly one document reference. <br>
    6262   * Pre:  Have obtained a valid document ID.<br>
    6363   * Post: Created a browse filter request
  • trunk/java-client/org/nzdl/gsdl/service/NzdlResultSet.java

    r2108 r2155  
    190190   * {@link NzdlService NzdlService} object has filled the NzdlResponse
    191191   * object with results from servicing a {@link NzdlRequest NzdlRequest}.<br>
    192    * @return A map of metatag values in the specified document. The key
    193    * of the map is the metatag field such as Author or Title.
     192   * @return A map of metatag values in the specified document. The map key
     193   * is the metatag field such as Author or Title.
    194194   */
    195195  public Set getMetaData( String _docID, String _metaTag ) {
  • trunk/java-client/org/nzdl/gsdl/service/NzdlService.java

    r2098 r2155  
     1/*
     2 *    NzdlService.java
     3 *    Copyright (C) 2001 New Zealand Digital Library Project
     4 *
     5 *    This program is free software; you can redistribute it and/or modify
     6 *    it under the terms of the GNU General Public License as published by
     7 *    the Free Software Foundation; either version 2 of the License, or
     8 *    (at your option) any later version.
     9 *
     10 *    This program is distributed in the hope that it will be useful,
     11 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 *    GNU General Public License for more details.
     14 *
     15 *    You should have received a copy of the GNU General Public License
     16 *    along with this program; if not, write to the Free Software
     17 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     18 */
    119
     20//the package we're in
    221package org.nzdl.gsdl.service;
    322
    423import java.util.*;
    524
     25/**
     26 * An object that services CORBA client requests to a Greenstone Digital
     27 * Library.
     28 * @author Stuart Yeates  ([email protected])
     29 * @author Aziz Mahoui    ([email protected])
     30 * @author Gordon Paynter ([email protected])
     31 * @version $Revision$
     32 */
    633public interface NzdlService {
    734
     35  /**
     36   * Allow the client to configure a CORBA server.
     37   * @param key the parameter to be set.
     38   * @param values what that parameter will be set to.
     39   */
    840  public void configure( String key, Set values );
     41
     42  /**
     43   * Obtain the set of collection names for a Greenstone library.
     44   * @return A set of collection names in string format.
     45   */
    946  public Set getCollectionSet( );
     47
     48  /**
     49   * Check if ORB knows of this collection.
     50   * @param collectionName the name of a Greenstone collection.
     51   * @return boolean <TT>true</TT> if collection is found, else <TT>false</TT>.
     52   */
    1053  public boolean hasCollection( String collectionName );
     54
     55  /**
     56   * Check if ORB can communicate with of this collection.
     57   * @param collectionName the name of a collection to be pinged.
     58   * @return boolean <TT>true</TT> if collection returned ping, else
     59   * <TT>false</TT>.
     60   */
    1161  public boolean pingCollection( String collectionName );
     62
     63 /**
     64   * Extract information on this collection into a
     65   * {@link NzdlCollectionInfo NzdlCollectionInfo} object
     66   * @param collectionName the Greenstone collection to be retrieved.
     67   * @return an instance of
     68   * {@link NzdlCollectionInfo NzdlCollectionInfo} containing data on a
     69   * collection
     70   */
    1271  public NzdlCollectionInfo getCollectionInfo( String collectionName );
     72
     73  /**
     74   * Returns the set of filters for the service object.
     75   * @param collectionName the name of the Greenstone collection.
     76   * @return a set of strings that name the filters, for example
     77   * BrowseFilter, QueryFilter and NullFilter.
     78   */
    1379  public Set getFilterSet( String collectionName );
     80
     81  /**
     82   * Not Currently implemented.
     83   */
    1484  public Set getMetaTagSet( String collectionName );
     85
     86  /**
     87   * Returns the Greenstone Markup Language (GML) text for a particular
     88   * document from a collection.
     89   * @param collectionName the name of the Greenstone collection.
     90   * @param documentID the document identity string
     91   * @return the GML document in the form of a string.
     92   */
    1593  public String getDocument( String collectionName, String documentID );
     94
     95  /**
     96   * Returns the set of value(s) for a metatag from a particular document.
     97   * @param collectionName the name of the Greenstone collection.
     98   * @param documentID the document identifier.
     99   * @param metaTag the metatag name such as: Title, Author, Date and Images.
     100   * @return The set of value(s) for the requested metatag and document. In
     101   * cases such as Title, Author, Date there will probably be only one value
     102   * per document.
     103   */
    16104  public Set getMetaData( String collectionName, String documentID, String metaTag );
     105
     106  /**
     107   * Returns a map of value(s) for a metatag from a list of documents.
     108   * @param collectionName name of the Greenstone collection
     109   * @param docIDs a list of document identifier strings.
     110   * @param metaTag the metatag name such as: Title, Author, Date and Images.
     111   * @return The map of value(s) for the requested metatag and document. In
     112   * cases such as Title, Author, Date there will probably be only one value
     113   * per document.
     114   */
    17115  public Map getMetaData( String collectionName, List documentIDs, String metaTag );
     116
     117  /**
     118   * Services a {@link NzdlRequest NzdlRequest} to a collection and places
     119   * the results into a {@link NzdlResponse NzdlResponse} object. <br>
     120   * Pre:   Created instances of NzdlRequest and NzdlResponse. <br>
     121   * Post: Placed the result data into NzdlResponse object.
     122   * @param collectionName name of the Greenstone collection.
     123   * @param request an instance of NzdlRequest with query data to be serviced
     124   * @param response an instance of NzdlResponse. where the results of
     125   * sevciving the query will be placed
     126   */
    18127  public void service( String collectionName, NzdlRequest request, NzdlResponse response );
    19128
    20129}
    21 
    22 
    23 
    24 
    25 
    26 
    27 
    28 
    29 
    30 
    31 
    32 
    33 
    34 
    35 
    36 
    37 
    38 
  • trunk/java-client/org/nzdl/gsdl/service/NzdlServiceClient.java

    r2148 r2155  
    1 
     1/*
     2 *    NzdlServiceClient.java
     3 *    Copyright (C) 2001 New Zealand Digital Library Project
     4 *
     5 *    This program is free software; you can redistribute it and/or modify
     6 *    it under the terms of the GNU General Public License as published by
     7 *    the Free Software Foundation; either version 2 of the License, or
     8 *    (at your option) any later version.
     9 *
     10 *    This program is distributed in the hope that it will be useful,
     11 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 *    GNU General Public License for more details.
     14 *
     15 *    You should have received a copy of the GNU General Public License
     16 *    along with this program; if not, write to the Free Software
     17 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     18 */
     19
     20//the package we're in
    221package org.nzdl.gsdl.service;
    322
    423import java.io.*;
    524import java.util.*;
    6 /** jdk 1.3 orb */
     25/* jdk 1.3 orb */
    726import org.omg.CORBA.*;
    8 /** gsdl corba stuff */
     27/* gsdl corba stuff */
    928import org.nzdl.gsdl.corba.gsdlInterface.*;
    1029import org.nzdl.gsdl.util.*;
    1130
     31/**
     32 * Used to implement the {@link NzdlService NzdlService} object.
     33 * NzdlService is an object that services CORBA client requests to a
     34 * Greenstone Digital Library.
     35 *
     36 * @author Stuart Yeates  ([email protected])
     37 * @author Aziz Mahoui    ([email protected])
     38 * @author Gordon Paynter ([email protected])
     39 * @version $Revision$
     40 */
    1241public class NzdlServiceClient
    1342  extends java.lang.Object
     
    1645  private corbaiface m_nzdlServer = null;
    1746
     47  /**
     48   * Creates an instance of Java's ORB (Object Request Broker) to interface
     49   * to a Greenstone Digital Library.
     50   * @param <b>args</b> command-line arguments from the application's main method, or
     51   * alternatively, the name of the applet. This parameter is passed to
     52   * <TT>ORB.init( _args, _props)</TT>. Args may be a <TT>null</TT>.
     53   * @param <b>props</b> application specific properties.
     54   * This parameter is passed to
     55   * <TT>ORB.init( _args, _props)</TT>. props may be a <TT>null</TT>.
     56   * @param <b>IOR</b> the Interoperable Object Reference, a string that identifies
     57   * the computer on which corbaserver is running and the interface it
     58   * supports.
     59   * @see The Java documentation on the ORB class.
     60   */
    1861  public NzdlServiceClient( String [] _args, Properties _props, String _IOR) {
    1962    corbaComErrorHolder error = NzdlCorbaFactory.createComErrorHolder();
     
    5295    System.err.println("Service init ... YES");
    5396  }
    54  
     97
     98  /**
     99   * Allow the client to configure a CORBA server.
     100   * @param key the parameter to be set.
     101   * @param values what that parameter will be set to.
     102   */
    55103  public void configure( String _key, Set _values ) {
    56104    if (_key == null || _key.equals("")){
     
    68116    }
    69117  }
    70  
     118
     119  /**
     120   * Obtain the set of collection names for a Greenstone library.
     121   * @return A set of collection names in string format.
     122   */
    71123  public Set getCollectionSet( ) {
    72124    corbaComErrorHolder error = NzdlCorbaFactory.createComErrorHolder();
     
    82134    return collSet ;
    83135  }
    84  
     136
     137  /**
     138   * Check if ORB knows of this collection.
     139   * @param name the name of a collecion to be searched for.
     140   * @return boolean <TT>true</TT> if collection is found, else <TT>false</TT>.
     141   */
    85142  public boolean hasCollection( String _name ) {
    86143    if (_name == null || _name.equals("")){
     
    94151    return c_has.value;
    95152  }
    96  
     153
     154
     155  /**
     156   * Check if ORB can communicate with of this collection.
     157   * @param name the name of a collecion to be pinged.
     158   * @return boolean <TT>true</TT> if collection returned ping, else
     159   * <TT>false</TT>.
     160   */
    97161  public boolean pingCollection( String _name ) {
    98162    if (_name == null || _name.equals("")){
     
    105169    return result;
    106170  }
    107  
     171
     172  /**
     173   * Extract information on this collection into a
     174   * {@link NzdlCollectionInfo NzdlCollectionInfo} object
     175   * @param name the collection to be retrieved.
     176   * @return an instance of
     177   * {@link NzdlCollectionInfo NzdlCollectionInfo} containing data on a
     178   * collection
     179   */
    108180  public NzdlCollectionInfo getCollectionInfo( String _name ) {
    109181    if (_name == null || _name.equals("")){
     
    118190  }
    119191
     192  /**
     193   * Returns the set of filters for the service object.
     194   * @param name the collection name
     195   * @return a set of strings that name the filters, for example
     196   * BrowseFilter, QueryFilter and NullFilter.
     197   */
    120198  public Set getFilterSet( String _name ) {
    121199    if (_name == null || _name.equals("")){
     
    137215  }
    138216
     217  /**
     218   * Not Currently implemented.
     219   */
    139220  public Set getMetaTagSet( String _name ) {
    140221    if (_name == null || _name.equals("")){
     
    145226  }
    146227
     228  /**
     229   * Returns the Greenstone Markup Language (GML) text for a particular
     230   * document from a collection.
     231   * @param name the name of the collection.
     232   * @param docID the document identity string
     233   * @return the GML document in the form of a string.
     234   */
    147235  public String getDocument( String _name, String _docID ) {
    148236    if (_name == null || _name.equals("")){
     
    162250  }
    163251
     252  /**
     253   * Returns the set of value(s) for a metatag from a particular document.
     254   * @param name collection name
     255   * @param docID the document identifier.
     256   * @param metaTag the metatag name such as: Title, Author, Date and Images.
     257   * @return The set of value(s) for the requested metatag and document. In
     258   * cases such as Title, Author, Date there will probably be only one value
     259   * per document.
     260   */
    164261  public Set getMetaData( String _name, String _docID, String _metaTag ) {
    165262    if (_name == null || _name.equals("")){
     
    176273    service( _name, request, response );
    177274    NzdlResultSet resultSet = response.getResultSet();
    178     /**
     275    /*
    179276     * Because a result set may contain several hits, we only return
    180277     * the set of metadata values of the specifed meta tag for the
     
    184281  }
    185282
     283  /**
     284   * Returns a map of value(s) for a metatag from a list of documents.
     285   * @param name collection name
     286   * @param docIDs a list of document identifier strings.
     287   * @param metaTag the metatag name such as: Title, Author, Date and Images.
     288   * @return The map of value(s) for the requested metatag and document. In
     289   * cases such as Title, Author, Date there will probably be only one value
     290   * per document.
     291   */
    186292  public Map getMetaData( String _name, List _docIDs, String _metaTag ) {
    187293    if (_name == null || _name.equals("")){
     
    202308    //return resultSet.getAllMetaData( );
    203309  }
    204  
     310
     311  /**
     312   * Services a {@link NzdlRequest NzdlRequest} to a collection and places
     313   * the results into a {@link NzdlResponse NzdlResponse} object. <br>
     314   * Pre:   Created instances of NzdlRequest and NzdlResponse. <br>
     315   * Post: Placed the result data into NzdlResponse object.
     316   * @param name the collection name.
     317   * @param request an instance of NzdlRequest with query data to be serviced
     318   * @param response an instance of NzdlResponse. where the results of
     319   * sevciving the query will be placed
     320   */
    205321  public void service( String _name, NzdlRequest _request, NzdlResponse _response ) {   
    206322    if (_name == null || _name.equals("")){
     
    221337 
    222338}
    223 
    224 
    225 
    226 
    227 
    228 
    229 
    230 
    231 
    232 
    233 
    234 
  • trunk/java-client/org/nzdl/gsdl/util/NzdlConstants.java

    r2098 r2155  
     1/*
     2 *    NzdlConstants.java
     3 *    Copyright (C) 2001 New Zealand Digital Library Project
     4 *
     5 *    This program is free software; you can redistribute it and/or modify
     6 *    it under the terms of the GNU General Public License as published by
     7 *    the Free Software Foundation; either version 2 of the License, or
     8 *    (at your option) any later version.
     9 *
     10 *    This program is distributed in the hope that it will be useful,
     11 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 *    GNU General Public License for more details.
     14 *
     15 *    You should have received a copy of the GNU General Public License
     16 *    along with this program; if not, write to the Free Software
     17 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     18 */
    119
     20//the package we're in
    221package org.nzdl.gsdl.util;
    322
  • trunk/java-client/org/nzdl/gsdl/util/NzdlCorbaFactory.java

    r2098 r2155  
    1 
     1/*
     2 *    NzdlCorbaFactory.java
     3 *    Copyright (C) 2001 New Zealand Digital Library Project
     4 *
     5 *    This program is free software; you can redistribute it and/or modify
     6 *    it under the terms of the GNU General Public License as published by
     7 *    the Free Software Foundation; either version 2 of the License, or
     8 *    (at your option) any later version.
     9 *
     10 *    This program is distributed in the hope that it will be useful,
     11 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 *    GNU General Public License for more details.
     14 *
     15 *    You should have received a copy of the GNU General Public License
     16 *    along with this program; if not, write to the Free Software
     17 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     18 */
     19
     20//the package we're in
    221package org.nzdl.gsdl.util;
    322
Note: See TracChangeset for help on using the changeset viewer.