package Savage.ShipsMilitary.PatrolCraftNavalAcademyBrazil;

import org.web3d.x3d.jsail.Core.*;
import org.web3d.x3d.jsail.fields.*;
import org.web3d.x3d.jsail.Geometry3D.*;
import org.web3d.x3d.jsail.Grouping.*;
import org.web3d.x3d.jsail.Interpolation.*;
import org.web3d.x3d.jsail.Navigation.*;
import org.web3d.x3d.jsail.PointingDeviceSensor.*;
import org.web3d.x3d.jsail.Rendering.*;
import org.web3d.x3d.jsail.Shape.*;
import org.web3d.x3d.jsail.Time.*;

// Javadoc metadata annotations follow, see below for X3DJSAIL Java source code.
/**
 * <p> Brazilian Naval Academy Training Ship. </p>
 <p> Related links: Catalog page <a href="../../../../ShipsMilitary/PatrolCraftNavalAcademyBrazil/SkylightHatchIndex.html" target="_blank">SkylightHatch</a>,  source <a href="../../../../ShipsMilitary/PatrolCraftNavalAcademyBrazil/SkylightHatch.java">SkylightHatch.java</a>, <a href="https://www.web3d.org/x3d/content/examples/X3dResources.html" target="_blank">X3D Resources</a>, <a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html" target="_blank">X3D Scene Authoring Hints</a>, and <a href="https://www.web3d.org/x3d/content/X3dTooltips.html" target="_blank">X3D Tooltips</a>. </p>
	<table style="color:black; border:0px solid; border-spacing:10px 0px;">
        <caption>Scene Meta Information</caption>
		<tr style="background-color:silver; border-color:silver;">
			<td style="text-align:center; padding:10px 0px;"><i>meta tags</i></td>
			<td style="text-align:left;   padding:10px 0px;">&nbsp; Document Metadata </td>
		</tr>

		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> title </i> </td>
			<td> <a href="../../../../ShipsMilitary/PatrolCraftNavalAcademyBrazil/SkylightHatch.x3d">SkylightHatch.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> description </i> </td>
			<td> Brazilian Naval Academy Training Ship </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> Claudio Coreixas </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> created </i> </td>
			<td> 20 October 2009 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> modified </i> </td>
			<td> 20 October 2019 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> reference </i> </td>
			<td> <a href="http://www.en.mar.mil.br" target="_blank">http://www.en.mar.mil.br</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> subject </i> </td>
			<td> ships parts </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> identifier </i> </td>
			<td> <a href="https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/SkylightHatch.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/SkylightHatch.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> generator </i> </td>
			<td> X3D-Edit, <a href="https://www.web3d.org/x3d/tools/X3D-Edit" target="_blank">https://www.web3d.org/x3d/tools/X3D-Edit</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> license </i> </td>
			<td> <a href="../../../../ShipsMilitary/PatrolCraftNavalAcademyBrazil/../../license.html">../../license.html</a> </td>
		</tr>
		<tr style="background-color:silver; border-color:silver;">
			<td style="text-align:center;" colspan="2">  &nbsp; </td>
		</tr>
	</table>

	<p>
		This program uses the
		<a href="https://www.web3d.org/specifications/java/X3DJSAIL.html" target="_blank">X3D Java Scene Access Interface Library (X3DJSAIL)</a>.
		It has been produced using the 
		<a href="https://www.web3d.org/x3d/stylesheets/X3dToJava.xslt" target="_blank">X3dToJava.xslt</a>
		stylesheet
	       (<a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3dToJava.xslt" target="_blank">version control</a>)
                which is used to create Java source code from an original <code>.x3d</code> model.
	</p>

	* @author Claudio Coreixas
 */

public class SkylightHatch
{
	/** Default constructor to create this object. */
	public SkylightHatch ()
	{
	  initialize();
	}

	/** Create and initialize the X3D model for this object. */
	public final void initialize()
	{
            try { // catch-all
  x3dModel = new X3D().setProfile(X3D.PROFILE_IMMERSIVE).setVersion(X3D.VERSION_3_2)
  .setHead(new head()
    .addMeta(new meta().setName(meta.NAME_TITLE      ).setContent("SkylightHatch.x3d"))
    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("Brazilian Naval Academy Training Ship"))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("Claudio Coreixas"))
    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("20 October 2009"))
    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("20 October 2019"))
    .addMeta(new meta().setName(meta.NAME_REFERENCE  ).setContent("http://www.en.mar.mil.br"))
    .addMeta(new meta().setName(meta.NAME_SUBJECT    ).setContent("ships parts"))
    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/SkylightHatch.x3d"))
    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("X3D-Edit, https://www.web3d.org/x3d/tools/X3D-Edit"))
    .addMeta(new meta().setName(meta.NAME_LICENSE    ).setContent("../../license.html")))
  .setScene(new Scene()
    .addChild(new WorldInfo().setTitle("SkylightHatch.x3d"))
    .addChild(new Viewpoint().setDescription("Door").setFieldOfView(0.45).setOrientation(1.0,0.0,0.0,0.0).setPosition(0.0,0.0,1.0))
    .addChild(new TimeSensor("spinTimer").setCycleInterval(2))
    .addChild(new OrientationInterpolator("openDoor").setKey(new double[] {0.0,1.0}).setKeyValue(new MFRotation(new double[] {1.0,0.0,0.0,0.0,1.0,0.0,0.0,-1.2})))
    .addChild(new ROUTE().setFromNode("spinTimer").setFromField("fraction_changed").setToNode("openDoor").setToField("set_fraction"))
    .addChild(new Transform("openDoorTransform").setCenter(0.0,0.01,-0.084)
      .addChild(new ROUTE().setFromNode("openDoor").setFromField("value_changed").setToNode("openDoorTransform").setToField("rotation"))
      .addChild(new Shape("TightDoor")
        .setAppearance(new Appearance()
          .setMaterial(new Material().setDiffuseColor(0.82,0.78,0.74)))
        .setGeometry(new IndexedFaceSet("hatchIFS").setDEF("hatchIFS").setCreaseAngle(1.5).setSolid(false).setCoordIndex(gethatchIFS_5_20_coordIndex())
          .setCoord(new Coordinate().setPoint(getCoordinate_6_20_point()))))
      .addChild(new TouchSensor("hatchSensor").setDescription("Touch to Open Hatch"))
      .addChild(new ROUTE().setFromNode("hatchSensor").setFromField("touchTime").setToNode("spinTimer").setToField("startTime"))
      .addChild(new Shape("window")
        .setAppearance(new Appearance()
          .setMaterial(new Material("Glass").setAmbientIntensity(0.37773332).setDiffuseColor(0.0,0.36666667,0.76666665).setShininess(0.76666665).setSpecularColor(1.0,1.0,1.0).setTransparency(0.58)))
        .setGeometry(new IndexedFaceSet("windowIFS").setDEF("windowIFS").setCreaseAngle(1.5).setSolid(false).setCoordIndex(new int[] {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0,-1})
          .setCoord(new Coordinate().setPoint(new MFVec3f(new double[] {0.0300,0.0120,0.0000,0.0277,0.0120,0.0115,0.0212,0.0120,0.0212,0.0115,0.0120,0.0277,0.0000,0.0120,0.0300,-0.0115,0.0120,0.0277,-0.0212,0.0120,0.0212,-0.0277,0.0120,0.0115,-0.0300,0.0120,0.0000,-0.0277,0.0120,-0.0114,-0.0213,0.0120,-0.0212,-0.0115,0.0120,-0.0277,-0.0001,0.0120,-0.0300,0.0114,0.0120,-0.0277,0.0212,0.0120,-0.0213,0.0277,0.0120,-0.0116,0.0300,0.0120,-0.0001})))))
      .addChild(new Shape()
        .setAppearance(new Appearance()
          .setMaterial(new Material().setAmbientIntensity(0.02).setDiffuseColor(0.701961,0.588235,0.0).setShininess(0.29).setSpecularColor(1.0,0.887979,0.0)))
        .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {-0.005,0.0,0.0,0.0,0.0,-0.0025,-0.005,-0.0025,-0.005,-0.005,-0.01,-0.005,-0.01,0.0,-0.005,0.0})).setSolid(false).setSpine(new MFVec3f(new double[] {0.04,0.01,0.0,0.037,0.01,0.0153,0.0283,0.01,0.0283,0.0153,0.01,0.0369,0.0,0.01,0.04,-0.0153,0.01,0.037,-0.0283,0.01,0.0283,-0.0369,0.01,0.0154,-0.04,0.01,0.0,-0.037,0.01,-0.0152,-0.0283,0.01,-0.0282,-0.0154,0.01,-0.0369,0.0,0.01,-0.04,0.0152,0.01,-0.037,0.0282,0.01,-0.0284,0.0369,0.01,-0.0154,0.04,0.01,0.0}))))
      .addChild(new Shape()
        .setAppearance(new Appearance()
          .setMaterial(new Material().setAmbientIntensity(0.02).setDiffuseColor(0.701961,0.588235,0.0).setShininess(0.29).setSpecularColor(1.0,0.887979,0.0)))
        .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {0.0,0.0,0.001,0.0,0.001,0.002,-0.001,0.002,-0.001,0.0,0.0,0.0})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0300,0.0150,0.0000,-0.0300,0.0150,0.0000}))))
      .addChild(new Shape()
        .setAppearance(new Appearance()
          .setMaterial(new Material().setAmbientIntensity(0.02).setDiffuseColor(0.701961,0.588235,0.0).setShininess(0.29).setSpecularColor(1.0,0.887979,0.0)))
        .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {0.0,0.0,0.001,0.0,0.001,0.002,-0.001,0.002,-0.001,0.0,0.0,0.0})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0277,0.0150,0.0115,-0.0277,0.0150,0.0115}))))
      .addChild(new Shape()
        .setAppearance(new Appearance()
          .setMaterial(new Material().setAmbientIntensity(0.02).setDiffuseColor(0.701961,0.588235,0.0).setShininess(0.29).setSpecularColor(1.0,0.887979,0.0)))
        .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {0.0,0.0,0.001,0.0,0.001,0.002,-0.001,0.002,-0.001,0.0,0.0,0.0})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0212,0.0150,0.0212,-0.0212,0.0150,0.0212}))))
      .addChild(new Shape()
        .setAppearance(new Appearance()
          .setMaterial(new Material().setAmbientIntensity(0.02).setDiffuseColor(0.701961,0.588235,0.0).setShininess(0.29).setSpecularColor(1.0,0.887979,0.0)))
        .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {0.0,0.0,0.001,0.0,0.001,0.002,-0.001,0.002,-0.001,0.0,0.0,0.0})).setSolid(false).setSpine(new MFVec3f(new double[] {-0.0277,0.0150,-0.0114,0.0277,0.0150,-0.0116}))))
      .addChild(new Shape()
        .setAppearance(new Appearance()
          .setMaterial(new Material().setAmbientIntensity(0.02).setDiffuseColor(0.701961,0.588235,0.0).setShininess(0.29).setSpecularColor(1.0,0.887979,0.0)))
        .setGeometry(new Extrusion().setCrossSection(new MFVec2f(new double[] {0.0,0.0,0.001,0.0,0.001,0.002,-0.001,0.002,-0.001,0.0,0.0,0.0})).setSolid(false).setSpine(new MFVec3f(new double[] {-0.0213,0.0150,-0.0212,0.0212,0.0150,-0.0213}))))));
            }
            catch (Exception ex)
            {       
                System.err.println ("*** Further hints on X3DJSAIL errors and exceptions at");
                System.err.println ("*** https://www.web3d.org/specifications/java/X3DJSAIL.html");
                throw (ex);
            }
	}
	// end of initialize() method

		/** Define subarrays using type int[] */
		private int[] gethatchIFS_5_20_coordIndex_1()
		{
			int[] value = {1,2,22,21,-1,2,3,23,22,-1,3,4,24,23,-1,4,5,25,24,-1,5,6,26,25,-1,6,7,27,26,-1,7,8,28,27,-1,8,9,29,28,-1,9,10,30,29,-1,10,11,31,30,-1,11,12,32,31,-1,12,13,33,32,-1,13,14,34,33,-1,14,15,35,34,-1,15,16,36,35,-1,16,17,37,36,-1,17,18,38,37,-1,18,19,39,38,-1,19,20,40,39,-1,20,1,21,40,-1,21,22,42,41,-1,22,23,43,42,-1,23,24,44,43,-1,24,25,45,44,-1,25,26,46,45,-1,26,27,47,46,-1,27,28,48,47,-1,28,29,49,48,-1,29,30,50,49,-1,30,31,51,50,-1,31,32,52,51,-1,32,33,53,52,-1,33,34,54,53,-1,34,35,55,54,-1,35,36,56,55,-1,36,37,57,56,-1,37,38,58,57,-1,38,39,59,58,-1,39,40,60,59,-1,40,21,41,60,-1,41,42,62,61,-1,42,43,63,62,-1,43,44,64,63,-1,44,45,65,64,-1,45,46,66,65,-1,46,47,67,66,-1,47,48,68,67,-1,48,49,69,68,-1,49,50,70,69,-1,50,51,71,70,-1,51,52,72,71,-1,52,53,73,72,-1,53,54,74,73,-1,54,55,75,74,-1,55,56,76,75,-1,56,57,77,76,-1,57,58,78,77,-1,58,59,79,78,-1,59,60,80,79,-1,60,41,61,80,-1,61,62,81,-1,62,63,81,-1,63,64,81,-1,64,65,81,-1,65,66,82,81,-1,66,67,82,-1,67,68,82,-1,68,69,82,-1,69,70,82,-1,70,71,83,82,-1,71,72,83,-1,72,73,83,-1,73,74,83,-1,74,75,83,-1,75,76,84,83,-1,76,77,84,-1,77,78,84,-1,78,79,84,-1,79,80,84,-1,80,61,81,84,-1,81,85,84,-1,84,97,83,-1,83,93,82,-1,82,89,81,-1,85,81,86,-1,86,81,87,-1,87,81,88,-1,88,81,89,-1,89,82,90,-1,90,82,91,-1,91,82,92,-1,92,82,93,-1,93,83,94,-1,94,83,95,-1,95,83,96,-1,96,83,97,-1,97,84,98,-1,98,84,99,-1,99,84,100,-1,100,84,101,-1};
			return value;
		}


		/** Define subarrays using type double[] */
		private double[] getCoordinate_6_20_point_1()
		{
			double[] value = {0.0000,0.0000,0.0000,0.0779,0.0000,0.0768,0.0772,0.0000,0.0806,0.0750,0.0000,0.0838,0.0718,0.0000,0.0860,0.0679,0.0000,0.0868,-0.0679,0.0000,0.0868,-0.0717,0.0000,0.0860,-0.0750,0.0000,0.0839,-0.0772,0.0000,0.0806,-0.0779,0.0000,0.0768,-0.0779,0.0000,-0.0768,-0.0772,0.0000,-0.0806,-0.0750,0.0000,-0.0838,-0.0718,0.0000,-0.0860,-0.0680,0.0000,-0.0868,0.0679,0.0000,-0.0868,0.0717,0.0000,-0.0860,0.0750,0.0000,-0.0839,0.0772,0.0000,-0.0806,0.0779,0.0000,-0.0768,0.0772,0.0038,0.0768,0.0765,0.0038,0.0803,0.0745,0.0038,0.0833,0.0715,0.0038,0.0853,0.0679,0.0038,0.0860,-0.0679,0.0038,0.0860,-0.0715,0.0038,0.0853,-0.0745,0.0038,0.0833,-0.0765,0.0038,0.0803,-0.0772,0.0038,0.0768,-0.0772,0.0038,-0.0768,-0.0765,0.0038,-0.0803,-0.0745,0.0038,-0.0833,-0.0715,0.0038,-0.0853,-0.0680,0.0038,-0.0860,0.0679,0.0038,-0.0860,0.0714,0.0038,-0.0853,0.0744,0.0038,-0.0833,0.0765,0.0038,-0.0803,0.0772,0.0038,-0.0768,0.0750,0.0071,0.0768,0.0745,0.0071,0.0795,0.0729,0.0071,0.0818,0.0706,0.0071,0.0833,0.0679,0.0071,0.0839,-0.0679,0.0071,0.0839,-0.0706,0.0071,0.0833,-0.0729,0.0071,0.0818,-0.0745,0.0071,0.0795,-0.0750,0.0071,0.0768,-0.0750,0.0071,-0.0768,-0.0745,0.0071,-0.0795,-0.0729,0.0071,-0.0818,-0.0707,0.0071,-0.0833,-0.0679,0.0071,-0.0839,0.0679,0.0071,-0.0839,0.0706,0.0071,-0.0833,0.0729,0.0071,-0.0818,0.0745,0.0071,-0.0795,0.0750,0.0071,-0.0768,0.0718,0.0092,0.0768,0.0715,0.0092,0.0782,0.0706,0.0092,0.0795,0.0694,0.0092,0.0803,0.0679,0.0092,0.0806,-0.0679,0.0092,0.0806,-0.0694,0.0092,0.0803,-0.0706,0.0092,0.0795,-0.0715,0.0092,0.0783,-0.0718,0.0092,0.0768,-0.0718,0.0092,-0.0768,-0.0715,0.0092,-0.0782,-0.0706,0.0092,-0.0795,-0.0694,0.0092,-0.0803,-0.0679,0.0092,-0.0806,0.0679,0.0092,-0.0806,0.0694,0.0092,-0.0803,0.0706,0.0092,-0.0795,0.0715,0.0092,-0.0783,0.0718,0.0092,-0.0768,0.0679,0.0100,0.0768,-0.0679,0.0100,0.0768,-0.0679,0.0100,-0.0768,0.0679,0.0100,-0.0768,0.0400,0.0100,0.0000,0.0370,0.0100,0.0153,0.0283,0.0100,0.0283,0.0153,0.0100,0.0369,0.0000,0.0100,0.0400,-0.0153,0.0100,0.0370,-0.0283,0.0100,0.0283,-0.0369,0.0100,0.0154,-0.0400,0.0100,0.0000,-0.0370,0.0100,-0.0152,-0.0283,0.0100,-0.0282,-0.0154,0.0100,-0.0369,0.0000,0.0100,-0.0400,0.0152,0.0100,-0.0370,0.0282,0.0100,-0.0284};
			return value;
		}
		private double[] getCoordinate_6_20_point_2()
		{
			double[] value = {0.0369,0.0100,-0.0154,0.0400,0.0100,0.0000};
			return value;
		}

		/** Large attribute array: IndexedFaceSet DEF='hatchIFS' coordIndex field, scene-graph level=5, element #20, 464 total numbers.
		 * Reassemble split array as single method to improve readability and runnability.
		 * Provide large array values via separate methods, hoping to avoid 'code too large' Java compilation errors. 
		 * Individual Java methods (including aggregated initializations) are limited to 64KB.
		 * @see https://stackoverflow.com/questions/2407912/code-too-large-compilation-error-in-java
		 * @see https://stackoverflow.com/questions/11437905/java-too-many-constants-jvm-error
		 */
		private MFInt32 gethatchIFS_5_20_coordIndex()
		{
			MFInt32 hatchIFS_5_20_coordIndex = new MFInt32()/*2.finalize*/
				.append(new MFInt32(gethatchIFS_5_20_coordIndex_1()));
			return hatchIFS_5_20_coordIndex;
		}
		/** Large attribute array: Coordinate point field, scene-graph level=6, element #20, 306 total numbers made up of 102 3-tuple values.
		 * Reassemble split array as single method to improve readability and runnability.
		 * Provide large array values via separate methods, hoping to avoid 'code too large' Java compilation errors. 
		 * Individual Java methods (including aggregated initializations) are limited to 64KB.
		 * @see https://stackoverflow.com/questions/2407912/code-too-large-compilation-error-in-java
		 * @see https://stackoverflow.com/questions/11437905/java-too-many-constants-jvm-error
		 */
		private MFVec3f getCoordinate_6_20_point()
		{
			MFVec3f Coordinate_6_20_point = new MFVec3f()/*2.finalize*/
				.append(new MFVec3f(getCoordinate_6_20_point_1()))
				.append(new MFVec3f(getCoordinate_6_20_point_2()));
			return Coordinate_6_20_point;
		}

	/** The initialized model object, created within initialize() method. */
	private X3D x3dModel;

	/** 
	 * Provide a 
	 * <a href="https://dzone.com/articles/java-copy-shallow-vs-deep-in-which-you-will-swim" target="_blank">shallow copy</a>
	 * of the X3D model.
	 * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html">X3D</a>
	 * @return SkylightHatch model
	 */
	public X3D getX3dModel()
	{	  
		return x3dModel;
	}
	   
    /** 
     * Default main() method provided for test purposes, uses CommandLine to set global ConfigurationProperties for this object.
     * @param args array of input parameters, provided as arguments
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html#handleArguments-java.lang.String:A-">X3D.handleArguments(args)</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html#validationReport--">X3D.validationReport()</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/CommandLine.html">CommandLine</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/CommandLine.html#USAGE">CommandLine.USAGE</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/ConfigurationProperties.html">ConfigurationProperties</a>
     */
    public static void main(String args[])
    {
        System.out.println("Build this X3D model, showing validation diagnostics...");
        X3D thisExampleX3dModel = new SkylightHatch().getX3dModel();
//      System.out.println("X3D model construction complete.");
	
        // next handle command line arguments
        boolean hasArguments = (args != null) && (args.length > 0);
        boolean validate = true; // default
        boolean argumentsLoadNewModel = false;
        String  fileName = new String();

        if (args != null)
        {
                for (String arg : args)
                {
                        if (arg.toLowerCase().startsWith("-v") || arg.toLowerCase().contains("validate"))
                        {
                                validate = true; // making sure
                        }
                        if (arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_X3D) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_CLASSICVRML) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_X3DB) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_VRML97) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_EXI) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_GZIP) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_ZIP) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_HTML) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_XHTML))
                        {
                                argumentsLoadNewModel = true;
                                fileName = arg;
                        }
                }
        }
        if      (argumentsLoadNewModel)
                System.out.println("WARNING: \"Savage.ShipsMilitary.PatrolCraftNavalAcademyBrazil.SkylightHatch\" model invocation is attempting to load file \"" + fileName + "\" instead of simply validating itself... file loading ignored.");
        else if (hasArguments) // if no arguments provided, this method produces usage warning
                thisExampleX3dModel.handleArguments(args);
	
        if (validate)
        {
            //  System.out.println("--- TODO fix duplicated outputs ---"); // omit when duplicated outputs problem is solved/refactored
		String validationResults = thisExampleX3dModel.validationReport();
            //  System.out.println("-----------------------------------"); // omit when duplicated outputs problem is solved/refactored
                System.out.print("Savage.ShipsMilitary.PatrolCraftNavalAcademyBrazil.SkylightHatch self-validation test confirmation: ");
                if (!validationResults.equals("success"))
                    System.out.println();
                System.out.println(validationResults.trim());

                // experimental: test X3DJSAIL output files
                // ShipsMilitary/PatrolCraftNavalAcademyBrazil/SkylightHatch_JavaExport.* file validation is checked when building X3D Example Archives
                String filenameX3D  = "ShipsMilitary/PatrolCraftNavalAcademyBrazil/SkylightHatch_JavaExport.x3d"; 
                String filenameX3DV = "ShipsMilitary/PatrolCraftNavalAcademyBrazil/SkylightHatch_JavaExport.x3dv"; 
                String filenameJSON = "ShipsMilitary/PatrolCraftNavalAcademyBrazil/SkylightHatch_JavaExport.json";
                thisExampleX3dModel.toFileX3D        (filenameX3D);
                thisExampleX3dModel.toFileClassicVRML(filenameX3DV);
// TODO         thisExampleX3dModel.toFileJSON       (filenameJSON);
        }
    }
}
