OWL:SymmetricProperty not give the desired result - properties

I have similar it's owl:SymmetricProperty
<owl:ObjectProperty rdf:about="#similar">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#SymmetricProperty"/>
<rdfs:domain>
<rdf:Description rdf:about="#Protein"/>
</rdfs:domain>
<rdfs:range>
<rdf:Description rdf:about="#Protein"/>
</rdfs:range>
</owl:ObjectProperty>
I have 2 protein
I put the first protein as similar of the second protein
<similar>
<rdf:Description rdf:about="#protein1"/>
</similar>
When I use SPARQL
PREFIX ns:<http://www.owl-ontologies.com/unnamed.owl#> \n
SELECT ?p1 ?p2 WHERE{
?p1 ns:similar ?p2.};
I only get one result
-----------------------------
| p1 | p2 |
=============================
| ns:protein2 | ns:protein1 |
-----------------------------
But I want the following result
-----------------------------
| p1 | p2 |
=============================
| ns:protein2 | ns:protein1 |
| ns:protein1 | ns:protein2 |
-----------------------------

Related

Power Query / Power BI increment data at each occurrences with specific ranges

I am trying to combine worksheets from two different workbooks with Power Query and I have trouble doing that.
I do not would like to increment the "ID" column from one workbook given the occurrences of values in another.
The ID column has rows with letter tags : AB or BE. Following these letters, specific numeric ranges are associated. For both AB and BE, number ranges first from 0000 to 3000 and from 3000 to 6000 and then 6001 to 8000 and 8001 to 9999.
I thus have the following possibilities:
From AB0000 to AB3000
From AB3001 to AB6000
From AB6001 to AB8000
From AB8001 to AB9999
From BE0000 to BE3000
From BE3001 to AB6000
From BE6001 to BE8000
From BE8001 to AB9999
Each category match to the a specific item in my column geography, from the other workbook:
From AB0000 to AB3000, it is ItalyZ ABC
From AB3001 to AB6000 it is ItalyB BDE
From AB6001 to AB8000 it is ItalyZ ABC
From AB8001 to AB9999 it is ItalyB BDE
From BE0000 to BE3000 it is UKM ABC
From BE3001 to AB6000 it is UKY BDE
From BE6001 to BE8000 it is UKM ABC
From BE8001 to AB9999 it is UKY BDE
I am thus trying to find the highest number associated to the first AB category, the second AB category, the first BE category, and the second.
I then want to "bring" this number in the other query and increment it each time that matching country is found in the other workbook. For example :
AB356 is the highest number in the first workbook.
Once the first "ItalyB" is found, the column besides writes "AB357". Once the second is "ItalyB" is found, the column besides write "AB358".
Lets say that in the first file that I am getting I have the following data:
|---------------------|
| Test |
|---------------------|
| AB0000 |
|---------------------|
| AB0001 |
|---------------------|
| AB3034 |
|---------------------|
| AB3035 |
|---------------------|
| AB6005 |
|---------------------|
| AB6006 |
|---------------------|
| AB8011 |
|---------------------|
| AB8012 |
|---------------------|
| BE0000 |
|---------------------|
| BE0001 |
|---------------------|
| BE3091 |
|---------------------|
| BE3092 |
|---------------------|
| BE6001 |
|---------------------|
| BE6002 |
|---------------------|
| BE6003 |
|---------------------|
| BE8104 |
|---------------------|
| BE8105 |
|---------------------|
And a second file as follows:
|---------------------|
| ItalyZ ABC |
|---------------------|
| ItalyZ ABC |
|---------------------|
| ItalyB BDE |
|---------------------|
| ItalyZ ABC |
|---------------------|
| ItalyB BDE |
|---------------------|
| UKM ABC |
|---------------------|
| UKY BDE |
|---------------------|
| UKM ABC |
|---------------------|
| UKY BDE |
|---------------------|
| UKY BDE |
|---------------------|
| UKY BDE |
|---------------------|
| UKY BDE |
|---------------------|
Then my result would be as follows:
|---------------------|
| Test |
|---------------------|
| AB0002 |
|---------------------|
| AB0003 |
|---------------------|
| AB3036 |
|---------------------|
| AB6007 |
|---------------------|
| AB8013 |
|---------------------|
| BE0002 |
|---------------------|
| BE3091 |
|---------------------|
| BE3093 |
|---------------------|
| BE6004 |
|---------------------|
| BE8105 |
|---------------------|
| BE8106 |
|---------------------|
| BE8107 |
|---------------------|
| BE8108 |
|---------------------|
I have tried to adapt a query which was more limited in its scope, by adding the category, I thus have a query as follows:
let
Source = #table({"Prefix", "Seq_Start", "Seq_End","Zone"},
{{"AB",0,2999,"UKM BDE"}, {"AB",3000,4999,"UKM ABC"}, {"AB",5000,7999,"UKY BDE"}, {"AB",8000,9999,"UKY ABC"},{"BE",0,2999,"ITALYZ BDE"},{"BE",3000,4999,"ITALYZ ABC"}, {"BE",5000,7999,"ITALYB BDE"}, {"BE",8000,9999,"ITALYB ABC"}}),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Seq_Start", Int64.Type}, {"Seq_End", Int64.Type}}),
#"Merged Queries" = Table.NestedJoin(#"Changed Type", {"Prefix"}, #"Source data with occurence", {"Unique key Prefix"}, "Source data with occurence", JoinKind.LeftOuter),
#"Expanded Source data with occurence " = Table.ExpandTableColumn(#"Merged Queries", "Source data with occurence", {"Number"}, {"Number"}),
#"Filtered Rows" = Table.SelectRows(#"Expanded Source data with occurence ", each [Number] >= [Seq_Start] and [Number] <= [Seq_End]),
#"Grouped Rows" = Table.Group(#"Filtered Rows", {"Prefix", "Seq_Start", "Seq_End", "Zone"}, {{"NextSeq", each List.Max([Number]) + 1, type number}})
in
#"Grouped Rows"
your query says "Table.Group"
Did you try to COMBINE those two tables? i prefer "Combine and create new one".
Table-1 and Table-2' s headers were different, First i equalized them. Showed in the in the picture. then combined and created new table. Here is code section;
let
Kaynak = Table.Combine({#"Puantaj CkrEng", #"Puantaj Genel"}),
#"Filtrelenen Satırlar" = Table.SelectRows(Kaynak, each ([Firma] <> null)),
#"Yeniden Sıralanan Sütunlar" = Table.ReorderColumns(#"Filtrelenen Satırlar",{"Firma", "Resource ID", "Görev", "Tarih", "Yevmiye", "HaftaBasi"})
in
#"Yeniden Sıralanan Sütunlar"

Get all Wikidata items that have more than 10 languages?

I'm trying to get the most famous movies in the world from Wikidata with SPARQL.
I have the following query:
SELECT ?item WHERE {
?item wdt:P31 wd:Q11424.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
which returns ALL movies (about 214143).
I basically only need movies that have, let's say, more than 10 language entries on wikipedia, as I'm guessing these will be the most famous ones.
Is there a way to do this inside the query itself, without checking all entries ?
A naive answer to your question is:
SELECT ?movie (count(?wikipage) AS ?count) WHERE {
hint:Query hint:optimizer "None" .
?movie wdt:P31 wd:Q11424 .
?wikipage schema:about ?movie .
?wikipage schema:isPartOf/wikibase:wikiGroup "wikipedia"
} GROUP BY ?movie HAVING (?count > 10) ORDER BY DESC(?count)
Try it!
Alternatively, you could consider total number of sitelinks. Sitelinks include links to Wikipedia and also links to Wikiquote, Wikivoyage etc. The advantage is that total number of sitelinks is precomputed.
SELECT ?movie ?sitelinks WHERE {
?movie wdt:P31 wd:Q11424 .
?movie wikibase:sitelinks ?sitelinks .
FILTER (?sitelinks > 10)
} ORDER BY DESC(?sitelinks)
Try it!
See also these questions:
Get Wikipedia URLs (sitelinks) in Wikidata SPARQL query
Wikidata results sorted by something similar to a PageRank
As #TallTed and #AKSW have pointed out, the number of labels in different languages may be differ from the number of Wikipedia articles in different languages. Here below a comparison.
Top 5 movies by Wikipedia articles
| title | articles | sitelinks | labels |
|---------------------|----------|-----------|--------|
| Avatar | 92 | 103 | 99 |
| Titanic | 86 | 100 | 101 |
| The Godfather | 79 | 103 | 82 |
| Slumdog Millionaire | 72 | 75 | 80 |
| Forrest Gump | 71 | 101 | 84 |
Top 5 movies by sitelinks
| title | articles | sitelinks | labels |
|---------------|----------|-----------|--------|
| Avatar | 92 | 103 | 99 |
| The Godfather | 79 | 103 | 82 |
| Forrest Gump | 71 | 101 | 84 |
| Titanic | 86 | 100 | 101 |
| The Matrix | 67 | 94 | 77 |
Top 5 movies by labels
| title | articles | sitelinks | labels |
|------------------------------|----------|-----------|--------|
| The 25th Reich | 2 | 2 | 227 |
| Time Is But Brief | 0 | 0 | 224 |
| Michael Moore in TrumpLand | 6 | 6 | 222 |
| Magnus - The Mozart of Chess | 1 | 1 | 221 |
| Lee Chong Wei | 1 | 1 | 196 |

Get all Countries Name from DBpedia using SPARQL

I want list of countries name from DBpedia.
I am using http://dbpedia.org/snorql/ to execute my query, but till now I have not found all countries name which are available in DBpedia.
For Example : dbr:United_Kingdom, dbr:India, dbr:United_States, etc.
Is the problem
You don't know how to write SPARQL in general? (That's OK, it's hard to get started.)
You don' know about the classes and predicates in DBpedia? (That's OK too. I have to check each time.)
Something else?
This gets all UN member nations. Getting "all countries" is probably just a matter of finding the right class in their ontology.
select distinct ?s
where { ?s a <http://dbpedia.org/class/yago/WikicatMemberStatesOfTheUnitedNations> }
I happen to know that New York City is the largest city in the United States, and that DBpedia has a largestCity predicate and a New_York_City instance. So I wrote a query that should only get the United States as the subject, and then asked for all connected predicates and objects. You should look in that for an object that meets your exceptions for defining "all countries." If you don't find one, you may have to union a few other triple patterns into one query.
I have also filtered out objects that contain either of two terms that be relevant for you: "country" or "nation"
select distinct *
where { ?s a <http://dbpedia.org/class/yago/WikicatMemberStatesOfTheUnitedNations> ;
dbo:largestCity dbr:New_York_City ;
?p ?o
filter(isURI(?o))
filter((regex(lcase(str(?o)), "country")) || (regex(lcase(str(?o)), "nation")))
}
Gives the foloowing, which should help you write a followup question that isn't specific to the United States.
+--------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------+
| s | p | o |
+--------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------+
| http://dbpedia.org/resource/United_States | http://dbpedia.org/ontology/wikiPageExternalLink | http://www.ifs.du.edu/ifs/frm_CountryProfile.aspx?Country=US |
| http://dbpedia.org/resource/United_States | http://dbpedia.org/ontology/wikiPageExternalLink | http://nationalatlas.gov/ |
| http://dbpedia.org/resource/United_States | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/class/yago/Country108544813 |
| http://dbpedia.org/resource/United_States | http://purl.org/dc/terms/subject | http://dbpedia.org/resource/Category:G7_nations |
| http://dbpedia.org/resource/United_States | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://schema.org/Country |
| http://dbpedia.org/resource/United_States | http://www.w3.org/2000/01/rdf-schema#seeAlso | http://dbpedia.org/resource/Anti-miscegenation_laws |
| http://dbpedia.org/resource/United_States | http://purl.org/dc/terms/subject | http://dbpedia.org/resource/Category:Member_states_of_the_United_Nations |
| http://dbpedia.org/resource/United_States | http://www.w3.org/2002/07/owl#sameAs | http://transparency.270a.info/classification/country/US |
| http://dbpedia.org/resource/United_States | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/ontology/Country |
| http://dbpedia.org/resource/United_States | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://dbpedia.org/class/yago/WikicatMemberStatesOfTheUnitedNations |
| http://dbpedia.org/resource/United_States | http://purl.org/dc/terms/subject | http://dbpedia.org/resource/Category:G8_nations |
| http://dbpedia.org/resource/United_States | http://www.w3.org/2002/07/owl#sameAs | http://linked-web-apis.fit.cvut.cz/resource/united_states_of_america_country |
| http://dbpedia.org/resource/United_States | http://dbpedia.org/ontology/wikiPageExternalLink | http://www.nationalcenter.org/HistoricalDocuments.html |
| http://dbpedia.org/resource/United_States | http://dbpedia.org/ontology/wikiPageExternalLink | http://news.bbc.co.uk/2/hi/americas/country_profiles/1217752.stm |
| http://dbpedia.org/resource/United_States | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://umbel.org/umbel/rc/Country |
| http://dbpedia.org/resource/United_States | http://purl.org/dc/terms/subject | http://dbpedia.org/resource/Category:G20_nations |
+--------------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------+

JSFG grammar not parsing

I can't see where im breaking my jsfg grammar (for Sphinx4).
Or is there any debugging tool for parsing?
This compiles:
#JSGF V1.0;
grammar dialog;
<digit> = oh |
zero |
one |
two |
three |
four |
five |
six |
seven |
eight |
nine ;
<number> = <digit>+ [point <digit>+];
<menu_command> = digits |
[go to [the]] bank account |
weather forecast |
[play] music |
v |
hud |
exit [[the] program] ;
<bank_command> = [show | check] balance |
deposit <number> |
withdraw <number> |
back ;
<artist_command> = elvis |
moby |
[the] beatles |
sia |
random;
<song_command> = [a little less] converstion |
moby |
[the] beatles |
sia ;
<music_command> = [play] music;
public <command> = <menu_command> | <bank_command>;
But this doesnt:
#JSGF V1.0;
grammar dialog;
<digit> = oh |
zero |
one |
two |
three |
four |
five |
six |
seven |
eight |
nine ;
<number> = <digit>+ [point <digit>+];
<hud_command> = voicehud | hud
<menu_command> = digits |
[go to [the]] bank account |
weather forecast |
v |
hud |
exit [[the] program] |
hide ;
<bank_command> = [show | check] balance |
deposit <number> |
withdraw <number> |
back ;
<artist_command> = elvis |
moby |
[the] beatles |
sia |
random;
<song_command> = burning love |
moby |
[the] beatles |
sia ;
<album_command> = [one thousand] forms of fear |
play |
[the] white album |
burning love ;
<musicapp_command> = play | music;
<music_selector_command> = artist | song | album | random | mix;
<music_selection_command> = <artist_command> | <song_command> | <album_command>;
<music_command> = <musicapp_command><music_selector_command><music_selection_command>;
public <command> = <menu_command> | <bank_command> | <music_command>;

SPARQL Get all the properties from a Class or an Individual

What I want to do is to get the property list from the Individual1 or from a class,
Get all properties from "something"
The result should be something like this (for Secret_Data):
| Asset_has_Confidentiality_Importance | High |
| Asset_has_Availability_Importance....| Moderate |
| Asset_has_Integrity_Importance.......| Moderate |
| Asset_threatenedBy_ThreatEvent.......| Compromise_sensitive_information |
| Asset_threatenedBy_ThreatEvent.......| Disclosure_of_sensitive_information |
| Asset_threatenedBy_ThreatEvent.......| Exploit_exposed_unauthorized_information |
| Asset_threatenedBy_ThreatEvent.......| Integrity_loss_by_corrupting_critital_data |
<owl:NamedIndividual rdf:about="&securityOntology_ITESM_UC3M;Secret_Data">
<rdf:type rdf:resource="&securityOntology_ITESM_UC3M;Data"/>
<Asset_has_Confidentiality_Importance rdf:datatype="&xsd;string">High</Asset_has_Confidentiality_Importance>
<Asset_has_Availability_Importance rdf:datatype="&xsd;string">Moderate</Asset_has_Availability_Importance>
<Asset_has_Integrity_Importance rdf:datatype="&xsd;string">Moderate</Asset_has_Integrity_Importance>
<Asset_threatenedBy_ThreatEvent rdf:resource="&securityOntology_ITESM_UC3M;Compromise_sensitive_information"/>
<Asset_threatenedBy_ThreatEvent rdf:resource="&securityOntology_ITESM_UC3M;Disclosure_of_sensitive_information"/>
<Asset_threatenedBy_ThreatEvent rdf:resource="&securityOntology_ITESM_UC3M;Exploit_exposed_unauthorized_information"/>
<Asset_threatenedBy_ThreatEvent rdf:resource="&securityOntology_ITESM_UC3M;Integrity_loss_by_corrupting_critital_data"/>
<Asset_threatenedBy_ThreatEvent rdf:resource="&securityOntology_ITESM_UC3M;Obtain_unauthorized_access"/>
</owl:NamedIndividual>
I think the query is something like this, (But the value is not well formatted, and some properties are not importart like "type property"):
PREFIX css:<http://www.semanticweb.org/evalues/ontologies/2014/3/securityOntology_ITESM_UC3M#>
SELECT DISTINCT ?property ?value
WHERE {
css:Secret_Data ?property ?value.
}
Answer to updated question (a query about individuals)
It's much easier to answer question with complete sample data. If we bundle up the data that you've given with appropriate namespace declarations, we end up with something like this:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns="http://stackoverflow.com/q/23223447/1281433/">
<owl:NamedIndividual rdf:about="http://stackoverflow.com/q/23223447/1281433/Secret_Data">
<Asset_has_Availability_Importance rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Moderate</Asset_has_Availability_Importance>
<rdf:type rdf:resource="http://stackoverflow.com/q/23223447/1281433/Data"/>
<Asset_threatenedBy_ThreatEvent rdf:resource="http://stackoverflow.com/q/23223447/1281433/Integrity_loss_by_corrupting_critital_data"/>
<Asset_has_Integrity_Importance rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Moderate</Asset_has_Integrity_Importance>
<Asset_threatenedBy_ThreatEvent rdf:resource="http://stackoverflow.com/q/23223447/1281433/Obtain_unauthorized_access"/>
<Asset_threatenedBy_ThreatEvent rdf:resource="http://stackoverflow.com/q/23223447/1281433/Disclosure_of_sensitive_information"/>
<Asset_threatenedBy_ThreatEvent rdf:resource="http://stackoverflow.com/q/23223447/1281433/Compromise_sensitive_information"/>
<Asset_has_Confidentiality_Importance rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>High</Asset_has_Confidentiality_Importance>
<Asset_threatenedBy_ThreatEvent rdf:resource="http://stackoverflow.com/q/23223447/1281433/Exploit_exposed_unauthorized_information"/>
</owl:NamedIndividual>
</rdf:RDF>
It's often helpful to view this in Turtle serialization, since it will look more like the query. The data is the same though, and the query will run against the data in either serialization, of course.
#prefix : <http://stackoverflow.com/q/23223447/1281433/> .
#prefix owl: <http://www.w3.org/2002/07/owl#> .
#prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
:Secret_Data a owl:NamedIndividual , :Data ;
:Asset_has_Availability_Importance
"Moderate"^^<http://www.w3.org/2001/XMLSchema#string> ;
:Asset_has_Confidentiality_Importance
"High"^^<http://www.w3.org/2001/XMLSchema#string> ;
:Asset_has_Integrity_Importance
"Moderate"^^<http://www.w3.org/2001/XMLSchema#string> ;
:Asset_threatenedBy_ThreatEvent
:Integrity_loss_by_corrupting_critital_data , :Obtain_unauthorized_access , :Disclosure_of_sensitive_information , :Compromise_sensitive_information , :Exploit_exposed_unauthorized_information .
You can use a query like the following:
prefix : <http://stackoverflow.com/q/23223447/1281433/>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
select distinct ?property ?value where {
:Secret_Data ?property ?value .
}
---------------------------------------------------------------------------------------
| property | value |
=======================================================================================
| rdf:type | owl:NamedIndividual |
| :Asset_has_Availability_Importance | "Moderate"^^xsd:string |
| rdf:type | :Data |
| :Asset_threatenedBy_ThreatEvent | :Integrity_loss_by_corrupting_critital_data |
| :Asset_has_Integrity_Importance | "Moderate"^^xsd:string |
| :Asset_threatenedBy_ThreatEvent | :Obtain_unauthorized_access |
| :Asset_threatenedBy_ThreatEvent | :Disclosure_of_sensitive_information |
| :Asset_threatenedBy_ThreatEvent | :Compromise_sensitive_information |
| :Asset_has_Confidentiality_Importance | "High"^^xsd:string |
| :Asset_threatenedBy_ThreatEvent | :Exploit_exposed_unauthorized_information |
---------------------------------------------------------------------------------------
If you don't want rdf:type in there, you could use filter ?property != rdf:type, or if there are multiple properties that you want to exclude, filter ( ?property NOT IN ( rdf:type … ) ):
prefix : <http://stackoverflow.com/q/23223447/1281433/>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
select distinct ?property ?value where {
:Secret_Data ?property ?value .
filter ( ?property not in ( rdf:type ) )
}
---------------------------------------------------------------------------------------
| property | value |
=======================================================================================
| :Asset_has_Availability_Importance | "Moderate"^^xsd:string |
| :Asset_threatenedBy_ThreatEvent | :Integrity_loss_by_corrupting_critital_data |
| :Asset_has_Integrity_Importance | "Moderate"^^xsd:string |
| :Asset_threatenedBy_ThreatEvent | :Obtain_unauthorized_access |
| :Asset_threatenedBy_ThreatEvent | :Disclosure_of_sensitive_information |
| :Asset_threatenedBy_ThreatEvent | :Compromise_sensitive_information |
| :Asset_has_Confidentiality_Importance | "High"^^xsd:string |
| :Asset_threatenedBy_ThreatEvent | :Exploit_exposed_unauthorized_information |
---------------------------------------------------------------------------------------
Answer to the original question (a query about classes)
In the original version of the question, you gave this image of your ontology and asked for results that are after it:
| numberChapters | 1 |
| numberPages | 5 |
In the RDF/XML serialization of that ontology (since removed from the question), the description of the Psicology class was as follows:
<owl:Class rdf:about="http://webprotege.stanford.edu/RiMIUJzVuVHCr4Ke4TkFwX">
<rdfs:label>Psicology</rdfs:label>
<rdfs:subClassOf rdf:resource="http://webprotege.stanford.edu/RDHbMG5sh4tyJ6ZoHwxLBHk"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="http://webprotege.stanford.edu/R9DdxIZDrtXApiHoBJ6NmAy"/>
<owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">5</owl:hasValue>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="http://webprotege.stanford.edu/R8WDOefPWzIoTChbjV31ela"/>
<owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:hasValue>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
or in the more human-readable Turtle notation:
<http://webprotege.stanford.edu/RiMIUJzVuVHCr4Ke4TkFwX>
a owl:Class ;
rdfs:label "Psicology" ;
rdfs:subClassOf <http://webprotege.stanford.edu/RDHbMG5sh4tyJ6ZoHwxLBHk> ;
rdfs:subClassOf [ a owl:Restriction ;
owl:hasValue 5 ;
owl:onProperty <http://webprotege.stanford.edu/R9DdxIZDrtXApiHoBJ6NmAy>
] ;
rdfs:subClassOf [ a owl:Restriction ;
owl:hasValue 1 ;
owl:onProperty <http://webprotege.stanford.edu/R8WDOefPWzIoTChbjV31ela>
says that Psicology (which is usually spelled Psychology in English, by the way) is a subclass of the class of things that have the value 5 for the property numPages and the things that have the value 1 for the property numChapters. Psicology is also a subclass of Libray. (Is this supposed to be Library?)
These seem like strange axioms to me, and I wonder if there might be some sort of modeling error going on. I'm not sure what a Psicology is, but you're saying that for any Psicology p, it's the case that numPages(p,5) and numChapters(p,1). Is that really what you want to do?
At any rate, given your data, we can retrieve the results that you want. Looking at the Turtle serialization is useful, because it's very similar to the SPARQL query syntax. The query you want is:
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix : <http://webprotege.stanford.edu/project/Bnag2Z5E4j78tB27NnLq1L#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select ?property ?value where {
?class rdfs:label "Psicology" ;
rdfs:subClassOf [ owl:hasValue ?value ;
owl:onProperty [ rdfs:label ?property ] ] .
}
-------------------------
| property | value |
=========================
| "numChapters" | 1 |
| "numPages" | 5 |
-------------------------