uk.ac.starlink.votable.datalink
Class ServiceDescriptorInfo

java.lang.Object
  extended by uk.ac.starlink.table.DefaultValueInfo
      extended by uk.ac.starlink.votable.datalink.ServiceDescriptorInfo
All Implemented Interfaces:
ValueInfo

public class ServiceDescriptorInfo
extends DefaultValueInfo

ValueInfo for service descriptor values.

Since:
11 Dec 2017

Constructor Summary
ServiceDescriptorInfo(java.lang.String name, java.lang.String description, StarTable table)
          Constructor.
 
Method Summary
static java.lang.String formatDescriptor(ServiceDescriptor sd, StarTable table)
          Returns a string detailing the state of a given ServiceDesciptor in a human-readable form.
 java.lang.String formatValue(java.lang.Object value, int maxLength)
          Returns a string representation of a given value described by this ValueInfo.
 java.lang.Object unformatString(java.lang.String txt)
          Always returns null.
 
Methods inherited from class uk.ac.starlink.table.DefaultValueInfo
formatClass, formatShape, generalise, getContentClass, getDescription, getDomainMappers, getElementSize, getName, getShape, getUCD, getUnitString, getUtype, isArray, isNullable, setContentClass, setDescription, setDomainMappers, setElementSize, setName, setNullable, setShape, setUCD, setUnitString, setUtype, toString, unformatShape
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceDescriptorInfo

public ServiceDescriptorInfo(java.lang.String name,
                             java.lang.String description,
                             StarTable table)
Constructor.

Parameters:
name - descriptor name, should not be null
description - descriptor description, may be null if no relevant information is available
table - table to which the values of this info refer; may be null if inapplicable or unknown
Method Detail

formatValue

public java.lang.String formatValue(java.lang.Object value,
                                    int maxLength)
Description copied from interface: ValueInfo
Returns a string representation of a given value described by this ValueInfo. The returned string should be no longer than a given maximum length.

Specified by:
formatValue in interface ValueInfo
Overrides:
formatValue in class DefaultValueInfo
Parameters:
value - the value to represent
maxLength - the maximum number of characters in the returned string

unformatString

public java.lang.Object unformatString(java.lang.String txt)
Always returns null.

Specified by:
unformatString in interface ValueInfo
Overrides:
unformatString in class DefaultValueInfo
Parameters:
txt - the string representation of a value described by this ValueInfo
Returns:
the Object value represented by rep; must match this info's content class (or be null)

formatDescriptor

public static java.lang.String formatDescriptor(ServiceDescriptor sd,
                                                StarTable table)
Returns a string detailing the state of a given ServiceDesciptor in a human-readable form.

Parameters:
sd - service descriptor
table - table to which the descriptor refers; may be null if inapplicable or unknown
Returns:
multi-line description string

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.