Change-Id: Ic7c1594c1442d8463c5050bdefb434995ffc7f8a Former-commit-id:1d38804eb2
[formerly3719c41d2b
] [formerly71b4227061
] [formerly1d38804eb2
[formerly3719c41d2b
] [formerly71b4227061
] [formerly7cea97ab15
[formerly71b4227061
[formerly 949d132cf3260db5f75ea665f21601ab91440958]]]] Former-commit-id:7cea97ab15
Former-commit-id:e8ca9729eb
[formerly5bf1554597
] [formerly 4cf3887df369f38b75f0a2c9f9f7949057e50e42 [formerly6bdbfb7e1a
]] Former-commit-id: 0fc7bbac68e600996cc014bbf843e66d5484e6e9 [formerly66cd43313a
] Former-commit-id:ad7a69f2e3
59 lines
1.8 KiB
Java
59 lines
1.8 KiB
Java
/**
|
|
* This software was developed and / or modified by Raytheon Company,
|
|
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
|
*
|
|
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
|
* This software product contains export-restricted data whose
|
|
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
|
* to non-U.S. persons whether in the United States or abroad requires
|
|
* an export license or other authorization.
|
|
*
|
|
* Contractor Name: Raytheon Company
|
|
* Contractor Address: 6825 Pine Street, Suite 340
|
|
* Mail Stop B8
|
|
* Omaha, NE 68106
|
|
* 402.291.0100
|
|
*
|
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
|
* further licensing information.
|
|
**/
|
|
package com.raytheon.uf.common.parameter;
|
|
|
|
import com.raytheon.uf.common.dataplugin.annotations.DataURIFieldConverter;
|
|
import com.raytheon.uf.common.parameter.lookup.ParameterLookup;
|
|
|
|
/**
|
|
* A DataURIFieldConverter that ensures that a String parameter abbreviation
|
|
* will be looked up to potentially contain all the fields.
|
|
*
|
|
* <pre>
|
|
*
|
|
* SOFTWARE HISTORY
|
|
*
|
|
* Date Ticket# Engineer Description
|
|
* ------------ ---------- ----------- --------------------------
|
|
* May 6, 2014 2060 njensen Initial creation
|
|
*
|
|
* </pre>
|
|
*
|
|
* @author njensen
|
|
* @version 1.0
|
|
*/
|
|
|
|
public class ParameterConverter implements DataURIFieldConverter<Parameter> {
|
|
|
|
@Override
|
|
public String toString(Parameter field) {
|
|
return field.getAbbreviation();
|
|
}
|
|
|
|
@Override
|
|
public Parameter fromString(String string) {
|
|
Parameter p = ParameterLookup.getInstance().getParameter(string);
|
|
if (p == null) {
|
|
p = new Parameter(string);
|
|
}
|
|
return p;
|
|
}
|
|
|
|
}
|