DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.ndr.util.integration
Class NSDLCollectionUtils

java.lang.Object
  extended by org.dlese.dpc.schemedit.ndr.util.integration.NSDLCollectionUtils

public class NSDLCollectionUtils
extends Object

Utilities for working with NSDL Collection records housed in the NCS instance.

Author:
ostwald

Constructor Summary
NSDLCollectionUtils()
           
 
Method Summary
static void compare(NSDLCollectionReader nsdl, NCSCollectReader ncs)
          Description of the Method
static void compare(String aggHandle)
          Description of the Method
static void compareInfoModels()
          Description of the Method
static String getBaseServiceUrl()
           
static String getCollectionMetadataHandle(String aggHandle)
           
static String getNCSCollectionID(NSDLCollectionReader collReader)
          Extracts the NCS collection id from a NSDLCollectionReader instance.
static String getNCSCollectionID(String resourceUrl)
          Finds the collection id for the provided collection resource url.
static List getNCSCollectionIDs()
           
static List getNCSCollectionRecordIDs()
          Gets a list of collection ids from the NCSL Collections collection.
static NCSCollectReader getNCSRecord(String recId)
          Returns NCSCollectReader instance for NCS Collect record having provided id.
static NCSCollectReader getNCSRecord(URL resourceUrl)
          Gets an NCSCollectReader instance for a given resourceUrl.
static NCSCollectReader getNCSRecordByTitle(String title)
          Gets the nCSRecordByTitle attribute of the NSDLCollectionUtils class
static void main(String[] args)
          The main program for the NSDLCollectionUtils class
static void setBaseServiceUrl(String baseUrl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NSDLCollectionUtils

public NSDLCollectionUtils()
Method Detail

setBaseServiceUrl

public static void setBaseServiceUrl(String baseUrl)

getBaseServiceUrl

public static String getBaseServiceUrl()

getCollectionMetadataHandle

public static String getCollectionMetadataHandle(String aggHandle)

getNCSCollectionID

public static String getNCSCollectionID(NSDLCollectionReader collReader)
Extracts the NCS collection id from a NSDLCollectionReader instance.

Never returns null so we can stuff into xml without worry

Parameters:
collReader - Description of the Parameter
Returns:
The collection id value, or an empty string if one cannot be found

getNCSRecord

public static NCSCollectReader getNCSRecord(URL resourceUrl)
Gets an NCSCollectReader instance for a given resourceUrl.

Uses web service to find a metadata record for the resourceUrl and then creates a reader object from the response.

Parameters:
resourceUrl - Description of the Parameter
Returns:
The nCSRecord value

getNCSCollectionID

public static String getNCSCollectionID(String resourceUrl)
Finds the collection id for the provided collection resource url.

Parameters:
resourceUrl - Description of the Parameter
Returns:
The nCSCollectionID value

getNCSCollectionRecordIDs

public static List getNCSCollectionRecordIDs()
                                      throws Exception
Gets a list of collection ids from the NCSL Collections collection.

Returns:
The nCSCollectionIDs value
Throws:
Exception - Description of the Exception

getNCSCollectionIDs

public static List getNCSCollectionIDs()
                                throws Exception
Throws:
Exception

getNCSRecord

public static NCSCollectReader getNCSRecord(String recId)
                                     throws Exception
Returns NCSCollectReader instance for NCS Collect record having provided id.

Parameters:
recId - Description of the Parameter
Returns:
The nCSRecord value
Throws:
Exception - Description of the Exception

getNCSRecordByTitle

public static NCSCollectReader getNCSRecordByTitle(String title)
                                            throws Exception
Gets the nCSRecordByTitle attribute of the NSDLCollectionUtils class

Parameters:
title - Description of the Parameter
Returns:
The nCSRecordByTitle value
Throws:
Exception - Description of the Exception

main

public static void main(String[] args)
The main program for the NSDLCollectionUtils class

Parameters:
args - The command line arguments

compare

public static void compare(String aggHandle)
                    throws Exception
Description of the Method

Parameters:
aggHandle - Description of the Parameter
Throws:
Exception - Description of the Exception

compare

public static void compare(NSDLCollectionReader nsdl,
                           NCSCollectReader ncs)
Description of the Method

Parameters:
nsdl - Description of the Parameter
ncs - Description of the Parameter

compareInfoModels

public static void compareInfoModels()
                              throws Exception
Description of the Method

Throws:
Exception - Description of the Exception

DLESE Tools
v1.6.0