Last change
on this file since 2029 was
2029,
checked in by mwindhouwer, 12 years ago
|
Initial import of all the *cats, i.e., ISOcat, RELcat and SCHEMAcat.
|
File size:
1005 bytes
|
Line | |
---|
1 | /* |
---|
2 | * Copyright 2004 - 2007 - M.A.Windhouwer - TDS - University of Amsterdam - LOT |
---|
3 | * Published under the CDDL Version 1.0 |
---|
4 | */ |
---|
5 | |
---|
6 | import org.ten60.netkernel.layer1.nkf.*; |
---|
7 | import org.ten60.netkernel.layer1.representation.*; |
---|
8 | import com.ten60.netkernel.urii.aspect.*; |
---|
9 | import org.ten60.netkernel.xml.xda.*; |
---|
10 | import org.ten60.netkernel.xml.representation.*; |
---|
11 | import com.ten60.netkernel.urii.*; |
---|
12 | |
---|
13 | import java.util.Date; |
---|
14 | import java.text.DateFormat; |
---|
15 | import java.text.SimpleDateFormat; |
---|
16 | |
---|
17 | void main() |
---|
18 | { |
---|
19 | Date date= new Date(); |
---|
20 | try { |
---|
21 | date = new Date(Long.parseLong(context.sourceAspect("this:param:ms",IAspectXDA.class).getXDA().getText("/ms",true))); |
---|
22 | } catch (Exception e) { |
---|
23 | // ignore and use default |
---|
24 | } |
---|
25 | |
---|
26 | DateFormat df = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz"); |
---|
27 | df.setTimeZone(TimeZone.getTimeZone("GMT")); |
---|
28 | IURAspect result=new StringAspect("<date>"+df.format(date)+"</date>"); |
---|
29 | |
---|
30 | INKFResponse resp=context.createResponseFrom(result); |
---|
31 | resp.setMimeType("text/xml"); |
---|
32 | context.setResponse(resp); |
---|
33 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.