RDFCollection[{e1,e2,…}]
RDFStoreやSPARQLSelectのような関数の,eiのリスト状の集合を表す.
RDFCollection
RDFCollection[{e1,e2,…}]
RDFStoreやSPARQLSelectのような関数の,eiのリスト状の集合を表す.
例題
すべて開く すべて閉じる例 (1)
スコープ (2)
Needs["GraphStore`"]rdf[s_] := URL["http://www.w3.org/1999/02/22-rdf-syntax-ns#" <> s];
ex[s_] := URL["http://example.org/" <> s];g = RDFStore[{
RDFTriple[ex["a"], ex["list"], RDFCollection[{"a", "b", "c"}]]
}];g//SPARQLAsk[RDFTriple[SPARQLVariable["x"], SPARQLVariable["y"], RDFCollection[{SPARQLVariable["e1"], SPARQLVariable["e2"], SPARQLVariable["e3"]}]]]g//SPARQLSelect[RDFTriple[SPARQLVariable["x"], SPARQLVariable["y"], RDFCollection[{SPARQLVariable["e1"], SPARQLVariable["e2"], SPARQLVariable["e3"]}]] -> "e2"]g//SPARQLSelect[{
RDFTriple[ex["a"], ex["list"], SPARQLVariable["l"]],
SPARQLPropertyPath[SPARQLVariable["l"], {rdf["rest"]..., rdf["first"]}, SPARQLVariable["x"]]
} -> "x"]Needs["GraphStore`"]rdf[s_] := URL["http://www.w3.org/1999/02/22-rdf-syntax-ns#" <> s];
ex[s_] := URL["http://example.org/" <> s];g1 = RDFStore[{
RDFTriple[ex["a"], ex["list"], RDFCollection[{1, 2}]]
}];g2 = RDFStore[{
RDFTriple[ex["a"], ex["list"], RDFBlankNode["a"]],
RDFTriple[RDFBlankNode["a"], rdf["first"], 1],
RDFTriple[RDFBlankNode["a"], rdf["rest"], RDFBlankNode["b"]],
RDFTriple[RDFBlankNode["b"], rdf["first"], 2],
RDFTriple[RDFBlankNode["b"], rdf["rest"], rdf["nil"]]
}];iso = SelectFirst[
AssociationThread[
Cases[First[g2], _RDFBlankNode, {2}],
#
]& /@ Permutations[Cases[First[g1], _RDFBlankNode, {2}]],
ContainsExactly[First[g1], First[g2] /. #]&
]ContainsExactly[First[g1], First[g2] /. iso]考えられる問題 (1)
Needs["GraphStore`"]ex[s_] := URL["http://example.org/" <> s];ExportString[
RDFStore[{
RDFTriple[ex["a"], ex["numberList"], {1, 2}]
}],
"Turtle"
]ExportString[
RDFStore[{
RDFTriple[ex["a"], ex["numberList"], RDFCollection[{1, 2}]]
}],
"Turtle",
"Prefixes" -> <|"ex" -> "http://example.org/"|>
]リスト値ではない特性を選択して,それに複数の値を割り当てることもできる:
ExportString[
RDFStore[{
RDFTriple[ex["a"], ex["number"], 1],
RDFTriple[ex["a"], ex["number"], 2]
}],
"Turtle",
"Prefixes" -> <|"ex" -> "http://example.org/"|>
]関連項目
関連するガイド
テキスト
Wolfram Research (2019), RDFCollection, Wolfram言語関数, https://reference.wolfram.com/language/GraphStore/ref/RDFCollection.html.
CMS
Wolfram Language. 2019. "RDFCollection." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GraphStore/ref/RDFCollection.html.
APA
Wolfram Language. (2019). RDFCollection. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GraphStore/ref/RDFCollection.html
BibTeX
@misc{reference.wolfram_2026_rdfcollection, author="Wolfram Research", title="{RDFCollection}", year="2019", howpublished="\url{https://reference.wolfram.com/language/GraphStore/ref/RDFCollection.html}", note=[Accessed: 08-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_rdfcollection, organization={Wolfram Research}, title={RDFCollection}, year={2019}, url={https://reference.wolfram.com/language/GraphStore/ref/RDFCollection.html}, note=[Accessed: 08-August-2026]}