@prefix :        <https://www.web3d.org/x3d/content/examples/Basic/Geospatial/KmlPrototypes.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.0.xsd#> .
@prefix x3do:    <https://www.web3d.org/specifications/X3dOntology4.0#> .

:X3D a owl:NamedIndividual, x3do:X3D ;
  x3do:hasHead :head ;
  x3do:hasScene :Scene ;
  x3do:profile 'Immersive' ;
  x3do:version '3.3' ;
  x3do:noNamespaceSchemaLocation 'https://www.web3d.org/specifications/x3d-3.3.xsd' .
:head a owl:NamedIndividual, x3do:head ;
  x3do:hasParent :X3D ;
  x3do:hasComponent :component_1_1 ;
  x3do:hasMeta :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_12, :meta_1_13, :meta_1_14 .
:component_1_1 a owl:NamedIndividual, x3do:component ;
  x3do:hasParent :head ;
  x3do:level 1 ;
  x3do:name 'Geospatial' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'KmlPrototypes.x3d' ;
  x3do:name 'title' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'X3D prototypes to render Keyhole Markup Language (KML) information.' ;
  x3do:name 'description' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '20 August 2007' ;
  x3do:name 'translated' .
:meta_1_5 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '20 October 2019' ;
  x3do:name 'modified' .
:meta_1_6 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Don Brutzman' ;
  x3do:name 'creator' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'under development' ;
  x3do:name 'warning' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://www.web3d.org/x3d/content/examples/Basic/Geospatial/KmlPrototypes.x3d' ;
  x3do:name 'identifier' .
:meta_1_9 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'http://www.opengeospatial.org/standards/kml' ;
  x3do:name 'reference' .
:meta_1_10 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'http://schemas.opengis.net/kml' ;
  x3do:name 'reference' .
:meta_1_11 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd' ;
  x3do:name 'reference' .
:meta_1_12 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'KmlToX3d.xslt' ;
  x3do:name 'reference' .
:meta_1_13 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_14 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '../license.html' ;
  x3do:name 'license' .
:meta dcterms:title "KmlPrototypes.x3d" .
:meta dcterms:description "X3D prototypes to render Keyhole Markup Language (KML) information." .
:meta dcterms:translated "20 August 2007" .
:meta dcterms:modified "20 October 2019" .
:meta dcterms:creator "Don Brutzman" .
:meta dcterms:warning "under development" .
:meta dcterms:identifier "https://www.web3d.org/x3d/content/examples/Basic/Geospatial/KmlPrototypes.x3d" .
:meta dcterms:reference "http://www.opengeospatial.org/standards/kml" .
:meta dcterms:reference "http://schemas.opengis.net/kml" .
:meta dcterms:reference "http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd" .
:meta dcterms:reference "KmlToX3d.xslt" .
: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:hasProtoDeclare :ProtoDeclare_2_1, :ProtoDeclare_2_2 ;
  x3do:hasChildren :Viewpoint_2_3, :ProtoInstance_2_4 .
:ProtoDeclare_2_1 a owl:NamedIndividual, x3do:ProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasProtoInterface :ProtoInterface_2_1_1 ;
  x3do:hasProtoBody :ProtoBody_2_1_2 ;
  x3do:appinfo 'A Placemark with a Point has an icon associated with it that marks a point on the earth in the 3D viewer.' ;
  x3do:documentation 'http://code.google.com/apis/kml/documentation/kml_tags_21.html#placemark' ;
  x3do:name 'PlaceMark' .
:ProtoInterface_2_1_1 a owl:NamedIndividual, x3do:ProtoInterface ;
  x3do:hasParent :ProtoDeclare_2_1 ;
  x3do:hasField :field_2_1_1_1, :field_2_1_1_2, :field_2_1_1_3, :field_2_1_1_4, :field_2_1_1_5, :field_2_1_1_6, :field_2_1_1_7, :field_2_1_1_8, :field_2_1_1_9, :field_2_1_1_10, :field_2_1_1_11, :field_2_1_1_12, :field_2_1_1_13, :field_2_1_1_14, :field_2_1_1_15 .
:field_2_1_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'id' ;
  x3do:type 'SFString' .
:field_2_1_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'Label for the object' ;
  x3do:name 'name' ;
  x3do:type 'MFString' .
:field_2_1_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'User-supplied text that appears in the description balloon' ;
  x3do:name 'description' ;
  x3do:type 'SFString' .
:field_2_1_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'longitude latitude and altitude' ;
  x3do:name 'coordinates' ;
  x3do:type 'SFVec3d' ;
  x3do:value ( 0 0 0 ) .
:field_2_1_1_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'A string value representing an unstructured address written as a standard street city state address and/or as a postal code.' ;
  x3do:name 'address' ;
  x3do:type 'MFString' .
:field_2_1_1_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo '. Specifies whether the feature is drawn in the 3D viewer when it is initially loaded' ;
  x3do:name 'visibility' ;
  x3do:type 'SFBool' ;
  x3do:value true .
:field_2_1_1_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_visibility' ;
  x3do:type 'SFBool' .
:field_2_1_1_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'visibility_changed' ;
  x3do:type 'SFBool' .
:field_2_1_1_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Specifies whether a Folder appears closed or open when first loaded' ;
  x3do:name 'open' ;
  x3do:type 'SFBool' ;
  x3do:value true .
:field_2_1_1_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'A short description of the feature' ;
  x3do:name 'snippet' ;
  x3do:type 'MFString' .
:field_2_1_1_11 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_snippet' ;
  x3do:type 'MFString' .
:field_2_1_1_12 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'snippet_changed' ;
  x3do:type 'MFString' .
:field_2_1_1_13 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'Shape or (KML) Point LineString LinearRing Polygon MultiGeometry Model' ;
  x3do:name 'geometry' ;
  x3do:type 'MFNode' .
:field_2_1_1_14 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo 'Default color for PlaceMark' ;
  x3do:name 'diffuseColor' ;
  x3do:type 'SFColor' ;
  x3do:value ( 0.2 0.8 0.4 ) .
:field_2_1_1_15 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_1_1 ;
  x3do:accessType 'inputOutput' ;
  x3do:name 'metadata' ;
  x3do:type 'SFNode' .
:ProtoBody_2_1_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_1 ;
  x3do:hasChildren :SwitchVisible, :WorldInfo_2_1_2_2, :MetadataHolderPlaceMark, :BehaviorScript ;
  x3do:hasROUTE :ROUTE_2_1_2_5, :ROUTE_2_1_2_6 .
:SwitchVisible a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :ProtoBody_2_1_2 ;
  x3do:hasChildren :Anchor_2_1_2_1_1 ;
  x3do:DEF 'SwitchVisible' ;
  x3do:whichChoice 0 .
:Anchor_2_1_2_1_1 a owl:NamedIndividual, x3do:Anchor ;
  x3do:hasParent :SwitchVisible ;
  x3do:hasIS :IS_2_1_2_1_1_1 ;
  x3do:hasChildren :GeoLocation_2_1_2_1_1_2, :PlaceMarkBalloon, :PlaceMarkName, :SnippetTranslation, :GeometryGroup .
:IS_2_1_2_1_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :Anchor_2_1_2_1_1 ;
  x3do:hasConnect :connect_2_1_2_1_1_1_1, :connect_2_1_2_1_1_1_2 .
:connect_2_1_2_1_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_1_1_1 ;
  x3do:nodeField 'url' ;
  x3do:protoField 'address' .
:connect_2_1_2_1_1_1_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_1_1_1 ;
  x3do:nodeField 'description' ;
  x3do:protoField 'description' .
:GeoLocation_2_1_2_1_1_2 a owl:NamedIndividual, x3do:GeoLocation ;
  x3do:hasParent :Anchor_2_1_2_1_1 ;
  x3do:hasGeoOrigin :GeoOrigin_2_1_2_1_1_2_1 .
:GeoOrigin_2_1_2_1_1_2_1 a owl:NamedIndividual, x3do:GeoOrigin ;
  x3do:hasParent :GeoLocation_2_1_2_1_1_2 ;
  x3do:hasIS :IS_2_1_2_1_1_2_1_1 .
:IS_2_1_2_1_1_2_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :GeoOrigin_2_1_2_1_1_2_1 ;
  x3do:hasConnect :connect_2_1_2_1_1_2_1_1_1 .
:connect_2_1_2_1_1_2_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_1_1_2_1_1 ;
  x3do:nodeField 'geoCoords' ;
  x3do:protoField 'coordinates' .
:PlaceMarkBalloon a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Anchor_2_1_2_1_1 ;
  x3do:hasGeometry :Extrusion_2_1_2_1_1_3_1 ;
  x3do:hasAppearance :Appearance_2_1_2_1_1_3_2 ;
  x3do:DEF 'PlaceMarkBalloon' .
:Extrusion_2_1_2_1_1_3_1 a owl:NamedIndividual, x3do:Extrusion ;
  x3do:hasParent :PlaceMarkBalloon ;
  x3do:creaseAngle 3.14 ;
  x3do:crossSection ( 1.00 0.00 0.92 -0.38 0.71 -0.71 0.38 -0.92 0.00 -1.00 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1.00 -0.00 -0.92 0.38 -0.71 0.71 -0.38 0.92 0.00 1.00 0.38 0.92 0.71 0.71 0.92 0.38 1.00 0.00 ) ;
  x3do:scale ( 0.01 0.01 0.03 0.03 0.06 0.06 0.09 0.09 0.14 0.14 0.23 0.23 0.25 0.25 0.23 0.23 0.18 0.18 0.1 0.1 0.03 0.03 ) ;
  x3do:spine ( 0 0 0 0 0.12 0 0 0.28 0 0 0.4 0 0 0.55 0 0 0.65 0 0 0.75 0 0 0.85 0 0 0.92 0 0 0.98 0 0 1.0 0 ) .
:Appearance_2_1_2_1_1_3_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :PlaceMarkBalloon ;
  x3do:hasMaterial :PlaceMarkMaterial .
:PlaceMarkMaterial a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_1_2_1_1_3_2 ;
  x3do:hasIS :IS_2_1_2_1_1_3_2_1_1 ;
  x3do:DEF 'PlaceMarkMaterial' .
:IS_2_1_2_1_1_3_2_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :PlaceMarkMaterial ;
  x3do:hasConnect :connect_2_1_2_1_1_3_2_1_1_1 .
:connect_2_1_2_1_1_3_2_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_1_1_3_2_1_1 ;
  x3do:nodeField 'diffuseColor' ;
  x3do:protoField 'diffuseColor' .
:PlaceMarkName a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Anchor_2_1_2_1_1 ;
  x3do:hasChildren :Shape_2_1_2_1_1_4_1 ;
  x3do:DEF 'PlaceMarkName' ;
  x3do:translation ( 0 1.2 0 ) .
:Shape_2_1_2_1_1_4_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :PlaceMarkName ;
  x3do:hasGeometry :Text_2_1_2_1_1_4_1_1 ;
  x3do:hasAppearance :Appearance_2_1_2_1_1_4_1_2 .
:Text_2_1_2_1_1_4_1_1 a owl:NamedIndividual, x3do:Text ;
  x3do:hasParent :Shape_2_1_2_1_1_4_1 ;
  x3do:hasIS :IS_2_1_2_1_1_4_1_1_1 ;
  x3do:hasFontStyle :FontStyle_2_1_2_1_1_4_1_1_2 .
:IS_2_1_2_1_1_4_1_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :Text_2_1_2_1_1_4_1_1 ;
  x3do:hasConnect :connect_2_1_2_1_1_4_1_1_1_1 .
:connect_2_1_2_1_1_4_1_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_1_1_4_1_1_1 ;
  x3do:nodeField 'string' ;
  x3do:protoField 'name' .
:FontStyle_2_1_2_1_1_4_1_1_2 a owl:NamedIndividual, x3do:FontStyle ;
  x3do:hasParent :Text_2_1_2_1_1_4_1_1 ;
  x3do:justify '"MIDDLE" "MIDDLE"' ;
  x3do:size 0.2 .
:Appearance_2_1_2_1_1_4_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_1_2_1_1_4_1 ;
  x3do:hasMaterial :PlaceMarkMaterial-USE-1 .
:PlaceMarkMaterial-USE-1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_1_2_1_1_4_1_2 ;
  owl:sameAs :PlaceMarkMaterial . # DEF matching this USE
:SnippetTranslation a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Anchor_2_1_2_1_1 ;
  x3do:hasChildren :Shape_2_1_2_1_1_5_1 ;
  x3do:DEF 'SnippetTranslation' ;
  x3do:translation ( 0 2.4 0 ) .
:Shape_2_1_2_1_1_5_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :SnippetTranslation ;
  x3do:hasGeometry :Text_2_1_2_1_1_5_1_1 ;
  x3do:hasAppearance :Appearance_2_1_2_1_1_5_1_2 .
:Text_2_1_2_1_1_5_1_1 a owl:NamedIndividual, x3do:Text ;
  x3do:hasParent :Shape_2_1_2_1_1_5_1 ;
  x3do:hasIS :IS_2_1_2_1_1_5_1_1_1 ;
  x3do:hasFontStyle :FontStyle_2_1_2_1_1_5_1_1_2 .
:IS_2_1_2_1_1_5_1_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :Text_2_1_2_1_1_5_1_1 ;
  x3do:hasConnect :connect_2_1_2_1_1_5_1_1_1_1 .
:connect_2_1_2_1_1_5_1_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_1_1_5_1_1_1 ;
  x3do:nodeField 'string' ;
  x3do:protoField 'snippet' .
:FontStyle_2_1_2_1_1_5_1_1_2 a owl:NamedIndividual, x3do:FontStyle ;
  x3do:hasParent :Text_2_1_2_1_1_5_1_1 ;
  x3do:justify '"MIDDLE" "MIDDLE"' ;
  x3do:size 0.2 .
:Appearance_2_1_2_1_1_5_1_2 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_1_2_1_1_5_1 ;
  x3do:hasMaterial :PlaceMarkMaterial-USE-2 .
:PlaceMarkMaterial-USE-2 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_1_2_1_1_5_1_2 ;
  owl:sameAs :PlaceMarkMaterial . # DEF matching this USE
:GeometryGroup a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :Anchor_2_1_2_1_1 ;
  x3do:hasIS :IS_2_1_2_1_1_6_1 ;
  x3do:DEF 'GeometryGroup' .
:IS_2_1_2_1_1_6_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :GeometryGroup ;
  x3do:hasConnect :connect_2_1_2_1_1_6_1_1 .
:connect_2_1_2_1_1_6_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_1_1_6_1 ;
  x3do:nodeField 'children' ;
  x3do:protoField 'geometry' .
:WorldInfo_2_1_2_2 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :ProtoBody_2_1_2 ;
  x3do:hasIS :IS_2_1_2_2_1 .
:IS_2_1_2_2_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :WorldInfo_2_1_2_2 ;
  x3do:hasConnect :connect_2_1_2_2_1_1 .
:connect_2_1_2_2_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_2_1 ;
  x3do:nodeField 'title' ;
  x3do:protoField 'id' .
:MetadataHolderPlaceMark a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :ProtoBody_2_1_2 ;
  x3do:hasIS :IS_2_1_2_3_1 ;
  x3do:DEF 'MetadataHolderPlaceMark' .
:IS_2_1_2_3_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :MetadataHolderPlaceMark ;
  x3do:hasConnect :connect_2_1_2_3_1_1 .
:connect_2_1_2_3_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_3_1 ;
  x3do:nodeField 'metadata' ;
  x3do:protoField 'metadata' .
:BehaviorScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :ProtoBody_2_1_2 ;
  x3do:hasField :field_2_1_2_4_1, :field_2_1_2_4_2, :field_2_1_2_4_3, :field_2_1_2_4_4, :field_2_1_2_4_5, :field_2_1_2_4_6, :field_2_1_2_4_7, :field_2_1_2_4_8, :field_2_1_2_4_9 ;
  x3do:hasIS :IS_2_1_2_4_10 ;
  x3do:DEF 'BehaviorScript' ;
  x3do:sourceCode """
ecmascript:

function initialize ()
{
	Browser.println ('visibility=' + visibility);
	if (visibility == false) visibilityChoice = -1;

	// TODO:  if (open == false) open_changed = -1;

	adjustSnippetOffset ();
}

function set_visibility (value, timestamp)
{
	visibility = value;         // remember change
	visibility_changed = value; // send eventOut
	if (visibility == false) visibilityChoice = -1;
	else                     visibilityChoice =  0;
}

function set_snippet (value, timestamp)
{
	snippet = value;         // remember change
	snippet_changed = value; // send eventOut
	adjustSnippetOffset ();
}

function adjustSnippetOffset () // TODO
{
//	snippetOffset = new SFVec3f (0.0, (snippet.length * 0.3), 0.0);
//	Browser.println ('snippet.length=' + snippet.length + ', snippetOffset=' + snippetOffset);
}

function set_open (value, timestamp) // TODO
{

}
""" .
:field_2_1_2_4_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BehaviorScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'visibility' ;
  x3do:type 'SFBool' .
:field_2_1_2_4_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BehaviorScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_visibility' ;
  x3do:type 'SFBool' .
:field_2_1_2_4_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BehaviorScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'visibility_changed' ;
  x3do:type 'SFBool' .
:field_2_1_2_4_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BehaviorScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'visibilityChoice' ;
  x3do:type 'SFInt32' .
:field_2_1_2_4_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BehaviorScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'open' ;
  x3do:type 'SFBool' .
:field_2_1_2_4_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BehaviorScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'snippet' ;
  x3do:type 'MFString' .
:field_2_1_2_4_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BehaviorScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_snippet' ;
  x3do:type 'MFString' .
:field_2_1_2_4_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BehaviorScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'snippet_changed' ;
  x3do:type 'MFString' .
:field_2_1_2_4_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :BehaviorScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'snippetOffset' ;
  x3do:type 'SFVec3f' .
:IS_2_1_2_4_10 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :BehaviorScript ;
  x3do:hasConnect :connect_2_1_2_4_10_1, :connect_2_1_2_4_10_2, :connect_2_1_2_4_10_3, :connect_2_1_2_4_10_4, :connect_2_1_2_4_10_5, :connect_2_1_2_4_10_6, :connect_2_1_2_4_10_7 .
:connect_2_1_2_4_10_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_4_10 ;
  x3do:nodeField 'visibility' ;
  x3do:protoField 'visibility' .
:connect_2_1_2_4_10_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_4_10 ;
  x3do:nodeField 'set_visibility' ;
  x3do:protoField 'set_visibility' .
:connect_2_1_2_4_10_3 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_4_10 ;
  x3do:nodeField 'visibility_changed' ;
  x3do:protoField 'visibility_changed' .
:connect_2_1_2_4_10_4 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_4_10 ;
  x3do:nodeField 'open' ;
  x3do:protoField 'open' .
:connect_2_1_2_4_10_5 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_4_10 ;
  x3do:nodeField 'snippet' ;
  x3do:protoField 'snippet' .
:connect_2_1_2_4_10_6 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_4_10 ;
  x3do:nodeField 'set_snippet' ;
  x3do:protoField 'set_snippet' .
:connect_2_1_2_4_10_7 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_1_2_4_10 ;
  x3do:nodeField 'snippet_changed' ;
  x3do:protoField 'snippet_changed' .
:ROUTE_2_1_2_5 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_1_2 ;
  x3do:fromField 'visibilityChoice' ;
  x3do:fromNode 'BehaviorScript' ;
  x3do:toField 'whichChoice' ;
  x3do:toNode 'SwitchVisible' .
:ROUTE_2_1_2_6 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_1_2 ;
  x3do:fromField 'snippetOffset' ;
  x3do:fromNode 'BehaviorScript' ;
  x3do:toField 'set_translation' ;
  x3do:toNode 'SnippetTranslation' .
: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 'A geographic location defined by longitude latitude and (required) altitude.' ;
  x3do:documentation 'http://code.google.com/apis/kml/documentation/kml_tags_21.html#point' ;
  x3do:name 'Point' .
: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_5, :field_2_2_1_6, :field_2_2_1_7, :field_2_2_1_8 .
:field_2_2_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'id' ;
  x3do:type 'SFString' .
:field_2_2_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'allowed values: clampToGround relativeToGround absolute' ;
  x3do:name 'altitudeMode' ;
  x3do:type 'SFString' ;
  x3do:value 'clampToGround' .
:field_2_2_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'coordinates' ;
  x3do:type 'SFVec3d' ;
  x3do:value ( 0 0 0 ) .
:field_2_2_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_coordinates' ;
  x3do:type 'SFVec3d' .
:field_2_2_1_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'coordinates_changed' ;
  x3do:type 'SFVec3d' .
:field_2_2_1_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'extrude' ;
  x3do:type 'SFBool' ;
  x3do:value false .
:field_2_2_1_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'tessellate' ;
  x3do:type 'SFBool' ;
  x3do:value false .
:field_2_2_1_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_2_1 ;
  x3do:accessType 'inputOutput' ;
  x3do:name 'metadata' ;
  x3do:type 'SFNode' .
:ProtoBody_2_2_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_2 ;
  x3do:hasChildren :PointScript, :WorldInfo_2_2_2_2, :MetadataHolderPoint .
:PointScript 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, :field_2_2_2_1_5, :field_2_2_2_1_6 ;
  x3do:hasIS :IS_2_2_2_1_7 ;
  x3do:DEF 'PointScript' ;
  x3do:sourceCode """
ecmascript:

function initialize ()
{
	if  (altitudeMode == '') altitudeMode = 'clampToGround';
	if ((altitudeMode != 'clampToGround') &&
	    (altitudeMode != 'relativeToGround') &&
	    (altitudeMode != 'absolute'))
	{
		warningString = '[Point';
		if (id != '') warningString += ' ' + id;
		warningString += '] illegal value ';
		warningString += 'altitudeMode=' + altitudeMode;
		Browser.println (warningString);
	}
}

function set_coordinates (value)
{
	coordinates = value;
	coordinates_changed = value;
}

// TODO: how to handle extrude, tessellate
""" .
:field_2_2_2_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :PointScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'altitudeMode' ;
  x3do:type 'SFString' .
:field_2_2_2_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :PointScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'coordinates' ;
  x3do:type 'SFVec3d' .
:field_2_2_2_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :PointScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_coordinates' ;
  x3do:type 'SFVec3d' .
:field_2_2_2_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :PointScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'coordinates_changed' ;
  x3do:type 'SFVec3d' .
:field_2_2_2_1_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :PointScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'extrude' ;
  x3do:type 'SFBool' .
:field_2_2_2_1_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :PointScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'tessellate' ;
  x3do:type 'SFBool' .
:IS_2_2_2_1_7 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :PointScript ;
  x3do:hasConnect :connect_2_2_2_1_7_1, :connect_2_2_2_1_7_2, :connect_2_2_2_1_7_3, :connect_2_2_2_1_7_4, :connect_2_2_2_1_7_5, :connect_2_2_2_1_7_6 .
:connect_2_2_2_1_7_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_7 ;
  x3do:nodeField 'altitudeMode' ;
  x3do:protoField 'altitudeMode' .
:connect_2_2_2_1_7_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_7 ;
  x3do:nodeField 'coordinates' ;
  x3do:protoField 'coordinates' .
:connect_2_2_2_1_7_3 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_7 ;
  x3do:nodeField 'set_coordinates' ;
  x3do:protoField 'set_coordinates' .
:connect_2_2_2_1_7_4 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_7 ;
  x3do:nodeField 'coordinates_changed' ;
  x3do:protoField 'coordinates_changed' .
:connect_2_2_2_1_7_5 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_7 ;
  x3do:nodeField 'extrude' ;
  x3do:protoField 'extrude' .
:connect_2_2_2_1_7_6 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_1_7 ;
  x3do:nodeField 'tessellate' ;
  x3do:protoField 'tessellate' .
:WorldInfo_2_2_2_2 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :ProtoBody_2_2_2 ;
  x3do:hasIS :IS_2_2_2_2_1 .
:IS_2_2_2_2_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :WorldInfo_2_2_2_2 ;
  x3do:hasConnect :connect_2_2_2_2_1_1 .
:connect_2_2_2_2_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_2_1 ;
  x3do:nodeField 'title' ;
  x3do:protoField 'id' .
:MetadataHolderPoint a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :ProtoBody_2_2_2 ;
  x3do:hasIS :IS_2_2_2_3_1 ;
  x3do:DEF 'MetadataHolderPoint' .
:IS_2_2_2_3_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :MetadataHolderPoint ;
  x3do:hasConnect :connect_2_2_2_3_1_1 .
:connect_2_2_2_3_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_2_2_3_1 ;
  x3do:nodeField 'metadata' ;
  x3do:protoField 'metadata' .
:Viewpoint_2_3 a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :Scene ;
  x3do:description 'Placemark example' ;
  x3do:position ( 0 0 4 ) .
:ProtoInstance_2_4 a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Scene ;
  x3do:hasFieldValue :fieldValue_2_4_1, :fieldValue_2_4_2, :fieldValue_2_4_3, :fieldValue_2_4_4 ;
  x3do:name 'PlaceMark' .
:fieldValue_2_4_1 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :ProtoInstance_2_4 ;
  x3do:name 'name' ;
  x3do:value '"Simple placemark"' .
:fieldValue_2_4_2 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :ProtoInstance_2_4 ;
  x3do:name 'description' ;
  x3do:value 'Attached to the ground. Intelligently places itself at the height of the underlying terrain.' .
:fieldValue_2_4_3 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :ProtoInstance_2_4 ;
  x3do:name 'coordinates' ;
  x3do:value ( -122.0822035425683 37.42228990140251 0 ) .
:fieldValue_2_4_4 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :ProtoInstance_2_4 ;
  x3do:name 'address' ;
  x3do:value '"https://www.web3d.org/x3d-earth"' .
