Skip to content

Instantly share code, notes, and snippets.

@kenwebb
Last active June 29, 2017 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenwebb/0b78a16009d21bb8462245585200d9ea to your computer and use it in GitHub Desktop.
Save kenwebb/0b78a16009d21bb8462245585200d9ea to your computer and use it in GitHub Desktop.
AQL - Web Interface
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Thu Jun 29 2017 08:49:38 GMT-0400 (EDT)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: AQL - Web Interface
Description: Edit and visualize your own AQL content.
Url: http://www.primordion.com/Xholon/gwt/
InternalName: 0b78a16009d21bb8462245585200d9ea
Keywords:
My Notes
--------
June 19, 2017
http://127.0.0.1:8888/XholonAQL.html?app=AQL+-+Web+-+Interface&src=lstr&gui=none
References
----------
(1) http://categoricaldata.net/aql.html
]]></Notes>
<params>
<param name="DelayWorkbookCSH" value="true"/>
</params>
<_-.XholonClass>
<PhysicalSystem/>
<!--<TreeWanderer/>-->
<!--<ActRegulator/>-->
<!-- buttons -->
<PauseButton/>
<StepButton/>
</_-.XholonClass>
<xholonClassDetails>
<Avatar>
<Color>rgba(255,215,0,0.8)</Color>
</Avatar>
<!--<TreeWanderer implName="org.primordion.xholon.script.TreeWanderer">
<Color>rgba(255,215,0,0.8)</Color>
</TreeWanderer>
<ActRegulator implName="org.primordion.xholon.base.ActRegulator"/>-->
<PauseButton implName="org.primordion.xholon.base.Behavior_gwtjs"/>
<StepButton implName="org.primordion.xholon.base.Behavior_gwtjs"/>
</xholonClassDetails>
<PhysicalSystem xmlns:xi="http://www.w3.org/2001/XInclude">
<CatAql instances="true" schemas="true" separateSchemaInstance="true" xhcName_System="CattSystem" schemaNodeSuffix="s" schemaRoleNameNoSuffix="true" pointToSchema="true" exportGraphviz="true" exportSql="true" exportXml="true" exportYaml="true">
<xi:include href="#aql" roleName="aql"/>
</CatAql>
<!--<PauseButton><![CDATA[
var me, paused, beh = {
postConfigure: function() {
me = this.cnode.parent();
// pause the app
$wnd.xh.state(4); // CS_PAUSED = 4
paused = false;
},
handleNodeSelection: function() {
// pause/unpause the app
if (paused) {
$wnd.xh.state(3); // CS_RUNNING = 3
paused = false;
}
else {
$wnd.xh.state(4); // CS_PAUSED = 4
paused = true;
}
// the Xholon print2Console() IGNORE_ME character
return "\u0011";
}
}
//# sourceURL=PauseButton.js
]]></PauseButton>-->
<!--<StepButton><![CDATA[
var me, beh = {
postConfigure: function() {
me = this.cnode.parent();
},
handleNodeSelection: function() {
// this event is caused by pressing the Step button
$wnd.console.log("Step event");
$wnd.xh.state(5); // CS_STEPPING = 5
// the Xholon print2Console() IGNORE_ME character
return "\u0011";
}
}
//# sourceURL=StepButton.js
]]></StepButton>-->
</PhysicalSystem>
<Chameleonbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var me, beh = {
postConfigure: function() {
me = this.cnode.parent();
// change size and optionally other characteristics of the resizePanel
var resizePanel = $doc.querySelector("#xhtabs > table > tbody > tr > td:nth-child(1) > div");
$wnd.console.log(resizePanel);
resizePanel.style.height = "999px";
//$wnd.xh.html.toggle("xhtop");
//$wnd.xh.html.toggle("xhgui");
//$wnd.xh.html.toggle("xhtabs");
// optionally load in the "Categorical Data IDE"
//var respMsg = xh.service("XholonHelperService").call(-2028, "AqlWebInterface", xh.root());
var xhs = $wnd.xh.service("XholonHelperService");
if (xhs) {
var respMsg = xhs.call(-2028, "AqlWebInterface", me);
}
},
handleNodeSelection: function() {
// this event is caused by pressing the Start button
$wnd.console.log("Start event");
var subTree = $wnd.xh.stored.csh;
if (subTree) {
$wnd.xh.stored.csh = null; // prevent the subtree from being used again
me.append(subTree);
}
/*var img = $doc.querySelector("img#initialimg");
if (img) {
img.style.display = "none";
}*/
$wnd.xh.state(3);
// xh.root().first().next().next().name(); // "cattSystem_50"
var cattSystem = $wnd.xh.root().first().next().next();
$wnd.console.log(cattSystem);
var schemaNode = cattSystem.first();
var instanceNode = schemaNode.next();
//$wnd.xh.xport("Graphviz", cattSystem, '{"shouldShowLinkLabels":true,"shouldSpecifyShape":true,"shouldSpecifyArrowhead":true,"shouldDisplayGraph":true}');
// Graphviz schema
$wnd.xh.xport("Graphviz", schemaNode, '{"gvFileExt":".gv","gvGraph":"digraph","layout":"dot","edgeOp":"->","gvCluster":"","shouldShowStateMachineEntities":false,"filter":"--Behavior,Script","nameTemplateNodeId":"^^^^i^","nameTemplateNodeLabel":"R^^^^^","shouldQuoteLabels":true,"shouldShowLinks":true,"shouldShowLinkLabels":true,"shouldSpecifyLayout":false,"maxLabelLen":-1,"shouldColor":true,"defaultColor":"#f0f8ff","shouldSpecifyShape":true,"shape":"ellipse","shouldSpecifySize":false,"size":"6","shouldSpecifyFontname":false,"shouldSpecifyArrowhead":true,"arrowhead":"vee","shouldSpecifyStylesheet":true,"stylesheet":"Xholon.css","shouldSpecifyRankdir":false,"rankdir":"LR","shouldDisplayGraph":true,"outputFormat":"svg"}');
// Graphviz instances
$wnd.xh.xport("Graphviz", instanceNode, '{"gvFileExt":".gv","gvGraph":"digraph","layout":"dot","edgeOp":"->","gvCluster":"","shouldShowStateMachineEntities":false,"filter":"--Behavior,Script","nameTemplateNodeId":"^^^^i^","nameTemplateNodeLabel":"r C^^^","shouldQuoteLabels":true,"shouldShowLinks":true,"shouldShowLinkLabels":true,"shouldSpecifyLayout":false,"maxLabelLen":-1,"shouldColor":true,"defaultColor":"#f0f8ff","shouldSpecifyShape":true,"shape":"ellipse","shouldSpecifySize":false,"size":"6","shouldSpecifyFontname":false,"shouldSpecifyArrowhead":true,"arrowhead":"vee","shouldSpecifyStylesheet":true,"stylesheet":"Xholon.css","shouldSpecifyRankdir":true,"rankdir":"LR","shouldDisplayGraph":true,"outputFormat":"svg"}');
// Chap Network
$wnd.xh.xport("_other,ChapNetwork", schemaNode, '{"showNetwork":true,"showTree":false,"maxTreeLevels":1,"width":"800px","height":"800px","nameTemplate":"R^^^^^","maxChars":-1,"linksLength":100,"showPortName":true,"nodesStyle":"dot","stabilize":"false","jsLibName":"network-min"}');
// change the number of rows in each textarea to match the height of the resizePanel
var taArr = $doc.querySelectorAll("#xhtabs textarea");
for (var i = 0; i < taArr.length; i++) {
var ta = taArr[i];
ta.rows = "64";
}
// the Xholon print2Console() IGNORE_ME character
return "\u0011";
}
}
//# sourceURL=Chameleonbehavior.js
]]></Chameleonbehavior>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg id="controls" xmlns="http://www.w3.org/2000/svg" version="1.1" xml:space="preserve" height="32" width="150" y="0px" x="0px" viewBox="0 0 150 32">
<!-- http://www.myiconfinder.com/icon/next-pause-previous-rewind-forward-stop-play-back-eject-controls-music-button/4923#.128 and edited with Inkscape -->
<!--<g id="cntrlPause" transform="translate(-1,1)">
<title>Pause</title>
<path id="PhysicalSystem/PauseButton" style="stroke: rgb(169,169,169);" d="m60.277 1.3534c-2.0722 0-3.752 1.6798-3.752 3.752v19.154c0 2.072 1.6798 3.752 3.752 3.752 2.072 0 3.7518-1.6798 3.7518-3.752v-19.155c0-2.072-1.6798-3.7518-3.7518-3.7518M71.532 1.3534c-2.072 0-3.752 1.6798-3.752 3.752v19.154c0 2.072 1.6798 3.752 3.752 3.752s3.752-1.6798 3.752-3.752v-19.155c0-2.072-1.6798-3.7518-3.752-3.7518z"/>
</g>-->
<g id="cntrlStart">
<title>Run</title>
<path id="Chameleonbehavior" style="stroke: rgb(169,169,169);" d="m3.845 28.7c0.36325 0.21 0.769 0.31 1.1745 0.31s0.811-0.1 1.1745-0.31l19.05-11c0.72675-0.42 1.1745-1.2 1.1745-2.04 0-0.83-0.44775-1.61-1.1745-2.03l-19.05-11c-0.3638-0.21-0.769-0.31-1.1748-0.31-0.4055 0-0.811 0.1-1.1745 0.31-0.72675 0.42-1.1745 1.2-1.1745 2.04v21.99c0.0005 0.84 0.44825 1.62 1.1748 2.04z"/>
</g>
<!--<g id="cntrlStep" transform="translate(21,-49)">
<title>Step</title>
<path id="PhysicalSystem/StepButton" style="stroke: rgb(169,169,169);" d="m126.24 62.881-19.05-10.998c-0.3635-0.20975-0.76875-0.31475-1.1745-0.31475-0.4055 0-0.811 0.105-1.1745 0.31475-0.72675 0.4195-1.1745 1.195-1.1745 2.034v21.997c0 0.83925 0.44775 1.6145 1.1745 2.034 0.36325 0.20975 0.769 0.31475 1.1745 0.31475s0.811-0.10475 1.1745-0.31475l19.05-10.998c0.72675-0.4195 1.1745-1.195 1.1745-2.034 0.00025-0.83925-0.44775-1.6145-1.1742-2.034zM103.28 64.915c0-0.83925-0.44775-1.6145-1.1745-2.034l-19.05-10.998c-0.36325-0.20975-0.76875-0.31475-1.1745-0.31475-0.4055 0-0.811 0.105-1.1745 0.31475-0.72675 0.4195-1.1745 1.195-1.1745 2.034v21.997c0 0.83925 0.44775 1.6145 1.1745 2.034 0.3635 0.20975 0.769 0.31475 1.1745 0.31475s0.811-0.10475 1.1745-0.31475l19.05-10.998c0.727-0.4195 1.1745-1.1948 1.1745-2.034z"/>
</g>-->
</svg>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
</XholonWorkbook>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment