OOPS! RESTFull Web Service



The web service is deployed in the following URL: http://oops.linkeddata.es/rest. A wadl file with the definition of the RESTFul web service is available in the following URL: http://oops.linkeddata.es/rest/application.wadl.


For accessing the OOPS! RESTFUL Web Service, use a HTTP POST request using the following URL: http://oops.linkeddata.es/rest.
The body of the request must be an XML with the following structure:


<?xml version="1.0" encoding="UTF-8"?>
<OOPSRequest>
<OntologyURI>http://www.cc.uah.es/ie/ont/learning-resources.owl</OntologyURI>
<OntologyContent></OntologyContent>
<Pitfalls>10</Pitfalls>
<OutputFormat></OutputFormat>
</OOPSRequest>

The fields of the XML are:
  • OntologyURI: the ontology URI. Mandatory if OntologyContent field is empty.
  • OntologyContent: ontology RDF source code. Highly important: the RDF code must be contained inside <![CDATA[ RDF code ]]>. Otherwise, the code won’t be read properly. Mandatory if OntologyUrl field is empty.
  • Pitfalls: list of pitfalls to be scanned. If the list is empty, all the pitfalls will be analyzed. If the user just wants to analyze some pitfalls, just enter the number of the pitfall with a coma separator if more than one pitfall is entered. For instance: “4,11,21” or "P04,P11,P21". Although 35 pitfalls have been identified, not all of them have been implemented. List of implemented pitfalls: 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 19, 20, 21, 22, 24, 25, 25, 26, 27, 28 and 29. Optional field.
  • OutputFormat: response can be an RDF file or and XML file. Possible values of this field: XML or RDF/XML. If any other value is entered, the default output will be RDF/XML. Accepted values: XML, RDF/XML. Optional field.
You must enter either the OntologyUrl or the OntologyContent value, if none of them is sent, an RDF error message will be received as response. If both of them are entered, the service will use the OntologyContent.

The web service response can be either a XML or a RDF file. In both cases, the structure is almost similar. Tags in XML response have been created using similar names or the same as in the RDF response. Below, both structures are described.
The RDF file response has the following structure:
  • Response element: a resource of rdf:type http://oops.linkeddata.es/def#response. This is the main resource of the RDF file. This resource will contain as many elements as pitfalls, warning or suggestions detected during the analysis of the ontology.
  • Pitfall element: resources of rdf:type http://www.oeg-upm.net/oops#pitfall. For every pitfall detected, a new resource of this type will be created and associated with the response element. This element contains a set of fixed properties:
    • oops:hasCode: the code of the pitfall.
    • oops:hasName: the name of the pitfall.
    • oops:hasDescription: the description of the pitfall.
    Depending on the pitfall, it could contain some of the following elements:
    • oops:hasAffectedElement: indicates the URI of the element (class, object property or data property) affected.
    • oops:mightBeEquivalentProperty: points to a resource that will contain the URIs of the elements (class, object property or data property) affected.
    • oops:mightBeEquivalentAttribute: points to a resource that will contain the URIs of the elements (class, object property or data property) affected.
    • oops:mightNotBeInverseOf: indicates the URI of the element (class, object property or data property) affected.
  • Warning element: resources of rdf:type http://www.oeg-upm.net/oops#warning. For possible warning detected, a new resource of this type will be created and associated with the response element. This element contains a set of fixed elements:
    • oops:hasName: the name of the warning value.
    • oops:hasAffectedElement: this element will contain as many URIs as elements detected during the analysis.
  • Suggestion element: resources of rdf:type http://www.oeg-upm.net/oops#suggestion. For possible suggestions detected, a new resource of this type will be created and associated with the response element. This element contains a set of fixed elements:
    • oops:hasName: the name of the suggestion.
    • oops:hasDescription: the description of the suggestion value.
    • oops:hasAffectedElement: this element will contain as many URIs as elements detected during the analysis.
The XML file response has the following structure:
  • Pitfall element: this element (oops:Pitall) contains a set of fixed elements:
    • oops:Code: the code of the pitfall.
    • oops:Name: the name of the pitfall.
    • oops:Description: the description of the pitfall.
    • oops:Affects: this element will contain the elements affected. Depending on the pitfall, it could contain some of the following elements:
      • oops:AffectedElement: the URI of the element (class, object property or data property) affected.
      • oops:MightBeEquivalentProperty: to represent possible equivalent property elements. Contains oops:AffectedElement elements that will contain the URIs of the object properties affected.
      • oops:MightBeEquivalentAttribute: to represent possible equivalent attribute elements. Contains oops:AffectedElement elements that will contain the URIs of the data properties affected.
      • oops:MightNotBeInversedOf: to represent possible wrong inverse relationships between object properties. Contains oops:AffectedElement elements that will contain the URIs of the object properties affected.
  • Warning element: this element (oops:Warning) contains a set of fixed elements:
    • oops:Name: the name of the warning.
    • oops:Affects: this element will contain the elements affected. This element contains a set of oops:AffectedElement: the URI of the element (class, object property or data property) affected.
  • Suggestion element: this element (oops:Suggestion) contains a set of fixed elements:
    • oops:Name: the name of the suggestion.
    • oops:Description: the description of the suggestion.
    • oops:Affects: this element will contain the elements affected. This element contains a set of oops:AffectedElement: the URI of the element (class, object property or data property) affected.

Request examples

In both examples, the ontology analysed is http://www.cc.uah.es/ie/ont/learning-resources.owl. In the first example, OntologyUrl field is used and the output will be a XML file. In the second example, OntologyContent field is used and the output will be a RDF/XML file. In both cases, only pitfall number 10 will be analysed.


Request body:

<?xml version="1.0" encoding="UTF-8"?>
<OOPSRequest>
<OntologyUrl>http://www.cc.uah.es/ie/ont/learning-resources.owl</OntologyUrl>
<OntologyContent></OntologyContent>
<Pitfalls>10</Pitfalls>
<OutputFormat>XML</OutputFormat>
</OOPSRequest>

Service Response:

<?xml version="1.0" encoding="UTF-8"?>
<oops:OOPSResponse xmlns:oops="http://www.oeg-upm.net/oops">
<oops:Pitfall>
<oops:Code>P10</oops:Code>
<oops:Name>Missing disjointness [1, 2, 3]</oops:Name>
<oops:Description>The ontology lacks disjoint axioms between classes or between properties
that should be defined as disjoint. For example, we can create the classes “Odd” and “Even”
(or the classes “Prime” and “Composite”) without being disjoint; such representation is not
correct based on the definition of these types of numbers.</oops:Description>
</oops:Pitfall>
</oops:OOPSResponse>

Request body:

	<?xml version="1.0" encoding="UTF-8"?>
	<OOPSRequest>
	      <OntologyUrl></OntologyUrl>
	      <OntologyContent><![CDATA[
	<?xml version="1.0"?>
	<rdf:RDF
	    xmlns="http://www.cc.uah.es/ie/ont/learning-resources#"
	    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
	    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
	    xmlns:owl="http://www.w3.org/2002/07/owl#"
	  xml:base="http://www.cc.uah.es/ie/ont/learning-resources">
	  <owl:Ontology rdf:about="">
	    <rdfs:comment xml:lang="en">An upper ontology for models of</rdfs:comment>
	  </owl:Ontology>
	  <owl:Class rdf:ID="LearningObject">
	    <rdfs:comment xml:lang="en">"A digital learning resource"</rdfs:comment>
	  </owl:Class>
	  <owl:Class rdf:ID="ExerciseLO">
	    <rdfs:comment xml:lang="en">"A task, problem, or other effort performed
	     to develop or maintain fitness 
	    or increase skill:"</rdfs:comment>
	    <rdfs:subClassOf rdf:resource="#LearningObject"/>
	  </owl:Class>
	  <owl:ObjectProperty rdf:ID="partOf">
	    <owl:inverseOf>
	      <owl:TransitiveProperty rdf:ID="hasPart"/>
	    </owl:inverseOf>
	    <rdfs:range rdf:resource="#LearningObject"/>
	    <rdfs:domain rdf:resource="#LearningObject"/>
	  </owl:ObjectProperty>
	  <owl:TransitiveProperty rdf:about="#hasPart">
	    <rdfs:range rdf:resource="#LearningObject"/>
	    <rdfs:domain rdf:resource="#LearningObject"/>
	    <rdfs:comment xml:lang="en">Specifies that a LO has as one of its constituent
	     another LO.</rdfs:comment>
	    <owl:inverseOf rdf:resource="#partOf"/>
	    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
	  </owl:TransitiveProperty>
	  <LearningObject rdf:ID="aLearningObject">
	    <hasPart>
	      <ExerciseLO rdf:ID="anExerciseLearningObject">
	        <partOf rdf:resource="#aLearningObject"/>
	      </ExerciseLO>
	    </hasPart>
	    <partOf>
	      <LearningObject rdf:ID="yetAnotherLearningObject">
	        <hasPart rdf:resource="#aLearningObject"/>
	      </LearningObject>
	    </partOf>
	  </LearningObject>
	  <LearningObject rdf:ID="anotherLearningObject"/>
	</rdf:RDF>
	]]></OntologyContent>
	      <Pitfalls>10</Pitfalls>
	      <OutputFormat>RDF/XML</OutputFormat>
	</OOPSRequest>

Service Response:


	<rdf:RDF
	    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	    xmlns:oops="http://www.oeg-upm.net/oops#" > 
	  <rdf:Description rdf:about=
	  	"http://www.oeg-upm.net/oops/64abbced-1570-4067-a079-f8f94722a57e">
	    <oops:hasPitfall rdf:resource=
	    "http://www.oeg-upm.net/oops/8ed5e4bb-f95d-4641-bc20-ff226466d535"/>
	    <rdf:type rdf:resource=
	    "http://www.oeg-upm.net/oops#response"/>
	  </rdf:Description>
	  <rdf:Description rdf:about=
	  	"http://www.oeg-upm.net/oops/8ed5e4bb-f95d-4641-bc20-ff226466d535">
	    <oops:hasDescription rdf:datatype=
	    "http://www.w3.org/2001/XMLSchema#string">The ontology lacks 
	    disjoint axioms between classes or between properties that should be defined 
	    as disjoint. For example, we can create the classes “Odd” and “Even” (or the
	    classes “Prime” and “Composite”) without being disjoint; such representation
	     is not correct based on the definition of these     types of numbers.
	     </oops:hasDescription>
	    <oops:hasName rdf:datatype=
	    	"http://www.w3.org/2001/XMLSchema#string">Missing disjointness 
	    [1, 2, 3]</oops:hasName>
	    <oops:hasCode rdf:datatype=
	    	"http://www.w3.org/2001/XMLSchema#string">P10</oops:hasCode>
	    <rdf:type rdf:resource="http://www.oeg-upm.net/oops#pitfall"/>
	  </rdf:Description>
	</rdf:RDF>


How to cite OOPS!


Poveda-Villalón, María, Asunción Gómez-Pérez, and Mari Carmen Suárez-Figueroa. "OOPS!(Ontology Pitfall Scanner!): An on-line tool for ontology evaluation." International Journal on Semantic Web and Information Systems (IJSWIS) 10.2 (2014): 7-34.

BibTex:


@article{poveda2014oops,
title={{OOPS! (OntOlogy Pitfall Scanner!): An On-line Tool for Ontology Evaluation}},
author={Poveda-Villal{\'o}n, Mar{\'i}a and G{\'o}mez-P{\'e}rez, Asunci{\'o}n and Su{\'a}rez-Figueroa, Mari Carmen},
journal={International Journal on Semantic Web and Information Systems (IJSWIS)},
volume={10},
number={2},
pages={7--34},
year={2014},
publisher={IGI Global}
}



OEG logo
ESTIINF logo


Escuela Técnica
Superior de
Ingenieros Informáticos

UPM logo


Universidad
Politécnica
de Madrid