Ignore:
Timestamp:
2010-06-23T15:44:44+12:00 (14 years ago)
Author:
ak19
Message:

Changes to get Fedora to work with Greenstone3: to let the Greenstone3 Reader Interface work with a Fedora Repository behind the scenes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/dlservices/FedoraServicesAPIA.java

    r21846 r22298  
    7676     * @param collection is the name of the collection
    7777     * @param docIDs is an array of document identifiers of documents whose 
    78      * metadata is requested */
    79     public String retrieveDocumentMetadata(String collection, String[] docIDs) {
    80         return this.getDocumentMetadata(docIDs);
     78     * metadata is requested
     79     * @param metadata is the list of metadata elements requested. If "all" is specified
     80     * then all metadata is requested. */
     81    public String retrieveDocumentMetadata(String collection, String[] docIDs, String[] metadata) {
     82    return this.getDocumentMetadata(docIDs, metadata);
    8183    }
    8284   
     
    8587     * @param collection is the name of the collection
    8688     * @param docID is the document identifier of the document whose metadata is
    87      * requested */
    88     public String retrieveDocumentMetadata(String collection, String docID) {
    89         return this.getDocumentMetadata(docID);
     89     * requested.
     90     * @param metadata is the list of metadata elements requested. If "all" is specified
     91     * then all metadata is requested. */
     92    public String retrieveDocumentMetadata(String collection, String docID, String[] metadata) {
     93        return this.getDocumentMetadata(docID, metadata);
    9094    }
    9195
     
    96100     * are requested */
    97101    public String retrieveTitleMetadata(String collection, String[] docIDs) {
    98         return this.getTitleMetadata(docIDs);
     102        return this.getDocumentMetadata(docIDs, new String[] {"Title"});
    99103    }
    100104   
     
    105109     * requested */
    106110    public String retrieveTitleMetadata(String collection, String docID) {
    107         return this.getTitleMetadata(docID);
     111        return this.getDocumentMetadata(docID, new String[] {"Title"});
    108112    }
    109113
     
    134138     * hierarchical structures are requested */
    135139    public String retrieveDocumentStructure(String collection, String[] docIDs) {
    136         return this.getDocumentStructure(docIDs);
     140        return this.getDocumentStructure(docIDs, new String[]{"descendants"}, new String[]{""});
    137141    }
    138142   
     
    144148     * structure is requested*/
    145149    public String retrieveDocumentStructure(String collection, String docID) {
    146         return this.getDocumentStructure(docID);
     150        return this.getDocumentStructure(docID, new String[]{"descendants"}, new String[]{""});
    147151    }
    148152
     
    156160     * hierarchical structures are requested */
    157161    public String retrieveDocumentChildren(String collection, String[] docIDs) {
    158         return this.getChildren(docIDs);
     162        return this.getDocumentStructure(docIDs, new String[]{"children"}, new String[]{""});
    159163    }
    160164   
     
    166170     * structure is requested */
    167171    public String retrieveDocumentChildren(String collection, String docID) {
    168         return this.getChildren(docID);
    169     }
    170    
    171     /** @return a String representing Greenstone3 ClassifierBrowse XML
     172        return this.getDocumentStructure(docID, new String[]{"children"}, new String[]{""});
     173    }
     174   
     175    /** @return a String representing Greenstone3 DocumentMetadataRetrieve XML
     176     * containing the requested portion of the document structure of the documents
     177     * indicated by docIDs:
     178     * @param collection is the name of the collection. It's already included in the
     179     * docID for a Fedora DL.
     180     * @param docIDs is an array of document identifiers of documents whose
     181     * hierarchical structures are requested
     182     * @param structure - strings specifying the required structure of each document.
     183     * It can be a combination of: ancestors, parent, siblings, children, descendants, entire.
     184     * @param info - strings specifying the required structural info of each document.
     185     * It can be any combination of: siblingPosition, numSiblings, numChildren.
     186    */
     187    public String retrieveDocumentStructure(String collection, String[] docIDs, String[] structure, String[] info) {
     188    return this.getDocumentStructure(docIDs, structure, info);
     189    }
     190
     191
     192        /** @return a String representing Greenstone3 DocumentMetadataRetrieve XML
     193     * containing the requested portion of the document structure of the documents
     194     * indicated by docIDs:
     195     * @param collection is the name of the collection. It's already included in the
     196     * docID for a Fedora DL.
     197     * @param docID is the document identifier of the document whose hierarchical
     198     * structure is requested
     199     * @param structure - strings specifying the required structure of the document.
     200     * It can be a combination of: ancestors, parent, siblings, children, descendants, entire.
     201     * @param info - strings specifying the required structural info of the document.
     202     * It can be any combination of: siblingPosition, numSiblings, numChildren.
     203    */
     204    public String retrieveDocumentStructure(String collection, String docID, String[] structure, String[] info) {
     205    return this.getDocumentStructure(docID, structure, info);
     206    }
     207
     208
     209    /** @return a String representing Greenstone3 ClassifierBrowse XML
    172210     * giving the entire *structure* of the classification denoted by
    173211     * classifierID (including the structures of document descendents of
     
    177215     * @param collection is the name of the collection
    178216     * @param service is the name of the browse service (=ClassifierBrowse usually)
     217     * @param structure - the requested browse substructure. Can be any combination
     218     * of ancestors, parent, siblings, children, descendants.
     219     * @param info - the requested structural info. Can be numSiblings, siblingPosition,
     220     * numChildren
    179221    */
    180     public String retrieveBrowseStructure(
    181             String collection, String service, String[] classifierIDs)
     222    public String retrieveBrowseStructure(String collection, String service, String[] classifierIDs,
     223            String[] structure, String[] info)
    182224    {
    183         return this.browse(collection, classifierIDs);
     225        return this.browse(collection, classifierIDs, structure, info);
    184226    }
    185227
     
    190232     * out structured sections like CL2.1.3. NodeIDs are generally subsections
    191233     * of top-level classifierNodes (CL#, e.g. CL3).
     234     * @param metafields are the classifier metadata fields that are to be returned.
    192235     * @param collection is the name of the collection
    193236     * @param service is the name of the Browse's MetadataRetrieve service
    194237     * (usually the browse service is ClassifierBrowse, in which case it always
    195238     * has a retrieve service called ClassifierBrowseMetadataRetrieve) */
    196     public String retrieveBrowseMetadata(
    197             String collection, String service, String[] nodeIDs)
     239    public String retrieveBrowseMetadata(String collection, String service,
     240                         String[] nodeIDs, String[] metafields)
    198241    {
    199         return this.browseMetadataRetrieve(nodeIDs);
     242        return this.browseMetadataRetrieve(nodeIDs, metafields);
    200243    }
    201244   
Note: See TracChangeset for help on using the changeset viewer.