generateUnMarshallerFileFile.javadoc().add("all constraints defined in OGC's KML schema specification.");
generateUnMarshallerFileFile.javadoc().trimToSize();
final JVar fileunmarshallVar = generateUnMarshallerFileFile.param(JMod.FINAL, fileClass, "file");
final JVar validateVar = generateUnMarshallerFileFile.param(JMod.FINAL, boolean.class, "validate");
final JTryBlock tryBlock = generateUnMarshallerFileFile.body()._try();
final JVar localUnmarshallerFile = tryBlock.body().decl(jaxbUnmarshallerClass, "unmarshaller",
jaxbContextClass.boxify().staticInvoke("newInstance").arg(JExpr.direct("Kml.class")).invoke("createUnmarshaller"));
final JConditional ifBlockFilename = tryBlock.body()._if(validateVar.eq(JExpr.TRUE));
ifBlockFilename._then().add(kmlClass.boxify().staticInvoke(generateValidate).arg(localUnmarshallerFile));
final JVar inputsource = tryBlock.body().decl(inputsourceClass, "input", JExpr._new(inputsourceClass).arg(JExpr._new(fileReaderClass).arg(fileunmarshallVar)));
final JVar saxsource = tryBlock.body().decl(saxsourceClass, "saxSource", JExpr._new(saxsourceClass).arg(JExpr._new(namespaceFilterXMLReaderclass).arg(validateVar)).arg(inputsource));
final JVar decl = tryBlock.body().decl(kmlClass, "jaxbRootElement", JExpr.cast(kmlClass, JExpr.invoke(localUnmarshallerFile, "unmarshal").arg(saxsource)));
tryBlock.body()._return(decl);
tryBlock._catch(saxExceptionClass.boxify()).body().directStatement("_x.printStackTrace();");
tryBlock._catch(parserConfigurationExceptionClass.boxify()).body().directStatement("_x.printStackTrace();");
tryBlock._catch(jaxbExceptionClass.boxify()).body().directStatement("_x.printStackTrace();");
tryBlock._catch(fileNotFoundExceptionClass.boxify()).body().directStatement("_x.printStackTrace();");
generateUnMarshallerFileFile.body()._return(JExpr._null());
final JMethod generateUnMarshallerFile = cc.implClass.method(JMod.PUBLIC | JMod.STATIC, kmlClass, "unmarshal");
generateUnMarshallerFile.param(JMod.FINAL, fileClass, "file");
generateUnMarshallerFile.javadoc().add("KML to Java\n");