Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Arquisoft/wiq_es05c into…
Browse files Browse the repository at this point in the history
… adrian
  • Loading branch information
AdrianSantamarina committed Mar 12, 2024
2 parents 38d745e + 6e0a01f commit c10198b
Show file tree
Hide file tree
Showing 58 changed files with 21,423 additions and 1,568 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ Both the user and auth service share a Mongo database that is accessed with mong

## Quick start guide

## Team Members
### David Gonzalez

### Using docker

The fastest way for launching this sample project is using docker. Just clone the project:

```sh
git clone https://github.com/Arquisoft/wiq_es05c.git
```
git clone https://github.com/Arquisoft/wiq_es05c.git

and launch it with docker compose:

Expand Down
158 changes: 158 additions & 0 deletions WikidataPrueba/consultas.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
--CONSULTAS GEOGRAFIA --
--Consulta que devuelve pais y capital --

SELECT ?country ?countryLabel ?capitalLabel
WHERE
{
?country wdt:P31 wd:Q3624078. # Instance of country
?country wdt:P36 ?capital. # Has capital
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}


--Consulta que devuelve pais y poblacion --
SELECT ?country ?countryLabel ?population
WHERE
{
?country wdt:P31 wd:Q3624078. # Instance of country
?country wdt:P1082 ?population. # Has population
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

--Consulta que devuelve pais, capital y poblacion --
SELECT ?country ?countryLabel ?capitalLabel ?population
WHERE
{
?country wdt:P31 wd:Q3624078. # Instance of country
?country wdt:P36 ?capital. # Has capital
?country wdt:P1082 ?population. # Has population
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

--Consulta estado de EEUU y su capital --
SELECT ?state ?stateLabel ?capitalLabel
WHERE {
?state wdt:P31 wd:Q35657 .
?state p:P36 ?statement .
?statement ps:P36 ?capital .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}


--Consulta estados de EEUU, capital y poblacion
SELECT ?state ?stateLabel ?capitalLabel ?poblation
WHERE {
?state wdt:P31 wd:Q35657 .
?state wdt:P36 ?capital .
?state wdt:P1082 ?poblation .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".}
}


--CONSULTAS DEPORTES--
--Consulta que devuelve club de futbol y su estadio --

SELECT ?club ?clubLabel ?stadiumLabel
WHERE {
?club wdt:P31 wd:Q17270000 .
?club p:P115 ?statement .
?statement ps:P115 ?stadium .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}


--CONSULTAS ARTE---
--Consulta libro y su autor --
SELECT ?book ?bookLabel ?authorLabel
WHERE {
?book wdt:P31 wd:Q571 .
?book wdt:P50 ?author .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".}
}


--Consulta que devuelve libre y su autor pero solo 4 resultados --

SELECT ?book ?bookLabel ?authorLabel
WHERE {
?book wdt:P31 wd:Q571 .
?book wdt:P50 ?author .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".}
}
LIMIT 4

--Consulta que me da peliculas su genero y año de publicacion del director Steven Spielberg --

SELECT ?film ?filmLabel ?genere ?d WHERE {
{
SELECT ?film (GROUP_CONCAT(DISTINCT ?gL; SEPARATOR = ", ") AS ?genere) (MIN(YEAR(?date)) AS ?d) WHERE {
?sitelink schema:about ?director;
schema:isPartOf <https://en.wikipedia.org/>;
schema:name "Steven Spielberg"@en. # Edit this with different director's name to see their films. Use the English Wikipedia title only.
?film wdt:P31 wd:Q11424;
wdt:P136 ?g, ?g.
?g rdfs:label ?gL.
?film wdt:P57 ?director;
wdt:P577 ?date.
FILTER((LANG(?gL)) = "en")
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
GROUP BY ?film
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

--CONSULTAS ENTRETENIMIENTO--
# Consulta para obtener videojuegos y sus plataformas de desarrollo
SELECT ?videojuego ?nombreVideojuego ?plataforma ?nombrePlataforma
WHERE {
?videojuego wdt:P31 wd:Q7889. # Videojuegos (clase)
?videojuego wdt:P178 ?plataforma. # Relación "desarrollado para"
?videojuego rdfs:label ?nombreVideojuego filter (lang(?nombreVideojuego) = "es").
?plataforma rdfs:label ?nombrePlataforma filter (lang(?nombrePlataforma) = "es").
}
LIMIT 100


# Consulta para obtener el nombre del videojuego y su género
SELECT ?videojuego ?nombreVideojuego ?genero ?nombreGenero
WHERE {
?videojuego wdt:P31 wd:Q7889. # Videojuegos (clase)
?videojuego wdt:P136 ?genero. # Relación "género"
?videojuego rdfs:label ?nombreVideojuego filter (lang(?nombreVideojuego) = "es").
?genero rdfs:label ?nombreGenero filter (lang(?nombreGenero) = "es").
}
LIMIT 100


--CONSULTAS CIENCIA--

--CONSULTAS HISTORIA--


--OTRAS CONSULTAS--


--Consulta que me devuelve por orden descendente y solo 4 resultados las ciudades mas grandes por pais
me devuelve el nombre de la ciudad, pais y poblacion --

SELECT DISTINCT ?city ?cityLabel ?population ?countryLabel WHERE {
{
SELECT (MAX(?population_) AS ?population) ?country WHERE {
?city wdt:P31/wdt:P279* wd:Q515 .
?city wdt:P1082 ?population_ .
?city wdt:P17 ?country .
}
GROUP BY ?country
ORDER BY DESC(?population)
}
?city wdt:P31/wdt:P279* wd:Q515 .
?city wdt:P1082 ?population .
?city wdt:P17 ?country .
?city wdt:P625 ?loc .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
ORDER BY DESC(?population)
LIMIT 4
23 changes: 19 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:

authservice:
container_name: authservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/authservice:latest
image: ghcr.io/arquisoft/wiq_es05c/authservice:latest
profiles: ["dev", "prod"]
build: ./users/authservice
depends_on:
Expand All @@ -27,7 +27,7 @@ services:

userservice:
container_name: userservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/userservice:latest
image: ghcr.io/arquisoft/wiq_es05c/userservice:latest
profiles: ["dev", "prod"]
build: ./users/userservice
depends_on:
Expand All @@ -39,26 +39,41 @@ services:
environment:
MONGODB_URI: mongodb://mongodb:27017/userdb

questionservice:
container_name: questionservice-${teamname:-defaultASW}
profiles: ["dev", "prod"]
build: ./questionsService/
depends_on:
- mongodb
ports:
- "8003:8003"
networks:
- mynetwork
environment:
MONGODB_URI: mongodb://mongodb:27017/questionsdb

gatewayservice:
container_name: gatewayservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/gatewayservice:latest
image: ghcr.io/arquisoft/wiq_es05c/gatewayservice:latest
profiles: ["dev", "prod"]
build: ./gatewayservice
depends_on:
- mongodb
- userservice
- authservice
- questionservice
ports:
- "8000:8000"
networks:
- mynetwork
environment:
AUTH_SERVICE_URL: http://authservice:8002
USER_SERVICE_URL: http://userservice:8001
QUESTION_SERVICE_URL: http://questionservice:8003

webapp:
container_name: webapp-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/webapp:latest
image: ghcr.io/arquisoft/wiq_es05c/webapp:latest
profiles: ["dev", "prod"]
build: ./webapp
depends_on:
Expand Down
Binary file added docs/images/06-loginSecuencia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/06-nextQuestion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/06-registerSecuencia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/07-diagramaDespliegue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/3.BusinessContext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Business Context.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Level2-BusinessLogic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Level2-Databases.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Level2-UserInterface.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/QualityTree.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Sin título.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/level1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/scopeAndContext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// configure EN settings for asciidoc
include::src/config.adoc[]

= image:arc42-logo.png[arc42] Template
= image:arc42-logo.png[arc42] Documentación WIQ-ES05C
:revnumber: 8.2 EN
:revdate: January 2023
:revremark: (based upon AsciiDoc version)
Expand Down
Loading

0 comments on commit c10198b

Please sign in to comment.