Package ucar.nc2.dataset
Class CoordinateTransform
- java.lang.Object
-
- ucar.nc2.dataset.CoordinateTransform
-
- All Implemented Interfaces:
Comparable<CoordinateTransform>
- Direct Known Subclasses:
ProjectionCT
,VerticalCT
@ThreadSafe public class CoordinateTransform extends Object implements Comparable<CoordinateTransform>
A CoordinateTransform is an abstraction of a function from a CoordinateSystem to a "reference" CoordinateSystem. CoordinateTransform is the superclass for ProjectionCT and VerticalCT. It contains the Attributes/Parameters needed to make a "Coordinate Transform Variable" which is just a container for the Transform parameters. LOOK this should be abstract.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CoordinateTransform.Builder<T extends CoordinateTransform.Builder<T>>
-
Field Summary
Fields Modifier and Type Field Description protected String
authority
protected String
name
protected List<Parameter>
params
protected TransformType
transformType
-
Constructor Summary
Constructors Modifier Constructor Description CoordinateTransform(String name, String authority, TransformType transformType)
Deprecated.Use CoordinateTransform.builder()protected
CoordinateTransform(String name, String authority, TransformType transformType, List<Parameter> params)
Create a Coordinate Transform.protected
CoordinateTransform(CoordinateTransform.Builder<?> builder, NetcdfDataset ncd)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected CoordinateTransform.Builder<?>
addLocalFieldsToBuilder(CoordinateTransform.Builder<? extends CoordinateTransform.Builder<?>> b)
void
addParameter(Parameter param)
Deprecated.Use CoordinateTransform.builder()static CoordinateTransform.Builder<?>
builder()
Get Builder for this class that allows subclassing.int
compareTo(CoordinateTransform oct)
boolean
equals(Object oo)
Instances which have same name, authority and parameters are equal.Parameter
findParameterIgnoreCase(String name)
Convenience function; look up Parameter by name, ignoring case.AttributeContainer
getAttributeContainer()
String
getAuthority()
String
getName()
com.google.common.collect.ImmutableList<Parameter>
getParameters()
TransformType
getTransformType()
int
hashCode()
Override Object.hashCode() to be consistent with equals.CoordinateTransform.Builder<?>
toBuilder()
String
toString()
-
-
-
Field Detail
-
name
protected String name
-
authority
protected String authority
-
transformType
protected final TransformType transformType
-
-
Constructor Detail
-
CoordinateTransform
protected CoordinateTransform(String name, String authority, TransformType transformType, List<Parameter> params)
Create a Coordinate Transform.- Parameters:
name
- name of transform, must be unique within the Coordinate System.authority
- naming authoritytransformType
- type of transform.params
- list of Parameters.
-
CoordinateTransform
@Deprecated public CoordinateTransform(String name, String authority, TransformType transformType)
Deprecated.Use CoordinateTransform.builder()Create a Coordinate Transform.- Parameters:
name
- name of transform, must be unique within the NcML.authority
- naming authoritytransformType
- type of transform.
-
CoordinateTransform
protected CoordinateTransform(CoordinateTransform.Builder<?> builder, NetcdfDataset ncd)
-
-
Method Detail
-
addParameter
@Deprecated public void addParameter(Parameter param)
Deprecated.Use CoordinateTransform.builder()add a parameter- Parameters:
param
- add this Parameter
-
getName
public String getName()
-
getAttributeContainer
public AttributeContainer getAttributeContainer()
-
getAuthority
public String getAuthority()
-
getTransformType
public TransformType getTransformType()
-
getParameters
public com.google.common.collect.ImmutableList<Parameter> getParameters()
-
findParameterIgnoreCase
public Parameter findParameterIgnoreCase(String name)
Convenience function; look up Parameter by name, ignoring case.- Parameters:
name
- the name of the attribute- Returns:
- the Attribute, or null if not found
-
equals
public boolean equals(Object oo)
Instances which have same name, authority and parameters are equal.
-
hashCode
public int hashCode()
Override Object.hashCode() to be consistent with equals.
-
compareTo
public int compareTo(CoordinateTransform oct)
- Specified by:
compareTo
in interfaceComparable<CoordinateTransform>
-
toBuilder
public CoordinateTransform.Builder<?> toBuilder()
-
addLocalFieldsToBuilder
protected CoordinateTransform.Builder<?> addLocalFieldsToBuilder(CoordinateTransform.Builder<? extends CoordinateTransform.Builder<?>> b)
-
builder
public static CoordinateTransform.Builder<?> builder()
Get Builder for this class that allows subclassing.- See Also:
- "https://community.oracle.com/blogs/emcmanus/2010/10/24/using-builder-pattern-subclasses"
-
-