Class FDSNSourceId


  • public class FDSNSourceId
    extends java.lang.Object
    • Field Detail

      • sourceIdRegExString

        public static final java.lang.String sourceIdRegExString
        See Also:
        Constant Field Values
      • sourceIdRegEx

        public static final java.util.regex.Pattern sourceIdRegEx
      • DEFAULT_SOURCE_CODE

        public static final java.lang.String DEFAULT_SOURCE_CODE
        See Also:
        Constant Field Values
      • DEFAULT_NETWORK_CODE

        public static final java.lang.String DEFAULT_NETWORK_CODE
        See Also:
        Constant Field Values
      • DEFAULT_STATION_CODE

        public static final java.lang.String DEFAULT_STATION_CODE
        See Also:
        Constant Field Values
      • DEFAULT_LOCATION_CODE

        public static final java.lang.String DEFAULT_LOCATION_CODE
        See Also:
        Constant Field Values
      • DEFAULT_SUBSOURCE_CODE

        public static final java.lang.String DEFAULT_SUBSOURCE_CODE
        See Also:
        Constant Field Values
      • networkCode

        protected java.lang.String networkCode
      • stationCode

        protected java.lang.String stationCode
      • locationCode

        protected java.lang.String locationCode
      • bandCode

        protected java.lang.String bandCode
      • sourceCode

        protected java.lang.String sourceCode
      • subsourceCode

        protected java.lang.String subsourceCode
    • Constructor Detail

      • FDSNSourceId

        public FDSNSourceId​(java.lang.String networkCode,
                            java.lang.String stationCode,
                            java.lang.String locationCode,
                            java.lang.String bandCode,
                            java.lang.String sourceCode,
                            java.lang.String subsourceCode)
    • Method Detail

      • getNetworkCode

        public java.lang.String getNetworkCode()
      • getStationCode

        public java.lang.String getStationCode()
      • getLocationCode

        public java.lang.String getLocationCode()
      • getBandCode

        public java.lang.String getBandCode()
      • getSourceCode

        public java.lang.String getSourceCode()
      • getSubsourceCode

        public java.lang.String getSubsourceCode()
      • getChannelCode

        public java.lang.String getChannelCode()
        If band, source and subsource are all length 1, returns a 3-char channel code like BHZ. Otherwise, return separated by '_' like B_XY_Z.
        Returns:
        combination of band, source and subsource code
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • bandCodeForRate

        public static java.lang.String bandCodeForRate​(java.lang.Double sampRate,
                                                       java.lang.Double response_lb)
                                                throws FDSNSourceIdException
        Calculates the band code for the given sample rate. Optionally taking into account the lower bound of the response, response_lb, to distinguish broadband from short period in the higher sample rates, where 0.1 hertz/10 seconds is the boundary. Use of negative values implies period in seconds, while positive implies Hz. See http://docs.fdsn.org/projects/source-identifiers/en/v1.0/channel-codes.html#band-code
        Parameters:
        sampRate - sample rate, Hz if positive, period in seconds if negative
        response_lb - response lower bound in Hz if positive, period if negative
        Returns:
        Throws:
        FDSNSourceIdException