<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_18) on Sat Dec 04 05:26:33 UTC 2010 --> <TITLE> Validator </TITLE> <META NAME="date" CONTENT="2010-12-04"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Validator"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/xml/bind/ValidationException.html" title="class in javax.xml.bind"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/xml/bind/Validator.html" target="_top"><B>FRAMES</B></A> <A HREF="Validator.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> javax.xml.bind</FONT> <BR> Interface Validator</H2> <DL> <DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../org/apache/ws/jaxme/JMValidator.html" title="interface in org.apache.ws.jaxme">JMValidator</A></DD> </DL> <DL> <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../org/apache/ws/jaxme/impl/JMValidatorImpl.html" title="class in org.apache.ws.jaxme.impl">JMValidatorImpl</A></DD> </DL> <HR> <DL> <DT><PRE>public interface <B>Validator</B></DL> </PRE> <P> <p>A <code>Validator</code> may be used to decide, whether a JAXB object is valid or not. If it is not, the JAXB user may decide to trigger an exception or not (via the <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> and he may receive information on the problems location (via the event handlers <A HREF="../../../javax/xml/bind/ValidationEventLocator.html" title="interface in javax.xml.bind"><CODE>ValidationEventLocator</CODE></A>.</p> <p>A Validator may be present implicitly, invoked by the Unmarshaller. See <A HREF="../../../javax/xml/bind/Unmarshaller.html#setValidating(boolean)"><CODE>Unmarshaller.setValidating(boolean)</CODE></A> for more information on that.</p> <P> <P> <DL> <DT><B>Since:</B></DT> <DD>JAXB1.0</DD> <DT><B>Author:</B></DT> <DD>JSR-31</DD> <DT><B>See Also:</B><DD><A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A>, <A HREF="../../../javax/xml/bind/ValidationEvent.html" title="interface in javax.xml.bind"><CODE>ValidationEvent</CODE></A></DL> <HR> <P> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/bind/Validator.html#getEventHandler()">getEventHandler</A></B>()</CODE> <BR> Returns an event handler that shall be invoked for notifications on problems detected by the <code>Validator</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/bind/Validator.html#getProperty(java.lang.String)">getProperty</A></B>(java.lang.String pName)</CODE> <BR> Returns the marshallers property <code>pName</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/bind/Validator.html#setEventHandler(javax.xml.bind.ValidationEventHandler)">setEventHandler</A></B>(<A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A> pHandler)</CODE> <BR> Registers an event handler that shall be invoked for notifications on problems detected by the <code>Validator</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/bind/Validator.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A></B>(java.lang.String pName, java.lang.Object pValue)</CODE> <BR> Sets the <code>Validator</code> property <code>pName</code> to <code>pValue</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/bind/Validator.html#validate(java.lang.Object)">validate</A></B>(java.lang.Object pObject)</CODE> <BR> Validates the given JAXB object, invoking its error handler for any problems it detects.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/bind/Validator.html#validateRoot(java.lang.Object)">validateRoot</A></B>(java.lang.Object pObject)</CODE> <BR> Validates the given JAXB object, but not its child elements.</TD> </TR> </TABLE> <P> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="setEventHandler(javax.xml.bind.ValidationEventHandler)"><!-- --></A><H3> setEventHandler</H3> <PRE> void <B>setEventHandler</B>(<A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A> pHandler) throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><p>Registers an event handler that shall be invoked for notifications on problems detected by the <code>Validator</code>. If this method is not invoked, there is a default event handler. The default event handler will trigger an exception for errors and fatal errors.</p> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pHandler</CODE> - The event handler being notified or null to restore the default event handler. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - Setting the event handler failed.</DL> </DD> </DL> <HR> <A NAME="getEventHandler()"><!-- --></A><H3> getEventHandler</H3> <PRE> <A HREF="../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A> <B>getEventHandler</B>() throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><p>Returns an event handler that shall be invoked for notifications on problems detected by the <code>Validator</code>. If no specific event handler was set, returns the default event handler. The default event handler will trigger an exception for errors and fatal errors.</p> <P> <DD><DL> <DT><B>Returns:</B><DD>The event handler previously set or the default handler. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - Getting the event handler failed.</DL> </DD> </DL> <HR> <A NAME="validate(java.lang.Object)"><!-- --></A><H3> validate</H3> <PRE> boolean <B>validate</B>(java.lang.Object pObject) throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><p>Validates the given JAXB object, invoking its error handler for any problems it detects. Detected problems may cause exceptions, for example, if the event handlers <A HREF="../../../javax/xml/bind/ValidationEventHandler.html#handleEvent(javax.xml.bind.ValidationEvent)"><CODE>ValidationEventHandler.handleEvent(ValidationEvent)</CODE></A> method returns false.</p> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pObject</CODE> - The JAXB object being validated. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - An unexpected problem occurred during validation <DD><CODE><A HREF="../../../javax/xml/bind/ValidationException.html" title="class in javax.xml.bind">ValidationException</A></CODE> - It was detected, that the object is invalid. <DD><CODE>java.lang.IllegalArgumentException</CODE> - The parameter was null.<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/bind/Validator.html#validateRoot(java.lang.Object)"><CODE>validateRoot(Object)</CODE></A></DL> </DD> </DL> <HR> <A NAME="validateRoot(java.lang.Object)"><!-- --></A><H3> validateRoot</H3> <PRE> boolean <B>validateRoot</B>(java.lang.Object pObject) throws <A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><p>Validates the given JAXB object, but not its child elements.</p> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pObject</CODE> - The JAXB object being validated. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - An unexpected problem occurred during validation <DD><CODE><A HREF="../../../javax/xml/bind/ValidationException.html" title="class in javax.xml.bind">ValidationException</A></CODE> - It was detected, that the object is invalid. <DD><CODE>java.lang.IllegalArgumentException</CODE> - The parameter was null.<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/bind/Validator.html#validate(java.lang.Object)"><CODE>validate(Object)</CODE></A></DL> </DD> </DL> <HR> <A NAME="setProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3> setProperty</H3> <PRE> void <B>setProperty</B>(java.lang.String pName, java.lang.Object pValue) throws <A HREF="../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind">PropertyException</A></PRE> <DL> <DD><p>Sets the <code>Validator</code> property <code>pName</code> to <code>pValue</code>.</p> <p><em>Note</em>: The values type depends on the property name.</p> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pName</CODE> - The property name.<DD><CODE>pValue</CODE> - The property value. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind">PropertyException</A></CODE> - Setting the property failed. <DD><CODE>java.lang.IllegalArgumentException</CODE> - The <code>pName</code> parameter was null.</DL> </DD> </DL> <HR> <A NAME="getProperty(java.lang.String)"><!-- --></A><H3> getProperty</H3> <PRE> java.lang.Object <B>getProperty</B>(java.lang.String pName) throws <A HREF="../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind">PropertyException</A></PRE> <DL> <DD><p>Returns the marshallers property <code>pName</code>.</p> <p><em>Note</em>: The values type depends on the property name.</p> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pName</CODE> - The property name. <DT><B>Returns:</B><DD>The property value. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind">PropertyException</A></CODE> - Fetching the property failed. <DD><CODE>java.lang.IllegalArgumentException</CODE> - The parameter was null.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/xml/bind/ValidationException.html" title="class in javax.xml.bind"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/xml/bind/Validator.html" target="_top"><B>FRAMES</B></A> <A HREF="Validator.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>