Data Catalog API 

See also http://glast-ground.slac.stanford.edu/docs/org-glast-datacat-client/apidocs/index.html

The API 

   void addDatasetLocation(Dataset dataset, String site, String filePath);

   Map<String, Object> addDatasetMetaData(Dataset dataset, List<String> metaData);

   Map<String, Object> addDatasetMetaData(Dataset dataset, Map<String, Object> metaData);

   Dataset getDataset(String datasetName, String logicalFolderPath, String groupName);

   List<DatasetGroup> getDatasetGroups(String logicalFolderPath, String searchCriteria);

   DatasetList getDatasets(String logicalFolderPath, String searchCriteria);

   DatasetList getDatasets(String logicalFolderPath, String searchCriteria, String[] sites);

   LogicalFolder getLogicalFolderParent(LogicalFolder logicalFolder);

   List<LogicalFolder> getLogicalFolders(String logicalFolderPath, String searchCriteria);

   void md(String logicalFolderPath);

   Dataset registerDataset(NewDataset ds, List<String> metaData);

   Dataset registerDataset(NewDataset ds, Map<String, Object> metaData);

   Dataset registerDataset(String dataType, String logicalFolderPath, String filePath);

   Dataset registerDataset(String dataType, String logicalFolderPath, String filePath, String attributes);

Dataset Interface 

The Dataset Interface has several implementations but is used generically as the return-type for dataset queries.  It has the following definition:

   String getName();
   String getDataType();
   String getFileFormat();
   String getSource();
   long getCheckSum();
   long getByteCount();
   long getEvents();
   Map<String,DatasetLocation> getLocations();
   DatasetLocation getLocation(String site);
   DatasetLocation getFirstOKLocation();
   DatasetLocation getFirstUnscannedLocation();
   long getPK();
   long getDatasetGroupPK();
   long getLogicalFolderPK();

NewDataset Class

The NewDataset class is an extension of the Dataset Interface.  It offers all the same methods, but since it is used in the creation of new dataset entries, it's fields are writable only via the constructor which has the following method signature:

   NewDataset(String name, String fileFormat, String dataType, String source, String logicalFolderPath, String groupName, String site, String filePath);

Definitions

Data Type 

 dataType is the pedigree of file registered, it describes the type of data contained in the file.  Current types are:

  • CAL
  • DATA
  • DIGI
  • DIGIHIST
  • EVENTS
  • EXPCUBE
  • FASTMON
  • FITS
  • FT1
  • FT2
  • GCR
  • HISTOGRAM
  • MC
  • MCSRCID
  • MERIT
  • RECON
  • RECONHIST
  • RELATION
  • SCDATA
  • SVAC

Meta Data 

Meta-data represent additional information about the data within a file.  These have a type, a name, and a value.  The type is one of:

  • String
  • Number
  • Timestamp

 The name of meta-data type is significant, with the exception of string-types.  The name must conform to the following conventions:

Type

Name

Notes

Number

n[A-Z]+.*

An 'n' followed by a capital letter character, followed by any string of characters

Timestamp

t[A-Z]+.*

A 't' followed by a capital letter character, followed by any string of characters

  • No labels