query-595f886125157a37e52b87519b88db92

rq turtle/ttl

Marinha ultimo

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT  distinct ?item  ?itemLabel ?instLabel ?powered ?serv ?foto # ?instLabel ?lenght # ?draft ?beam  ?serv  ?refurl  ?evento  ?eventoLabel 
# ?operatorLabel ?propriLabel ?itemDescription
# ?foto # ?instLabel ?itemDescription   # ?foto  # ?itemAltLabel # ?servret  ?pennant ?differ ?instLabel
# ?operatorLabel ?topic ?classLabel   ?foto    # ?mass ?serv 
# ?countryLabel  ?manufLabel ?manuf  ?incep  ?catshipname ?imo  ?manuf  
# ?vesselLabel  ?namedLabel ?subclaLabel ?vesselLabel 
# ?itemDescription ?itemAltLabel
WHERE 
{

            { ?item wdt:P31 ?inst .                 }    #  instance  -  tipo de navio
            { ?item wdt:P31/wdt:P279* wd:Q1229765 . }    #  instancia -  watercraft e subclasses
   UNION    { ?item wdt:P31/wdt:P279* wd:Q559026 .  }    #  instancia -  ship class

          { ?item wdt:P137 ?navy .             }    # operator ?navi
          { ?item wdt:P137 wd:Q588089 .        }    # operator portuguese navy   

 #ver daqui
 #      { ?item wdt:P495/wdt:P361* wd:Q200464 .  }  #  pais origem - imperio portugues
 #      { ?item wdt:P495/wdt:P361* wd:Q148 .  }  #  pais origem - imperio portugues  
 # ate aqui 

  # { ?item wdt:P31 wd:Q5258439 .           }  # inst - galeota real
  # { ?item wdt:P516   wd:Q25999 .          }  # powered by sail
  # { ?item wdt:P31/wdt:P279*  wd:Q559026 . } 
  # FILTER NOT EXISTS  { ?item wdt:P373   ?comcat .            }  # comons cat
  # FILTER NOT EXISTS  { ?item wdt:P186   ?made .              }  # made from material 
  # FILTER NOT EXISTS  { ?item wdt:P31/wdt:P279*  wd:Q559026 . } 
  # FILTER NOT EXISTS  { ?item   wdt:P176   ?manuf  .          }  #numero vessel class

# filter not exists { ?item wdt:P31 wd:Q12859788 . }
#  { ?item wdt:P31 wd:Q214196. }  #canhoneira


#caracte ----------------------------------------------------------------------
  OPTIONAL          {    ?item wdt:P516   ?powered .     }    # 1 powered by - motores
  optional          {    ?item wdt:P2067  ?mass .        }    # 2 mass
  OPTIONAL          {    ?item wdt:P2043  ?lenght .      }    # 31 length  comprimento
  OPTIONAL          {    ?item wdt:P2261  ?beam .        }    # 32 beam boca
  OPTIONAL          {    ?item wdt:P2262  ?draft .       }    # 33 draft  calado
  OPTIONAL          {    ?item wdt:P4511  ?pontal .      }    # 34 vertical depth - (ver PetScan) pontal (P2048)
  Optional          {    ?item wdt:P1083  ?guarn .       }    # 4 capacidade maxima - guarniçao
  Optional          {    ?item wdt:P520   ?armament .    }    # 5 armamento (ver PetScan) Q1330003 torpedo tube
  OPTIONAL          {    ?item wdt:P2052  ?speed .       }    # 6 speed
#fim caracte ----------------------------------------------------------------------

 OPTIONAL {    ?item wdt:P7782  ?catshipname . }    # operator portuguese navy
 OPTIONAL {    ?item wdt:P289   ?class  .      }    # numero vessel class 
 OPTIONAL {    ?item wdt:P607   ?conflit  .    }    # numero conflit war 
 OPTIONAL {    ?item wdt:P373   ?commonscat .  }    # operator portuguese navy
 OPTIONAL {    ?item wdt:P495   ?country  .    }    # numero vessel clas 
 OPTIONAL {    ?item wdt:P1071  ?criado  .     }    # criado em
 OPTIONAL {    ?item wdt:P1889  ?differ  .     }    # different
 OPTIONAL {    ?item wdt:P793   ?evento  .     }    # evento
 OPTIONAL {    ?item wdt:P18    ?foto  .       }    # foto
 OPTIONAL {    ?item wdt:P458   ?imo .         }    # operator portuguese navy
 OPTIONAL {    ?item wdt:P571   ?incep  .      }    # numero vessel class 
 OPTIONAL {    ?item wdt:P1071  ?local  .      }    # location of cration
 OPTIONAL {    ?item wdt:P176   ?manuf  .      }    # numero vessel class
 OPTIONAL {    ?item wdt:P138   ?named  .      }    # numero vessel class 
 OPTIONAL {    ?item wdt:P137   ?operator  .   }    # numero amura 
 OPTIONAL {    ?item wdt:P495   ?paisori  .    }    # pais de origem
 OPTIONAL {    ?item wdt:P879   ?pennant  .    }    # numero amura 
 OPTIONAL {    ?item wdt:P127   ?propri .      }    # proprietario owned b
 OPTIONAL {    ?item wdt:P973   ?refurl .      }    # proprietario referencia URL
 OPTIONAL {    ?item wdt:P729   ?serv .        }    # operator portuguese navy
 OPTIONAL {    ?item wdt:P730   ?servret .     }    # operator portuguese navy
 OPTIONAL {    ?item wdt:P1813  ?short  .      }    # short
 OPTIONAL {    ?item wdt:P279   ?subcla .      }    # numero subcal 
 OPTIONAL {    ?item wdt:P910   ?topic .       }    # topico

#  OPTIONAL {?comm schema:about ?item ; schema:isPartOf <https://commons.wikimedia.org/> .}

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language,
  #defaultView:Map if not, then en language

#  ?article2 schema:about ?item . 
#  ?article2 schema:isPartOf <https://commons.wikimedia.org/> . #Commons

#FILTER(NOT EXISTS {
#    ?item schema:description ?itemdesc.
#    FILTER(LANG(?itemdesc) = "pt")
#  })

#  ?article1 schema:about ?item . 
#  ?article1 schema:isPartOf <https://pt.wikipedia.org/> .   #WP.en
}

#Limit 50
# order by ?serverv

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v11("?armament") v7("?beam") v13("?catshipname") v14("?class") v16("?commonscat") v15("?conflit") v17("?country") v18("?criado") v19("?differ") v8("?draft") v20("?evento") v21("?foto"):::projected v10("?guarn") v22("?imo") v23("?incep") v2("?inst") v1("?item"):::projected v6("?lenght") v24("?local") v25("?manuf") v5("?mass") v26("?named") v3("?navy") v27("?operator") v28("?paisori") v29("?pennant") v9("?pontal") v4("?powered"):::projected v30("?propri") v31("?refurl") v32("?serv"):::projected v33("?servret") v34("?short") v12("?speed") v35("?subcla") v36("?topic") a1((" ")) a2((" ")) c4(["wd:Q559026"]):::iri c37(["bd:serviceParam"]):::iri c6(["wd:Q588089"]):::iri c3(["wd:Q1229765"]):::iri c39(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P31"--> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 end union0r <== or ==> union0l end v1 --"wdt:P137"--> v3 v1 --"wdt:P137"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P516".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P2067".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P2043".-> v6 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P2261".-> v7 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P2262".-> v8 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P4511".-> v9 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1083".-> v10 end subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P520".-> v11 end subgraph optional8["(optional)"] style optional8 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P2052".-> v12 end subgraph optional9["(optional)"] style optional9 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P7782".-> v13 end subgraph optional10["(optional)"] style optional10 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P289".-> v14 end subgraph optional11["(optional)"] style optional11 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P607".-> v15 end subgraph optional12["(optional)"] style optional12 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P373".-> v16 end subgraph optional13["(optional)"] style optional13 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P495".-> v17 end subgraph optional14["(optional)"] style optional14 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1071".-> v18 end subgraph optional15["(optional)"] style optional15 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1889".-> v19 end subgraph optional16["(optional)"] style optional16 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P793".-> v20 end subgraph optional17["(optional)"] style optional17 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P18".-> v21 end subgraph optional18["(optional)"] style optional18 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P458".-> v22 end subgraph optional19["(optional)"] style optional19 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P571".-> v23 end subgraph optional20["(optional)"] style optional20 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1071".-> v24 end subgraph optional21["(optional)"] style optional21 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P176".-> v25 end subgraph optional22["(optional)"] style optional22 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P138".-> v26 end subgraph optional23["(optional)"] style optional23 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P137".-> v27 end subgraph optional24["(optional)"] style optional24 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P495".-> v28 end subgraph optional25["(optional)"] style optional25 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P879".-> v29 end subgraph optional26["(optional)"] style optional26 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P127".-> v30 end subgraph optional27["(optional)"] style optional27 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P973".-> v31 end subgraph optional28["(optional)"] style optional28 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P729".-> v32 end subgraph optional29["(optional)"] style optional29 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P730".-> v33 end subgraph optional30["(optional)"] style optional30 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1813".-> v34 end subgraph optional31["(optional)"] style optional31 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P279".-> v35 end subgraph optional32["(optional)"] style optional32 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P910".-> v36 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c37 --"wikibase:language"--> c39 end