forked from pparsons/jsdas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsdas.min.js
62 lines (62 loc) · 29.5 KB
/
jsdas.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
var JSDAS=function(){var b=function(a,c,f){return JSDAS.Parser.parseElement(a,JSDAS.Formats[f||JSDAS.Formats.current][c])},e={version:function(){return"1.0"},debug:function(a){if(a)this._debug=a;return this._debug},setXMLLoader:function(a){if(a&&typeof a.load=="function"){this.XMLLoader=a;return true}else return false},sources:function(a,c,f,g){JSDAS.XMLLoader.load(a,function(d){d=!JSDAS.error?JSDAS.parseSources(d,g):undefined;if(JSDAS.error)f&&typeof f=="FUNCTION"&&f();else c(d)},f)},types:function(a,
c,f,g){JSDAS.XMLLoader.load(a,function(d){d=!JSDAS.error?JSDAS.parseTypes(d,g):undefined;if(JSDAS.error)f&&typeof f=="FUNCTION"&&f();else c(d)},f)},dsn:function(a,c){JSDAS.XMLLoader.load(a,function(f){c(JSDAS.parseDSN(f,"v153"))})},sequence:function(a,c,f,g){JSDAS.XMLLoader.load(a,function(d){d=JSDAS.parseSequence(d,g);var i=d.SEQUENCE;if(typeof i=="undefined")f&&typeof f=="FUNCTION"&&f();else{for(var j=0,h=i.length;j<h;++j){var k=i[j];k.textContent=k.textContent.replace(/\n/gi,"")}c(d)}},f)},features:function(a,
c,f,g){JSDAS.XMLLoader.load(a,function(d){d=!JSDAS.error?JSDAS.parseFeatures(d,g):undefined;if(JSDAS.error)f&&typeof f=="FUNCTION"&&f();else c(d)},f)},entry_points:function(a,c,f,g){JSDAS.XMLLoader.load(a,function(d){d=!JSDAS.error?JSDAS.parseEntry_points(d,g):undefined;if(JSDAS.error)f&&typeof f=="FUNCTION"&&f();else c(d)},f)},alignment:function(a,c,f,g){JSDAS.XMLLoader.load(a,function(d){d=!JSDAS.error?JSDAS.parseAlignment(d,g):undefined;if(JSDAS.error)f&&typeof f=="FUNCTION"&&f();else c(d)},f)},
stylesheet:function(a,c,f,g){JSDAS.XMLLoader.load(a,function(d){d=!JSDAS.error?JSDAS.parseStylesheet(d,g):undefined;if(JSDAS.error)f&&typeof f=="FUNCTION"&&f();else c(d)},f)},coordinate_systems:function(a,c,f,g){JSDAS.XMLLoader.load(a,function(d){d=!JSDAS.error?JSDAS.parseCoordinate_systems(d,g):undefined;if(JSDAS.error)f&&typeof f=="FUNCTION"&&f();else c(d)},f)},parseSources:function(a,c){return b(a,"sources",c)},parseDSN:function(a,c){return b(a,"dsn",c)},parseTypes:function(a,c){return b(a,"types",
c)},parseSequence:function(a,c){return b(a,"sequence",c)},parseFeatures:function(a,c){return b(a,"features",c)},parseEntry_points:function(a,c){return b(a,"entry_points",c)},parseAlignment:function(a,c){return b(a,"alignment",c)},parseStylesheet:function(a,c){return b(a,"stylesheet",c)},parseCoordinate_systems:function(a,c){return b(a,"coordinate_systems",c)},errors:[],error:false,flushErrors:function(){this.errors=[];e.error=false},addError:function(a,c){if(a){e.errors[e.errors.length]={id:a,comment:c};
e.error=true}}};return e}();JSDAS=JSDAS||{};
(function(){var b=[{name:"id",type:"string",mandatory:false},{name:"start",type:"string",mandatory:false},{name:"stop",type:"string",mandatory:false},{name:"type",type:"string",mandatory:false},{name:"version",type:"string",mandatory:false},{name:"label",type:"string",mandatory:false}];JSDAS.Formats={current:"v16",v16:{sources:{tagname:"SOURCES",multiple:false,mandatory:true,properties:[],childs:[{tagname:"SOURCE",multiple:true,mandatory:true,properties:[{name:"uri",type:"string",mandatory:true},
{name:"title",type:"string",mandatory:true},{name:"description",type:"string",mandatory:false},{name:"doc_href",type:"string",mandatory:false}],childs:[{tagname:"MAINTAINER",multiple:false,mandatory:false,properties:[{name:"email",type:"string",mandatory:true}],childs:[]},{tagname:"VERSION",multiple:true,mandatory:true,properties:[{name:"uri",type:"string",mandatory:false},{name:"created",type:"date",mandatory:false}],childs:[{tagname:"COORDINATES",multiple:true,mandatory:true,properties:[{name:"uri",
type:"string",mandatory:true},{name:"source",type:"string",mandatory:true},{name:"authority",type:"string",mandatory:true},{name:"version",type:"string",mandatory:false}],childs:"text"},{tagname:"CAPABILITY",multiple:true,mandatory:true,properties:[{name:"type",type:"string",mandatory:true},{name:"query_uri",type:"string",mandatory:true}],childs:[]},{tagname:"PROP",multiple:true,mandatory:false,properties:[{name:"name",type:"string",mandatory:true},{name:"value",type:"string",mandatory:true}],childs:[]}]}]}]},
types:{tagname:"DASTYPES",multiple:false,mandatory:true,properties:[],childs:[{tagname:"GFF",multiple:false,mandatory:true,properties:[{name:"version",type:"string",mandatory:true},{name:"href",type:"string",mandatory:true}],childs:[{tagname:"SEGMENT",multiple:true,mandatory:true,properties:b,childs:[{tagname:"TYPE",multiple:true,mandatory:false,properties:[{name:"id",type:"string",mandatory:true},{name:"category",type:"string",mandatory:false},{name:"method",type:"string",mandatory:false},{name:"cvId",
type:"string",mandatory:false}],childs:"text"}]}]}]},sequence:{tagname:"DASSEQUENCE",multiple:false,mandatory:true,properties:[],childs:[{tagname:"SEQUENCE",multiple:true,mandatory:true,childs:"text",properties:[{name:"id",type:"string",mandatory:true},{name:"start",type:"string",mandatory:true},{name:"stop",type:"string",mandatory:true},{name:"version",type:"string",mandatory:false},{name:"label",type:"string",mandatory:false},{name:"moltype",type:"string",mandatory:false}]}]},features:{tagname:"DASGFF",
multiple:false,mandatory:true,properties:[],childs:[{tagname:"GFF",multiple:false,mandatory:true,properties:[],childs:[{tagname:"SEGMENT",multiple:true,mandatory:true,properties:b,childs:[{tagname:"FEATURE",multiple:true,mandatory:false,properties:[{name:"id",type:"string",mandatory:true},{name:"label",type:"string",mandatory:false}],childs:[{tagname:"TYPE",multiple:false,mandatory:true,properties:[{name:"id",type:"string",mandatory:true},{name:"category",type:"string",mandatory:true},{name:"method",
type:"string",mandatory:false},{name:"cvId",type:"string",mandatory:false},{name:"reference",type:"string",mandatory:false},{name:"subparts",type:"string",mandatory:false},{name:"superparts",type:"string",mandatory:false}],childs:"text"},{tagname:"METHOD",multiple:false,mandatory:true,properties:[{name:"id",type:"string",mandatory:true},{name:"cvId",type:"string",mandatory:false}],childs:"text"},{tagname:"START",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"END",multiple:false,
mandatory:false,properties:[],childs:"text"},{tagname:"SCORE",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ORIENTATION",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"PHASE",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"NOTE",multiple:true,mandatory:false,properties:[],childs:"text"},{tagname:"LINK",multiple:true,mandatory:false,properties:[{name:"href",type:"string",mandatory:true}],childs:"text"},{tagname:"TARGET",multiple:true,
mandatory:false,properties:[{name:"id",type:"string",mandatory:true},{name:"start",type:"string",mandatory:true},{name:"stop",type:"string",mandatory:true}],childs:"text"},{tagname:"GROUP",multiple:true,mandatory:false,properties:[{name:"id",type:"string",mandatory:true},{name:"label",type:"string",mandatory:true},{name:"type",type:"string",mandatory:true}],childs:[{tagname:"NOTE",multiple:true,mandatory:false,properties:[],childs:"text"},{tagname:"LINK",multiple:true,mandatory:false,properties:[{name:"href",
type:"string",mandatory:true}],childs:"text"},{tagname:"TARGET",multiple:true,mandatory:false,properties:[{name:"id",type:"string",mandatory:true},{name:"start",type:"string",mandatory:true},{name:"stop",type:"string",mandatory:true}],childs:"text"}]},{tagname:"PARENT",multiple:true,mandatory:false,properties:[{name:"id",type:"string",mandatory:true}],childs:[]},{tagname:"PART",multiple:true,mandatory:false,properties:[{name:"id",type:"string",mandatory:true}],childs:[]}]}]}]}]},alignment:{tagname:"DASALIGNMENT",
multiple:false,mandatory:true,properties:[],childs:[{tagname:"alignment",multiple:true,mandatory:false,properties:[{name:"aligntype",type:"string",mandatory:false},{name:"name",type:"string",mandatory:false},{name:"description",type:"string",mandatory:false},{name:"position",type:"string",mandatory:false},{name:"max",type:"string",mandatory:false}],childs:[{tagname:"alignobject",multiple:true,mandatory:true,properties:[{name:"dbaccessionid",type:"string",mandatory:true},{name:"objectversion",type:"string",
mandatory:true},{name:"chain",type:"string",mandatory:false},{name:"intobjectid",type:"string",mandatory:true},{name:"dbsource",type:"string",mandatory:true},{name:"dbversion",type:"string",mandatory:true},{name:"dbcoordsys",type:"string",mandatory:true}],childs:[{tagname:"alignobjectdetail",multiple:true,mandatory:false,properties:[{name:"dbsource",type:"string",mandatory:true},{name:"property",type:"string",mandatory:true}],childs:"text"},{tagname:"sequence",multiple:true,mandatory:false,properties:[],
childs:"text"}]},{tagname:"score",multiple:true,mandatory:false,properties:[{name:"methodname",type:"string",mandatory:true},{name:"value",type:"string",mandatory:true}],childs:[]},{tagname:"block",multiple:true,mandatory:false,properties:[{name:"blockorder",type:"string",mandatory:true},{name:"blockscore",type:"string",mandatory:true}],clilds:[{tagname:"segment",multiple:true,mandatory:true,properties:[{name:"intobjectid",type:"string",mandatory:true},{name:"end",type:"string",mandatory:false},{name:"orientation",
type:"string",mandatory:false},{name:"start",type:"string",mandatory:false}],childs:[{tagname:"cigar",multiple:true,mandatory:false,properties:[],childs:"text"}]}]},{tagname:"geo3d",multiple:true,mandatory:false,properties:[{name:"intobjectid",type:"string",mandatory:false}],childs:[{tagname:"vector",multiple:false,mandatory:true,properties:[{name:"x",type:"string",mandatory:true},{name:"y",type:"string",mandatory:true},{name:"z",type:"string",mandatory:true}],childs:[]},{tagname:"matrix",multiple:false,
mandatory:true,properties:[{name:"mat11",type:"string",mandatory:true},{name:"mat12",type:"string",mandatory:true},{name:"mat13",type:"string",mandatory:true},{name:"mat21",type:"string",mandatory:true},{name:"mat22",type:"string",mandatory:true},{name:"mat23",type:"string",mandatory:true},{name:"mat31",type:"string",mandatory:true},{name:"mat32",type:"string",mandatory:true},{name:"mat33",type:"string",mandatory:true}],childs:[]}]}]}]},stylesheet:{tagname:"DASSTYLE",multiple:false,mandatory:true,
properties:[],childs:[{tagname:"STYLESHEET",multiple:false,mandatory:true,properties:[{name:"version",type:"string",mandatory:true}],childs:[{tagname:"CATEGORY",multiple:true,mandatory:true,properties:[{name:"id",type:"string",mandatory:true}],childs:[{tagname:"TYPE",multiple:true,mandatory:true,properties:[{name:"id",type:"string",mandatory:true}],childs:[{tagname:"GLYPH",multiple:true,mandatory:true,properties:[{name:"zoom",type:"string",mandatory:false}],childs:[{tagname:"ARROW",multiple:false,
mandatory:false,properties:[],childs:[{tagname:"PARALLEL",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"SOUTHWEST",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"NORTHEAST",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"HEIGHT",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"FGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BGCOLOR",multiple:false,mandatory:false,properties:[],
childs:"text"},{tagname:"LABEL",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BUMP",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ZINDEX",multiple:false,mandatory:false,properties:[],childs:"text"}]},{tagname:"ANCHORED_ARROW",multiple:false,mandatory:false,properties:[],childs:[{tagname:"PARALLEL",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"HEIGHT",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"FGCOLOR",
multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"LABEL",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BUMP",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ZINDEX",multiple:false,mandatory:false,properties:[],childs:"text"}]},{tagname:"BOX",multiple:false,mandatory:false,properties:[],childs:[{tagname:"LINEWITH",multiple:false,mandatory:false,properties:[],
childs:"text"},{tagname:"HEIGHT",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"FGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"LABEL",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BUMP",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ZINDEX",multiple:false,mandatory:false,properties:[],childs:"text"}]},{tagname:"CROSS",
multiple:false,mandatory:false,properties:[],childs:[{tagname:"HEIGHT",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"FGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"LABEL",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BUMP",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ZINDEX",multiple:false,mandatory:false,properties:[],
childs:"text"}]},{tagname:"DOT",multiple:false,mandatory:false,properties:[],childs:[{tagname:"HEIGHT",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"FGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"LABEL",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BUMP",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ZINDEX",multiple:false,
mandatory:false,properties:[],childs:"text"}]},{tagname:"EX",multiple:false,mandatory:false,properties:[],childs:[{tagname:"HEIGHT",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"FGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"LABEL",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BUMP",multiple:false,mandatory:false,properties:[],childs:"text"},
{tagname:"ZINDEX",multiple:false,mandatory:false,properties:[],childs:"text"}]},{tagname:"HIDDEN",multiple:false,mandatory:false,properties:[],childs:[]},{tagname:"LINE",multiple:false,mandatory:false,properties:[],childs:[{tagname:"STYLE",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"HEIGHT",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"FGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BGCOLOR",multiple:false,mandatory:false,
properties:[],childs:"text"},{tagname:"LABEL",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BUMP",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ZINDEX",multiple:false,mandatory:false,properties:[],childs:"text"}]},{tagname:"SPAN",multiple:false,mandatory:false,properties:[],childs:[{tagname:"HEIGHT",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"FGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BGCOLOR",
multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"LABEL",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BUMP",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ZINDEX",multiple:false,mandatory:false,properties:[],childs:"text"}]},{tagname:"TEXT",multiple:false,mandatory:false,properties:[],childs:[{tagname:"FONT",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"FONTSIZE",multiple:false,mandatory:false,properties:[],
childs:"text"},{tagname:"STRING",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"STYLE",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"FGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"LABEL",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BUMP",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ZINDEX",multiple:false,
mandatory:false,properties:[],childs:"text"}]},{tagname:"PRIMERS",multiple:false,mandatory:false,properties:[],childs:[{tagname:"HEIGHT",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"FGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"LABEL",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BUMP",multiple:false,mandatory:false,properties:[],childs:"text"},
{tagname:"ZINDEX",multiple:false,mandatory:false,properties:[],childs:"text"}]},{tagname:"TOOMANY",multiple:false,mandatory:false,properties:[],childs:[{tagname:"LINEWIDTH",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"HEIGHT",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"FGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"LABEL",multiple:false,
mandatory:false,properties:[],childs:"text"},{tagname:"BUMP",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ZINDEX",multiple:false,mandatory:false,properties:[],childs:"text"}]},{tagname:"TRIANGLE",multiple:false,mandatory:false,properties:[],childs:[{tagname:"DIRECTION",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"LINEWIDTH",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"HEIGHT",multiple:false,mandatory:false,properties:[],childs:"text"},
{tagname:"FGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BGCOLOR",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"LABEL",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"BUMP",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ZINDEX",multiple:false,mandatory:false,properties:[],childs:"text"}]},{tagname:"GRADIENT",multiple:false,mandatory:false,properties:[],childs:[{tagname:"HEIGHT",multiple:false,mandatory:false,
properties:[],childs:"text"},{tagname:"COLOR1",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"COLOR2",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"COLOR3",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"MIN",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"MAX",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"STEPS",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ZINDEX",
multiple:false,mandatory:false,properties:[],childs:"text"}]},{tagname:"HISTOGRAM",multiple:false,mandatory:false,properties:[],childs:[{tagname:"HEIGHT",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"COLOR1",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"COLOR2",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"COLOR3",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"MIN",multiple:false,mandatory:false,properties:[],
childs:"text"},{tagname:"MAX",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"STEPS",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ZINDEX",multiple:false,mandatory:false,properties:[],childs:"text"}]},{tagname:"LINEPLOT",multiple:false,mandatory:false,properties:[],childs:[{tagname:"HEIGHT",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"COLOR1",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"COLOR2",multiple:false,
mandatory:false,properties:[],childs:"text"},{tagname:"COLOR3",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"MIN",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"MAX",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"STEPS",multiple:false,mandatory:false,properties:[],childs:"text"},{tagname:"ZINDEX",multiple:false,mandatory:false,properties:[],childs:"text"}]}]}]}]}]}]},structure:{tagname:"dasstructure",multiple:false,mandatory:true,
properties:[],childs:[{tagname:"object",multiple:true,mandatory:true,properties:[{name:"dbaccessionid",type:"string",mandatory:true},{name:"objectversion",type:"string",mandatory:true},{name:"dbsource",type:"string",mandatory:true},{name:"dbversion",type:"string",mandatory:true},{name:"dbcoordsys",type:"string",mandatory:true}],childs:[]},{tagname:"objectdetail",multiple:true,mandatory:false,properties:[{name:"dbsource",type:"string",mandatory:true},{name:"property",type:"string",mandatory:true}],
childs:"text"},{tagname:"chainid",multiple:true,mandatory:false,properties:[{name:"id",type:"string",mandatory:true},{name:"model",type:"string",mandatory:false},{name:"swissprot",type:"string",mandatory:false}],childs:[{tagname:"group",multiple:true,mandatory:false,properties:[{name:"name",type:"string",mandatory:true},{name:"type",type:"string",mandatory:true},{name:"groupid",type:"string",mandatory:true},{name:"insetcode",type:"string",mandatory:false}],childs:[{tagname:"atom",multiple:true,mandatory:true,
properties:[{name:"x",type:"string",mandatory:true},{name:"y",type:"string",mandatory:true},{name:"z",type:"string",mandatory:true},{name:"atomname",type:"string",mandatory:true},{name:"atomid",type:"string",mandatory:true},{name:"occupancy",type:"string",mandatory:false},{name:"tempfactor",type:"string",mandatory:false},{name:"altloc",type:"string",mandatory:false}]}]}]},{tagname:"connect",multiple:true,mandatory:false,properties:[{name:"typr",type:"string",mandatory:false},{name:"atomserial",type:"string",
mandatory:false}],childs:[{tagname:"atomid",multiple:true,mandatory:false,properties:[{name:"atomid",type:"string",mandatory:false}],childs:[]}]}]},entry_points:{tagname:"DASEP",multiple:false,mandatory:true,properties:[],childs:[{tagname:"ENTRY_POINTS",multiple:false,mandatory:true,childs:[{tagname:"SEGMENT",multiple:true,mandatory:false,properties:[{name:"id",type:"string",mandatory:false},{name:"start",type:"string",mandatory:false},{name:"stop",type:"string",mandatory:false},{name:"type",type:"string",
mandatory:false},{name:"orientation",type:"string",mandatory:false},{name:"subparts",type:"string",mandatory:false}],childs:"text"}],properties:[{name:"href",type:"string",mandatory:true},{name:"start",type:"string",mandatory:false},{name:"end",type:"string",mandatory:false},{name:"version",type:"string",mandatory:false},{name:"orientation",type:"string",mandatory:false},{name:"label",type:"string",mandatory:false}]}]}},v153:{dsn:{tagname:"DASDSN",multiple:false,mandatory:true,properties:[],childs:[{tagname:"DSN",
multiple:true,mandatory:true,properties:[],childs:[{tagname:"SOURCE",multiple:false,mandatory:true,properties:[{name:"id",type:"string",mandatory:true},{name:"version",type:"string",mandatory:false}],childs:"text"},{tagname:"MAPMASTER",multiple:false,mandatory:true,properties:[],childs:"text"},{tagname:"DESCRIPTION",multiple:false,mandatory:false,properties:[],childs:"text"}]}]}}}})();
JSDAS.URL={analyzeUrl:function(b){var e=b.split("/");b="";for(var a=undefined,c=undefined,f=undefined,g=0,d=e.length;g<d&&e[g]!=="das";){b+=e[g]+"/";g++}g<d&&g++;if(g<d){if(e[g]!==""&&e[g]!=="dsn"&&e[g]!=="sources")a=e[g];else{c=e[g];if(c=="")c=undefined}g++}if(g<d){e=e.slice(g).join("/");g=e.indexOf("?");if(g!==-1){c=e.substr(0,g);f=e.substr(g+1)}}return{prefix:b,source:a,command:c,parameters:f}},getPrefix:function(b){b=b.split("/");for(var e="",a=0,c=b.length;a<c;a++){if(b[a]=="das")break;e+=b[a]+
"/"}return e},getSourcesURL:function(b){return this.getPrefix(b)+"das/sources"},getSourceURL:function(b,e){if(e){var a=this.getPrefix(b);if(a!=undefined)return a+"das/"+e+(e[e.length-1]=="/"?"":"/");JSDAS.addError("No_DAS_URL","It seems like the URL is not formatted acording to DAS specification or maybe undefined URL:"+b)}else{a=this.analyzeUrl(b);if(a.source&&a.prefix!=undefined)return a.prefix+"das/"+a.source+(a.source[a.source.length-1]=="/"?"":"/");else JSDAS.addError("No_DAS_URL","It seems like the URL is not formatted acording to DAS specification or maybe undefined URL:"+
b)}},getEntryPointsURL:function(b,e){return this.getSourceURL(b,e)+"entry_points"},getTypesURL:function(b,e){return this.getSourceURL(b,e)+"types"},getSequenceURL:function(b,e){return this.getSourceURL(b,e)+"sequence"},getFeaturesURL:function(b,e){return this.getSourceURL(b,e)+"features"},getStylesheetURL:function(b,e){return this.getSourceURL(b,e)+"stylesheet"},getAlignmentURL:function(b,e){return this.getSourceURL(b,e)+"alignment"},hasSource:function(b){return JSDAS.URL.analyzeUrl(b).source!=undefined},
paramsURLEncode:function(b){var e="";for(par in b){var a=b[par];if(typeof a=="string"){if(b[par]){if(e)e+="&";e+=par+"="+b[par]}}else if(a instanceof Array){if(e)e+="&";var c=0;for(c=0;c<a.length;c++)if(a[c]){e+=par+"="+a[c];if(c!=a.length-1)e+=";"}}}return encodeURI("?"+e)}};
JSDAS.Parser={num_elements:0,checkMandatoryElements:false,parseElement:function(b,e){var a={};if(b.nodeType==9)for(b=b.firstChild;b.nodeType!=1&&b.nextSibling;)b=b.nextSibling;if(e.properties)for(var c=e.properties,f=0,g=c.length;f<g;++f){var d=c[f],i=d.jsname||d.name;a[i]=this.parseProperty(b,d)}if(e.childs){c=e.childs;if(c==="text")a.textContent=b.innerText||b.textContent||b.text;else{f=0;for(g=c.length;f<g;++f){d=c[f];var j=[];i=b.getElementsByTagName("*");for(var h=0,k=i.length;h<k;++h){var l=
i[h];RegExp("^"+d.tagname+"$","i").test(l.nodeName)&&j.push(l)}if(j.length>0){i=d.jsname||d.tagname;if(d.multiple){a[i]=[];h=0;for(k=j.length;h<k;++h)a[i].push(this.parseElement(j[h],d))}else a[i]=this.parseElement(j[0],d)}}}}return a},parseProperty:function(b,e){for(var a,c=b.attributes,f=false,g=0,d=c.length;g<d&&!f;++g){var i=c[g];if(RegExp("^"+e.name+"$","i").test(i.name)){a=i.value;f=true}}if(a)switch(e.type){case "date":return new Date(a);default:return a}}};
JSDAS.XMLLoader={initialize:function(){this.initialized=true;this.proxyURL="proxy.php"},xhrCORS:function(b,e){var a;if(typeof XMLHttpRequest=="undefined")return null;a=new XMLHttpRequest;if("withCredentials"in a)a.open(b,e,true);else if(typeof XDomainRequest!="undefined"){a=new XDomainRequest;a.open(b,e)}else a=null;return a},xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest},load:function(b,e,a){this.initialized||this.initialize();var c=JSDAS.XMLLoader,
f=true,g=this.xhrCORS("GET",b);if(!g)if(this.proxyURL){g=this.xhr();g.open("GET",this.proxyURL+"?url="+b,true);f=false}else a&&a({id:"no_proxy",msg:"Cross-Origin requests are not supported but no proxy has been defined"});c=this;var d=function(k){if(k&&k.readyState==4){if(c.httpSuccess(k))i(k);else if(f&&c.proxyURL){k=undefined;f=false;var l=c.xhr();l.open("GET",c.proxyURL+"?url="+b,true);l.onreadystatechange=function(){d(l)};l.send(null)}else a&&a({id:"xmlhttprequest_error",msg:k.status});k=undefined}},
i=function(k){(k=k.responseXML)||a&&a({id:"not_xml",msg:"The response was not XML"});k.documentElement.nodeName!="parsererror"&&e(k)};g.onreadystatechange=function(){d(g)};try{g.send(null)}catch(j){if(f&&this.proxyURL){g=this.xhr();g.open("GET",this.proxyURL+"?url="+b,true);g.onreadystatechange=function(){d(g)};try{g.send(null)}catch(h){a&&a({id:"sending_error",msg:"There was an error when sending the request"})}}else a&&a({id:"sending_error",msg:"There was an error when sending the request"})}},
httpSuccess:function(b){try{return!b.status&&location.protocol=="file:"&&b.responseXML||b.status>=200&&b.status<300||b.status==304||b.status==1223}catch(e){}return false}};JSDAS=JSDAS||{};
(function(){JSDAS.Simple={getClient:function(b){var e=b,a=b?JSDAS.URL.analyzeUrl(b):undefined,c=undefined,f=function(){},g={url:function(d){if(d){e=d;a=JSDAS.URL.analyzeUrl(b)}return d},source:function(d){if(a){a.source=d||a.source;return a.source}},server:function(d){return g.url(d)},sources:function(d,i,j){var h=JSDAS.URL.getSourcesURL(e);if(h){h+=JSDAS.URL.paramsURLEncode(j);JSDAS.sources(h,d,i)}else JSDAS.addError("wrong_url","Malformed or Undefined URL?")},features:function(d,i,j){var h=JSDAS.URL.getFeaturesURL(e,
a.source);if(h){h+=JSDAS.URL.paramsURLEncode(d);JSDAS.features(h,i||f,j||function(){JSDAS.addError("error_retrieving_features","Error retrieving features, see errors log")},c)}else JSDAS.addError("wrong_url","Malformed or Undefined URL?")},types:function(d,i,j){var h=JSDAS.URL.getTypesURL(e,a.source);if(h){h+=JSDAS.URL.paramsURLEncode(d);JSDAS.types(h,i||f,j||function(){JSDAS.addError("error_retrieving_types","Error retrieving types, see errors log")},c)}else JSDAS.addError("wrong_url","Malformed or Undefined URL?")},
entry_points:function(d,i,j){var h=JSDAS.URL.getEntryPointsURL(e,a.source);if(h){h+=JSDAS.URL.paramsURLEncode(d);JSDAS.entry_points(h,i||f,j||function(){JSDAS.addError("error_retrieving_entry_points","Error retrieving entry points, see errors log")},c)}else JSDAS.addError("wrong_url","Malformed or Undefined URL?")},sequence:function(d,i,j){var h=JSDAS.URL.getSequenceURL(e,a.source);if(h){h+=JSDAS.URL.paramsURLEncode(d);JSDAS.sequence(h,i||f,j||function(){JSDAS.addError("error_retrieving_sequence",
"Error retrieving sequence, see errors log")},c)}else JSDAS.addError("wrong_url","Malformed or Undefined URL?")},alignment:function(d,i,j){var h=JSDAS.URL.getAlignmentURL(e,a.source);if(sequence_url){h+=JSDAS.URL.paramsURLEncode(d);JSDAS.alignment(h,i||f,j||function(){JSDAS.addError("error_retrieving_alignment","Error retrieving sequence, see errors log")},c)}else JSDAS.addError("wrong_url","Malformed or Undefined URL?","simple.js")},stylesheet:function(d,i){var j=JSDAS.URL.getStylesheetURL(e,a.source);
j?JSDAS.stylesheet(j,d||f,i||function(){JSDAS.addError("error_retrieving_stylesheet","Error retrieving sequence, see errors log")},c):JSDAS.addError("wrong_url","Malformed or Undefined URL?")},version:function(d){if(d==undefined)return c;c=d}};return g}}})();