1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
\r
5 <!-- Generated by javadoc (build 1.5.0_22) on Thu Apr 10 14:54:57 PDT 2014 -->
\r
6 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
\r
11 <META NAME="keywords" CONTENT="org.openexi.proc.common.GrammarOptions class">
\r
13 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
\r
15 <SCRIPT type="text/javascript">
\r
16 function windowTitle()
\r
18 parent.document.title="GrammarOptions";
\r
26 <BODY BGCOLOR="white" onload="windowTitle();">
\r
29 <!-- ========= START OF TOP NAVBAR ======= -->
\r
30 <A NAME="navbar_top"><!-- --></A>
\r
31 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
\r
32 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
34 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
35 <A NAME="navbar_top_firstrow"><!-- --></A>
\r
36 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
37 <TR ALIGN="center" VALIGN="top">
\r
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
40 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
48 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
54 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
55 <A HREF="../../../../org/openexi/proc/common/EXIOptions.html" title="class in org.openexi.proc.common"><B>PREV CLASS</B></A>
\r
56 <A HREF="../../../../org/openexi/proc/common/QName.html" title="class in org.openexi.proc.common"><B>NEXT CLASS</B></A></FONT></TD>
\r
57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
58 <A HREF="../../../../index.html?org/openexi/proc/common/GrammarOptions.html" target="_top"><B>FRAMES</B></A>
\r
59 <A HREF="GrammarOptions.html" target="_top"><B>NO FRAMES</B></A>
\r
60 <SCRIPT type="text/javascript">
\r
63 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
68 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
75 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
76 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
77 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
78 DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
81 <A NAME="skip-navbar_top"></A>
\r
82 <!-- ========= END OF TOP NAVBAR ========= -->
\r
85 <!-- ======== START OF CLASS DATA ======== -->
\r
88 org.openexi.proc.common</FONT>
\r
90 Class GrammarOptions</H2>
\r
93 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.openexi.proc.common.GrammarOptions</B>
\r
97 <DT><PRE>public final class <B>GrammarOptions</B><DT>extends java.lang.Object</DL>
\r
101 GrammarOptions computes a short integer that represents settings in the EXI Grammar settings
102 that determine how an EXI file will be encoded or decoded.
104 Values are set using binary switch values (represented as short integers).
106 If no options have been set, the value is 0 (this is an temporary internal
107 value, rather than a valid setting).
109 If an XSD is available, and the file to be processed is 100% compatible with the XSD, choosing
110 STRICT_OPTIONS (1) provides the best performance. No other options can be set
111 when files are encoded or decoded in strict mode.
113 The DEFAULT_OPTIONS setting is 2. The following table lists all of the options and their values.
115 <table align="center" border="1" cellpadding="3" width="640"><tr>
116 <th>Constant</th><th>Value</th>
118 <td>STRICT_OPTIONS</td><td>1</td>
120 <td>DEFAULT_OPTIONS</td><td>2</td>
132 <tr><td colspan="2">*The self-contained option is not supported in this release.
136 The value of DEFAULT_OPTIONS is 2. When you pass the options variable to an add[??] method,
137 the binary switch value is added to the current value of the options variable.
138 The sum of all additional switches becomes a concise list of the selected options.
140 For example, if you preserve comments and processing instructions, the total is
141 98 (2 + 32 + 64). The bitwise options are set correctly, because there is one and only one
142 combination of options that sums up to 98.
144 If your application uses the same options every time, you can hard code the numeric value
145 as a short integer and use it to create your GrammarCache. For example:
147 GrammarCache gc = new GrammarCache((EXISchema)null,98);
149 Be careful to use the correct numeric value, to avoid unexpected results.
\r
154 <!-- yWorks UML Doclet http://www.yworks.com/ b0ac8294d3f86ae0003f3a3a002ea3cf577df824efc6f2... -->
159 <!-- =========== FIELD SUMMARY =========== -->
\r
161 <A NAME="field_summary"><!-- --></A>
\r
162 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
163 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
164 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
\r
165 <B>Field Summary</B></FONT></TH>
\r
167 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
168 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
169 <CODE>static short</CODE></FONT></TD>
\r
170 <TD><CODE><B><A HREF="../../../../org/openexi/proc/common/GrammarOptions.html#DEFAULT_OPTIONS">DEFAULT_OPTIONS</A></B></CODE>
\r
173 Indicates that undeclared elements and attributes will be
174 processed when the XML stream is encoded and decoded.</TD>
\r
176 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
177 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
178 <CODE>static short</CODE></FONT></TD>
\r
179 <TD><CODE><B><A HREF="../../../../org/openexi/proc/common/GrammarOptions.html#OPTIONS_UNUSED">OPTIONS_UNUSED</A></B></CODE>
\r
182 OPTIONS_UNUSED is an internal value.</TD>
\r
184 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
185 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
186 <CODE>static short</CODE></FONT></TD>
\r
187 <TD><CODE><B><A HREF="../../../../org/openexi/proc/common/GrammarOptions.html#STRICT_OPTIONS">STRICT_OPTIONS</A></B></CODE>
\r
190 Indicates that undeclared elements and attributes will throw an
191 exception when the XML stream is encoded and decoded.</TD>
\r
195 <!-- ========== METHOD SUMMARY =========== -->
\r
197 <A NAME="method_summary"><!-- --></A>
\r
198 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
199 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
200 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
\r
201 <B>Method Summary</B></FONT></TH>
\r
203 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
204 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
205 <CODE>static short</CODE></FONT></TD>
\r
206 <TD><CODE><B><A HREF="../../../../org/openexi/proc/common/GrammarOptions.html#addCM(short)">addCM</A></B>(short options)</CODE>
\r
209 Sets Preserve Comments to <i>true</i>.</TD>
\r
211 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
212 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
213 <CODE>static short</CODE></FONT></TD>
\r
214 <TD><CODE><B><A HREF="../../../../org/openexi/proc/common/GrammarOptions.html#addDTD(short)">addDTD</A></B>(short options)</CODE>
\r
217 Sets Preserve Document Type Definition to <i>true</i>.</TD>
\r
219 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
220 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
221 <CODE>static short</CODE></FONT></TD>
\r
222 <TD><CODE><B><A HREF="../../../../org/openexi/proc/common/GrammarOptions.html#addNS(short)">addNS</A></B>(short options)</CODE>
\r
225 Sets Preserve Namespaces to <i>true</i>.</TD>
\r
227 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
228 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
229 <CODE>static short</CODE></FONT></TD>
\r
230 <TD><CODE><B><A HREF="../../../../org/openexi/proc/common/GrammarOptions.html#addPI(short)">addPI</A></B>(short options)</CODE>
\r
233 Sets Preserve Processing Instructions to <i>true</i>.</TD>
\r
235 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
236 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
237 <CODE>static boolean</CODE></FONT></TD>
\r
238 <TD><CODE><B><A HREF="../../../../org/openexi/proc/common/GrammarOptions.html#hasCM(short)">hasCM</A></B>(short options)</CODE>
\r
241 Returns <i>true</i> if Preserve Comments is true.</TD>
\r
243 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
244 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
245 <CODE>static boolean</CODE></FONT></TD>
\r
246 <TD><CODE><B><A HREF="../../../../org/openexi/proc/common/GrammarOptions.html#hasDTD(short)">hasDTD</A></B>(short options)</CODE>
\r
249 Returns <i>true</i> if Preserve Document Type Definition is true.</TD>
\r
251 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
252 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
253 <CODE>static boolean</CODE></FONT></TD>
\r
254 <TD><CODE><B><A HREF="../../../../org/openexi/proc/common/GrammarOptions.html#hasNS(short)">hasNS</A></B>(short options)</CODE>
\r
257 Returns <i>true</i> if Preserve Namespaces is true.</TD>
\r
259 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
260 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
261 <CODE>static boolean</CODE></FONT></TD>
\r
262 <TD><CODE><B><A HREF="../../../../org/openexi/proc/common/GrammarOptions.html#hasPI(short)">hasPI</A></B>(short options)</CODE>
\r
265 Returns <i>true</i> if Preserve Processing Instructions is true.</TD>
\r
267 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
268 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
269 <CODE>static boolean</CODE></FONT></TD>
\r
270 <TD><CODE><B><A HREF="../../../../org/openexi/proc/common/GrammarOptions.html#isPermitDeviation(short)">isPermitDeviation</A></B>(short options)</CODE>
\r
273 Returns <i>true</i> if DEFAULT_OPTIONS is set to true.</TD>
\r
276 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
\r
277 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
278 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
\r
279 <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
\r
281 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
282 <TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
\r
288 <!-- ============ FIELD DETAIL =========== -->
\r
290 <A NAME="field_detail"><!-- --></A>
\r
291 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
292 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
293 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
\r
294 <B>Field Detail</B></FONT></TH>
\r
298 <A NAME="OPTIONS_UNUSED"><!-- --></A><H3>
\r
299 OPTIONS_UNUSED</H3>
\r
301 public static final short <B>OPTIONS_UNUSED</B></PRE>
\r
303 <DD>OPTIONS_UNUSED is an internal value.
304 It indicates that the grammar options value has not yet been set.
\r
307 <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.openexi.proc.common.GrammarOptions.OPTIONS_UNUSED">Constant Field Values</A></DL>
\r
311 <A NAME="DEFAULT_OPTIONS"><!-- --></A><H3>
\r
312 DEFAULT_OPTIONS</H3>
\r
314 public static final short <B>DEFAULT_OPTIONS</B></PRE>
\r
316 <DD>Indicates that undeclared elements and attributes will be
317 processed when the XML stream is encoded and decoded.
\r
320 <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.openexi.proc.common.GrammarOptions.DEFAULT_OPTIONS">Constant Field Values</A></DL>
\r
324 <A NAME="STRICT_OPTIONS"><!-- --></A><H3>
\r
325 STRICT_OPTIONS</H3>
\r
327 public static final short <B>STRICT_OPTIONS</B></PRE>
\r
329 <DD>Indicates that undeclared elements and attributes will throw an
330 exception when the XML stream is encoded and decoded. When
331 STRICT_OPTIONS is set, all other Grammar Options are ignored.
\r
334 <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.openexi.proc.common.GrammarOptions.STRICT_OPTIONS">Constant Field Values</A></DL>
\r
337 <!-- ============ METHOD DETAIL ========== -->
\r
339 <A NAME="method_detail"><!-- --></A>
\r
340 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
341 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
342 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
\r
343 <B>Method Detail</B></FONT></TH>
\r
347 <A NAME="isPermitDeviation(short)"><!-- --></A><H3>
\r
348 isPermitDeviation</H3>
\r
350 public static boolean <B>isPermitDeviation</B>(short options)</PRE>
\r
352 <DD>Returns <i>true</i> if DEFAULT_OPTIONS is set to true.
\r
360 <A NAME="hasNS(short)"><!-- --></A><H3>
\r
363 public static boolean <B>hasNS</B>(short options)</PRE>
\r
365 <DD>Returns <i>true</i> if Preserve Namespaces is true.
\r
373 <A NAME="hasDTD(short)"><!-- --></A><H3>
\r
376 public static boolean <B>hasDTD</B>(short options)</PRE>
\r
378 <DD>Returns <i>true</i> if Preserve Document Type Definition is true.
\r
386 <A NAME="hasCM(short)"><!-- --></A><H3>
\r
389 public static boolean <B>hasCM</B>(short options)</PRE>
\r
391 <DD>Returns <i>true</i> if Preserve Comments is true.
\r
399 <A NAME="hasPI(short)"><!-- --></A><H3>
\r
402 public static boolean <B>hasPI</B>(short options)</PRE>
\r
404 <DD>Returns <i>true</i> if Preserve Processing Instructions is true.
\r
412 <A NAME="addNS(short)"><!-- --></A><H3>
\r
415 public static short <B>addNS</B>(short options)</PRE>
\r
417 <DD>Sets Preserve Namespaces to <i>true</i>. (Adds 4 to the <i>options</i> value.)
\r
421 <DT><B>Returns:</B><DD>the new <i>options</i> short integer value</DL>
\r
426 <A NAME="addDTD(short)"><!-- --></A><H3>
\r
429 public static short <B>addDTD</B>(short options)</PRE>
\r
431 <DD>Sets Preserve Document Type Definition to <i>true</i>. (Adds 16 to the <i>options</i> value.)
\r
435 <DT><B>Returns:</B><DD>the new <i>options</i> short integer value</DL>
\r
440 <A NAME="addCM(short)"><!-- --></A><H3>
\r
443 public static short <B>addCM</B>(short options)</PRE>
\r
445 <DD>Sets Preserve Comments to <i>true</i>. (Adds 32 to the <i>options</i> value.)
\r
449 <DT><B>Returns:</B><DD>the new <i>options</i> short integer value</DL>
\r
454 <A NAME="addPI(short)"><!-- --></A><H3>
\r
457 public static short <B>addPI</B>(short options)</PRE>
\r
459 <DD>Sets Preserve Processing Instructions to <i>true</i>. (Adds 64 to the <i>options</i> value.)
\r
463 <DT><B>Returns:</B><DD>the new <i>options</i> short integer value</DL>
\r
466 <!-- ========= END OF CLASS DATA ========= -->
\r
470 <!-- ======= START OF BOTTOM NAVBAR ====== -->
\r
471 <A NAME="navbar_bottom"><!-- --></A>
\r
472 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
\r
473 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
475 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
476 <A NAME="navbar_bottom_firstrow"><!-- --></A>
\r
477 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
478 <TR ALIGN="center" VALIGN="top">
\r
479 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
480 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
481 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
482 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
483 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
484 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
485 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
489 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
495 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
496 <A HREF="../../../../org/openexi/proc/common/EXIOptions.html" title="class in org.openexi.proc.common"><B>PREV CLASS</B></A>
\r
497 <A HREF="../../../../org/openexi/proc/common/QName.html" title="class in org.openexi.proc.common"><B>NEXT CLASS</B></A></FONT></TD>
\r
498 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
499 <A HREF="../../../../index.html?org/openexi/proc/common/GrammarOptions.html" target="_top"><B>FRAMES</B></A>
\r
500 <A HREF="GrammarOptions.html" target="_top"><B>NO FRAMES</B></A>
\r
501 <SCRIPT type="text/javascript">
\r
504 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
509 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
516 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
517 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
518 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
519 DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
522 <A NAME="skip-navbar_bottom"></A>
\r
523 <!-- ======== END OF BOTTOM NAVBAR ======= -->
\r