axis_examplecompt_changesinfo-opsversion-1.30version-2.00version-3.01version-3.02
Last change
on this file since 866c983 was
8780cbec,
checked in by Jay Jacobs <Jay.Jacobs@…>, 15 years ago
|
ABAC sources from Cobham
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | package edu.stanford.rt.datatype; |
---|
2 | |
---|
3 | import java.util.Date; |
---|
4 | import java.text.DateFormat; |
---|
5 | |
---|
6 | /** |
---|
7 | * @author Ninghui Li, Sandra Qiu<br> |
---|
8 | * |
---|
9 | * Implementation of <code>TimeValue</code> in RTML |
---|
10 | * |
---|
11 | */ |
---|
12 | public class TimeValue implements DataValue |
---|
13 | { |
---|
14 | // Which XML Schema datetype is for this TimeValue? |
---|
15 | private String type; |
---|
16 | |
---|
17 | // The corresponding Java Date object for this TimeValue. |
---|
18 | private Date value; |
---|
19 | |
---|
20 | /** |
---|
21 | * Constructor for TimeValue. |
---|
22 | */ |
---|
23 | public TimeValue(String type, Date value) |
---|
24 | { |
---|
25 | this.type = type; |
---|
26 | this.value = value; |
---|
27 | } |
---|
28 | |
---|
29 | /** |
---|
30 | * Method getValue. |
---|
31 | * @return Date |
---|
32 | */ |
---|
33 | public Date getValue() |
---|
34 | { |
---|
35 | return value; |
---|
36 | } |
---|
37 | |
---|
38 | /** |
---|
39 | * Method getTypeName. |
---|
40 | * @return String |
---|
41 | */ |
---|
42 | public String getType() |
---|
43 | { |
---|
44 | return type; |
---|
45 | } |
---|
46 | |
---|
47 | /* (non-Javadoc) |
---|
48 | * @see java.lang.Object#toString() |
---|
49 | */ |
---|
50 | public String toString() |
---|
51 | { |
---|
52 | return DateFormat.getDateInstance().format(value); |
---|
53 | } |
---|
54 | |
---|
55 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.