SPARQL协议.docx
- 文档编号:9210133
- 上传时间:2023-02-03
- 格式:DOCX
- 页数:43
- 大小:30.58KB
SPARQL协议.docx
《SPARQL协议.docx》由会员分享,可在线阅读,更多相关《SPARQL协议.docx(43页珍藏版)》请在冰豆网上搜索。
SPARQL协议
SPARQLProtocolforRDF
W3CRecommendation15January2008
Abstract
TheSPARQLProtocolandRDFQueryLanguage(SPARQL)isaquerylanguageandprotocolfor RDF.ThisdocumentspecifiestheSPARQLProtocol;ituses WSDL2.0 todescribeameansforconveyingSPARQLqueriestoanSPARQLqueryprocessingserviceandreturningthequeryresultstotheentitythatrequestedthem.Thisprotocolwasdevelopedbythe W3CRDFDataAccessWorkingGroup (DAWG),partofthe SemanticWebActivity asdescribedinthe activitystatement .
StatusofThisDocument
Thissectiondescribesthestatusofthisdocumentatthetimeofitspublication.Otherdocumentsmaysupersedethisdocument.AlistofcurrentW3Cpublicationsandthelatestrevisionofthistechnicalreportcanbefoundinthe W3Ctechnicalreportsindex athttp:
//www.w3.org/TR/.
Thisisa W3CRecommendation.
ThisdocumenthasbeenreviewedbyW3CMembers,bysoftwaredevelopers,andbyotherW3Cgroupsandinterestedparties,andisendorsedbytheDirectorasaW3CRecommendation.Itisastabledocumentandmaybeusedasreferencematerialorcitedfromanotherdocument.W3C'sroleinmakingtheRecommendationistodrawattentiontothespecificationandtopromoteitswidespreaddeployment.ThisenhancesthefunctionalityandinteroperabilityoftheWeb.
Commentsonthisdocumentshouldbesentto public-rdf-dawg-comments@w3.org,amailinglistwitha publicarchive.QuestionsandcommentsaboutSPARQLthatarenotrelatedtothisspecification,includingextensionsandfeatures,canbediscussedonthemailinglist public-sparql-dev@w3.org,(publicarchive).
Thisdocumentwasproducedbythe RDFDataAccessWorkingGroup,whichispartofthe W3CSemanticWebActivity.ThefirstreleaseofthisdocumentasaWorkingDraftwas14January2005andtheWorkingGrouphasaddressedanumberof commentsreceived and issues sincethen.Therehasbeen oneeditorialchange sincethe November2007ProposedRecommendation.
TheWorkingGroup's SPARQLProtocolImplementationReport demonstratesthatthegoalsforinteroperableimplementations,setinthe April2006CandidateRecommendation ,wereachieved.
TheDataAccessWorkingGrouphaspostponed12issues,including aggregatefunctions,and anupdatelanguage.
Thisdocumentwasproducedbyagroupoperatingunderthe 5February2004W3CPatentPolicy.W3Cmaintainsa publiclistofanypatentdisclosures madeinconnectionwiththedeliverablesofthegroup;thatpagealsoincludesinstructionsfordisclosingapatent.Anindividualwhohasactualknowledgeofapatentwhichtheindividualbelievescontains EssentialClaim(s) mustdisclosetheinformationinaccordancewith section6oftheW3CPatentPolicy.
TableofContents
∙1.Introduction
∙2.SPARQLProtocol
o2.1 SparqlQuery Interface
▪2.1.1 query Operation
▪2.1.2 query InMessage
▪2.1.3 query OutMessage
▪2.1.4 query FaultMessages
o2.2HTTPBindings
▪2.2.1HTTPExamples
▪2.2.1.1 SELECT withservice-suppliedRDFdataset
▪2.2.1.2 SELECT withsimpleRDFdataset
▪2.2.1.3 CONSTRUCT withsimpleRDFdatasetandHTTPcontentnegotiation
▪2.2.1.4 ASK withsimpleRDFdataset
▪2.2.1.5 DESCRIBE withsimpleRDFdataset
▪2.2.1.6 SELECT withcomplexRDFdataset
▪2.2.1.7 SELECT withquery-onlyRDFdataset
▪2.2.1.8 SELECT withambiguousRDFdataset
▪2.2.1.9 SELECT withmalformedqueryfault
▪2.2.1.10 SELECT withqueryrequestrefusedfault
▪2.2.1.11Verylong SELECT queryusingPOSTbinding
▪2.2.1.12 SELECT withinternationalization
▪2.2.1.13 SELECT withqueryHttpPostbindingandXMLinput
o2.3SOAPBindings
▪2.3.1SOAPExample
∙3.PolicyConsiderations
o3.1Security
∙4.Conformance
∙5.References
o5.1Normative
o5.2Informative
∙6.Acknowledgments
1.Introduction
Thisdocument(whichreferstoitselfas"SPARQLProtocolforRDF")describesSPARQLProtocol,ameansofconveyingSPARQLqueriesfromqueryclientstoqueryprocessors.SPARQLProtocolhasbeendesignedforcompatibilitywiththeSPARQLQueryLanguageforRDF [SPARQL].SPARQLProtocolisdescribedintwoways:
first,asanabstractinterfaceindependentofanyconcreterealization,implementation,orbindingtoanotherprotocol;second,asHTTPandSOAPbindingsofthisinterface.Thisdocument,aswellastheassociatedWSDLandW3CXMLSchemadocuments,areprimarilyintendedforsoftwaredevelopersinterestedinimplementingSPARQLqueryservicesandclients.
Whenthisdocumentusesthewords must, mustnot, should, shouldnot, may and recommended,andthewordsappearasemphasizedtext,theymustbeinterpretedasdescribedin RFC2119 [RFC2119].
Whenthisdocumentcontainsexcerptsfromotherdocuments,includingWSDLandXMLSchemainstances,itusesthefollowingnamespaceprefixesandnamespaceURIs:
Prefix
NamespaceURI
st
http:
//www.w3.org/2005/09/sparql-protocol-types/#
xs
http:
//www.w3.org/2001/XMLSchema
vbr
http:
//www.w3.org/2005/sparql-results#
rdf
http:
//www.w3.org/1999/02/22-rdf-syntax-ns#
whttp
http:
//www.w3.org/2006/01/wsdl/http
wsoap
http:
//www.w3.org/2006/01/wsdl/soap
soap
http:
//www.w3.org/2003/05/soap-envelope
wsdlx
http:
//www.w3.org/2005/08/wsdl-extensions
tns
http:
//www.w3.org/2005/08/sparql-protocol-query/#
2.SPARQLProtocol
ThissetofdocumentscomprisesthespecificationoftheSPARQLProtocol:
SPARQLProtocolforRDF
ThecurrentdocumentwhichnormativelyspecifiestheSPARQLProtocolinhuman-readablelanguage.
SPARQLProtocolWSDL2.0Description
ThenormativedescriptionoftheSPARQLProtocolusingWSDL2.0.
SPARQLProtocolTypes
TheXMLSchemadocumentthatnormativelydefinesthetypesusedinSPARQLProtocol.
SPARQLProtocolcontainsoneinterface, SparqlQuery,whichinturncontainsoneoperation, query.SPARQLProtocolisdescribedabstractly with WSDL2.0 [WSDL2]intermsofawebservicethatimplementsitsinterface,types,faults,andoperations,aswellasbyHTTPandSOAPbindings.NotethatwhilethisdocumentusesWSDL2.0todescribeSPARQLProtocol,thereisnoobligationonthepartofanyimplementationtouseanyparticularimplementationstrategy,includingtheuseofanyWSDLlibraryorprogramminglanguageframework.
2.1SparqlQueryInterface
2.1.1 query operation
SparqlQuery istheprotocol'sonlyinterface.Itcontainsoneoperation, query,whichisusedtoconveya SPARQLquerystring and,optionally,an RDFdataset description.
The query operationisdescribedasan In-Outmessageexchangepattern [WSDL-Adjuncts].TheconstraintsofanIn-Outmessageexchangepatternareasfollows:
Thispatternconsistsofexactlytwomessages,inorder,asfollows:
1.Amessage:
oindicatedbyaInterfaceMessageReferencecomponentwhose{messagelabel}is"In"and{direction}is"in"
oreceivedfromsomenodeN
2.Amessage:
oindicatedbyaInterfaceMessageReferencecomponentwhose{messagelabel}is"Out"and{direction}is"out"
osenttonodeN
Thispatternusestherule 2.2.1FaultReplacesMessage.
ThisinterfaceanditsoperationaredescribedinthefollowingWSDL2.0fragment(from protocol-query.wsdl,whichcontainstherelevantnamespacedeclarations):
--AbstractSparqlQueryInterface-->
//www.w3.org/2006/01/wsdl/style/iri"> --theInterfaceFaults--> malformed-query"/> query-request-refused"/> --theInterfaceOperation--> //www.w3.org/2006/01/wsdl/in-out"> again. query-request"/> query-result"/> --theinterfacefaultsareoutfaults--> MalformedQuery"messageLabel="Out"/> QueryRequestRefused"messageLabel="Out"/> Excerpt1.0WSDL2.0fragment 2.1.2 query InMessage Abstractly,thecontentsoftheInMessageof SparqlQuery's query operationisaninstanceofanXMLSchemacomplextype,called st: query-request inExcerpt1.0,composedoftwofurtherparts: one SPARQLquerystring;andzerooroneRDFdataset descriptions.TheSPARQLquerystring,identifiedbyone query type,is defined by[SPARQL]as"asequenceofcharactersinthelanguagedefinedbythe[SPARQL]grammar,startingwiththeQueryproduction".TheRDFdatasetdescriptioniscomposedofzerooronedefaultRDFgraphs—composedbytheRDFmergeoftheRDFgraphsidentifiedbyzeroormore default-graph-uri types—andbyzeroormorenamedRDFgraphs,identifiedbyzeroormore named-graph-uri types.Thesecorrespondtothe FROM and FROMNAMED keywordsin[SPARQL],respectively. ThesetypesaredefinedinthefollowingXMLSchemafragment,from protocol-types.xsd: elementname="query-request"> complexType> sequence> elementminOccurs="1"maxOccurs="1"name="query"type="xs: string"> annotation> documentation>queryisanxs: stringconstrainedbythelanguagedefinition, http: //www.w3.org/TR/rdf-sparql-query/#grammar,as"asequenceofcharactersin thelanguagedefinedbythe[SPARQL]grammar,startingwiththeQueryproduction". documentation> annotation> element> elementminOccurs="0"maxOccurs="unbounded"name="default-graph-uri"type="xs: anyURI"/> elementminOccurs="0"maxOccurs="unbounded"name="named-graph-uri"type="xs: anyURI"/> sequence> complexType> element> Excerpt1.1XMLSchemafragment SpecifyinganRDFDataset TheRDFdatasetmaybespecifiedeitherina[SPARQL]queryusing FROM and FROMNAMED keywords;oritmaybespecifiedintheprotocoldescribedinthisdocument;oritma
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- SPARQL 协议
![提示](https://static.bdocx.com/images/bang_tan.gif)