uk.ac.starlink.vo
Class TapLimit

java.lang.Object
  extended by uk.ac.starlink.vo.TapLimit

public class TapLimit
extends Object

Characterises a limit which applies to a TAP service. This class can represent values encoded by the TAPRegExt DataLimits and TimeLimits element types.

Since:
8 Mar 2011
Author:
Mark Taylor

Field Summary
static String BYTES
          Unit string used for a data limit of bytes ("byte").
static String ROWS
          Unit string used for a data limit of rows ("row").
static String SECONDS
          Unit string used always for time limits ("seconds").
 
Constructor Summary
TapLimit(long value, boolean isHard, String unit)
          Constructor.
 
Method Summary
 String getUnit()
          Returns the limit unit.
 long getValue()
          Returns the limit value.
 boolean isHard()
          Indicates whether this is a hard or soft (default) limit.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SECONDS

public static final String SECONDS
Unit string used always for time limits ("seconds").

See Also:
Constant Field Values

ROWS

public static final String ROWS
Unit string used for a data limit of rows ("row").

See Also:
Constant Field Values

BYTES

public static final String BYTES
Unit string used for a data limit of bytes ("byte").

See Also:
Constant Field Values
Constructor Detail

TapLimit

public TapLimit(long value,
                boolean isHard,
                String unit)
Constructor.

Parameters:
value - limit value
isHard - true for a hard limit, false for a default limit
unit - unit for value
Method Detail

getValue

public long getValue()
Returns the limit value.

Returns:
limit value

isHard

public boolean isHard()
Indicates whether this is a hard or soft (default) limit.

Returns:
true for hard limit, false for default limit

getUnit

public String getUnit()
Returns the limit unit. Should be SECONDS for time limits, and either ROWS or BYTES for data limits.

Returns:
limit unit

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.