This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
for $d in cts:search(collection(), cts:directory-query("/questions/")) | |
where $d/answers/accepted[.=true()] | |
return xdmp:document-add-permissions( $d/base-uri() , xdmp:permission("samplestack-guest", "read")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qa-machine.core=> (pprint (browsable-domains (domains "IP"))) | |
(("http://purl.org/dc/terms/publisher" "16") | |
("http://purl.oreilly.com/ns/meta/approvedToAnnounceBy" "22") | |
("http://www.loc.gov/mods/edition" "13") | |
("http://purl.oreilly.com/ns/meta/imprint" "25") | |
("http://purl.oreilly.com/ns/relations/sampleContent" "30") | |
("http://purl.oreilly.com/ns/meta/audience" "27") | |
("http://purl.oreilly.com/ns/meta/division" "18") | |
("http://www.loc.gov/loc.terms/relators/PBD" "41") | |
("http://purl.oreilly.com/ns/meta/printings" "36") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qa-machine.core=> (pprint (browsable-domains (domains "BOOK"))) | |
(("http://purl.org/dc/terms/language" "7") | |
("http://purl.org/dc/terms/publisher" "13") | |
("http://www.loc.gov/mods/edition" "11") | |
("http://purl.oreilly.com/ns/meta/imprint" "25") | |
("http://purl.oreilly.com/ns/meta/projectManager" "22") | |
("http://purl.oreilly.com/ns/meta/audience" "29") | |
("http://purl.oreilly.com/ns/meta/division" "16") | |
("http://purl.oreilly.com/ns/meta/availableIn" "10") | |
("http://purl.oreilly.com/ns/meta/approvedToAnnounceBy" "18") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX dc: <http://purl.org/dc/terms/> | |
PREFIX pt: <http://purl.oreilly.com/product-types/> | |
PREFIX trons: <http://purl.oreilly.com/ns/trons/> | |
PREFIX status: <http://purl.oreilly.com/statuses/> | |
PREFIX frbr: <http://purl.org/vocab/frbr/core#> | |
PREFIX om: <http://purl.oreilly.com/ns/meta/> | |
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | |
select ?ip ?publisher (count(?subj) as ?ct) (count(?product) as ?ctpv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX pdb: <http://oreilly.com/legacy/pdb/> | |
PREFIX product: <urn:x-domain:oreilly.com:product:> | |
PREFIX dc: <http://purl.org/dc/terms/> | |
PREFIX pt: <http://purl.oreilly.com/product-types/> | |
PREFIX trons: <http://purl.oreilly.com/ns/trons/> | |
PREFIX status: <http://purl.oreilly.com/statuses/> | |
PREFIX frbr: <http://purl.org/vocab/frbr/core#> | |
PREFIX mods: <http://www.loc.gov/mods/> | |
PREFIX pubs: <http://purl.oreilly.com/publishers/> | |
PREFIX om: <http://purl.oreilly.com/ns/meta/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"title": "Person", | |
"version": "0.0.2" | |
}, | |
"definitions": { | |
"Person": { | |
"properties": { | |
"id": { | |
"type": "string" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static EvalResultIterator eval(String functionCall) throws TestEvalException { | |
String imports = | |
"import module namespace sem = 'http://marklogic.com/semantics' at '/MarkLogic/semantics.xqy';\n"; | |
ServerEvaluationCall call = | |
client.newServerEval().xquery(entityServicesImport + functionCall); | |
EvalResultIterator results = null; | |
try { | |
results = call.eval(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"baseUri": "http://marklogic.com/offshore-leaks/", | |
"description": "An attempt to model a real data set (single source) in entity services. The data froms from http://offshoreleaks.icij.org/pages/database.", | |
"title": "OffshoreLeaks", | |
"version": "0.0.1" | |
}, | |
"definitions": { | |
"Address": { | |
"primaryKey": "node_id", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<template xmlns="http://marklogic.com/xdmp/tde"> | |
<description> | |
A custom TDE for tagging instances of Runner as instance of RDFS class Runner. | |
</description> | |
<context>//es:instance//Runner</context> | |
<path-namespaces> | |
<path-namespace> | |
<prefix>es</prefix> | |
<namespace-uri>http://marklogic.com/entity-services</namespace-uri> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(: turn a QA Harness test file into a QConsole Workspace :) | |
declare namespace h = "http://marklogic.com/xdmp/harness"; | |
let $QA_HOME := "/MarkLogic/git/qa-trunk" | |
let $source := ($QA_HOME || "/scripts/tests/rest-client-api-documents-06.xml") | |
=>xdmp:filesystem-file() | |
=>xdmp:unquote() | |
let $queries := |
OlderNewer