@prefix :        <https://www.web3d.org/x3d/content/examples/Basic/development/EventUtilityPrototypes.ttl#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema:  <http://schema.org/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix x3d:     <https://www.web3d.org/specifications/x3d-4.1.xsd#> .
@prefix x3do:    <https://www.web3d.org/specifications/X3dOntology4.1#> .

:X3D a owl:NamedIndividual, x3do:X3D ;
  x3do:hasHead :head ;
  x3do:hasScene :Scene ;
  x3do:profile 'Immersive' ;
  x3do:version '3.0' ;
  x3do:noNamespaceSchemaLocation 'https://www.web3d.org/specifications/x3d-3.0.xsd' .
:head a owl:NamedIndividual, x3do:head ;
  x3do:hasParent :X3D ;
  x3do:hasMeta :meta_1_1, :meta_1_2, :meta_1_3, :meta_1_4, :meta_1_5, :meta_1_6, :meta_1_7, :meta_1_8, :meta_1_9, :meta_1_10, :meta_1_11 .
:meta_1_1 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'EventUtilityPrototypes.x3d' ;
  x3do:name 'title' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Event utility node prototypes for boolean filtering and other event utility nodes.' ;
  x3do:name 'description' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Nick Polys, Tony Parisi, Don Brutzman, Justin Couch' ;
  x3do:name 'creator' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '25 September 2002' ;
  x3do:name 'created' .
:meta_1_5 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '20 January 2020' ;
  x3do:name 'modified' .
:meta_1_6 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Under development, IntegerTrigger example needed.' ;
  x3do:name 'warning' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'EventUtilityExamples.x3d' ;
  x3do:name 'reference' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'BooleanFilter BooleanToggle BooleanTrigger IntegerTrigger TimeTrigger' ;
  x3do:name 'subject' .
:meta_1_9 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://www.web3d.org/x3d/content/examples/Basic/development/EventUtilityPrototypes.x3d' ;
  x3do:name 'identifier' .
:meta_1_10 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit' ;
  x3do:name 'generator' .
:meta_1_11 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '../license.html' ;
  x3do:name 'license' .
:meta dcterms:title "EventUtilityPrototypes.x3d" .
:meta dcterms:description "Event utility node prototypes for boolean filtering and other event utility nodes." .
:meta dcterms:creator "Nick Polys, Tony Parisi, Don Brutzman, Justin Couch" .
:meta dcterms:created "25 September 2002" .
:meta dcterms:modified "20 January 2020" .
:meta dcterms:warning "Under development, IntegerTrigger example needed." .
:meta dcterms:reference "EventUtilityExamples.x3d" .
:meta dcterms:subject "BooleanFilter BooleanToggle BooleanTrigger IntegerTrigger TimeTrigger" .
:meta dcterms:identifier "https://www.web3d.org/x3d/content/examples/Basic/development/EventUtilityPrototypes.x3d" .
:meta dcterms:generator "X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit" .
:meta dcterms:license "../license.html" .
:Scene a owl:NamedIndividual, x3do:Scene ;
  x3do:hasParent :X3D ;
  x3do:hasChildren :WorldInfo_2_1, :Anchor_2_7 ;
  x3do:hasProtoDeclare :ProtoDeclare_2_2, :ProtoDeclare_2_3, :ProtoDeclare_2_4, :ProtoDeclare_2_5, :ProtoDeclare_2_6 .
:WorldInfo_2_1 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :Scene ;
  x3do:title 'EventUtilityPrototypes.x3d' .
:ProtoDeclare_2_2 a owl:NamedIndividual, x3do:ProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasProtoInterface :ProtoInterface_2_2_1 ;
  x3do:hasProtoBody :ProtoBody_2_2_2 ;
  x3do:appinfo 'BooleanFilter selectively passes true false or negated events.' ;
  x3do:name 'BooleanFilter' .
:ProtoInterface_2_2_1 a owl:NamedIndividual, x3do:ProtoInterface ;
  x3do:hasParent :ProtoDeclare_2_2 ;
  x3do:hasField :field_2_2_1_1, :field_2_2_1_2, :field_2_2_1_3, :field_2_2_1_4 .
:field_2_2_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'set_boolean is the input value to be filtered.' ;
  x3do:name 'set_boolean' ;
  x3do:type 'SFBool' .
:field_2_2_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'inputTrue only passes a true value when set_boolean input is true.' ;
  x3do:name 'inputTrue' ;
  x3do:type 'SFBool' .
:field_2_2_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'inputFalse only passes a false value when set_boolean is false.' ;
  x3do:name 'inputFalse' ;
  x3do:type 'SFBool' .
:field_2_2_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'inputNegate provides opposite value by negating set_boolean input.' ;
  x3do:name 'inputNegate' ;
  x3do:type 'SFBool' .
:ProtoBody_2_2_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_2 ;
  x3do:hasChildren :BooleanFilterScript .
:BooleanFilterScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :ProtoBody_2_2_2 ;
  x3do:hasField :field_2_2_2_1_1, :field_2_2_2_1_2, :field_2_2_2_1_3, :field_2_2_2_1_4 ;
  x3do:hasIS :IS_2_2_2_1_5 ;
  x3do:DEF 'BooleanFilterScript' ;
  x3do:sourceCode """
ecmascript:

function set_boolean (value, timestamp)
{
	if (value) inputTrue  = value;
	else       inputFalse = value;
	inputNegate = !value;

//	if (value) Browser.println ('[BooleanFilter] set_boolean=' + value + ', inputTrue='  + inputTrue  + ', inputNegate=' + inputNegate);
//	else       Browser.println ('[BooleanFilter] set_boolean=' + value + ', inputFalse=' + inputFalse + ', inputNegate=' + inputNegate);
}
""" .
:field_2_2_2_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BooleanFilterScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_boolean' ;
  x3do:type 'SFBool' .
:field_2_2_2_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BooleanFilterScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'inputTrue' ;
  x3do:type 'SFBool' .
:field_2_2_2_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BooleanFilterScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'inputFalse' ;
  x3do:type 'SFBool' .
:field_2_2_2_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BooleanFilterScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'inputNegate' ;
  x3do:type 'SFBool' .
:IS_2_2_2_1_5 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :BooleanFilterScript ;
  x3do:hasConnect :connect_2_2_2_1_5_1, :connect_2_2_2_1_5_2, :connect_2_2_2_1_5_3, :connect_2_2_2_1_5_4 .
:connect_2_2_2_1_5_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_5 ;
  x3do:nodeField 'set_boolean' ;
  x3do:protoField 'set_boolean' .
:connect_2_2_2_1_5_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_5 ;
  x3do:nodeField 'inputTrue' ;
  x3do:protoField 'inputTrue' .
:connect_2_2_2_1_5_3 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_5 ;
  x3do:nodeField 'inputFalse' ;
  x3do:protoField 'inputFalse' .
:connect_2_2_2_1_5_4 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_5 ;
  x3do:nodeField 'inputNegate' ;
  x3do:protoField 'inputNegate' .
:ProtoDeclare_2_3 a owl:NamedIndividual, x3do:ProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasProtoInterface :ProtoInterface_2_3_1 ;
  x3do:hasProtoBody :ProtoBody_2_3_2 ;
  x3do:appinfo 'BooleanToggle maintains state and negates output when a true input is provided.' ;
  x3do:name 'BooleanToggle' .
:ProtoInterface_2_3_1 a owl:NamedIndividual, x3do:ProtoInterface ;
  x3do:hasParent :ProtoDeclare_2_3 ;
  x3do:hasField :field_2_3_1_1, :field_2_3_1_2, :field_2_3_1_3, :field_2_3_1_4 .
:field_2_3_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'If set_boolean input is true toggle state.' ;
  x3do:name 'set_boolean' ;
  x3do:type 'SFBool' .
:field_2_3_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'Reset persistent state value.' ;
  x3do:name 'set_toggle' ;
  x3do:type 'SFBool' .
:field_2_3_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Persistent state value that gets toggled or reset.' ;
  x3do:name 'toggle' ;
  x3do:type 'SFBool' ;
  x3do:value false .
:field_2_3_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Output toggled persistent state value.' ;
  x3do:name 'toggle_changed' ;
  x3do:type 'SFBool' .
:ProtoBody_2_3_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_3 ;
  x3do:hasChildren :Group_2_3_2_1 .
:Group_2_3_2_1 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:hasChildren :BooleanToggleScript .
:BooleanToggleScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :Group_2_3_2_1 ;
  x3do:hasField :field_2_3_2_1_1_1, :field_2_3_2_1_1_2, :field_2_3_2_1_1_3, :field_2_3_2_1_1_4, :field_2_3_2_1_1_5 ;
  x3do:hasIS :IS_2_3_2_1_1_6 ;
  x3do:DEF 'BooleanToggleScript' ;
  x3do:sourceCode """
ecmascript:

function initialize ()
{
	if (traceEnabled) Browser.println ('[BooleanToggle] toggle=' + toggle);

}
function set_boolean (value, timestamp)
{
	if (value == true)  // only toggle on true input
	{
		if (toggle == true) toggle = false;
		else                toggle = true;
	}
	toggle_changed = toggle;
//	Browser.println ('[BooleanToggle] traceEnabled=' + traceEnabled);
	if (traceEnabled) Browser.println ('[BooleanToggle] set_boolean=' + value + ', toggle=' + toggle);
}
function set_toggle (value, timestamp)
{
	toggle = value;
	toggle_changed = toggle;
	if (traceEnabled) Browser.println ('[BooleanToggle] set_toggle=' + set_toggle);
}
""" .
:field_2_3_2_1_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BooleanToggleScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_boolean' ;
  x3do:type 'SFBool' .
:field_2_3_2_1_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BooleanToggleScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_toggle' ;
  x3do:type 'SFBool' .
:field_2_3_2_1_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BooleanToggleScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'toggle' ;
  x3do:type 'SFBool' ;
  x3do:value false .
:field_2_3_2_1_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BooleanToggleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'toggle_changed' ;
  x3do:type 'SFBool' .
:field_2_3_2_1_1_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BooleanToggleScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'traceEnabled' ;
  x3do:type 'SFBool' ;
  x3do:value false .
:IS_2_3_2_1_1_6 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :BooleanToggleScript ;
  x3do:hasConnect :connect_2_3_2_1_1_6_1, :connect_2_3_2_1_1_6_2, :connect_2_3_2_1_1_6_3 .
:connect_2_3_2_1_1_6_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_1_6 ;
  x3do:nodeField 'set_boolean' ;
  x3do:protoField 'set_boolean' .
:connect_2_3_2_1_1_6_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_1_6 ;
  x3do:nodeField 'set_toggle' ;
  x3do:protoField 'set_toggle' .
:connect_2_3_2_1_1_6_3 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_1_6 ;
  x3do:nodeField 'toggle_changed' ;
  x3do:protoField 'toggle_changed' .
:ProtoDeclare_2_4 a owl:NamedIndividual, x3do:ProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasProtoInterface :ProtoInterface_2_4_1 ;
  x3do:hasProtoBody :ProtoBody_2_4_2 ;
  x3do:appinfo 'BooleanTrigger converts time events to boolean true events.' ;
  x3do:name 'BooleanTrigger' .
:ProtoInterface_2_4_1 a owl:NamedIndividual, x3do:ProtoInterface ;
  x3do:hasParent :ProtoDeclare_2_4 ;
  x3do:hasField :field_2_4_1_1, :field_2_4_1_2 .
:field_2_4_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'set_triggerTime provides input time event typical event sent is TouchSensor touchTime.' ;
  x3do:name 'set_triggerTime' ;
  x3do:type 'SFTime' .
:field_2_4_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_4_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'triggerTrue outputs a true value whenever a triggerTime event is received.' ;
  x3do:name 'triggerTrue' ;
  x3do:type 'SFBool' .
:ProtoBody_2_4_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_4 ;
  x3do:hasChildren :TriggerBooleanScript .
:TriggerBooleanScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :ProtoBody_2_4_2 ;
  x3do:hasField :field_2_4_2_1_1, :field_2_4_2_1_2 ;
  x3do:hasIS :IS_2_4_2_1_3 ;
  x3do:DEF 'TriggerBooleanScript' ;
  x3do:sourceCode """
ecmascript:

function set_triggerTime (value, timestamp)
{
	triggerTrue = true;
//	Browser.println ('triggerTrue = true');
}
""" .
:field_2_4_2_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :TriggerBooleanScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_triggerTime' ;
  x3do:type 'SFTime' .
:field_2_4_2_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :TriggerBooleanScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'triggerTrue' ;
  x3do:type 'SFBool' .
:IS_2_4_2_1_3 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :TriggerBooleanScript ;
  x3do:hasConnect :connect_2_4_2_1_3_1, :connect_2_4_2_1_3_2 .
:connect_2_4_2_1_3_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_3 ;
  x3do:nodeField 'set_triggerTime' ;
  x3do:protoField 'set_triggerTime' .
:connect_2_4_2_1_3_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_4_2_1_3 ;
  x3do:nodeField 'triggerTrue' ;
  x3do:protoField 'triggerTrue' .
:ProtoDeclare_2_5 a owl:NamedIndividual, x3do:ProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasProtoInterface :ProtoInterface_2_5_1 ;
  x3do:hasProtoBody :ProtoBody_2_5_2 ;
  x3do:appinfo 'IntegerTrigger converts boolean true or time input events to integer value (suitable for Switch node).' ;
  x3do:name 'IntegerTrigger' .
:ProtoInterface_2_5_1 a owl:NamedIndividual, x3do:ProtoInterface ;
  x3do:hasParent :ProtoDeclare_2_5 ;
  x3do:hasField :field_2_5_1_1, :field_2_5_1_2, :field_2_5_1_3, :field_2_5_1_4, :field_2_5_1_5 .
:field_2_5_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'If set_boolean input is true trigger output of integer value.' ;
  x3do:name 'set_boolean' ;
  x3do:type 'SFBool' .
:field_2_5_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'Resets value used for output when triggered later.' ;
  x3do:name 'set_integerKey' ;
  x3do:type 'SFInt32' .
:field_2_5_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'integerKey is value for output when triggered.' ;
  x3do:name 'integerKey' ;
  x3do:type 'SFInt32' ;
  x3do:value -1 .
:field_2_5_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'Reports change in integerKey value.' ;
  x3do:name 'integerKey_changed' ;
  x3do:type 'SFInt32' .
:field_2_5_1_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_5_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'triggerValue provides integer event output matching integerKey when true set_boolean received.' ;
  x3do:name 'triggerValue' ;
  x3do:type 'SFInt32' .
:ProtoBody_2_5_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_5 ;
  x3do:hasChildren :Group_2_5_2_1 .
:Group_2_5_2_1 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :ProtoBody_2_5_2 ;
  x3do:hasChildren :IntegerKeyHolder, :TriggerIntegerScript .
:IntegerKeyHolder a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :Group_2_5_2_1 ;
  x3do:hasIS :IS_2_5_2_1_1_1 ;
  x3do:DEF 'IntegerKeyHolder' ;
  x3do:whichChoice -1 .
:IS_2_5_2_1_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :IntegerKeyHolder ;
  x3do:hasConnect :connect_2_5_2_1_1_1_1 .
:connect_2_5_2_1_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_1_1 ;
  x3do:nodeField 'whichChoice' ;
  x3do:protoField 'integerKey' .
:TriggerIntegerScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :Group_2_5_2_1 ;
  x3do:hasField :field_2_5_2_1_2_1, :field_2_5_2_1_2_2, :field_2_5_2_1_2_3, :field_2_5_2_1_2_4, :field_2_5_2_1_2_5 ;
  x3do:hasIS :IS_2_5_2_1_2_6 ;
  x3do:DEF 'TriggerIntegerScript' ;
  x3do:directOutput true ;
  x3do:sourceCode """
ecmascript:

function set_boolean (inputValue, timestamp)
{
	if (inputValue == true)
	{
		integerKey = integerKeyHolderNode.whichChoice;
		triggerValue = integerKey; // send output event
	}
}
function set_integerKey (inputValue, timestamp)
{
	integerKey = inputValue;
	integerKeyHolderNode.whichChoice = integerKey;
	integerKey_changed = integerKey; // send output event
}
""" .
:field_2_5_2_1_2_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :TriggerIntegerScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_boolean' ;
  x3do:type 'SFBool' .
:field_2_5_2_1_2_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :TriggerIntegerScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_integerKey' ;
  x3do:type 'SFInt32' .
:field_2_5_2_1_2_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :TriggerIntegerScript ;
  x3do:hasChildren :IntegerKeyHolder-USE-1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'integerKeyHolderNode' ;
  x3do:type 'SFNode' .
:IntegerKeyHolder-USE-1 a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :field_2_5_2_1_2_3 ;
  owl:sameAs :IntegerKeyHolder . # DEF matching this USE
:field_2_5_2_1_2_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :TriggerIntegerScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'integerKey_changed' ;
  x3do:type 'SFInt32' .
:field_2_5_2_1_2_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :TriggerIntegerScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'triggerValue' ;
  x3do:type 'SFInt32' .
:IS_2_5_2_1_2_6 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :TriggerIntegerScript ;
  x3do:hasConnect :connect_2_5_2_1_2_6_1, :connect_2_5_2_1_2_6_2, :connect_2_5_2_1_2_6_3, :connect_2_5_2_1_2_6_4 .
:connect_2_5_2_1_2_6_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_6 ;
  x3do:nodeField 'set_boolean' ;
  x3do:protoField 'set_boolean' .
:connect_2_5_2_1_2_6_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_6 ;
  x3do:nodeField 'set_integerKey' ;
  x3do:protoField 'set_integerKey' .
:connect_2_5_2_1_2_6_3 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_6 ;
  x3do:nodeField 'integerKey_changed' ;
  x3do:protoField 'integerKey_changed' .
:connect_2_5_2_1_2_6_4 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_5_2_1_2_6 ;
  x3do:nodeField 'triggerValue' ;
  x3do:protoField 'triggerValue' .
:ProtoDeclare_2_6 a owl:NamedIndividual, x3do:ProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasProtoInterface :ProtoInterface_2_6_1 ;
  x3do:hasProtoBody :ProtoBody_2_6_2 ;
  x3do:appinfo 'TimeTrigger converts boolean true events to time events.' ;
  x3do:name 'TimeTrigger' .
:ProtoInterface_2_6_1 a owl:NamedIndividual, x3do:ProtoInterface ;
  x3do:hasParent :ProtoDeclare_2_6 ;
  x3do:hasField :field_2_6_1_1, :field_2_6_1_2 .
:field_2_6_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_6_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'If set_boolean input is true trigger output time value.' ;
  x3do:name 'set_boolean' ;
  x3do:type 'SFBool' .
:field_2_6_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_6_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:appinfo 'triggerTime is output time event sent when set_boolean input is true.' ;
  x3do:name 'triggerTime' ;
  x3do:type 'SFTime' .
:ProtoBody_2_6_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_6 ;
  x3do:hasChildren :TriggerTimeScript .
:TriggerTimeScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :ProtoBody_2_6_2 ;
  x3do:hasField :field_2_6_2_1_1, :field_2_6_2_1_2 ;
  x3do:hasIS :IS_2_6_2_1_3 ;
  x3do:DEF 'TriggerTimeScript' ;
  x3do:sourceCode """
ecmascript:

function set_boolean (value, timestamp)
{
	if (value) triggerTime = timestamp;
}
""" .
:field_2_6_2_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :TriggerTimeScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_boolean' ;
  x3do:type 'SFBool' .
:field_2_6_2_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :TriggerTimeScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'triggerTime' ;
  x3do:type 'SFTime' .
:IS_2_6_2_1_3 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :TriggerTimeScript ;
  x3do:hasConnect :connect_2_6_2_1_3_1, :connect_2_6_2_1_3_2 .
:connect_2_6_2_1_3_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_6_2_1_3 ;
  x3do:nodeField 'set_boolean' ;
  x3do:protoField 'set_boolean' .
:connect_2_6_2_1_3_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_6_2_1_3 ;
  x3do:nodeField 'triggerTime' ;
  x3do:protoField 'triggerTime' .
:Anchor_2_7 a owl:NamedIndividual, x3do:Anchor ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :Shape_2_7_1 ;
  x3do:description 'EventUtilityExamples' ;
  x3do:parameter '"target=_blank"' ;
  x3do:url '"EventUtilityExamples.x3d" "https://www.web3d.org/x3d/content/examples/Basic/development/EventUtilityExamples.x3d" "EventUtilityExamples.wrl" "https://www.web3d.org/x3d/content/examples/Basic/development/EventUtilityExamples.wrl"' .
:Shape_2_7_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Anchor_2_7 ;
  x3do:hasGeometry :Text_2_7_1_1 ;
  x3do:hasAppearance :Appearance_2_7_1_2 .
:Text_2_7_1_1 a owl:NamedIndividual, x3do:Text ;
  x3do:hasParent :Shape_2_7_1 ;
  x3do:hasFontStyle :FontStyle_2_7_1_1_1 ;
  x3do:string '"EventUtilityPrototype" "defines prototypes" "" "Click text to see" "EventUtilityExamples"' .
:FontStyle_2_7_1_1_1 a owl:NamedIndividual, x3do:FontStyle ;
  x3do:hasParent :Text_2_7_1_1 ;
  x3do:justify '"MIDDLE" "MIDDLE"' ;
  x3do:size 0.9 .
:Appearance_2_7_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_7_1 ;
  x3do:hasMaterial :Material_2_7_1_2_1 .
:Material_2_7_1_2_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_7_1_2 ;
  x3do:diffuseColor ( 1 1 0.2 ) .
