1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
|
2
|
<!--NewPage-->
|
3
|
<HTML>
|
4
|
<HEAD>
|
5
|
<!-- Generated by javadoc on Mon Jun 26 20:52:07 AKDT 2000 -->
|
6
|
<TITLE>
|
7
|
MetaCat API: Class DBValidate
|
8
|
</TITLE>
|
9
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
|
10
|
</HEAD>
|
11
|
<BODY BGCOLOR="white">
|
12
|
|
13
|
<!-- ========== START OF NAVBAR ========== -->
|
14
|
<A NAME="navbar_top"><!-- --></A>
|
15
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
16
|
<TR>
|
17
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
18
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
19
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
20
|
<TR ALIGN="center" VALIGN="top">
|
21
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
22
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
23
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DBValidate.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
24
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
25
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
26
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
27
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
28
|
</TR>
|
29
|
</TABLE>
|
30
|
</TD>
|
31
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
32
|
</EM>
|
33
|
</TD>
|
34
|
</TR>
|
35
|
|
36
|
<TR>
|
37
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
38
|
<A HREF="../../../../edu/ucsb/nceas/metacat/DBTransform.html"><B>PREV CLASS</B></A>
|
39
|
<A HREF="../../../../edu/ucsb/nceas/metacat/DBWriter.html"><B>NEXT CLASS</B></A></FONT></TD>
|
40
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
41
|
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
42
|
<A HREF="DBValidate.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
43
|
</TR>
|
44
|
<TR>
|
45
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
46
|
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
47
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
48
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
49
|
</TR>
|
50
|
</TABLE>
|
51
|
<!-- =========== END OF NAVBAR =========== -->
|
52
|
|
53
|
<HR>
|
54
|
<!-- ======== START OF CLASS DATA ======== -->
|
55
|
<H2>
|
56
|
<FONT SIZE="-1">
|
57
|
edu.ucsb.nceas.metacat</FONT>
|
58
|
<BR>
|
59
|
Class DBValidate</H2>
|
60
|
<PRE>
|
61
|
java.lang.Object
|
62
|
|
|
63
|
+--<B>edu.ucsb.nceas.metacat.DBValidate</B>
|
64
|
</PRE>
|
65
|
<HR>
|
66
|
<DL>
|
67
|
<DT>public class <B>DBValidate</B><DT>extends java.lang.Object</DL>
|
68
|
|
69
|
<P>
|
70
|
Name: DBValidate.java
|
71
|
Purpose: A Class that validates XML documents
|
72
|
This class is designed to be parser independent
|
73
|
i.e. it uses only org.xml.sax classes
|
74
|
It is tied to SAX 2.0 methods
|
75
|
Copyright: 2000 Regents of the University of California and the
|
76
|
National Center for Ecological Analysis and Synthesis
|
77
|
April 28, 2000
|
78
|
<P>
|
79
|
<DL>
|
80
|
<DT><B>Version: </B><DD>1.0</DD>
|
81
|
<DT><B>Author: </B><DD>Dan Higgins</DD>
|
82
|
</DL>
|
83
|
<HR>
|
84
|
|
85
|
<P>
|
86
|
<!-- ======== INNER CLASS SUMMARY ======== -->
|
87
|
|
88
|
|
89
|
<!-- =========== FIELD SUMMARY =========== -->
|
90
|
|
91
|
|
92
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
93
|
|
94
|
<A NAME="constructor_summary"><!-- --></A>
|
95
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
96
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
97
|
<TD COLSPAN=2><FONT SIZE="+2">
|
98
|
<B>Constructor Summary</B></FONT></TD>
|
99
|
</TR>
|
100
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
101
|
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBValidate.html#DBValidate(java.lang.String)">DBValidate</A></B>(java.lang.String parserName)</CODE>
|
102
|
|
103
|
<BR>
|
104
|
Construct a new validation object</TD>
|
105
|
</TR>
|
106
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
107
|
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBValidate.html#DBValidate(java.lang.String, java.lang.String)">DBValidate</A></B>(java.lang.String parserName,
|
108
|
java.lang.String xmlcatalogfile)</CODE>
|
109
|
|
110
|
<BR>
|
111
|
Construct a new validation object</TD>
|
112
|
</TR>
|
113
|
</TABLE>
|
114
|
|
115
|
<!-- ========== METHOD SUMMARY =========== -->
|
116
|
|
117
|
<A NAME="method_summary"><!-- --></A>
|
118
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
119
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
120
|
<TD COLSPAN=2><FONT SIZE="+2">
|
121
|
<B>Method Summary</B></FONT></TD>
|
122
|
</TR>
|
123
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
124
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
125
|
<CODE>static void</CODE></FONT></TD>
|
126
|
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBValidate.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE>
|
127
|
|
128
|
<BR>
|
129
|
main method for testing
|
130
|
</TD>
|
131
|
</TR>
|
132
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
133
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
134
|
<CODE> java.lang.String</CODE></FONT></TD>
|
135
|
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBValidate.html#returnErrors()">returnErrors</A></B>()</CODE>
|
136
|
|
137
|
<BR>
|
138
|
provide a list of errors fromthe validation process</TD>
|
139
|
</TR>
|
140
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
141
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
142
|
<CODE> boolean</CODE></FONT></TD>
|
143
|
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBValidate.html#validate(java.lang.String)">validate</A></B>(java.lang.String doc)</CODE>
|
144
|
|
145
|
<BR>
|
146
|
validate an xml document against its DTD</TD>
|
147
|
</TR>
|
148
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
149
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
150
|
<CODE> boolean</CODE></FONT></TD>
|
151
|
<TD><CODE><B><A HREF="../../../../edu/ucsb/nceas/metacat/DBValidate.html#validateString(java.lang.String)">validateString</A></B>(java.lang.String xmldoc)</CODE>
|
152
|
|
153
|
<BR>
|
154
|
validate an xml document against its DTD</TD>
|
155
|
</TR>
|
156
|
</TABLE>
|
157
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
158
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
159
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
160
|
<TD><B>Methods inherited from class java.lang.Object</B></TD>
|
161
|
</TR>
|
162
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
163
|
<TD><CODE>clone,
|
164
|
equals,
|
165
|
finalize,
|
166
|
getClass,
|
167
|
hashCode,
|
168
|
notify,
|
169
|
notifyAll,
|
170
|
toString,
|
171
|
wait,
|
172
|
wait,
|
173
|
wait</CODE></TD>
|
174
|
</TR>
|
175
|
</TABLE>
|
176
|
|
177
|
<P>
|
178
|
|
179
|
<!-- ============ FIELD DETAIL =========== -->
|
180
|
|
181
|
|
182
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
183
|
|
184
|
<A NAME="constructor_detail"><!-- --></A>
|
185
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
186
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
187
|
<TD COLSPAN=1><FONT SIZE="+2">
|
188
|
<B>Constructor Detail</B></FONT></TD>
|
189
|
</TR>
|
190
|
</TABLE>
|
191
|
|
192
|
<A NAME="DBValidate(java.lang.String)"><!-- --></A><H3>
|
193
|
DBValidate</H3>
|
194
|
<PRE>
|
195
|
public <B>DBValidate</B>(java.lang.String parserName)</PRE>
|
196
|
<DL>
|
197
|
<DD>Construct a new validation object</DL>
|
198
|
<HR>
|
199
|
|
200
|
<A NAME="DBValidate(java.lang.String, java.lang.String)"><!-- --></A><H3>
|
201
|
DBValidate</H3>
|
202
|
<PRE>
|
203
|
public <B>DBValidate</B>(java.lang.String parserName,
|
204
|
java.lang.String xmlcatalogfile)</PRE>
|
205
|
<DL>
|
206
|
<DD>Construct a new validation object</DL>
|
207
|
|
208
|
<!-- ============ METHOD DETAIL ========== -->
|
209
|
|
210
|
<A NAME="method_detail"><!-- --></A>
|
211
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
212
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
213
|
<TD COLSPAN=1><FONT SIZE="+2">
|
214
|
<B>Method Detail</B></FONT></TD>
|
215
|
</TR>
|
216
|
</TABLE>
|
217
|
|
218
|
<A NAME="validate(java.lang.String)"><!-- --></A><H3>
|
219
|
validate</H3>
|
220
|
<PRE>
|
221
|
public boolean <B>validate</B>(java.lang.String doc)</PRE>
|
222
|
<DL>
|
223
|
<DD>validate an xml document against its DTD<DD><DL>
|
224
|
<DT><B>Parameters:</B><DD><CODE>doc</CODE> - the filename of the document to validate</DL>
|
225
|
</DD>
|
226
|
</DL>
|
227
|
<HR>
|
228
|
|
229
|
<A NAME="validateString(java.lang.String)"><!-- --></A><H3>
|
230
|
validateString</H3>
|
231
|
<PRE>
|
232
|
public boolean <B>validateString</B>(java.lang.String xmldoc)</PRE>
|
233
|
<DL>
|
234
|
<DD>validate an xml document against its DTD<DD><DL>
|
235
|
<DT><B>Parameters:</B><DD><CODE>xmldoc</CODE> - the String containing the xml document to validate</DL>
|
236
|
</DD>
|
237
|
</DL>
|
238
|
<HR>
|
239
|
|
240
|
<A NAME="returnErrors()"><!-- --></A><H3>
|
241
|
returnErrors</H3>
|
242
|
<PRE>
|
243
|
public java.lang.String <B>returnErrors</B>()</PRE>
|
244
|
<DL>
|
245
|
<DD>provide a list of errors fromthe validation process</DL>
|
246
|
<HR>
|
247
|
|
248
|
<A NAME="main(java.lang.String[])"><!-- --></A><H3>
|
249
|
main</H3>
|
250
|
<PRE>
|
251
|
public static void <B>main</B>(java.lang.String[] args)</PRE>
|
252
|
<DL>
|
253
|
<DD>main method for testing
|
254
|
<p>
|
255
|
Usage: java DBValidate <xmlfile or URL></DL>
|
256
|
<!-- ========= END OF CLASS DATA ========= -->
|
257
|
<HR>
|
258
|
|
259
|
<!-- ========== START OF NAVBAR ========== -->
|
260
|
<A NAME="navbar_bottom"><!-- --></A>
|
261
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
262
|
<TR>
|
263
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
264
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
265
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
266
|
<TR ALIGN="center" VALIGN="top">
|
267
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
268
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
269
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DBValidate.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
270
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
271
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
272
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
273
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
274
|
</TR>
|
275
|
</TABLE>
|
276
|
</TD>
|
277
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
278
|
</EM>
|
279
|
</TD>
|
280
|
</TR>
|
281
|
|
282
|
<TR>
|
283
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
284
|
<A HREF="../../../../edu/ucsb/nceas/metacat/DBTransform.html"><B>PREV CLASS</B></A>
|
285
|
<A HREF="../../../../edu/ucsb/nceas/metacat/DBWriter.html"><B>NEXT CLASS</B></A></FONT></TD>
|
286
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
287
|
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
288
|
<A HREF="DBValidate.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
289
|
</TR>
|
290
|
<TR>
|
291
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
292
|
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
293
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
294
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
295
|
</TR>
|
296
|
</TABLE>
|
297
|
<!-- =========== END OF NAVBAR =========== -->
|
298
|
|
299
|
<HR>
|
300
|
<i>Copyright ? 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.</i>
|
301
|
</BODY>
|
302
|
</HTML>
|