View Javadoc

1   // Copyright 2006-2007, by the California Institute of Technology.
2   // ALL RIGHTS RESERVED. United States Government Sponsorship acknowledged.
3   // Any commercial use must be negotiated with the Office of Technology Transfer
4   // at the California Institute of Technology.
5   //
6   // This software is subject to U. S. export control laws and regulations
7   // (22 C.F.R. 120-130 and 15 C.F.R. 730-774). To the extent that the software
8   // is subject to U.S. export control laws and regulations, the recipient has
9   // the responsibility to obtain export licenses or other export authority as
10  // may be required before exporting such information to foreign countries or
11  // providing access to foreign nationals.
12  //
13  // $Id: TextString.java 3382 2008-07-22 17:47:02Z pramirez $ 
14  //
15  
16  package gov.nasa.pds.tools.label;
17  
18  import gov.nasa.pds.tools.dict.type.Types;
19  
20  /***
21   * @author pramirez
22   * @version $Revision: 3382 $
23   * 
24   */
25  public class TextString extends Scalar implements Types {
26  
27      /***
28       * @param value
29       */
30      public TextString(String value) {
31          super(value.replaceAll("\"", ""));
32      }
33  
34  	public boolean isSupportedPDSType(String type) {
35  		if (Types.DATE.equals(type) || Types.DOUBLE.equals(type) || Types.INTEGER.equals(type) ||
36  				Types.REAL.equals(type) || Types.TIME.equals(type) || Types.EXPONENTIAL.equals(type))
37  			return false;
38  		return true;
39  	}
40      
41  }