Class NullIcat

java.lang.Object
gda.data.metadata.icat.IcatBase
gda.data.metadata.icat.NullIcat
All Implemented Interfaces:
Icat

public class NullIcat extends IcatBase
If no Icat configured, then this should be used as the singleton returned by IcatProvider to return meaningful error messages and responses.
  • Constructor Details

    • NullIcat

      public NullIcat()
  • Method Details

    • icatInUse

      public boolean icatInUse()
      Description copied from class: IcatBase
      Has an ICAT been defined for use? Based solely on the java property @see Icat.ICAT_TYPE_PROP
      Specified by:
      icatInUse in interface Icat
      Overrides:
      icatInUse in class IcatBase
      Returns:
      true if the Icat database can be connected to.
    • getMyValidVisits

      public VisitEntry[] getMyValidVisits(String username) throws Exception
      Return the default experiment defined by either the metadata or the java property
      Specified by:
      getMyValidVisits in interface Icat
      Overrides:
      getMyValidVisits in class IcatBase
      Parameters:
      username -
      Returns:
      array of valid visit IDs
      Throws:
      Exception
    • getCurrentInformation

      public String getCurrentInformation(String accessName) throws Exception
      Description copied from interface: Icat
      Queries the database filtering using the current username and visit held in metadata.
      Specified by:
      getCurrentInformation in interface Icat
      Overrides:
      getCurrentInformation in class IcatBase
      Parameters:
      accessName -
      Returns:
      String or null if no information found
      Throws:
      Exception
    • getExperimentTitleAccessName

      protected String getExperimentTitleAccessName()
      Description copied from class: IcatBase
      Returns the access name which is used to find the experiment title
      Specified by:
      getExperimentTitleAccessName in class IcatBase
    • getValue

      protected String getValue(String visitIDFilter, String userNameFilter, String accessName) throws Exception
      Description copied from class: IcatBase
      Returns the SQL result for the given accessName string filtered by beamline, username and (optionally) visitID.
      Specified by:
      getValue in class IcatBase
      Parameters:
      visitIDFilter -
      userNameFilter -
      accessName -
      Returns:
      String
      Throws:
      Exception
    • getVisitIDAccessName

      protected String getVisitIDAccessName()
      Description copied from class: IcatBase
      Returns the access name which is used to find the visit ID
      Specified by:
      getVisitIDAccessName in class IcatBase