1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
package org.kuali.student.contract.model.util; |
6 | |
|
7 | |
import java.io.PrintStream; |
8 | |
|
9 | |
import org.kuali.student.contract.model.XmlType; |
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
public class XmlTypeDumper |
16 | |
{ |
17 | |
|
18 | |
private XmlType xmlType; |
19 | |
private PrintStream out; |
20 | |
|
21 | |
public XmlTypeDumper (XmlType xmlType, |
22 | |
PrintStream out) |
23 | 0 | { |
24 | 0 | this.xmlType = xmlType; |
25 | 0 | this.out = out; |
26 | 0 | } |
27 | |
|
28 | |
public void dump () |
29 | |
{ |
30 | 0 | out.println (xmlType.getName () |
31 | |
+ " - " + xmlType.getPrimitive () |
32 | |
+ " - " + xmlType.getDesc () |
33 | |
+ " - Http://XXX" + xmlType.getUrl ()); |
34 | 0 | } |
35 | |
|
36 | |
public void writeTabbedHeader () |
37 | |
{ |
38 | 0 | out.print ("name"); |
39 | 0 | out.print ("\t"); |
40 | 0 | out.print ("desc"); |
41 | 0 | out.print ("\t"); |
42 | 0 | out.print ("primitive"); |
43 | 0 | out.print ("\t"); |
44 | 0 | out.print ("hasOwnType"); |
45 | 0 | out.print ("\t"); |
46 | 0 | out.print ("hasOwnState"); |
47 | 0 | out.print ("\t"); |
48 | 0 | out.print ("hasOwnCreateUpdate"); |
49 | 0 | out.print ("\t"); |
50 | 0 | out.print ("Service"); |
51 | 0 | out.print ("\t"); |
52 | 0 | out.print ("examples"); |
53 | 0 | out.print ("\t"); |
54 | 0 | out.print ("javaPackage"); |
55 | 0 | out.print ("\t"); |
56 | 0 | out.print ("comments"); |
57 | |
|
58 | 0 | out.println (""); |
59 | 0 | } |
60 | |
|
61 | |
public void writeTabbedData () |
62 | |
{ |
63 | 0 | out.print (xmlType.getName ()); |
64 | 0 | out.print ("\t"); |
65 | 0 | out.print (xmlType.getDesc ()); |
66 | 0 | out.print ("\t"); |
67 | 0 | out.print (xmlType.getPrimitive ()); |
68 | 0 | out.print ("\t"); |
69 | 0 | out.print (xmlType.hasOwnType ()); |
70 | 0 | out.print ("\t"); |
71 | 0 | out.print (xmlType.hasOwnState ()); |
72 | 0 | out.print ("\t"); |
73 | 0 | out.print (xmlType.hasOwnCreateUpdate ()); |
74 | 0 | out.print ("\t"); |
75 | 0 | out.print (xmlType.getService ()); |
76 | 0 | out.print ("\t"); |
77 | 0 | out.print (xmlType.getExamples ()); |
78 | 0 | out.print ("\t"); |
79 | 0 | out.print (xmlType.getJavaPackage ()); |
80 | 0 | out.print ("\t"); |
81 | 0 | out.print (xmlType.getComments ()); |
82 | 0 | out.println (""); |
83 | 0 | } |
84 | |
|
85 | |
} |