1 / 39

RDF Schema

RDF Schema. Weak RDF Adoption. RDF Picking Up. RDF adoption will pick up because five primary reasons: Improved tutorials Improved tool support Improved XML Schema integration Ontologies Noncontextual modeling. Semantic Web Stack -- By W3C and Tim Berners-Lee.

leon
Download Presentation

RDF Schema

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RDF Schema

  2. Weak RDF Adoption

  3. RDF Picking Up • RDF adoption will pick up because five primary reasons: • Improved tutorials • Improved tool support • Improved XML Schema integration • Ontologies • Noncontextual modeling

  4. Semantic Web Stack -- By W3C and Tim Berners-Lee

  5. RDF Schema • RDF Schema is a simple set of standard RDF resources and properties to enable people to create their own RDF vocabularies. • The data model expressed by RDF Schema is the same data model used by object-oriented programming languages like Java.

  6. Data Model • The data model for RDF Schema allows you to create classes of data. • A class is defined as a group of things with common characteristics. • In object-oriented programming (OOP), a class is defined as a template or blueprint for an object composed of characteristics (also called data members) and behaviors (also called methods). • An object is one instance of a class.

  7. OO Language • OO languages also allow classes to inherit characteristics and behaviors from a parent class. • UML: Class name Class Class attributes Class behavior Inheritance Association

  8. RDF Schema • RDF Schema only uses the first two parts of a class, since it is for data modeling and not programming behaviors. • Discussion: • Whereas both employees may know about a technology, the key differentiator of developing source code to implement a technology is important enough to be formally captured in RDF. This is precisely the type of key determining factor that is often lost in a jumble of plaintext. So, let's see how we would model this in RDF Schema.

  9. In Protégé

  10. Protégé • The Protégé class structure is identical to the UML model except for the lack of behaviors. • After modeling the classes, Protégé allows you to generate both the RDF schema and an RDF document if you create instances of the Schema.

  11. RDF Schema <?xml version='1.0' encoding='ISO-8859-1'?> <!DOCTYPE rdf:RDF [ <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> <!ENTITY example_chp5 'http://protege.stanford.edu/example-chp5#'> <!ENTITY rdfs 'http://www.w3.org/TR/1999/PR-rdf-schema-19990303#'> ]> <rdf:RDF xmlns:rdf="&rdf;" xmlns:example_chp5="&example_chp5;" xmlns:rdfs="&rdfs;"> <rdfs:Class rdf:about="&example_chap5; Artifacts" rdfs:label="Artifacts"> <rdfs:subClassOf rdf:resource="&rdfs;Resource"/> </rdfs:Class> <rdfs:Class rdf:about="&example_chp5;DesignDocument" rdfs:label="DesignDocument"> <rdfs:subClassOf rdf:resource="&example_chp5;Artifacts"/> </rdfs:Class> <rdfs:Class rdf:about="&example_chp5;Employee" rdfs:label="Employee"> <rdfs:subClassOf rdf:resource="&rdfs;Resource"/> </rdfs:Class> <rdfs:Class rdf:about="&example_chp5;Software-Engineer" rdfs:label="Software-Engineer"> <rdfs:subClassOf rdf:resource="&example_chp5;Employee"/> </rdfs:Class> <!– Classes SourceCode, System-Analyst, Technology, and Topic omitted for brevity. They are similar to the above Classes. –><rdf:Property rdf:about="&example_chp5;knows" rdfs:label="knows"> <rdfs:domain rdf:resource="&example_chp5;Employee"/> <rdfs:range rdf:resource="&example_chp5;Topic"/> </rdf:Property> <rdf:Property rdf:about="&example_chp5;writes" rdfs:label="writes"> <rdfs:range rdf:resource="&example_chp5;Artifacts"/> <rdfs:domain rdf:resource="&example_chp5;Employee"/> </rdf:Property> </rdf:RDF>

  12. Components of RDF Schema • rdfs:Class An element that defines a group of related things that share a set of properties. This is synonymous with the concept of type or category. Works in conjunction with rdf:Property, rdfs:range, and rdfs:domain to assign properties to the class. Requires a URI as an identifier in the rdf:about attribute. • rdfs:label An attribute that defines a human-readable label for the class. This is important for applications to display the class name in applications even though the official unique identifier for the class is the URI in the rdf:about attribute. • rdfs:subclassOf An element that specifies that a class is a specialization of an existing class. The idea of specialization is that a subclass adds some unique characteristics to a general concept. Therefore, going down the class hierarchy is referred to as specialization, while going up the class hierarchy is referred to as generalization.

  13. RDF Schema <?xml version='1.0' encoding='ISO-8859-1'?> <!DOCTYPE rdf:RDF [ <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> <!ENTITY example_chp5 'http://protege.stanford.edu/example-chp5#'> <!ENTITY rdfs 'http://www.w3.org/TR/1999/PR-rdf-schema-19990303#'> ]> <rdf:RDF xmlns:rdf="&rdf;" xmlns:example_chp5="&example_chp5;" xmlns:rdfs="&rdfs;"> <rdfs:Class rdf:about="&example_chap5; Artifacts" rdfs:label="Artifacts"> <rdfs:subClassOf rdf:resource="&rdfs;Resource"/> </rdfs:Class> <rdfs:Class rdf:about="&example_chp5;DesignDocument" rdfs:label="DesignDocument"> <rdfs:subClassOf rdf:resource="&example_chp5;Artifacts"/> </rdfs:Class> <rdfs:Class rdf:about="&example_chp5;Employee" rdfs:label="Employee"> <rdfs:subClassOf rdf:resource="&rdfs;Resource"/> </rdfs:Class> <rdfs:Class rdf:about="&example_chp5;Software-Engineer" rdfs:label="Software-Engineer"> <rdfs:subClassOf rdf:resource="&example_chp5;Employee"/> </rdfs:Class> <!– Classes SourceCode, System-Analyst, Technology, and Topic omitted for brevity. They are similar to the above Classes. –><rdf:Property rdf:about="&example_chp5;knows" rdfs:label="knows"> <rdfs:domain rdf:resource="&example_chp5;Employee"/> <rdfs:range rdf:resource="&example_chp5;Topic"/> </rdf:Property> <rdf:Property rdf:about="&example_chp5;writes" rdfs:label="writes"> <rdfs:range rdf:resource="&example_chp5;Artifacts"/> <rdfs:domain rdf:resource="&example_chp5;Employee"/> </rdf:Property> </rdf:RDF>

  14. Components of RDF Schema • rdf:Property An element that defines a property of a class and the range of values it can represent. This is used in conjunction with rdfs:domain and rdfs:range properties. Modeling classes in RDFS takes a bottom-up approach, whereas OOP takes a top-down approach. In OOP, you define a class and everything it contains. In RDFS, you define properties and state what class they belong to. So, in OOP we are going down from the class to the properties. In RDFS, we are going up from the properties to the class. • rdfs:domain This property defines which class a property belongs to. The value of the property must be a previously defined class. In Listing 5.6, we see that the domain of the property "knows" is the "Employee" class. • rdfs:range This property defines the legal set of values for a property. The value of this attribute must be a previously defined class. In Listing 5.6, the range of the "knows" property is the "Topic" class.

  15. RDF Schema <?xml version='1.0' encoding='ISO-8859-1'?> <!DOCTYPE rdf:RDF [ <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> <!ENTITY example_chp5 'http://protege.stanford.edu/example-chp5#'> <!ENTITY rdfs 'http://www.w3.org/TR/1999/PR-rdf-schema-19990303#'> ]> <rdf:RDF xmlns:rdf="&rdf;" xmlns:example_chp5="&example_chp5;" xmlns:rdfs="&rdfs;"> <rdfs:Class rdf:about="&example_chap5; Artifacts" rdfs:label="Artifacts"> <rdfs:subClassOf rdf:resource="&rdfs;Resource"/> </rdfs:Class> <rdfs:Class rdf:about="&example_chp5;DesignDocument" rdfs:label="DesignDocument"> <rdfs:subClassOf rdf:resource="&example_chp5;Artifacts"/> </rdfs:Class> <rdfs:Class rdf:about="&example_chp5;Employee" rdfs:label="Employee"> <rdfs:subClassOf rdf:resource="&rdfs;Resource"/> </rdfs:Class> <rdfs:Class rdf:about="&example_chp5;Software-Engineer" rdfs:label="Software-Engineer"> <rdfs:subClassOf rdf:resource="&example_chp5;Employee"/> </rdfs:Class> <!– Classes SourceCode, System-Analyst, Technology, and Topic omitted for brevity. They are similar to the above Classes. –><rdf:Property rdf:about="&example_chp5;knows" rdfs:label="knows"> <rdfs:domain rdf:resource="&example_chp5;Employee"/> <rdfs:range rdf:resource="&example_chp5;Topic"/> </rdf:Property> <rdf:Property rdf:about="&example_chp5;writes" rdfs:label="writes"> <rdfs:range rdf:resource="&example_chp5;Artifacts"/> <rdfs:domain rdf:resource="&example_chp5;Employee"/> </rdf:Property> </rdf:RDF>

  16. Other RDFS Definitions • rdf:type. A standard property to define that an RDF subject is of a type defined in an RDF schema. For example, you could say that a person with Staff ID of 865 is a type of employee like this:<rdf:Description rdf:about= "http://www.mybiz.com/staff/ID/865"> <rdf:type rdf:resource ="&example_chp5;Employee"> • rdfs:subPropertyof A property that declares that the property that is the subject of the statement is a subproperty of another existing property. This feature actually goes beyond common OOP languages like Java and C# that only offer class inheritance. An example of this would be to declare a property called "weekend," which would be a subPropertyof "week."

  17. Other RDFS Definitions • rdfs:seeAlso A utility property that allows you to refer to a resource that can provide additional RDF information about the current resource. • rdfs:isDefinedBy A property to define the namespace of a subject. This is a subPropertyOf rdfs:seeAlso. In practice, the namespace can point to the RDF Schema document. • rdfs:comment A utility property to add additional descriptive information to explain the classes and properties to other users of the schema. As in programming, good comments are essential to fostering understanding and adoption.

  18. Other RDFS Definitions • rdfs:Literal A property that represents a constant value represented as a character string. In Listing 5.7, the value of the example_chp5:name attribute is a literal (like "Jane Jones"). RDF/XML syntax revision has recently added typed literals to RDF so that you can specify any of the types in the XML Schema specification (like integer or float). • rdfs:XMLLiteral A property that represents a constant value that is well-formed XML. This allows XML to be easily embedded in RDF.

  19. RDFS Containers • For containers, RDF Schema defines rdfs:Container, rdf:Bag, rdf:Seq, rdf:Alt, rdfs:member, and rdfs:ContainerMembershipProperty. • The purpose for defining these is to allow you to subclass these classes or properties.

  20. RDFS Reification • For reification, RDF Schema defines rdf:Statement, rdf:subject, rdf:predicate, and rdf:object. • These can be used to explicitly model a statement to assert additional statements about it.

  21. Instance Document <?xml version='1.0' encoding='ISO-8859-1' ?> <!DOCTYPE rdf:RDF [ <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> <!ENTITY example_chp5 'http://protege.stanford.edu/example-chp5#'> <!ENTITY rdfs 'http://www.w3.org/TR/1999/PR-rdf-schema-19990303#'> ]> <rdf:RDF xmlns:rdf="&rdf;" xmlns:example_chp5="&example_chp5;" xmlns:rdfs="&rdfs;"> <example_chp5:SourceCode rdf:about="&example_chp5;example-chp5_00015" example_chp5 :name="stuff.Java" rdfs:label="example-chp5_00015"/><example_chp5:System-Analyst rdf:about="&example_chp5;example- chp5_00016" example_chp5:name="Jane Jones" rdfs:label="example-chp5_00016"> <example_chp5:writes rdf:resource="&example_chp5; example-chp5_00017"/> </example_chp5:System-Analyst> <example_chp5:DesignDocument rdf:about="&example_chp5;example- chp5_00017" example_chp5:name="system.sdd" rdfs:label="example-chp5_00017"/> <example_chp5:Software-Engineer rdf:about="&example_chp5;example- chp5_00018" example_chp5:name="John Doe" rdfs:label="example-chp5_00018"> <example_chp5:writes rdf:resource="&example_chp5;example-chp5_00015"/> </example_chp5:Software-Engineer> </rdf:RDF>

  22. Typed Node Element • The classes of the RDF schema in above are not defined using rdf:type or rdf:about; instead, they use an abbreviation called using a "typed node element." • For example, instead of <rdf:Description>, we use <example_chp5:System-Analyst, which is an rdfs:Class in the schema. • In terms of knowledge capture, the instance document captures the fact that the System-Analyst, Jane Jones wrote the DesignDocument named "system.sdd," and that the Software-Engineer, John Doe, wrote SourceCode called "stuff.java."

  23. Noncontextual Modeling • Over the years, businesses have used standard document types to easily convey the context of a specific business transaction. • For example, a purchase order is a common document shared between companies with little difficulty even if there is some variation in specific fields or the order of fields. • The shared understanding is facilitated because the context is conveyed or fixed by the document type. In that same vein, XML documents have a fixed context provided by their root element and governing schema (formerly called the Document Type Definition, or DTD).

  24. Example of contextual modeling (a resume) <?xml version="1.0" encoding="UTF-8"?> <Resume xmlns="http://ns.hr-xml.org/RecruitingAndStaffing/SEP-2_0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ns.hr-xml.org/RecruitingAndStaffing/SEP-2_0 Resume-2_0.xsd"> <StructuredXMLResume> <ContactInfo> <PersonName> <FormattedName>John Doe</FormattedName> </PersonName> <ContactMethod> <Telephone> <FormattedNumber>123-456-7890</FormattedNumber> </Telephone> <InternetEmailAddress>jdoe@fakeaddress.com</InternetEmailAddress> <PostalAddress> <CountryCode>US</CountryCode> <Region>MA</Region> <Municipality>Brooklyn</Municipality> <DeliveryAddress> <AddressLine>27 </AddressLine> <StreetName>Pine Street</StreetName> </DeliveryAddress> </PostalAddress> </ContactMethod> </ContactInfo> <Objective> To obtain a leadership position in the field of Electronic Commerce </Objective>

  25. Example of contextual modeling (a resume) <EmploymentHistory> <EmployerOrg employerOrgType="soleEmployer"> <EmployerOrgName>General Electric</EmployerOrgName> <PositionHistory positionType="directHire"> <Title> E-Business Program Manager - Business to Business integration (B2Bi) Program</Title> <OrgName> <OrganizationName>Aircraft Engines (GEAE) </OrganizationName> </OrgName> <Description>Key Player in the GE growth initiative bringing IT leadership into our acquisition/ JV strategy. Ensured fundamental IT capabilities were present in acquisition targets in order to maintain a competitive advantage and ensure future growth. Led cross-functional team on due diligence, and negotiations activity for $100M+ acquisitions. Led several new market` opportunity assessments and Instrumental in acquisition strategy development including negotiation of partnership structures and negotiating potential new market opportunities. </Description> <!-- remainder omitted for brevity. --> </Resume>

  26. Contextual versus Noncontextual Modeling • It is not a question of better or worse, but a question of whether your specific application is better served by fixing the context or not fixing the context. • In some ways this is the classic trade-off between flexibility in the face of change versus reliable execution via static processes.

  27. Toward Contextual Modeling • For many applications, fixing the context at the document level is the best method. • One example of this would be high-volume static transactions between well-known trading partners. When the environment is stable and the volume is high, it is both easier and more efficient to strictly fix the context of documents and messages to reduce errors and increase throughput.

  28. Toward Noncontextual Modeling • Where neither the environment is stable nor the volume is high, is the classic example where flexibility and noncontextual modeling are the best choice. • Markup languages have been following the trend toward noncontextual modeling over the last several years via namespaces and modularization.

  29. Toward Noncontextual Modeling • Namespaces divide a set of terms (used as elements or attributes) into domain-specific vocabularies with fixed definitions. • Modularization allows namespaces to be mixed and matched to assemble a document (sometimes on the fly) that conveys the desired meaning.

  30. Toward Noncontextual Modeling • Two examples of such modularization are XHTML and XBRL. • XHTML modularization allows you to mix and match vocabularies inside of HTML documents. • The extensible business reporting language (XBRL) uses both modularization and taxonomies for the description of financial statements for public and private companies.

  31. RDF Implementing Noncontextual Modeling • RDF creates a collection of statements and not a document. Therefore, the context of a set of RDF statements cannot be determined beforehand; instead, it is wholly dependent on the statements themselves and the relationships between the sentences. • In a sense, this disconnect between a list of statements and a hierarchical tree is the root cause of the difficulty in encoding RDF in RDF/XML syntax, because it attempts to marry a list of statements with a hierarchical tree structure.

  32. Key Aspects of Noncontextual Modeling • Non-contextual modeling uses explicit versus implicit relationships XML documents create a hierarchy of name/value pairs. Both elements and attributes revolve around a name and a typed value. However, XML does not state the relationship between the name and the value. The relationship between them is implicit. On the contrary, RDF uses an explicit relationship between the name and the value with the triple structure: subject, predicate, and object.

  33. Key Aspects of Noncontextual Modeling • A graph is less brittle than a tree A collection of RDF statements can be added to dynamically without regard to order or even previous statements. In fact, a previous statement can be reified and deprecated by another statement. This allows the RDF graph to be robust in the face of change and suffer less from the brittle data problem and need for versioning and compatibility issues that can plague XML documents.

  34. XML Document Model and RDF Graph • Tim Berners-Lee stresses several differences between the XML document model and an RDF graph. • First is that there are many possible XML documents that can express a set of semantic assertions. Therefore, RDF simplifies this via a semantic model also known as the triple model. In other words, RDF makes you explicitly define the semantics of your data and thus avoid confusion and alternate syntaxes.

  35. XML Document Model and RDF Graph • Another obvious difference is that order is often very important in a document but not important to an RDF graph. • Many times the order reflects implicit context not expressed in the name/value pairs. By forcing explicit relationships between subjects and objects, RDF avoids this. • Of course, if order is important and it changes, you have an incompatible change to the document structure; hence, this is another example where an RDF list of statements is less affected by change and therefore less brittle.

  36. SMORE • One application (among many) that is bridging the gap between contextual and noncontextual modeling is called SMORE (Semantic Markup, Ontology, and RDF Editor), developed by Aditya Kalyanpur of the University of Maryland, College Park. • It allows you to embed RDF markup inside of HTML documents during the HTML authoring process. • SMORE allows you to select an ontology and easily add triples about the information in your Web pages to your HTML document.

  37. Generated Document with RDF Embedded in the Head of the HTML Document <html> <head> <script type="application/rdf+xml"> <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:general1.0="http://www.cs.umd.edu/plus/DAML/onts/general1.0.daml#" xmlns:personOnt="http://www.wam.umd.edu/~mhgrove/personOnt.rdf#"> <general1.0:Organization rdf:ID="Virtual_Knowledge_Base_"> <general1.0:subOrganizationOf>JIVA</general1.0:subOrganizationOf> </general1.0:Organization> <general1.0:Organization rdf:ID="JIVA"> <general1.0:subOrganizationOf>DIA</general1.0:subOrganizationOf> </general1.0:Organization> <personOnt:Person rdf:ID="Ted_Wiatrak"></personOnt:Person> <personOnt:Person rdf:ID="Danny_Proko"></personOnt:Person> </rdf:RDF> </script> </head> <body> <P> <b>Virtual Knowledge Base (VKB) </b> </P> <!-- omitted for brevity. --> </body> </html>

  38. TAPache • A project from IBM's Knowledge Management Group and Stanford's Knowledge Systems Laboratory that enables the distributed processing of chunks of RDF knowledge is the TAPache subproject of the TAP project at http://tap.stanford.edu. • TAPache is a module for the Apache HTTP server that enables you to publish RDF data via a standard Web service called getData(). This allows easy integration of distributed RDF data. • This further highlights the ability to assemble context even from disparate servers across the network.

More Related