-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
to reproduce
data
Demo 1 - Compound to MeSH; PubChem; 1060 - Pyruvic acid | D005947 (Glucose)
SWDiscoveryConfiguration
.init()
.sparqlEndpoint(this.url)
.setPageSize(this.pageSize)
.setSizeBatchProcessing(this.batchProcessing)
.setLogLevel(this.logLevel)
.setCache(this.cache)
SWDiscovery(config)
.directive('DEFINE input:inference "schema-inference-rules"')
.prefix("dcterm", "http://purl.org/dc/terms/")
.prefix("cid", "http://rdf.ncbi.nlm.nih.gov/pubchem/compound/")
.prefix("cito", "http://purl.org/spar/cito/")
.prefix("meshv", "http://id.nlm.nih.gov/mesh/vocab#")
.prefix("mesh", "http://id.nlm.nih.gov/mesh/")
.prefix("fabio", "http://purl.org/spar/fabio/")
.something("cid")
.set(URI("cid:" + cidRequest))
.isSubjectOf(URI("cito:isDiscussedBy"), "pmid")
.datatype(URI("http://purl.org/dc/terms/title"), "title")
.datatype(URI("http://purl.org/dc/terms/date"), "date")
.isSubjectOf(
PropertyPath(
"fabio:hasSubjectTerm|fabio:hasSubjectTerm/meshv:hasDescriptor"
),
"mesh_ini"
)
.isSubjectOf(
PropertyPath(
"meshv:treeNumber|meshv:treeNumber/meshv:parentTreeNumber"
)
)
.isObjectOf(URI("meshv:treeNumber"))
.set(URI("mesh:" + meshid))
.focus("mesh_ini")
.isA(URI("meshv:TopicalDescriptor"))
.focus("mesh_ini")
.isSubjectOf("meshv:active")
.set(Literal(1))
.focus("pmid")
.isSubjectOf("dcterm:date", "dateToOrdered")
//.console()
.selectDistinctByPage("pmid", "title", "date")
.then(( args: [number,(SWTransaction[])] ) => {
let numberOfPages: number = Object.values(args)[0] as number;
let lazyPage: SWTransaction[] = Object.values(
args
)[1] as Array<SWTransaction>;
resolve([numberOfPages, lazyPage]);
})
.catch((error: any) => {
reject(error);
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels