Showing
5 changed files
with
461 additions
and
29 deletions
| ... | @@ -72,6 +72,158 @@ app:PropertyWidgetGroupFilterFunctions | ... | @@ -72,6 +72,158 @@ app:PropertyWidgetGroupFilterFunctions |
| 72 | ] ; | 72 | ] ; |
| 73 | spin:returnType xsd:boolean . | 73 | spin:returnType xsd:boolean . |
| 74 | 74 | ||
| 75 | +app:ResourcesWithLetter | ||
| 76 | + rdf:type spin:SelectTemplate ; | ||
| 77 | + rdfs:comment "Gets an ordered list of all instances of a given class that start with a given letter."^^xsd:string ; | ||
| 78 | + rdfs:label "Resources with letter"^^xsd:string ; | ||
| 79 | + rdfs:subClassOf spin:SelectTemplates ; | ||
| 80 | + spin:body | ||
| 81 | + [ rdf:type sp:Select ; | ||
| 82 | + sp:distinct "true"^^xsd:boolean ; | ||
| 83 | + sp:orderBy ([ rdf:type fn:lower-case ; | ||
| 84 | + sp:arg1 [ sp:varName "label"^^xsd:string | ||
| 85 | + ] | ||
| 86 | + ]) ; | ||
| 87 | + sp:resultVariables ([ sp:varName "resource"^^xsd:string | ||
| 88 | + ]) ; | ||
| 89 | + sp:where ([ rdf:type sp:TriplePath ; | ||
| 90 | + sp:object | ||
| 91 | + [ sp:varName "resourceType"^^xsd:string | ||
| 92 | + ] ; | ||
| 93 | + sp:path [ rdf:type sp:ModPath ; | ||
| 94 | + sp:modMax -2 ; | ||
| 95 | + sp:modMin 0 ; | ||
| 96 | + sp:subPath rdfs:subClassOf | ||
| 97 | + ] ; | ||
| 98 | + sp:subject | ||
| 99 | + [ sp:varName "type"^^xsd:string | ||
| 100 | + ] | ||
| 101 | + ] [ sp:object | ||
| 102 | + [ sp:varName "type"^^xsd:string | ||
| 103 | + ] ; | ||
| 104 | + sp:predicate rdf:type ; | ||
| 105 | + sp:subject | ||
| 106 | + [ sp:varName "resource"^^xsd:string | ||
| 107 | + ] | ||
| 108 | + ] [ rdf:type sp:Filter ; | ||
| 109 | + sp:expression | ||
| 110 | + [ rdf:type sp:isIRI ; | ||
| 111 | + sp:arg1 [ sp:varName "resource"^^xsd:string | ||
| 112 | + ] | ||
| 113 | + ] | ||
| 114 | + ] [ rdf:type sp:Bind ; | ||
| 115 | + sp:expression | ||
| 116 | + [ rdf:type ui:label ; | ||
| 117 | + sp:arg1 [ sp:varName "resource"^^xsd:string | ||
| 118 | + ] | ||
| 119 | + ] ; | ||
| 120 | + sp:variable | ||
| 121 | + [ sp:varName "label"^^xsd:string | ||
| 122 | + ] | ||
| 123 | + ] [ rdf:type sp:Filter ; | ||
| 124 | + sp:expression | ||
| 125 | + [ rdf:type fn:starts-with ; | ||
| 126 | + sp:arg1 [ rdf:type fn:upper-case ; | ||
| 127 | + sp:arg1 [ sp:varName "label"^^xsd:string | ||
| 128 | + ] | ||
| 129 | + ] ; | ||
| 130 | + sp:arg2 [ sp:varName "letter"^^xsd:string | ||
| 131 | + ] | ||
| 132 | + ] | ||
| 133 | + ]) | ||
| 134 | + ] ; | ||
| 135 | + spin:constraint | ||
| 136 | + [ rdf:type spl:Argument ; | ||
| 137 | + rdfs:comment "The (uppercase) letter to match."^^xsd:string ; | ||
| 138 | + spl:predicate arg:letter ; | ||
| 139 | + spl:valueType xsd:string | ||
| 140 | + ] ; | ||
| 141 | + spin:constraint | ||
| 142 | + [ rdf:type spl:Argument ; | ||
| 143 | + rdfs:comment "The resource type."^^xsd:string ; | ||
| 144 | + spl:predicate arg:resourceType ; | ||
| 145 | + spl:valueType rdfs:Class | ||
| 146 | + ] . | ||
| 147 | + | ||
| 148 | +app:ResourcesWithNonLetter | ||
| 149 | + rdf:type spin:SelectTemplate ; | ||
| 150 | + rdfs:comment "Gets an ordered list of all instances of a given type that do not start with a letter from A-Z."^^xsd:string ; | ||
| 151 | + rdfs:label "Resources with non letter"^^xsd:string ; | ||
| 152 | + rdfs:subClassOf spin:SelectTemplates ; | ||
| 153 | + spin:body | ||
| 154 | + [ rdf:type sp:Select ; | ||
| 155 | + sp:distinct "true"^^xsd:boolean ; | ||
| 156 | + sp:orderBy ([ rdf:type fn:lower-case ; | ||
| 157 | + sp:arg1 [ sp:varName "label"^^xsd:string | ||
| 158 | + ] | ||
| 159 | + ]) ; | ||
| 160 | + sp:resultVariables ([ sp:varName "resource"^^xsd:string | ||
| 161 | + ]) ; | ||
| 162 | + sp:where ([ rdf:type sp:TriplePath ; | ||
| 163 | + sp:object | ||
| 164 | + [ sp:varName "resourceType"^^xsd:string | ||
| 165 | + ] ; | ||
| 166 | + sp:path [ rdf:type sp:ModPath ; | ||
| 167 | + sp:modMax -2 ; | ||
| 168 | + sp:modMin 0 ; | ||
| 169 | + sp:subPath rdfs:subClassOf | ||
| 170 | + ] ; | ||
| 171 | + sp:subject | ||
| 172 | + [ sp:varName "type"^^xsd:string | ||
| 173 | + ] | ||
| 174 | + ] [ sp:object | ||
| 175 | + [ sp:varName "type"^^xsd:string | ||
| 176 | + ] ; | ||
| 177 | + sp:predicate rdf:type ; | ||
| 178 | + sp:subject | ||
| 179 | + [ sp:varName "resource"^^xsd:string | ||
| 180 | + ] | ||
| 181 | + ] [ rdf:type sp:Filter ; | ||
| 182 | + sp:expression | ||
| 183 | + [ rdf:type sp:isIRI ; | ||
| 184 | + sp:arg1 [ sp:varName "resource"^^xsd:string | ||
| 185 | + ] | ||
| 186 | + ] | ||
| 187 | + ] [ rdf:type sp:Bind ; | ||
| 188 | + sp:expression | ||
| 189 | + [ rdf:type ui:label ; | ||
| 190 | + sp:arg1 [ sp:varName "resource"^^xsd:string | ||
| 191 | + ] | ||
| 192 | + ] ; | ||
| 193 | + sp:variable | ||
| 194 | + [ sp:varName "label"^^xsd:string | ||
| 195 | + ] | ||
| 196 | + ] [ rdf:type sp:Bind ; | ||
| 197 | + sp:expression | ||
| 198 | + [ rdf:type fn:upper-case ; | ||
| 199 | + sp:arg1 [ rdf:type fn:substring ; | ||
| 200 | + sp:arg1 [ sp:varName "label"^^xsd:string | ||
| 201 | + ] ; | ||
| 202 | + sp:arg2 1 ; | ||
| 203 | + sp:arg3 1 | ||
| 204 | + ] | ||
| 205 | + ] ; | ||
| 206 | + sp:variable | ||
| 207 | + [ sp:varName "first"^^xsd:string | ||
| 208 | + ] | ||
| 209 | + ] [ rdf:type sp:Filter ; | ||
| 210 | + sp:expression | ||
| 211 | + [ rdf:type sp:not ; | ||
| 212 | + sp:arg1 [ rdf:type fn:contains ; | ||
| 213 | + sp:arg1 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ; | ||
| 214 | + sp:arg2 [ sp:varName "first"^^xsd:string | ||
| 215 | + ] | ||
| 216 | + ] | ||
| 217 | + ] | ||
| 218 | + ]) | ||
| 219 | + ] ; | ||
| 220 | + spin:constraint | ||
| 221 | + [ rdf:type spl:Argument ; | ||
| 222 | + rdfs:comment "The type of resources to match (will include subclasses of the type)."^^xsd:string ; | ||
| 223 | + spl:predicate arg:resourceType ; | ||
| 224 | + spl:valueType rdfs:Class | ||
| 225 | + ] . | ||
| 226 | + | ||
| 75 | app:allValuesFromFunctor | 227 | app:allValuesFromFunctor |
| 76 | rdf:type spin:Function ; | 228 | rdf:type spin:Function ; |
| 77 | rdfs:comment "Can be used in conjunction with spif:walkObjects to get the \"first\" declared owl:allValuesFrom restriction of a given property (?property) at a given class (?class)."^^xsd:string ; | 229 | rdfs:comment "Can be used in conjunction with spif:walkObjects to get the \"first\" declared owl:allValuesFrom restriction of a given property (?property) at a given class (?class)."^^xsd:string ; |
| ... | @@ -809,6 +961,76 @@ app:isSingle | ... | @@ -809,6 +961,76 @@ app:isSingle |
| 809 | spin:private "true"^^xsd:boolean ; | 961 | spin:private "true"^^xsd:boolean ; |
| 810 | spin:returnType xsd:boolean . | 962 | spin:returnType xsd:boolean . |
| 811 | 963 | ||
| 964 | +app:letters | ||
| 965 | + rdf:type spin:MagicProperty ; | ||
| 966 | + rdfs:comment "Binds the variable on the left with all letters from A-Z, and then *."^^xsd:string ; | ||
| 967 | + rdfs:label "letters"^^xsd:string ; | ||
| 968 | + rdfs:subClassOf spin:MagicProperties ; | ||
| 969 | + spin:body | ||
| 970 | + [ rdf:type sp:Select ; | ||
| 971 | + sp:resultVariables ([ sp:varName "letter"^^xsd:string | ||
| 972 | + ]) ; | ||
| 973 | + sp:where ([ rdf:type sp:Bind ; | ||
| 974 | + sp:expression "ABCDEFGHIJKLMNOPQRSTUVXYZ*" ; | ||
| 975 | + sp:variable | ||
| 976 | + [ sp:varName "str"^^xsd:string | ||
| 977 | + ] | ||
| 978 | + ] [ rdf:type sp:Bind ; | ||
| 979 | + sp:expression | ||
| 980 | + [ rdf:type fn:string-length ; | ||
| 981 | + sp:arg1 [ sp:varName "str"^^xsd:string | ||
| 982 | + ] | ||
| 983 | + ] ; | ||
| 984 | + sp:variable | ||
| 985 | + [ sp:varName "length"^^xsd:string | ||
| 986 | + ] | ||
| 987 | + ] [ sp:object | ||
| 988 | + [ sp:varName "?0"^^xsd:string | ||
| 989 | + ] ; | ||
| 990 | + sp:predicate spif:for ; | ||
| 991 | + sp:subject | ||
| 992 | + [ sp:varName "x"^^xsd:string | ||
| 993 | + ] | ||
| 994 | + ] [ sp:object 1 ; | ||
| 995 | + sp:predicate rdf:first ; | ||
| 996 | + sp:subject | ||
| 997 | + [ sp:varName "?0"^^xsd:string | ||
| 998 | + ] | ||
| 999 | + ] [ sp:object | ||
| 1000 | + [ sp:varName "?1"^^xsd:string | ||
| 1001 | + ] ; | ||
| 1002 | + sp:predicate rdf:rest ; | ||
| 1003 | + sp:subject | ||
| 1004 | + [ sp:varName "?0"^^xsd:string | ||
| 1005 | + ] | ||
| 1006 | + ] [ sp:object | ||
| 1007 | + [ sp:varName "length"^^xsd:string | ||
| 1008 | + ] ; | ||
| 1009 | + sp:predicate rdf:first ; | ||
| 1010 | + sp:subject | ||
| 1011 | + [ sp:varName "?1"^^xsd:string | ||
| 1012 | + ] | ||
| 1013 | + ] [ sp:object () ; | ||
| 1014 | + sp:predicate rdf:rest ; | ||
| 1015 | + sp:subject | ||
| 1016 | + [ sp:varName "?1"^^xsd:string | ||
| 1017 | + ] | ||
| 1018 | + ] [ rdf:type sp:Bind ; | ||
| 1019 | + sp:expression | ||
| 1020 | + [ rdf:type fn:substring ; | ||
| 1021 | + sp:arg1 [ sp:varName "str"^^xsd:string | ||
| 1022 | + ] ; | ||
| 1023 | + sp:arg2 [ sp:varName "x"^^xsd:string | ||
| 1024 | + ] ; | ||
| 1025 | + sp:arg3 1 | ||
| 1026 | + ] ; | ||
| 1027 | + sp:variable | ||
| 1028 | + [ sp:varName "letter"^^xsd:string | ||
| 1029 | + ] | ||
| 1030 | + ]) | ||
| 1031 | + ] ; | ||
| 1032 | + spin:returnType xsd:string . | ||
| 1033 | + | ||
| 812 | app:localDomain | 1034 | app:localDomain |
| 813 | rdf:type spin:Function ; | 1035 | rdf:type spin:Function ; |
| 814 | rdfs:comment "Gets the \"domain\" of a property at an object. This is used to narrow down the Subjects widgets at edit time. Currently only uses rdfs:domain of the property, but future versions should also look at restrictions and spl:Arguments."^^xsd:string ; | 1036 | rdfs:comment "Gets the \"domain\" of a property at an object. This is used to narrow down the Subjects widgets at edit time. Currently only uses rdfs:domain of the property, but future versions should also look at restrictions and spl:Arguments."^^xsd:string ; |
| ... | @@ -1268,6 +1490,11 @@ arg:class | ... | @@ -1268,6 +1490,11 @@ arg:class |
| 1268 | rdfs:label "class"^^xsd:string ; | 1490 | rdfs:label "class"^^xsd:string ; |
| 1269 | rdfs:subPropertyOf sp:arg . | 1491 | rdfs:subPropertyOf sp:arg . |
| 1270 | 1492 | ||
| 1493 | +arg:letter | ||
| 1494 | + rdf:type rdf:Property ; | ||
| 1495 | + rdfs:label "letter"^^xsd:string ; | ||
| 1496 | + rdfs:subPropertyOf sp:arg . | ||
| 1497 | + | ||
| 1271 | arg:node | 1498 | arg:node |
| 1272 | rdf:type rdf:Property ; | 1499 | rdf:type rdf:Property ; |
| 1273 | rdfs:label "node"^^xsd:string ; | 1500 | rdfs:label "node"^^xsd:string ; | ... | ... |
| ... | @@ -2101,6 +2101,180 @@ app:ImageResourceViewer | ... | @@ -2101,6 +2101,180 @@ app:ImageResourceViewer |
| 2101 | ] | 2101 | ] |
| 2102 | ] . | 2102 | ] . |
| 2103 | 2103 | ||
| 2104 | +app:Index | ||
| 2105 | + rdf:type ui:NodeClass ; | ||
| 2106 | + rdfs:comment "Displays a list of hyperlinks A B C ... Z * where each letter opens a dialog with all resources starting with that letter."^^xsd:string ; | ||
| 2107 | + rdfs:label "Index"^^xsd:string ; | ||
| 2108 | + rdfs:subClassOf app:IndexElements ; | ||
| 2109 | + spin:constraint | ||
| 2110 | + [ rdf:type spl:Argument ; | ||
| 2111 | + rdfs:comment "The JavaScript code that will be called if the user has selected a resource. The variable resource will point to the URI of the selected resource."^^xsd:string ; | ||
| 2112 | + spl:predicate arg:onSelect ; | ||
| 2113 | + spl:valueType xsd:string | ||
| 2114 | + ] ; | ||
| 2115 | + spin:constraint | ||
| 2116 | + [ rdf:type spl:Argument ; | ||
| 2117 | + rdfs:comment "The type of instances to index."^^xsd:string ; | ||
| 2118 | + spl:predicate arg:resourceType ; | ||
| 2119 | + spl:valueType rdfs:Resource | ||
| 2120 | + ] ; | ||
| 2121 | + ui:prototype | ||
| 2122 | + [ rdf:type html:Div ; | ||
| 2123 | + html:class "appIndex"^^xsd:string ; | ||
| 2124 | + ui:child | ||
| 2125 | + [ rdf:type ui:forEach ; | ||
| 2126 | + ui:child | ||
| 2127 | + [ rdf:type html:A ; | ||
| 2128 | + html:href "javascript:void(0)"^^xsd:string ; | ||
| 2129 | + html:onclick | ||
| 2130 | + [ rdf:type ui:concat ; | ||
| 2131 | + sp:arg1 "appOpenIndexLetterDialog('appIndexLetterDialog', '"^^xsd:string ; | ||
| 2132 | + sp:arg2 [ sp:varName "letter"^^xsd:string | ||
| 2133 | + ] ; | ||
| 2134 | + sp:arg3 "')"^^xsd:string | ||
| 2135 | + ] ; | ||
| 2136 | + ui:child | ||
| 2137 | + [ rdf:type ui:TextNode ; | ||
| 2138 | + ui:childIndex 0 ; | ||
| 2139 | + ui:text [ sp:varName "letter"^^xsd:string | ||
| 2140 | + ] | ||
| 2141 | + ] ; | ||
| 2142 | + ui:childIndex 0 | ||
| 2143 | + ] ; | ||
| 2144 | + ui:childIndex 0 ; | ||
| 2145 | + ui:resultSet | ||
| 2146 | + [ rdf:type sp:Select ; | ||
| 2147 | + sp:where ([ sp:object | ||
| 2148 | + [ sp:varName "letter"^^xsd:string | ||
| 2149 | + ] ; | ||
| 2150 | + sp:predicate app:letters ; | ||
| 2151 | + sp:subject () | ||
| 2152 | + ]) | ||
| 2153 | + ] ; | ||
| 2154 | + ui:separator " "^^xsd:string | ||
| 2155 | + ] ; | ||
| 2156 | + ui:child | ||
| 2157 | + [ rdf:type app:IndexLetterDialog ; | ||
| 2158 | + arg:onSelect | ||
| 2159 | + [ sp:varName "onSelect"^^xsd:string | ||
| 2160 | + ] ; | ||
| 2161 | + arg:resourceType | ||
| 2162 | + [ sp:varName "resourceType"^^xsd:string | ||
| 2163 | + ] ; | ||
| 2164 | + ui:childIndex 1 | ||
| 2165 | + ] | ||
| 2166 | + ] . | ||
| 2167 | + | ||
| 2168 | +app:IndexElements | ||
| 2169 | + rdf:type ui:NodeClass ; | ||
| 2170 | + rdfs:label "Index elements"^^xsd:string ; | ||
| 2171 | + rdfs:subClassOf app:Elements ; | ||
| 2172 | + ui:abstract "true"^^xsd:boolean . | ||
| 2173 | + | ||
| 2174 | +app:IndexLetterDialog | ||
| 2175 | + rdf:type ui:NodeClass ; | ||
| 2176 | + rdfs:comment "A dialog that displays a sorted list of all resources starting with a given letter."^^xsd:string ; | ||
| 2177 | + rdfs:label "Index letter dialog"^^xsd:string ; | ||
| 2178 | + rdfs:subClassOf app:IndexElements ; | ||
| 2179 | + spin:constraint | ||
| 2180 | + [ rdf:type spl:Argument ; | ||
| 2181 | + rdfs:comment "The JavaScript that will be called."^^xsd:string ; | ||
| 2182 | + spl:predicate arg:onSelect ; | ||
| 2183 | + spl:valueType xsd:string | ||
| 2184 | + ] ; | ||
| 2185 | + spin:constraint | ||
| 2186 | + [ rdf:type spl:Argument ; | ||
| 2187 | + rdfs:comment "The type of instances to display."^^xsd:string ; | ||
| 2188 | + spl:predicate arg:resourceType ; | ||
| 2189 | + spl:valueType rdfs:Resource | ||
| 2190 | + ] ; | ||
| 2191 | + ui:prototype | ||
| 2192 | + [ rdf:type ui:loadable ; | ||
| 2193 | + html:style "display: none"^^xsd:string ; | ||
| 2194 | + ui:child | ||
| 2195 | + [ rdf:type ui:if ; | ||
| 2196 | + ui:child | ||
| 2197 | + [ rdf:type ui:call ; | ||
| 2198 | + arg:letter | ||
| 2199 | + [ sp:varName "letter"^^xsd:string | ||
| 2200 | + ] ; | ||
| 2201 | + arg:resourceType | ||
| 2202 | + [ sp:varName "resourceType"^^xsd:string | ||
| 2203 | + ] ; | ||
| 2204 | + ui:child | ||
| 2205 | + [ rdf:type html:Div ; | ||
| 2206 | + html:id "div-appIndexLetterDialog"^^xsd:string ; | ||
| 2207 | + html:title | ||
| 2208 | + [ rdf:type ui:concat ; | ||
| 2209 | + sp:arg1 "Resources starting with "^^xsd:string ; | ||
| 2210 | + sp:arg2 [ sp:varName "letter"^^xsd:string | ||
| 2211 | + ] ; | ||
| 2212 | + sp:arg3 " ("^^xsd:string ; | ||
| 2213 | + sp:arg4 [ rdf:type spr:rowCount ; | ||
| 2214 | + sp:arg1 [ sp:varName "rs"^^xsd:string | ||
| 2215 | + ] | ||
| 2216 | + ] ; | ||
| 2217 | + sp:arg5 ")"^^xsd:string | ||
| 2218 | + ] ; | ||
| 2219 | + ui:child | ||
| 2220 | + [ rdf:type ui:forEach ; | ||
| 2221 | + ui:child | ||
| 2222 | + [ rdf:type html:Div ; | ||
| 2223 | + html:class "appIndexSummary"^^xsd:string ; | ||
| 2224 | + ui:child | ||
| 2225 | + [ rdf:type html:A ; | ||
| 2226 | + html:href "javascript:void(0)"^^xsd:string ; | ||
| 2227 | + html:onclick | ||
| 2228 | + [ rdf:type ui:concat ; | ||
| 2229 | + sp:arg1 "var resource = '"^^xsd:string ; | ||
| 2230 | + sp:arg2 [ sp:varName "resource"^^xsd:string | ||
| 2231 | + ] ; | ||
| 2232 | + sp:arg3 "';"^^xsd:string ; | ||
| 2233 | + sp:arg4 [ sp:varName "onSelect"^^xsd:string | ||
| 2234 | + ] ; | ||
| 2235 | + sp:arg5 ";appCloseDialog('appIndexLetterDialog');"^^xsd:string | ||
| 2236 | + ] ; | ||
| 2237 | + ui:child | ||
| 2238 | + [ rdf:type ui:TextNode ; | ||
| 2239 | + ui:childIndex 0 ; | ||
| 2240 | + ui:text [ rdf:type ui:label ; | ||
| 2241 | + sp:arg1 [ sp:varName "resource"^^xsd:string | ||
| 2242 | + ] | ||
| 2243 | + ] | ||
| 2244 | + ] ; | ||
| 2245 | + ui:childIndex 0 | ||
| 2246 | + ] ; | ||
| 2247 | + ui:childIndex 0 | ||
| 2248 | + ] ; | ||
| 2249 | + ui:childIndex 0 ; | ||
| 2250 | + ui:resultSet | ||
| 2251 | + [ sp:varName "rs"^^xsd:string | ||
| 2252 | + ] | ||
| 2253 | + ] ; | ||
| 2254 | + ui:childIndex 0 | ||
| 2255 | + ] ; | ||
| 2256 | + ui:childIndex 0 ; | ||
| 2257 | + ui:template | ||
| 2258 | + [ rdf:type sp:if ; | ||
| 2259 | + sp:arg1 [ rdf:type sp:eq ; | ||
| 2260 | + sp:arg1 [ sp:varName "letter"^^xsd:string | ||
| 2261 | + ] ; | ||
| 2262 | + sp:arg2 "*" | ||
| 2263 | + ] ; | ||
| 2264 | + sp:arg2 app:ResourcesWithNonLetter ; | ||
| 2265 | + sp:arg3 app:ResourcesWithLetter | ||
| 2266 | + ] | ||
| 2267 | + ] ; | ||
| 2268 | + ui:childIndex 0 ; | ||
| 2269 | + ui:condition | ||
| 2270 | + [ rdf:type sp:bound ; | ||
| 2271 | + sp:arg1 [ sp:varName "letter"^^xsd:string | ||
| 2272 | + ] | ||
| 2273 | + ] | ||
| 2274 | + ] ; | ||
| 2275 | + ui:loadId "appIndexLetterDialog"^^xsd:string | ||
| 2276 | + ] . | ||
| 2277 | + | ||
| 2104 | app:Label | 2278 | app:Label |
| 2105 | rdf:type ui:NodeClass ; | 2279 | rdf:type ui:NodeClass ; |
| 2106 | rdfs:label "Label"^^xsd:string ; | 2280 | rdfs:label "Label"^^xsd:string ; |
| ... | @@ -3866,7 +4040,7 @@ app:ResourceFacet | ... | @@ -3866,7 +4040,7 @@ app:ResourceFacet |
| 3866 | ] ; | 4040 | ] ; |
| 3867 | ui:prototype | 4041 | ui:prototype |
| 3868 | [ rdf:type app:AutoComplete ; | 4042 | [ rdf:type app:AutoComplete ; |
| 3869 | - arg:id [ rdf:type fn:concat ; | 4043 | + arg:id [ rdf:type ui:concat ; |
| 3870 | sp:arg1 "value"^^xsd:string ; | 4044 | sp:arg1 "value"^^xsd:string ; |
| 3871 | sp:arg2 [ sp:varName "uid"^^xsd:string | 4045 | sp:arg2 [ sp:varName "uid"^^xsd:string |
| 3872 | ] | 4046 | ] |
| ... | @@ -4084,8 +4258,8 @@ app:ResourceViewDialog | ... | @@ -4084,8 +4258,8 @@ app:ResourceViewDialog |
| 4084 | ] | 4258 | ] |
| 4085 | ] ; | 4259 | ] ; |
| 4086 | ui:childIndex 0 ; | 4260 | ui:childIndex 0 ; |
| 4087 | - ui:varName "noLinks"^^xsd:string ; | 4261 | + ui:varName "createLinkFunction"^^xsd:string ; |
| 4088 | - ui:varValue "true"^^xsd:boolean | 4262 | + ui:varValue app:noLink |
| 4089 | ] ; | 4263 | ] ; |
| 4090 | ui:childIndex 0 | 4264 | ui:childIndex 0 |
| 4091 | ] ; | 4265 | ] ; |
| ... | @@ -6962,29 +7136,6 @@ app:createLink | ... | @@ -6962,29 +7136,6 @@ app:createLink |
| 6962 | sp:where ([ rdf:type sp:Bind ; | 7136 | sp:where ([ rdf:type sp:Bind ; |
| 6963 | sp:expression | 7137 | sp:expression |
| 6964 | [ rdf:type ui:contextValue ; | 7138 | [ rdf:type ui:contextValue ; |
| 6965 | - sp:arg1 "noLinks" | ||
| 6966 | - ] ; | ||
| 6967 | - sp:variable | ||
| 6968 | - [ sp:varName "noLinks"^^xsd:string | ||
| 6969 | - ] | ||
| 6970 | - ] [ rdf:type sp:Filter ; | ||
| 6971 | - sp:expression | ||
| 6972 | - [ rdf:type sp:or ; | ||
| 6973 | - sp:arg1 [ rdf:type sp:not ; | ||
| 6974 | - sp:arg1 [ rdf:type sp:bound ; | ||
| 6975 | - sp:arg1 [ sp:varName "noLinks"^^xsd:string | ||
| 6976 | - ] | ||
| 6977 | - ] | ||
| 6978 | - ] ; | ||
| 6979 | - sp:arg2 [ rdf:type sp:ne ; | ||
| 6980 | - sp:arg1 [ sp:varName "noLinks"^^xsd:string | ||
| 6981 | - ] ; | ||
| 6982 | - sp:arg2 "true"^^xsd:boolean | ||
| 6983 | - ] | ||
| 6984 | - ] | ||
| 6985 | - ] [ rdf:type sp:Bind ; | ||
| 6986 | - sp:expression | ||
| 6987 | - [ rdf:type ui:contextValue ; | ||
| 6988 | sp:arg1 "createLinkFunction" | 7139 | sp:arg1 "createLinkFunction" |
| 6989 | ] ; | 7140 | ] ; |
| 6990 | sp:variable | 7141 | sp:variable |
| ... | @@ -7409,6 +7560,18 @@ app:modeProperty | ... | @@ -7409,6 +7560,18 @@ app:modeProperty |
| 7409 | spl:valueType rdf:Property | 7560 | spl:valueType rdf:Property |
| 7410 | ] . | 7561 | ] . |
| 7411 | 7562 | ||
| 7563 | +app:noLink | ||
| 7564 | + rdf:type spin:Function ; | ||
| 7565 | + rdfs:comment "A dummy function that returns nothing, suppressing any links."^^xsd:string ; | ||
| 7566 | + rdfs:label "no link"^^xsd:string ; | ||
| 7567 | + rdfs:subClassOf app:CreateLinkFunctions ; | ||
| 7568 | + spin:body | ||
| 7569 | + [ rdf:type sp:Select ; | ||
| 7570 | + sp:resultVariables ([ sp:varName "nothing"^^xsd:string | ||
| 7571 | + ]) ; | ||
| 7572 | + sp:where () | ||
| 7573 | + ] . | ||
| 7574 | + | ||
| 7412 | app:objectWidgetClass | 7575 | app:objectWidgetClass |
| 7413 | rdf:type rdf:Property ; | 7576 | rdf:type rdf:Property ; |
| 7414 | rdfs:domain app:Mode ; | 7577 | rdfs:domain app:Mode ; |
| ... | @@ -7497,6 +7660,11 @@ app:weight | ... | @@ -7497,6 +7660,11 @@ app:weight |
| 7497 | rdfs:range xsd:integer ; | 7660 | rdfs:range xsd:integer ; |
| 7498 | rdfs:subPropertyOf app:systemProperty . | 7661 | rdfs:subPropertyOf app:systemProperty . |
| 7499 | 7662 | ||
| 7663 | +arg:callback | ||
| 7664 | + rdf:type rdf:Property ; | ||
| 7665 | + rdfs:label "callback"^^xsd:string ; | ||
| 7666 | + rdfs:subPropertyOf sp:arg . | ||
| 7667 | + | ||
| 7500 | arg:child | 7668 | arg:child |
| 7501 | rdf:type rdf:Property ; | 7669 | rdf:type rdf:Property ; |
| 7502 | rdfs:label "child"^^xsd:string ; | 7670 | rdfs:label "child"^^xsd:string ; | ... | ... |
| ... | @@ -29,6 +29,15 @@ body { | ... | @@ -29,6 +29,15 @@ body { |
| 29 | display: inline-block !important; | 29 | display: inline-block !important; |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | +.appIndex { | ||
| 33 | + font-size: 12px; | ||
| 34 | + text-align: right; | ||
| 35 | +} | ||
| 36 | + | ||
| 37 | +.appIndexSummary { | ||
| 38 | + font-size: 12px; | ||
| 39 | +} | ||
| 40 | + | ||
| 32 | .appLabeledObjectsBodyTD { | 41 | .appLabeledObjectsBodyTD { |
| 33 | padding: 0px 0px 1px 0px; | 42 | padding: 0px 0px 1px 0px; |
| 34 | } | 43 | } | ... | ... |
| ... | @@ -73,6 +73,18 @@ function appAddRow(id, single) { | ... | @@ -73,6 +73,18 @@ function appAddRow(id, single) { |
| 73 | 73 | ||
| 74 | 74 | ||
| 75 | /** | 75 | /** |
| 76 | + * Programmatically closes and destroys the elements of a dialog that was previously | ||
| 77 | + * loaded through a ui:loadable. | ||
| 78 | + * @param loadId the id of the loadable surrounding the dialog | ||
| 79 | + */ | ||
| 80 | +function appCloseDialog(loadId) { | ||
| 81 | + var div = $('#div-' + loadId); | ||
| 82 | + div.dialog("destroy"); | ||
| 83 | + div.remove(); | ||
| 84 | +} | ||
| 85 | + | ||
| 86 | + | ||
| 87 | +/** | ||
| 76 | * Called when the user clicks delete to delete a row from a widget. | 88 | * Called when the user clicks delete to delete a row from a widget. |
| 77 | * This completely deletes the element with the given id. | 89 | * This completely deletes the element with the given id. |
| 78 | * The hidden fields to instruct the server that the given object | 90 | * The hidden fields to instruct the server that the given object |
| ... | @@ -108,7 +120,7 @@ function appInitAutoComplete(id, hiddenId, link) { | ... | @@ -108,7 +120,7 @@ function appInitAutoComplete(id, hiddenId, link) { |
| 108 | return item.label; | 120 | return item.label; |
| 109 | }, | 121 | }, |
| 110 | select : function(event, ui) { | 122 | select : function(event, ui) { |
| 111 | - $('#' + hiddenId).val(ui.item.resource); | 123 | + $('#' + hiddenId).val('<' + ui.item.resource + '>'); |
| 112 | } | 124 | } |
| 113 | }); | 125 | }); |
| 114 | } | 126 | } |
| ... | @@ -312,6 +324,22 @@ function appNavigateToInTab(resourceURI, queryGraphURI) { | ... | @@ -312,6 +324,22 @@ function appNavigateToInTab(resourceURI, queryGraphURI) { |
| 312 | } | 324 | } |
| 313 | 325 | ||
| 314 | 326 | ||
| 327 | +// Private | ||
| 328 | +function appOpenIndexLetterDialog(loadId, letter) { | ||
| 329 | + appLoad(loadId, { letter: '"' + letter + '"' }, function() { | ||
| 330 | + var div = $('#div-' + loadId); | ||
| 331 | + var title = div.attr('title'); | ||
| 332 | + var options = { | ||
| 333 | + modal: true, | ||
| 334 | + title: title, | ||
| 335 | + width: 500, | ||
| 336 | + height: 400 | ||
| 337 | + }; | ||
| 338 | + div.dialog(options); | ||
| 339 | + }); | ||
| 340 | +} | ||
| 341 | + | ||
| 342 | + | ||
| 315 | /** | 343 | /** |
| 316 | * Loads and then opens a dialog that was inserted into the current | 344 | * Loads and then opens a dialog that was inserted into the current |
| 317 | * document using app:ResourceViewDialog. | 345 | * document using app:ResourceViewDialog. | ... | ... |
| ... | @@ -82,8 +82,8 @@ rhswp:AGResourceViewDialog | ... | @@ -82,8 +82,8 @@ rhswp:AGResourceViewDialog |
| 82 | ] | 82 | ] |
| 83 | ] ; | 83 | ] ; |
| 84 | ui:childIndex 0 ; | 84 | ui:childIndex 0 ; |
| 85 | - ui:varName "noLinks"^^xsd:string ; | 85 | + ui:varName "createLinkFunction"^^xsd:string ; |
| 86 | - ui:varValue "true"^^xsd:boolean | 86 | + ui:varValue <http://appschema.org/noLink> |
| 87 | ] ; | 87 | ] ; |
| 88 | ui:childIndex 0 | 88 | ui:childIndex 0 |
| 89 | ] ; | 89 | ] ; | ... | ... |
-
Please register or login to post a comment