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.jaxbcommons.locator.FieldObjectLocator fieldLocator = new org.jvnet.jaxbcommons.locator.DefaultFieldObjectLocator(locatorvalue"LogicalPosition");
                 if (!value.isSetLogicalPosition()) {
                     // Report missing object
                     handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(fieldLocatornew org.jvnet.jaxbvalidation.problem.structure.EmptyFieldProblem()));
                 } else {
                     // Check count
                     if (value.getLogicalPosition().size()< 1) {
                         // Report minimum of occurences violated
                         handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(fieldLocatornew org.jvnet.jaxbvalidation.problem.structure.TooFewElementsProblem(value.getLogicalPosition().size(), 1)));
                     }
                     // Check value
                     fieldValidator.check(fieldLocatorhandlervalue.getLogicalPosition());
                 }
             }
             {
                 final org.jvnet.jaxbcommons.locator.FieldObjectLocator fieldLocator = new org.jvnet.jaxbcommons.locator.DefaultFieldObjectLocator(locatorvalue"RefPhysicalCSU");
                 if (!value.isSetRefPhysicalCSU()) {
                     // Report missing object
                     handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(fieldLocatornew org.jvnet.jaxbvalidation.problem.structure.EmptyFieldProblem()));
                 } else {
                     // Check value
                     fieldValidator.check(fieldLocatorhandlervalue.getRefPhysicalCSU());
                 }
             }
             {
                 final org.jvnet.jaxbcommons.locator.FieldObjectLocator fieldLocator = new org.jvnet.jaxbcommons.locator.DefaultFieldObjectLocator(locatorvalue"RefPhysicalPosition");
                 if (!value.isSetRefPhysicalPosition()) {
                     // Report missing object
                     handler.handleEvent(new org.jvnet.jaxbvalidation.event.ObjectValidationEvent(fieldLocatornew org.jvnet.jaxbvalidation.problem.structure.EmptyFieldProblem()));
                 } else {
                     // Check value
                     fieldValidator.check(fieldLocatorhandlervalue.getRefPhysicalPosition());
                 }
             }
         }
     }
 
     {
 
 
         public void check(org.jvnet.jaxbcommons.locator.ObjectLocator parentLocatorjavax.xml.bind.ValidationEventHandler handlerjava.lang.Object value) {
             final java.util.List values = ((java.util.Listvalue);
             final org.jvnet.jaxbcommons.locator.ObjectLocator locator = new org.jvnet.jaxbcommons.locator.DefaultFieldObjectLocator(parentLocator"LogicalPosition");
             if (values!= null) {
                 for (int index = 0; (index<values.size()); index ++) {
                     java.lang.Object item = values.get(index);
                     checkEntry(locatorhandlerindexitem);
                 }
             }
         }
 
         public void checkEntry(org.jvnet.jaxbcommons.locator.ObjectLocator locatorjavax.xml.bind.ValidationEventHandler handlerint indexjava.lang.Object value) {
             final org.jvnet.jaxbcommons.locator.ObjectLocator entryLocator = new org.jvnet.jaxbcommons.locator.DefaultListEntryObjectLocator(locatorindex);
             checkValue(entryLocatorhandlervalue);
         }
 
         public void checkValue(org.jvnet.jaxbcommons.locator.ObjectLocator locatorjavax.xml.bind.ValidationEventHandler handlerjava.lang.Object draftValue) {
             final org.jvnet.jaxbvalidation.tests.one.LogicalPositionType value = ((org.jvnet.jaxbvalidation.tests.one.LogicalPositionTypedraftValue);
             if (value instanceof org.jvnet.jaxbvalidation.tests.one.LogicalPositionType) {
                 org.jvnet.jaxbvalidation.tests.one.LogicalPositionType realValue = ((org.jvnet.jaxbvalidation.tests.one.LogicalPositionTypevalue);
                 {
                     // Check complex value
                     validator.check(locatorhandlerrealValue);
                 }
             } 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 org.jvnet.jaxbvalidation.tests.one.PhysicalCSURef value = ((org.jvnet.jaxbvalidation.tests.one.PhysicalCSURefdraftValue);
            if (value instanceof org.jvnet.jaxbvalidation.tests.one.PhysicalCSURef) {
                org.jvnet.jaxbvalidation.tests.one.PhysicalCSURef realValue = ((org.jvnet.jaxbvalidation.tests.one.PhysicalCSURefvalue);
                {
                    // Check complex value
                    validator.check(locatorhandlerrealValue);
                }
            } 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 org.jvnet.jaxbvalidation.tests.one.PhysicalPositionRef value = ((org.jvnet.jaxbvalidation.tests.one.PhysicalPositionRefdraftValue);
            if (value instanceof org.jvnet.jaxbvalidation.tests.one.PhysicalPositionRef) {
                org.jvnet.jaxbvalidation.tests.one.PhysicalPositionRef realValue = ((org.jvnet.jaxbvalidation.tests.one.PhysicalPositionRefvalue);
                {
                    // Check complex value
                    validator.check(locatorhandlerrealValue);
                }
            } 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