没有合适的资源?快使用搜索试试~ 我知道了~
用于XML和HTML的无模式查询和重组的REST API。
资源推荐
资源详情
资源评论
Data Access and Retrieval Composion (DARC)
Working Draft 0.1 Oct. 1, 2010
Editors:
Chris Knight, NASA
Abstract
This is a very early draft of a standard and specification for the Data Access and
Retrieval Composition protocol, a REST HTTP query protocol for retrieving and
recomposing XML and HTML documents stored on a remote server.
DARC provides a contextual search and retrieval capability useful for lightweight
web applications (e.g. AJAX or PHP middleware) that removes the need for schemas
and schema management while providing the capability to retrieve relevant data
from large, semi-structured stores.
The DARC protocol may be seen as providing remote network access to “NoSQL”-
like data stores, and contains many of the concepts of simplicity and adaptability of
the NoSQL model in the protocol design.
Status of this Document
This is the first draft of this document and should not be considered a standard in
any way. However, this documents the DARC/XDB reference implementation as
currently implemented. As this document is revised, it is expected that the query
API expression language may be simplified and/or normalized and some formats
and options may be removed from this standard. (For example, we may wish to limit
this to XML input and output, removing the ASCII output format and defaulting to
the “XML” output format.)
Table of Contents
Data Access and Retrieval Composition (DARC)...........................................................1
Abstract.............................................................................................................................................. 1
Status of this Document................................................................................................................. 1
1. Introduction................................................................................................................................. 2
2. Query Search Expressions........................................................................................................ 3
a. Contextual Search..................................................................................................................................... 3
b. Second-level Context Searches............................................................................................................ 4
c. Controlling Which Records to Search...............................................................................................4
d. Comparison Expressions (Optional).................................................................................................5
3. Output Formats........................................................................................................................... 5
a. Query Output Format: Default............................................................................................................. 5
b. Query Output Format: XML.................................................................................................................. 6
c. Query Output Format: ASCII (Optional)..........................................................................................7
4. Query Options.............................................................................................................................. 7
a. Controlling the Result Data Returned...............................................................................................7
b. Controlling the Number of Returned Results................................................................................8
5. Examples....................................................................................................................................... 8
6. Acknowledgements................................................................................................................. 11
7. References.................................................................................................................................. 11
1. Introduction............................................................................................................................. 2
2. Query Expressions.................................................................................................................. 2
3. Output Formats....................................................................................................................... 2
4. Query Options.......................................................................................................................... 2
5. Examples.................................................................................................................................... 2
6. Acknowledgements................................................................................................................ 2
7. References................................................................................................................................. 2
1. Introducon
The Data Access and Retrieval Composition (DARC) protocol provides contextual
search and retrieval of semi-structured data. Contextual search is searching for data
based on where it is located in the structure, primarily focused on the immediate
context of the information sought. For example, if a user wishes to find their name in
the “Author” section of a set of documents, they can perform that search quickly
with no fore-knowledge of the structure of the documents being searched.
Contextual retrieval adds the capability to retrieve only the relevant section
(context) of the documents that match the query expression which reduces the
network bandwidth required to find that relevant information and provides for
analysis such as composition. Following the previous example, the user’s query
would return not only which documents contain their name in the “Author” section,
but also would contain those author sections in a structured output. The user could
then store the output as an index of documents and authors that are co-authors with
this user, or provide for other analysis such as social network analysis (“six-
degrees”.)
Updating data in a DARC index is not proscribed by this specification, nor is locking
or other transactional operations or models defined; however the specification
authors strongly encourage using WebDAV protocols for remote data management
and many implementations closely integrate with WebDAV stores in order to
leverage the simplicity of remote data management of the WebDAV protocols. DARC
relies on documents (resources) having Unique Resource Identifiers (URI’s) both in
the query expressions (for limiting queries to specific subsets of the data) and in the
result output when it identifies matches. DARC must be made aware of any updates
to the underlying resources and each URI must uniquely identify one and only one
resource (as per the semantics of the URI standard.)
DARC is a protocol that follows the Representational State Transfer (REST)
architecture. DARC queries are performed as HTTP “GET” (or “POST”, if the client
requires) requests and DARC query results returned in the HTTP response in XML
or ASCII. Queries are read-only, stateless operations on the DARC data store. As
DARC uses standard HTTP GET requests, existing caching, proxying, authentication
and access control, encryption, compression and other HTTP-related technologies
play well with the DARC protocol.
All DARC queries, as RESTful operations, require a base URI (an absolute URL). All
query expressions and options are specified as part of the “query string” of the URL
(see RFC 1630) and the query response is an XML (or ASCII) HTTP response body.
This is by design, so that users can interact with a DARC system directly from within
their browser by typing queries into the URL field and examining the structured
XML in the page view of the browser.
For example, expanding on the above example, a GET request of
http://publib.library.org/darc?author=Chris%20Knight&syntax=xml
would return:
<?xml version=”1.0”?>
<resultset><result><meta><uri>/specifications/darc.xml</uri></
meta><value><author>Chris Knight</author></value></result></resultset>
2. Query Search Expressions
Queries contain one or more expressions, separated with the ampersand (“&”)
character. Resources must satisfy all expressions to be considered a “match” and be
returned in the result set (imagine each expression creating a set of URIs that satisfy
that expression, the result set is all documents that exist in all expression sets.) For
queries requesting contextual results, all contexts that match any of the expressions
must be returned.
Many of the expressions may be expressed using a number of syntactical structures.
DARC servers, when implementing each type of expression, MUST implement all
variants and the syntactic variations MUST be semantically equivalent and return
identical results. In cases where a subtree is matched by multiple terms, that
subtree MUST only be returned one time.
a. Contextual Search
Contextual searches must perform full-text searches of the contents of the records—
the contents must contain each word specified, normally the order of words is
inconsequential and ranking may be performed but is not required or part of the
DARC specification.
Contextual searches may support a number of full-text operations on the contents
such as stemming, Boolean operators (“this –that”), and thesaurus lookups and the
like. The DARC protocol should make every effort to not interfere with special
characters required for such operations and URI escaping may be required.
剩余10页未读,继续阅读
资源评论
工程求知者
- 粉丝: 31
- 资源: 4608
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功