Triple St Predicate Object
Total Page:16
File Type:pdf, Size:1020Kb
USOO8447786B2 (12) United States Patent (10) Patent No.: US 8.447,786 B2 Akolkar et al. (45) Date of Patent: May 21, 2013 (54) LANGUAGE EXTENSIONS FOR CREATING, (56) References Cited ACCESSING, QUERYING AND UPDATING RDF DATA U.S. PATENT DOCUMENTS 6.857,124 B1* 2/2005 Doyle ........................... T19.316 (75) Inventors: Rahul P. Akolkar, Tuckahoe, NY (US); 2005, OO60287 A1* 3, 2005 Hellman et al. 707/2 2006/0235823 A1* 10/2006 Chong et al. ....... 707/1 Bruce David Lucas, Mohegan Lake, NY 2006/0265508 A1* 1 1/2006 Angel et al. ....... TO9/230 (US); Charles F. Wiecha, 2006/0271506 A1* 11/2006 Bohannon et al. ................ 707/2 Hastings-on-Hudson, NY (US) 2008, OO27981 A1* 1/2008 Wahl .................. TO7/103 R 2008/O126397 A1* 5/2008 Alexander et al. TO7,102 (73) Assignee: International Business Machines 2009,0300656 A1* 12/2009 Bosworth et al. .. T19,320 Corporation, Armonk, NY (US) 2010.0036788 A1 2/2010 Wu et al. ......................... TO6/47 * cited by examiner (*) Notice: Subject to any disclaimer, the term of this patent is extended or adjusted under 35 Primary Examiner – Pierre Vital U.S.C. 154(b) by 1056 days. Assistant Examiner — Berhanu Mitiku (74) Attorney, Agent, or Firm — Tutunjian & Bitetto, P.C.; (21) Appl. No.: 12/243,161 Louis Percello (22) Filed: Oct. 1, 2008 (57) ABSTRACT (65) Prior Publication Data A method for processing a graph structure includes providing a graph as a set of triples, each triple having a Subject node, a US 201O/OO82651A1 Apr. 1, 2010 predicate, and an object node, the predicate defining a rela tionship between a respective subject node and an object (51) Int. C. node. One of more triples in the set of triples are processed G06F 7700 (2006.01) according to one or more attributes of each triple in the set of G06F 7/30 (2006.01) triples to permit accessing, querying, creating, and updating (52) U.S. C. resource description framework (RDF) data structures in at USPC ........................................... 707/798: 707/807 least one of a Script language and an objectoriented language (58) Field of Classification Search by providing a set of language extensions. None See application file for complete search history. 18 Claims, 2 Drawing Sheets -o 201 2O2 9 2O A. 211 29 y 2OT f 208 210 "bar" 216 212 Y 21 N RDFTripTriple st predicate object/ U.S. Patent May 21, 2013 Sheet 1 of 2 US 8.447,786 B2 Provide graph to represent triples including subject and object nodes and edges that include the relationships therebetween -102 Processing the triples of the graph - 104 Ouery Access Modifying triples triples to graph based on find triples and for attributes that satisfy triples Criteria 112 106 108 Generate a hit list 110 Navigate graph using forward and backward navigation - 114 FIG. 1 U.S. Patent May 21, 2013 Sheet 2 of 2 US 8.447,786 B2 / 2OO 2O1 2O2 " ' b b 9 fod- - R2 2O 4. 211 205 209 d e y 2O7 f 208 R4 210 bar 2 O S.s FIG.2 US 8.447,786 B2 1. 2 LANGUAGE EXTENSIONS FOR CREATING, ECMA-357 standard, defining an extension to ECMAScript, ACCESSING, QUERYING AND UPDATING known as E4X (ECMAScript for XML). RDF DATA SUMMARY BACKGROUND A method for processing a graph structure includes pro 1. Technical Field viding a graph as a set of triples, each triple having a subject The present invention relates to data structures and more node, a predicate, and an object node, the predicate defining a particularly to mechanisms for extending languages to pro relationship between a respective subject node and an object vide compatibility with resource description framework node. One of more triples in the set of triples are processed (RDF) data. according to one or more attributes of each triple in the set of 2. Description of the Related Art triples to permit accessing, querying, creating, and updating resource description framework (RDF) data structures in at Resource Description Framework (RDF) is a family of least one of a script language and an object oriented language World Wide Web Consortium (W3C) specifications, origi 15 by providing a set of language extensions. nally designed as a metadata data model, which has come to These and other features and advantages will become be used as a general method of modeling information through apparent from the following detailed description of illustra a variety of syntax formats. The RDF metadata model is based tive embodiments thereof, which is to be read in connection upon the idea of making statements about Web resources in with the accompanying drawings. the form of Subject-predicate-object expressions, called triples in RDF terminology. The subject denotes the resource, BRIEF DESCRIPTION OF DRAWINGS and the predicate denotes traits or aspects of the resource and expresses a relationship between the Subject and the object. The disclosure will provide details in the following For example, one way to represent the notion “The fox is the description of preferred embodiments with reference to the color red in RDF is as the triple: a subject denoting “the fox'. 25 following figures wherein: a predicate denoting “is the color, and an object denoting FIG. 1 is a block/flow diagram showing a system/method “red'. RDF is an abstract model with several serialization for creating, accessing, querying and updating RDF data in formats (i.e., file formats), and so the particular way in which accordance with the present principles; and a resource or triple is encoded varies from format to format. FIG. 2 is a graph showing an RDF graph and triple store The mechanism for describing resources is an evolutionary 30 table creating, accessing, querying and updating RDF data in stage of the World Wide Web in which automated software accordance with the present principles. can store, exchange, and use machine-readable information distributed throughout the Web, in turn enabling users to deal DETAILED DESCRIPTION OF PREFERRED with the information with greater efficiency and certainty, EMBODIMENTS RDF's simple data model and ability to model disparate, 35 abstract concepts has also led to its increasing use in knowl The present principles provide a set of language extensions edge management applications unrelated to Semantic Web to ECMAScript for accessing, querying, creating, and updat activity. ing resource description framework (RDF) data structures. RDF is an increasingly popular data and knowledge repre The language features are based on existing E4X ECMAS sentation language. It is highly flexible, relatively low-level. 40 cript language features for accessing, querying, creating, and and fundamentally distributed, which makes it suitable for updating XML data structures. In this disclosure, for ease of representing a wide range of data on the web. However, while reference, we refer to the ECMAScript language features for the RDF data model may be used as the basis for a complete accessing RDF data as E4R in accordance with the present programming model, this is possible only if the programming principles. E4R enriches ECMAScript with easy native model has a set of features that provide simple, easy to use 45 access to RDF data in environments where Javascript or access to underlying RDF data. ECMAScript are used. E4R provides a user-friendly query The subject of an RDF statement is a resource, possibly as language for RDF data, and allows RDF data to be accessed named by a Uniform Resource Identifier (URI). Some using familiar path-oriented navigation expressions. resources are unnamed and are called blank nodes or anony Embodiments of the present invention can take the form of mous resources. They are not directly identifiable. The predi 50 an entirely hardware embodiment, an entirely software cate is a resource as well, representing a relationship. The embodiment or an embodiment including both hardware and object is a resource. A Uniform Resource Locator (URL) is a software elements. In a preferred embodiment, the present URI that in addition to identifying a resource, provides away invention is implemented in software, which includes but is of locating the resource by describing its primary access not limited to firmware, resident Software, microcode, etc. mechanism (e.g., its network location). It is necessary for 55 Furthermore, the invention can take the form of a computer producers and consumers of RDF statements to be in agree program product accessible from a computer-usable or com ment on the semantics of resource identifiers. Such agreement puter-readable medium providing program code for use by or is not inherent to RDF itself. in connection with a computer or any instruction execution Despite the advantages of using RDF, many languages system. For the purposes of this description, a computer cannot make use of RDF or aspects of RDF. For example, 60 usable or computer readable medium can be any apparatus ECMAScript and language features used in programming that may include, store, communicate, propagate, or transport browsers encounter problems. For example, JavaScript, the program for use by or in connection with the instruction ECMAScript, cannot be used conveniently with RDF graph execution system, apparatus, or device. The medium can be structures. ECMAScript, E4X and JavaScript, cannot be used an electronic, magnetic, optical, electromagnetic, infrared, or for distributed RDF data structures. Object oriented lan 65 semiconductor system (or apparatus or device) or a propaga guages cannot conveniently use distributed RDF data struc tion medium. Examples of a computer-readable medium tures on the web. (Note ECMA International published the include a semiconductor or Solid state memory, magnetic US 8.447,786 B2 3 4 tape, a removable computer diskette, a random access the lexical range of URIs is different from the lexical range of memory (RAM), a read-only memory (ROM), a rigid mag ECMAScript identifiers, the Xp’ representation may be netic disk and an optical disk.