nesstar.api
Class DatasetEx

java.lang.Object
  extended by java.util.Observable
      extended by nesstar.rdf.RDFObject
          extended by nesstar.api.Dataset
              extended by nesstar.api.DatasetEx
All Implemented Interfaces:
Comparable, RDFObj
Direct Known Subclasses:
Study

public class DatasetEx
extends Dataset


An extension of Dataset, adds a few convenience methods.

Created:
26 April 2002
Bug:
if a statistical operation is bookmarked and then reapplied the client will get a dataset object that is not being retrieved from the server and that will not contain an indication of data present

Field Summary
static String CLASS_ID
          param
 
Fields inherited from class nesstar.rdf.RDFObject
COLSEP, IS_GETTER, IS_PART, IS_PART_OF, WRITE_OP
 
Constructor Summary
DatasetEx(RDFDB db, URL id)
          
Create an object with the indicated id in the indicated db
 
Method Summary
static void dbg(String msg)
          Method
static DatasetEx getDataset(RDFDB db, URL catalog, String id)
           
static URL getDatasetURL(URL catalog, String id)
           
 String getDDI()
          Gets the dDI attribute of the DatasetEx object
static FeatureDescriptor getDescriptor(String featureName)
          get the descriptor for a feature of the class, either method or attribute
 String getId()
           
static Dataset getInstance(RDFDB db, URL id)
          
If an object of type Dataset with the indicated id exists in the db returns it otherwise create a new object in the db and returns it
 String getProvider()
           
 String getProviderURL()
           
 boolean hasData()
           
 void setDDI(String fullDDI)
          Sets the dDI attribute of the DatasetEx object
 
Methods inherited from class nesstar.api.Dataset
AddDataFile, AddDataFile, Breakdown, Breakdown, clear, Datalist, Datalist, Delete, Delete, Descriptive, Descriptive, FindDDIVariables, FindDDIVariables, Frequency, Frequency, get_abstractText, get_accessConditions, get_accessStatus, get_collMode, get_dataKind, get_distributionDate, get_distributor, get_geographicalCover, get_geographicalUnit, get_hasData, get_sampling, get_source, get_subcat, get_timeMeth, get_timePeriod, get_title, getAbstractText, getAccessConditions, getAccessStatus, getAllInstances, getAllInstances, getCollMode, getComment, getDataKind, GetDDI, GetDDI, GetDDISkeleton, GetDDISkeleton, GetDDIVariable, GetDDIVariable, getDistributionDate, getDistributor, getGeographicalCover, getGeographicalCoverAsString, getGeographicalUnit, getGeographicalUnitAsString, getGetterMethods, getHasData, getInstance, getLabel, getPartsDescriptor, getSampling, getSamplingAsString, getSource, getSubcat, getSubcatAsString, getTimeMeth, getTimePeriod, getTitle, GFrequency, GFrequency, initialised, listenForNewObj, MultipleRegression, MultipleRegression, newInstance, retrieve, set_abstractText, set_accessConditions, set_accessStatus, set_collMode, set_dataKind, set_distributionDate, set_distributor, set_geographicalCover, set_geographicalUnit, set_hasData, set_sampling, set_source, set_subcat, set_timeMeth, set_timePeriod, set_title, setAbstractText, setAccessConditions, setAccessStatus, setCollMode, setDataKind, setDistributionDate, setDistributor, setGeographicalCover, setGeographicalUnit, setHasData, setSampling, setSource, setSubcat, setTimeMeth, setTimePeriod, setTitle, Subset, Subset, Tabulation, Tabulation, XBreak, XBreak
 
Methods inherited from class nesstar.rdf.RDFObject
AddProperty, AddStringProperty, chkFinal, compareTo, equals, err, err, get_comment, get_creationDate, get_label, get, getAccessCondition, getBinding, getBindings, getBookmarkLabel, getCollectionURL, getCreationDate, getDB, getDescriptor, getDomain, getID, getInitialisedProperties, getInternalID, getLastClear, getPartsDescriptor, getPartsDescriptor, getPath, getProperties, GetProperties, GetProperty, GetPropertyStatement, GetPropertyStatements, getRange, getRangeType, getRef, getRef, getServer, getShortId, getShortID, getStatementHome, GetStringProperties, GetStringProperty, getTimeoutInSecs, getType, init, init, isComplete, isLocal, isMeta, isStale, loaded, neededCollectionReload, neededReload, neededReload, neededReload, neededReload, needsReload, reload, remove, set_comment, set_complete, set_creationDate, set_label, set, setComment, setComplete, setCreationDate, setDB, setHardOrSoft, setID, setLabel, setLastClear, SetProperty, setServer, SetStringProperty, setTimeoutInSecs, setTimestamp, setType, setTypeID, stale, toRDF, toRDFWrapped, toString, update
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_ID

public static String CLASS_ID
param

Constructor Detail

DatasetEx

public DatasetEx(RDFDB db,
                 URL id)
          throws Exception

Create an object with the indicated id in the indicated db

Parameters:
db - the db where the object is to be created
id - the id of the object to create
Throws:
Exception
Method Detail

setDDI

public void setDDI(String fullDDI)
Sets the dDI attribute of the DatasetEx object

Parameters:
fullDDI - The new dDI value

getDescriptor

public static FeatureDescriptor getDescriptor(String featureName)
get the descriptor for a feature of the class, either method or attribute

Parameters:
featureName -

getInstance

public static Dataset getInstance(RDFDB db,
                                  URL id)
                           throws Exception

If an object of type Dataset with the indicated id exists in the db returns it otherwise create a new object in the db and returns it

Parameters:
db - the db where the object is to be found or created
id - the id of the object to retrieve or create
Returns:
an object of type Dataset with the indicated id and existing in the indicated db
Throws:
Exception

getId

public String getId()
             throws Exception
Returns:
the short ID of the dataset, e.g.: 2568 from either http://nesstar.data-archive.ac.uk/obj/Catalog/UKDATA_2568 (1.1) or http://nesstar2.essex.ac.uk/obj/fStudy/2568 (2.x)
Throws:
Exception

getProvider

public String getProvider()
Returns:
the name of the catalog where the dataset is stored, ex:UKDA
Bug:
for new servers returns the url of the server

getProviderURL

public String getProviderURL()
Returns:
the full URL of the catalog where the dataset is stored, ex: http://nesstar.essex.ac.uk/obj/Catalog/UKDA
Bug:
for new servers returns the url of the server

getDatasetURL

public static URL getDatasetURL(URL catalog,
                                String id)
                         throws Exception
Parameters:
catalog - the URL of the catalog
id - the short ID of the dataset, ex: 7728
Returns:
the complete URL of the dataset
Throws:
Exception

getDataset

public static DatasetEx getDataset(RDFDB db,
                                   URL catalog,
                                   String id)
                            throws Exception
Parameters:
db - the DB where the dataset is stored or should be created
catalog - the URL of the catalog
id - the short ID of the dataset, ex: 7728
Returns:
an existing DatasetEx object if one with the given catalog and ID exists in the db, otherwise create and return a new one
Throws:
Exception

getDDI

public String getDDI()
Gets the dDI attribute of the DatasetEx object

Returns:
The dDI value

dbg

public static void dbg(String msg)
Method

Parameters:
msg -

hasData

public boolean hasData()
Returns:
true if the dataset's data is available online
Bug:
the value of the field is not updated if data is added (or removed).

Nesstar SDK

Copyright©2003 NSD - All Rights Reserved