Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  //
  // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-01/24/2006 06:15 PM(kohsuke)-fcs 
  // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
  // Any modifications to this file will be lost upon recompilation of the source schema. 
  // Generated on: 2007.03.26 at 04:39:11 PM CEST 
  //
  
  
  package org.jvnet.jaxbvalidation.tests.one.validation;
 
 {
 
 
     public void check(org.jvnet.jaxbcommons.locator.ObjectLocator locatorjavax.xml.bind.ValidationEventHandler handlerjava.lang.Object draftValue) {
         if (draftValue!= null) {
             final org.jvnet.jaxbvalidation.tests.one.AreaCoordinatesType value = ((org.jvnet.jaxbvalidation.tests.one.AreaCoordinatesTypedraftValue);
             {
                 final org.jvnet.jaxbcommons.locator.FieldObjectLocator fieldLocator = new org.jvnet.jaxbcommons.locator.DefaultFieldObjectLocator(locatorvalue"InfX");
                 if (!value.isSetInfX()) {
                     // Report missing object
                     handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(fieldLocatornew org.jvnet.jaxbvalidation.problem.structure.EmptyFieldProblem()));
                 } else {
                     // Check value
                     fieldValidator.check(fieldLocatorhandlernew java.lang.Float(value.getInfX()));
                 }
             }
             {
                 final org.jvnet.jaxbcommons.locator.FieldObjectLocator fieldLocator = new org.jvnet.jaxbcommons.locator.DefaultFieldObjectLocator(locatorvalue"InfY");
                 if (!value.isSetInfY()) {
                     // Report missing object
                     handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(fieldLocatornew org.jvnet.jaxbvalidation.problem.structure.EmptyFieldProblem()));
                 } else {
                     // Check value
                     fieldValidator.check(fieldLocatorhandlernew java.lang.Float(value.getInfY()));
                 }
             }
             {
                 final org.jvnet.jaxbcommons.locator.FieldObjectLocator fieldLocator = new org.jvnet.jaxbcommons.locator.DefaultFieldObjectLocator(locatorvalue"SupX");
                 if (!value.isSetSupX()) {
                     // Report missing object
                     handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(fieldLocatornew org.jvnet.jaxbvalidation.problem.structure.EmptyFieldProblem()));
                 } else {
                     // Check value
                     fieldValidator.check(fieldLocatorhandlernew java.lang.Float(value.getSupX()));
                 }
             }
             {
                 final org.jvnet.jaxbcommons.locator.FieldObjectLocator fieldLocator = new org.jvnet.jaxbcommons.locator.DefaultFieldObjectLocator(locatorvalue"SupY");
                 if (!value.isSetSupY()) {
                     // Report missing object
                     handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(fieldLocatornew org.jvnet.jaxbvalidation.problem.structure.EmptyFieldProblem()));
                 } else {
                     // Check value
                     fieldValidator.check(fieldLocatorhandlernew java.lang.Float(value.getSupY()));
                 }
             }
         }
     }
 
     {
 
 
         public void check(org.jvnet.jaxbcommons.locator.ObjectLocator locatorjavax.xml.bind.ValidationEventHandler handlerjava.lang.Object value) {
             checkValue(locatorhandlervalue);
         }
 
         public void checkValue(org.jvnet.jaxbcommons.locator.ObjectLocator locatorjavax.xml.bind.ValidationEventHandler handlerjava.lang.Object draftValue) {
             final java.lang.Float value = ((java.lang.FloatdraftValue);
             if (value instanceof java.lang.Float) {
                 java.lang.Float realValue = ((java.lang.Floatvalue);
                 // Check primitive value
                 {
                     // Perform the check
                     // Checking class com.sun.msv.datatype.xsd.MaxInclusiveFacet datatype
                     org.jvnet.jaxbvalidation.problem.datatype.ValueProblem problem = null;
                     if (((java.lang.ComparablerealValue).compareTo(new java.lang.Float(-512.0F))>= 0) {
                         // Range is valid
                     } else {
                         problem = new org.jvnet.jaxbvalidation.problem.datatype.LessProblem(realValuenew java.lang.Float(-512.0F));
                     }
                     if (((java.lang.ComparablerealValue).compareTo(new java.lang.Float(512.0F))<= 0) {
                         // Range is valid
                     } else {
                         problem = new org.jvnet.jaxbvalidation.problem.datatype.GreaterProblem(realValuenew java.lang.Float(512.0F));
                     }
                     if (null!= problem) {
                         // Handle event
                         handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(locatorproblem));
                     }
                 }
             } else {
                if (null == value) {
                    // todo: report null
                } else {
                    // Report wrong class
                    handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(locatornew org.jvnet.jaxbvalidation.problem.structure.NonExpectedClassProblem(value.getClass())));
                }
            }
        }
    }
    {
        public void check(org.jvnet.jaxbcommons.locator.ObjectLocator locatorjavax.xml.bind.ValidationEventHandler handlerjava.lang.Object value) {
            checkValue(locatorhandlervalue);
        }
        public void checkValue(org.jvnet.jaxbcommons.locator.ObjectLocator locatorjavax.xml.bind.ValidationEventHandler handlerjava.lang.Object draftValue) {
            final java.lang.Float value = ((java.lang.FloatdraftValue);
            if (value instanceof java.lang.Float) {
                java.lang.Float realValue = ((java.lang.Floatvalue);
                // Check primitive value
                {
                    // Perform the check
                    // Checking class com.sun.msv.datatype.xsd.MaxInclusiveFacet datatype
                    org.jvnet.jaxbvalidation.problem.datatype.ValueProblem problem = null;
                    if (((java.lang.ComparablerealValue).compareTo(new java.lang.Float(-512.0F))>= 0) {
                        // Range is valid
                    } else {
                        problem = new org.jvnet.jaxbvalidation.problem.datatype.LessProblem(realValuenew java.lang.Float(-512.0F));
                    }
                    if (((java.lang.ComparablerealValue).compareTo(new java.lang.Float(512.0F))<= 0) {
                        // Range is valid
                    } else {
                        problem = new org.jvnet.jaxbvalidation.problem.datatype.GreaterProblem(realValuenew java.lang.Float(512.0F));
                    }
                    if (null!= problem) {
                        // Handle event
                        handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(locatorproblem));
                    }
                }
            } else {
                if (null == value) {
                    // todo: report null
                } else {
                    // Report wrong class
                    handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(locatornew org.jvnet.jaxbvalidation.problem.structure.NonExpectedClassProblem(value.getClass())));
                }
            }
        }
    }
    {
        public void check(org.jvnet.jaxbcommons.locator.ObjectLocator locatorjavax.xml.bind.ValidationEventHandler handlerjava.lang.Object value) {
            checkValue(locatorhandlervalue);
        }
        public void checkValue(org.jvnet.jaxbcommons.locator.ObjectLocator locatorjavax.xml.bind.ValidationEventHandler handlerjava.lang.Object draftValue) {
            final java.lang.Float value = ((java.lang.FloatdraftValue);
            if (value instanceof java.lang.Float) {
                java.lang.Float realValue = ((java.lang.Floatvalue);
                // Check primitive value
                {
                    // Perform the check
                    // Checking class com.sun.msv.datatype.xsd.MaxInclusiveFacet datatype
                    org.jvnet.jaxbvalidation.problem.datatype.ValueProblem problem = null;
                    if (((java.lang.ComparablerealValue).compareTo(new java.lang.Float(-512.0F))>= 0) {
                        // Range is valid
                    } else {
                        problem = new org.jvnet.jaxbvalidation.problem.datatype.LessProblem(realValuenew java.lang.Float(-512.0F));
                    }
                    if (((java.lang.ComparablerealValue).compareTo(new java.lang.Float(512.0F))<= 0) {
                        // Range is valid
                    } else {
                        problem = new org.jvnet.jaxbvalidation.problem.datatype.GreaterProblem(realValuenew java.lang.Float(512.0F));
                    }
                    if (null!= problem) {
                        // Handle event
                        handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(locatorproblem));
                    }
                }
            } else {
                if (null == value) {
                    // todo: report null
                } else {
                    // Report wrong class
                    handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(locatornew org.jvnet.jaxbvalidation.problem.structure.NonExpectedClassProblem(value.getClass())));
                }
            }
        }
    }
    {
        public void check(org.jvnet.jaxbcommons.locator.ObjectLocator locatorjavax.xml.bind.ValidationEventHandler handlerjava.lang.Object value) {
            checkValue(locatorhandlervalue);
        }
        public void checkValue(org.jvnet.jaxbcommons.locator.ObjectLocator locatorjavax.xml.bind.ValidationEventHandler handlerjava.lang.Object draftValue) {
            final java.lang.Float value = ((java.lang.FloatdraftValue);
            if (value instanceof java.lang.Float) {
                java.lang.Float realValue = ((java.lang.Floatvalue);
                // Check primitive value
                {
                    // Perform the check
                    // Checking class com.sun.msv.datatype.xsd.MaxInclusiveFacet datatype
                    org.jvnet.jaxbvalidation.problem.datatype.ValueProblem problem = null;
                    if (((java.lang.ComparablerealValue).compareTo(new java.lang.Float(-512.0F))>= 0) {
                        // Range is valid
                    } else {
                        problem = new org.jvnet.jaxbvalidation.problem.datatype.LessProblem(realValuenew java.lang.Float(-512.0F));
                    }
                    if (((java.lang.ComparablerealValue).compareTo(new java.lang.Float(512.0F))<= 0) {
                        // Range is valid
                    } else {
                        problem = new org.jvnet.jaxbvalidation.problem.datatype.GreaterProblem(realValuenew java.lang.Float(512.0F));
                    }
                    if (null!= problem) {
                        // Handle event
                        handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(locatorproblem));
                    }
                }
            } else {
                if (null == value) {
                    // todo: report null
                } else {
                    // Report wrong class
                    handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(locatornew org.jvnet.jaxbvalidation.problem.structure.NonExpectedClassProblem(value.getClass())));
                }
            }
        }
    }
New to GrepCode? Check out our FAQ X