diff --git a/.gitignore b/.gitignore index ba3536049..5185d70e4 100644 --- a/.gitignore +++ b/.gitignore @@ -8,10 +8,7 @@ bin ### STS ### .apt_generated -.classpath .factorypath -.project -.settings .springBeans .sts4-cache @@ -38,3 +35,6 @@ build/ ## Java .class files ## *.class + +## Node ## +node_modules \ No newline at end of file diff --git a/README.md b/README.md index 83c836402..ed6b2718d 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,24 @@ Ambiente de aprendizagem sobre o tema componentes de software. +# Navegando pelo Ambiente + +* [Navegando](navigate/) + Todos os exemplos no diretório `notebook` são preparados para o ambiente Jupyter. # Acionando os Notebooks via Binder * Última versão testada e estável: - [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/santanche/component2learn/v1.1.5) + [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/santanche/component2learn/v1.1.6) * Última versão disponível: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/santanche/component2learn/master) +# Componentes em Web e Java + +* [Frameworks de Web Components](web/frameworks/) +* [Componentes em Java com Eclipse](java/) + # Disciplina de Componentização e Reúso de Software * [Especificação de Laboratórios](labs/) diff --git a/componentverse/componentverse-lightning.ipynb b/componentverse/componentverse-lightning.ipynb deleted file mode 100644 index 8d21180a6..000000000 --- a/componentverse/componentverse-lightning.ipynb +++ /dev/null @@ -1,131 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# ComponentVerse\n", - "\n", - "# Salesforce Lightning\n", - "\n", - "Entre no catálogo de componentes Lightning do Salesforce: [Catálogo](https://developer.salesforce.com/docs/component-library/overview/components)\n", - "\n", - "Na categoria `COMPONENTS/Lightning` à esquerda selecione o componente `slider`.\n", - "\n", - "Na aba `basic.html` configure o componente para criar um slider que faça o registro de uma temperatura usando o seguinte código HTML:\n", - "\n", - "~~~HTML\n", - "\n", - "~~~\n", - "\n", - "O código fica contido dentro do elemento ``.\n", - "\n", - "Nesse código, o elemento `` instancia um componente `lightning-slider`.\n", - "\n", - "Em seguida são definidos os valores para propriedades do componente:\n", - "* `label` - rótulo do slider\n", - "* `min` - valor mínimo\n", - "* `max` - valor máximo\n", - "* `value` - valor padrão inicial\n", - "\n", - "Clique no botão `Run` para executar o código.\n", - "\n", - "## Tarefa\n", - "\n", - "Adapte o slider para registrar a idade de uma pessoa e cole o código na célula abaixo:" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Agregando Componentes\n", - "\n", - "Componentes podem ser agregados colocando-se elementos dentro de elementos. Encontre o componente `tabset` e configure com o seguinte código:\n", - "\n", - "~~~html\n", - "\n", - "~~~\n", - "\n", - "## Tarefa\n", - "\n", - "Configure estas abas para um outro tipo de aplicação que você proponha e cole o código na célula abaixo:" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Tarefa\n", - "\n", - "Seguindo a mesma lógica da tarefa anterior, configure o componente do tipo `input` para que receba uma entrada de uma cor, usando a cor inicial padrão vermelha. Cole o código na célula abaixo:" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Tarefa\n", - "\n", - "Escolha um componente lightning (diferente dos exemplos anteriores) e o configure. Descreva abaixo o propósito do seu componente configurado. Coloque na célula a seguir a descrição e o código:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.7.3" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s01start/App01ChartSequence.java b/eclipse/src/pt/c08componentes/s01chartseq/s01start/App01ChartSequence.java deleted file mode 100644 index 903d6e55e..000000000 --- a/eclipse/src/pt/c08componentes/s01chartseq/s01start/App01ChartSequence.java +++ /dev/null @@ -1,22 +0,0 @@ -package pt.c08componentes.s01chartseq.s01start; - -import pt.c08componentes.s01chartseq.s01start.chart.BarChart; -import pt.c08componentes.s01chartseq.s01start.chart.IBarChart; -import pt.c08componentes.s01chartseq.s01start.sequence.GeometricProgression; -import pt.c08componentes.s01chartseq.s01start.sequence.IGeometricProgression; - -public class App01ChartSequence { - public static void main(String args[]) { - IGeometricProgression gp = new GeometricProgression(); - gp.setInitial(1); - gp.setRatio(2); - - IBarChart bc = new BarChart(); - bc.setFilled(true); - bc.setCharacter('#'); - bc.setN(5); - - bc.connect(gp); - bc.plot(); - } -} diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/IChart.java b/eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/IChart.java deleted file mode 100644 index a8faba075..000000000 --- a/eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/IChart.java +++ /dev/null @@ -1,5 +0,0 @@ -package pt.c08componentes.s01chartseq.s01start.chart; - -public interface IChart { - public void plot(); -} diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/IRSequence.java b/eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/IRSequence.java deleted file mode 100644 index e52a8ebac..000000000 --- a/eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/IRSequence.java +++ /dev/null @@ -1,7 +0,0 @@ -package pt.c08componentes.s01chartseq.s01start.chart; - -import pt.c08componentes.s01chartseq.s01start.sequence.ISequence; - -public interface IRSequence { - public void connect(ISequence sequence); -} diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/IChart.java b/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/IChart.java deleted file mode 100644 index f6be0ea27..000000000 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/IChart.java +++ /dev/null @@ -1,5 +0,0 @@ -package pt.c08componentes.s01chartseq.s02sequences.chart; - -public interface IChart { - public void plot(); -} diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/IRSequence.java b/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/IRSequence.java deleted file mode 100644 index 94a5b2d5c..000000000 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/IRSequence.java +++ /dev/null @@ -1,7 +0,0 @@ -package pt.c08componentes.s01chartseq.s02sequences.chart; - -import pt.c08componentes.s01chartseq.s02sequences.sequence.ISequence; - -public interface IRSequence { - public void connect(ISequence sequence); -} diff --git a/eclipse/.classpath b/java/.classpath similarity index 100% rename from eclipse/.classpath rename to java/.classpath diff --git a/eclipse/.project b/java/.project similarity index 55% rename from eclipse/.project rename to java/.project index 3271b4a60..96969620f 100644 --- a/eclipse/.project +++ b/java/.project @@ -14,4 +14,15 @@ org.eclipse.jdt.core.javanature + + + 1677079743467 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/eclipse/.settings/org.eclipse.jdt.core.prefs b/java/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from eclipse/.settings/org.eclipse.jdt.core.prefs rename to java/.settings/org.eclipse.jdt.core.prefs diff --git a/eclipse/lib/xchart-3.5.2.jar b/java/lib/xchart-3.5.2.jar similarity index 100% rename from eclipse/lib/xchart-3.5.2.jar rename to java/lib/xchart-3.5.2.jar diff --git a/eclipse/src/pt/c06patterns/factory/s01aquatic/AppAquaticConsole1.java b/java/src/pt/c06patterns/factory/s01aquatic/AppAquaticConsole1.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s01aquatic/AppAquaticConsole1.java rename to java/src/pt/c06patterns/factory/s01aquatic/AppAquaticConsole1.java diff --git a/eclipse/src/pt/c06patterns/factory/s01aquatic/CrabConsole.java b/java/src/pt/c06patterns/factory/s01aquatic/CrabConsole.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s01aquatic/CrabConsole.java rename to java/src/pt/c06patterns/factory/s01aquatic/CrabConsole.java diff --git a/eclipse/src/pt/c06patterns/factory/s01aquatic/FishConsole.java b/java/src/pt/c06patterns/factory/s01aquatic/FishConsole.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s01aquatic/FishConsole.java rename to java/src/pt/c06patterns/factory/s01aquatic/FishConsole.java diff --git a/eclipse/src/pt/c06patterns/factory/s01aquatic/FishTankConsole.java b/java/src/pt/c06patterns/factory/s01aquatic/FishTankConsole.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s01aquatic/FishTankConsole.java rename to java/src/pt/c06patterns/factory/s01aquatic/FishTankConsole.java diff --git a/eclipse/src/pt/c06patterns/factory/s01aquatic/IFishTank.java b/java/src/pt/c06patterns/factory/s01aquatic/IFishTank.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s01aquatic/IFishTank.java rename to java/src/pt/c06patterns/factory/s01aquatic/IFishTank.java diff --git a/eclipse/src/pt/c06patterns/factory/s01aquatic/ISeaAnimal.java b/java/src/pt/c06patterns/factory/s01aquatic/ISeaAnimal.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s01aquatic/ISeaAnimal.java rename to java/src/pt/c06patterns/factory/s01aquatic/ISeaAnimal.java diff --git a/eclipse/src/pt/c06patterns/factory/s02aquatic/AppAquaticGUI1.java b/java/src/pt/c06patterns/factory/s02aquatic/AppAquaticGUI1.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s02aquatic/AppAquaticGUI1.java rename to java/src/pt/c06patterns/factory/s02aquatic/AppAquaticGUI1.java diff --git a/eclipse/src/pt/c06patterns/factory/s02aquatic/CrabGUI.java b/java/src/pt/c06patterns/factory/s02aquatic/CrabGUI.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s02aquatic/CrabGUI.java rename to java/src/pt/c06patterns/factory/s02aquatic/CrabGUI.java diff --git a/eclipse/src/pt/c06patterns/factory/s02aquatic/FishGUI.java b/java/src/pt/c06patterns/factory/s02aquatic/FishGUI.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s02aquatic/FishGUI.java rename to java/src/pt/c06patterns/factory/s02aquatic/FishGUI.java diff --git a/eclipse/src/pt/c06patterns/factory/s02aquatic/FishTankGUI.java b/java/src/pt/c06patterns/factory/s02aquatic/FishTankGUI.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s02aquatic/FishTankGUI.java rename to java/src/pt/c06patterns/factory/s02aquatic/FishTankGUI.java diff --git a/eclipse/src/pt/c06patterns/factory/s02aquatic/IFishTank.java b/java/src/pt/c06patterns/factory/s02aquatic/IFishTank.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s02aquatic/IFishTank.java rename to java/src/pt/c06patterns/factory/s02aquatic/IFishTank.java diff --git a/eclipse/src/pt/c06patterns/factory/s02aquatic/ISeaAnimal.java b/java/src/pt/c06patterns/factory/s02aquatic/ISeaAnimal.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s02aquatic/ISeaAnimal.java rename to java/src/pt/c06patterns/factory/s02aquatic/ISeaAnimal.java diff --git a/eclipse/src/pt/c06patterns/factory/s02aquatic/crab.png b/java/src/pt/c06patterns/factory/s02aquatic/crab.png similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s02aquatic/crab.png rename to java/src/pt/c06patterns/factory/s02aquatic/crab.png diff --git a/eclipse/src/pt/c06patterns/factory/s02aquatic/fish.png b/java/src/pt/c06patterns/factory/s02aquatic/fish.png similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s02aquatic/fish.png rename to java/src/pt/c06patterns/factory/s02aquatic/fish.png diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/AppAquaticConsole2.java b/java/src/pt/c06patterns/factory/s03aquatic/AppAquaticConsole2.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/AppAquaticConsole2.java rename to java/src/pt/c06patterns/factory/s03aquatic/AppAquaticConsole2.java diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/AppAquaticGUI2.java b/java/src/pt/c06patterns/factory/s03aquatic/AppAquaticGUI2.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/AppAquaticGUI2.java rename to java/src/pt/c06patterns/factory/s03aquatic/AppAquaticGUI2.java diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/console/AquaticFactoryConsole.java b/java/src/pt/c06patterns/factory/s03aquatic/console/AquaticFactoryConsole.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/console/AquaticFactoryConsole.java rename to java/src/pt/c06patterns/factory/s03aquatic/console/AquaticFactoryConsole.java diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/console/CrabConsole.java b/java/src/pt/c06patterns/factory/s03aquatic/console/CrabConsole.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/console/CrabConsole.java rename to java/src/pt/c06patterns/factory/s03aquatic/console/CrabConsole.java diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/console/FishConsole.java b/java/src/pt/c06patterns/factory/s03aquatic/console/FishConsole.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/console/FishConsole.java rename to java/src/pt/c06patterns/factory/s03aquatic/console/FishConsole.java diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/console/FishTankConsole.java b/java/src/pt/c06patterns/factory/s03aquatic/console/FishTankConsole.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/console/FishTankConsole.java rename to java/src/pt/c06patterns/factory/s03aquatic/console/FishTankConsole.java diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/gui/AquaticFactoryGUI.java b/java/src/pt/c06patterns/factory/s03aquatic/gui/AquaticFactoryGUI.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/gui/AquaticFactoryGUI.java rename to java/src/pt/c06patterns/factory/s03aquatic/gui/AquaticFactoryGUI.java diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/gui/CrabGUI.java b/java/src/pt/c06patterns/factory/s03aquatic/gui/CrabGUI.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/gui/CrabGUI.java rename to java/src/pt/c06patterns/factory/s03aquatic/gui/CrabGUI.java diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/gui/FishGUI.java b/java/src/pt/c06patterns/factory/s03aquatic/gui/FishGUI.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/gui/FishGUI.java rename to java/src/pt/c06patterns/factory/s03aquatic/gui/FishGUI.java diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/gui/FishTankGUI.java b/java/src/pt/c06patterns/factory/s03aquatic/gui/FishTankGUI.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/gui/FishTankGUI.java rename to java/src/pt/c06patterns/factory/s03aquatic/gui/FishTankGUI.java diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/gui/crab.png b/java/src/pt/c06patterns/factory/s03aquatic/gui/crab.png similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/gui/crab.png rename to java/src/pt/c06patterns/factory/s03aquatic/gui/crab.png diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/gui/fish.png b/java/src/pt/c06patterns/factory/s03aquatic/gui/fish.png similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/gui/fish.png rename to java/src/pt/c06patterns/factory/s03aquatic/gui/fish.png diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/interfaces/IAquaticFactory.java b/java/src/pt/c06patterns/factory/s03aquatic/interfaces/IAquaticFactory.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/interfaces/IAquaticFactory.java rename to java/src/pt/c06patterns/factory/s03aquatic/interfaces/IAquaticFactory.java diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/interfaces/IFishTank.java b/java/src/pt/c06patterns/factory/s03aquatic/interfaces/IFishTank.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/interfaces/IFishTank.java rename to java/src/pt/c06patterns/factory/s03aquatic/interfaces/IFishTank.java diff --git a/eclipse/src/pt/c06patterns/factory/s03aquatic/interfaces/ISeaAnimal.java b/java/src/pt/c06patterns/factory/s03aquatic/interfaces/ISeaAnimal.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s03aquatic/interfaces/ISeaAnimal.java rename to java/src/pt/c06patterns/factory/s03aquatic/interfaces/ISeaAnimal.java diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/AppAquatic4.java b/java/src/pt/c06patterns/factory/s04aquatic/AppAquatic4.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/AppAquatic4.java rename to java/src/pt/c06patterns/factory/s04aquatic/AppAquatic4.java diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/AquaticAbstractFactory.java b/java/src/pt/c06patterns/factory/s04aquatic/AquaticAbstractFactory.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/AquaticAbstractFactory.java rename to java/src/pt/c06patterns/factory/s04aquatic/AquaticAbstractFactory.java diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/console/AquaticFactoryConsole.java b/java/src/pt/c06patterns/factory/s04aquatic/console/AquaticFactoryConsole.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/console/AquaticFactoryConsole.java rename to java/src/pt/c06patterns/factory/s04aquatic/console/AquaticFactoryConsole.java diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/console/CrabConsole.java b/java/src/pt/c06patterns/factory/s04aquatic/console/CrabConsole.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/console/CrabConsole.java rename to java/src/pt/c06patterns/factory/s04aquatic/console/CrabConsole.java diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/console/FishConsole.java b/java/src/pt/c06patterns/factory/s04aquatic/console/FishConsole.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/console/FishConsole.java rename to java/src/pt/c06patterns/factory/s04aquatic/console/FishConsole.java diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/console/FishTankConsole.java b/java/src/pt/c06patterns/factory/s04aquatic/console/FishTankConsole.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/console/FishTankConsole.java rename to java/src/pt/c06patterns/factory/s04aquatic/console/FishTankConsole.java diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/gui/AquaticFactoryGUI.java b/java/src/pt/c06patterns/factory/s04aquatic/gui/AquaticFactoryGUI.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/gui/AquaticFactoryGUI.java rename to java/src/pt/c06patterns/factory/s04aquatic/gui/AquaticFactoryGUI.java diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/gui/CrabGUI.java b/java/src/pt/c06patterns/factory/s04aquatic/gui/CrabGUI.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/gui/CrabGUI.java rename to java/src/pt/c06patterns/factory/s04aquatic/gui/CrabGUI.java diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/gui/FishGUI.java b/java/src/pt/c06patterns/factory/s04aquatic/gui/FishGUI.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/gui/FishGUI.java rename to java/src/pt/c06patterns/factory/s04aquatic/gui/FishGUI.java diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/gui/FishTankGUI.java b/java/src/pt/c06patterns/factory/s04aquatic/gui/FishTankGUI.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/gui/FishTankGUI.java rename to java/src/pt/c06patterns/factory/s04aquatic/gui/FishTankGUI.java diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/gui/crab.png b/java/src/pt/c06patterns/factory/s04aquatic/gui/crab.png similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/gui/crab.png rename to java/src/pt/c06patterns/factory/s04aquatic/gui/crab.png diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/gui/fish.png b/java/src/pt/c06patterns/factory/s04aquatic/gui/fish.png similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/gui/fish.png rename to java/src/pt/c06patterns/factory/s04aquatic/gui/fish.png diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/interfaces/IAquaticFactory.java b/java/src/pt/c06patterns/factory/s04aquatic/interfaces/IAquaticFactory.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/interfaces/IAquaticFactory.java rename to java/src/pt/c06patterns/factory/s04aquatic/interfaces/IAquaticFactory.java diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/interfaces/IFishTank.java b/java/src/pt/c06patterns/factory/s04aquatic/interfaces/IFishTank.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/interfaces/IFishTank.java rename to java/src/pt/c06patterns/factory/s04aquatic/interfaces/IFishTank.java diff --git a/eclipse/src/pt/c06patterns/factory/s04aquatic/interfaces/ISeaAnimal.java b/java/src/pt/c06patterns/factory/s04aquatic/interfaces/ISeaAnimal.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s04aquatic/interfaces/ISeaAnimal.java rename to java/src/pt/c06patterns/factory/s04aquatic/interfaces/ISeaAnimal.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/App05ChartSequence.java b/java/src/pt/c06patterns/factory/s10components/App05ChartSequence.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/App05ChartSequence.java rename to java/src/pt/c06patterns/factory/s10components/App05ChartSequence.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/chart/BarChart.java b/java/src/pt/c06patterns/factory/s10components/chart/BarChart.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/chart/BarChart.java rename to java/src/pt/c06patterns/factory/s10components/chart/BarChart.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/chart/BarChartFactory.java b/java/src/pt/c06patterns/factory/s10components/chart/BarChartFactory.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/chart/BarChartFactory.java rename to java/src/pt/c06patterns/factory/s10components/chart/BarChartFactory.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/chart/ConsoleBarChart.java b/java/src/pt/c06patterns/factory/s10components/chart/ConsoleBarChart.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/chart/ConsoleBarChart.java rename to java/src/pt/c06patterns/factory/s10components/chart/ConsoleBarChart.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/chart/GraphicBarChart.java b/java/src/pt/c06patterns/factory/s10components/chart/GraphicBarChart.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/chart/GraphicBarChart.java rename to java/src/pt/c06patterns/factory/s10components/chart/GraphicBarChart.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/chart/IBarChart.java b/java/src/pt/c06patterns/factory/s10components/chart/IBarChart.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/chart/IBarChart.java rename to java/src/pt/c06patterns/factory/s10components/chart/IBarChart.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/chart/IBarChartProperties.java b/java/src/pt/c06patterns/factory/s10components/chart/IBarChartProperties.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/chart/IBarChartProperties.java rename to java/src/pt/c06patterns/factory/s10components/chart/IBarChartProperties.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/chart/IChart.java b/java/src/pt/c06patterns/factory/s10components/chart/IChart.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/chart/IChart.java rename to java/src/pt/c06patterns/factory/s10components/chart/IChart.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/chart/IRSequence.java b/java/src/pt/c06patterns/factory/s10components/chart/IRSequence.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/chart/IRSequence.java rename to java/src/pt/c06patterns/factory/s10components/chart/IRSequence.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/chart/exception/InvalidBlankChar.java b/java/src/pt/c06patterns/factory/s10components/chart/exception/InvalidBlankChar.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/chart/exception/InvalidBlankChar.java rename to java/src/pt/c06patterns/factory/s10components/chart/exception/InvalidBlankChar.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/chart/exception/PlotException.java b/java/src/pt/c06patterns/factory/s10components/chart/exception/PlotException.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/chart/exception/PlotException.java rename to java/src/pt/c06patterns/factory/s10components/chart/exception/PlotException.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/chart/exception/UnsupportedNegativeNumber.java b/java/src/pt/c06patterns/factory/s10components/chart/exception/UnsupportedNegativeNumber.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/chart/exception/UnsupportedNegativeNumber.java rename to java/src/pt/c06patterns/factory/s10components/chart/exception/UnsupportedNegativeNumber.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/sequence/ArithmeticProgression.java b/java/src/pt/c06patterns/factory/s10components/sequence/ArithmeticProgression.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/sequence/ArithmeticProgression.java rename to java/src/pt/c06patterns/factory/s10components/sequence/ArithmeticProgression.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/sequence/Fibonacci.java b/java/src/pt/c06patterns/factory/s10components/sequence/Fibonacci.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/sequence/Fibonacci.java rename to java/src/pt/c06patterns/factory/s10components/sequence/Fibonacci.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/sequence/GeometricProgression.java b/java/src/pt/c06patterns/factory/s10components/sequence/GeometricProgression.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/sequence/GeometricProgression.java rename to java/src/pt/c06patterns/factory/s10components/sequence/GeometricProgression.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/sequence/IMathRatioSequence.java b/java/src/pt/c06patterns/factory/s10components/sequence/IMathRatioSequence.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/sequence/IMathRatioSequence.java rename to java/src/pt/c06patterns/factory/s10components/sequence/IMathRatioSequence.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/sequence/IMathSequence.java b/java/src/pt/c06patterns/factory/s10components/sequence/IMathSequence.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/sequence/IMathSequence.java rename to java/src/pt/c06patterns/factory/s10components/sequence/IMathSequence.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/sequence/ISeqInitialProperties.java b/java/src/pt/c06patterns/factory/s10components/sequence/ISeqInitialProperties.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/sequence/ISeqInitialProperties.java rename to java/src/pt/c06patterns/factory/s10components/sequence/ISeqInitialProperties.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/sequence/ISeqRatioProperties.java b/java/src/pt/c06patterns/factory/s10components/sequence/ISeqRatioProperties.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/sequence/ISeqRatioProperties.java rename to java/src/pt/c06patterns/factory/s10components/sequence/ISeqRatioProperties.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/sequence/ISequence.java b/java/src/pt/c06patterns/factory/s10components/sequence/ISequence.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/sequence/ISequence.java rename to java/src/pt/c06patterns/factory/s10components/sequence/ISequence.java diff --git a/eclipse/src/pt/c06patterns/factory/s10components/sequence/SequenceFactory.java b/java/src/pt/c06patterns/factory/s10components/sequence/SequenceFactory.java similarity index 100% rename from eclipse/src/pt/c06patterns/factory/s10components/sequence/SequenceFactory.java rename to java/src/pt/c06patterns/factory/s10components/sequence/SequenceFactory.java diff --git a/java/src/pt/c08componentes/s01chartseq/s01push/App0101BarChart.java b/java/src/pt/c08componentes/s01chartseq/s01push/App0101BarChart.java new file mode 100644 index 000000000..dc6fd96c5 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s01push/App0101BarChart.java @@ -0,0 +1,18 @@ +package pt.c08componentes.s01chartseq.s01push; + +import pt.c08componentes.s01chartseq.s01push.chart.BarChart; + +public class App0101BarChart { + public static void main(String args[]) { + BarChart bc1 = new BarChart(true, '#'); + bc1.plot(10); + bc1.plot(12); + bc1.plot(8); + System.out.println(); + + BarChart bc2 = new BarChart(false, '*'); + bc2.plot(4); + bc2.plot(5); + bc2.plot(7); + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s01push/App0102GeoChart.java b/java/src/pt/c08componentes/s01chartseq/s01push/App0102GeoChart.java new file mode 100644 index 000000000..8002521eb --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s01push/App0102GeoChart.java @@ -0,0 +1,14 @@ +package pt.c08componentes.s01chartseq.s01push; + +import pt.c08componentes.s01chartseq.s01push.chart.BarChart; +import pt.c08componentes.s01chartseq.s01push.sequence.GeometricProgressionPre; + +public class App0102GeoChart { + public static void main(String args[]) { + BarChart bc = new BarChart(true, '#'); + + GeometricProgressionPre gp = new GeometricProgressionPre(1, 2, 7, bc); + + gp.present(); + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s01push/App0103GeoChartConnect.java b/java/src/pt/c08componentes/s01chartseq/s01push/App0103GeoChartConnect.java new file mode 100644 index 000000000..decc74945 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s01push/App0103GeoChartConnect.java @@ -0,0 +1,15 @@ +package pt.c08componentes.s01chartseq.s01push; + +import pt.c08componentes.s01chartseq.s01push.chart.BarChart; +import pt.c08componentes.s01chartseq.s01push.sequence.GeometricProgression; + +public class App0103GeoChartConnect { + public static void main(String args[]) { + BarChart bc = new BarChart(true, '#'); + + GeometricProgression gp = new GeometricProgression(1, 2, 7); + + gp.connect(bc); + gp.present(); + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s01push/App0104GeoChartMultiple.java b/java/src/pt/c08componentes/s01chartseq/s01push/App0104GeoChartMultiple.java new file mode 100644 index 000000000..8db883025 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s01push/App0104GeoChartMultiple.java @@ -0,0 +1,19 @@ +package pt.c08componentes.s01chartseq.s01push; + +import pt.c08componentes.s01chartseq.s01push.chart.BarChart; +import pt.c08componentes.s01chartseq.s01push.sequence.GeometricProgression; + +public class App0104GeoChartMultiple { + public static void main(String args[]) { + BarChart bc1 = new BarChart(true, '#'); + BarChart bc2 = new BarChart(false, '*'); + + GeometricProgression gp = new GeometricProgression(1, 2, 7); + + gp.connect(bc1); + gp.present(); + + gp.connect(bc2); + gp.present(); + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s01push/README.md b/java/src/pt/c08componentes/s01chartseq/s01push/README.md new file mode 100644 index 000000000..50344de6a --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s01push/README.md @@ -0,0 +1,230 @@ +# Classes pre-Componentes / Abordagem Push + +*Documentação gerada a partir do Notebook Jupyter do mesmo exemplo em `notebooks/pt/s04components/s01chart/s01push.ipynb`* + +# Componentes `GeometricProgresion` e `BarChart` trabalhando em conjunto via Push + +Neste exemplo usaremos a abordagem **Push**, ou seja, o objeto da classe GeometricProgression controla todo o processo gerando a sequência de números e pede para o BarChart plotar cada valor. + +O `BarChart` atua de forma passiva, aguardando que lhe solicitem que plote algo. + +## `BarChart` Component + +Plota um gráfico de barras no console sob demanda. + +* Atributos + * `filled` - define se a plotagem será preenchida; + * `character` - define o caractere da plotagem. +* Método + * `plot()` - plota uma barra do gráfico. + + +```Java +public class BarChart { + private boolean filled; + private char character; + + public BarChart(boolean filled, char character) { + this.filled = filled; + this.character = character; + } + + public void plot(int value) { + for (int v = 1; v < value; v++) + System.out.print((filled) ? character : ' '); + System.out.println(character); + } +} +``` + +## Usando objetos da classe `BarChart` + +Abaixo um exemplo de como objetos da classe `BarChart` podem ser usados. + + +```Java +BarChart bc1 = new BarChart(true, '#'); +bc1.plot(10); +bc1.plot(12); +bc1.plot(8); +System.out.println(); + +BarChart bc2 = new BarChart(false, '*'); +bc2.plot(4); +bc2.plot(5); +bc2.plot(7); +``` + + ########## + ############ + ######## + + * + * + * + +## Classe `GeometricProgressionPre` + +Gera uma sequência de números que crescem em progressão geométrica. + +* Atributos + * `initial` - valor inicial da sequência; + * `ratio` - taxa de crescimento da progressão; + * `n` - quantidade de valores na sequência; + * `output` - referência para um objeto da classe `BarChart`. +* Métodos + * `present` - apresenta o gráfico exponencial (em conjunto com um objeto da classe `BarChart`). + + +```Java +public class GeometricProgressionPre { + private int initial, + ratio, + n; + private BarChart output; + + public GeometricProgressionPre(int initial, int ratio, int n, BarChart output) { + this.initial = initial; + this.ratio = ratio; + this.n = n; + this.output = output; + } + + public void present() { + if (output != null) { + int value = initial; + for (int s = 1; s <= n; s++) { + output.plot(value); + value *= ratio; + } + } + } +} +``` + +## Criando objetos associados + +Exemplo que cria um objeto da classe `GeometricProgression` outro da classe `BarChart`. O objeto da classe `GeometricProgression` recebe uma referência do objeto `BarChart` no construtor para se relacionar com ele. + + +```Java +BarChart bc = new BarChart(true, '#'); + +GeometricProgressionPre gp = new GeometricProgressionPre(1, 2, 7, bc); + +gp.present(); +``` + + # + ## + #### + ######## + ################ + ################################ + ################################################################ + +## Classe `GeometricProgression` + +No `GeometricProgressionPre` a associação com o objeto `BarChart` foi feita pelo construtor, o que limita as possibilidades de combinação, por exemplo, quando queremos conectar a mesma progressão com diversos dispositivos de saída. + +### Usando Conectores + +Uma abordagem derivada dos componentes considera usar a ideia de conector para ligar dois objetos usando o método `connect`. + +* Métodos adicional + * `conect` - conecta dois objetos informando a um deles (`GeometricProgression`) a identidade do outro `BarChart`. + + +```Java +public class GeometricProgression { + private int initial, + ratio, + n; + private BarChart output; + + public GeometricProgression(int initial, int ratio, int n) { + this.initial = initial; + this.ratio = ratio; + this.n = n; + this.output = null; + } + + public void connect(BarChart output) { + this.output = output; + } + + public void present() { + if (output != null) { + int value = initial; + for (int s = 1; s <= n; s++) { + output.plot(value); + value *= ratio; + } + } + } +} +``` + +## Criando e Conectando objetos - abordagem Push + +Exemplo que cria um objeto da classe `GeometricProgression` outro da classe `BarChart` e os conecta através do novo método `connect`. Por ser uma abordagem Push, o `GeometricProgression` tem a referência do `BarChart` e envia (“empurra”) valores para ele. + + +```Java +BarChart bc = new BarChart(true, '#'); + +GeometricProgression gp = new GeometricProgression(1, 2, 7); + +gp.connect(bc); +gp.present(); +``` + + # + ## + #### + ######## + ################ + ################################ + ################################################################ + +## Conectando o objeto `GeometricProgression` com dois objetos `BarChart` - abordagem Push + +Exemplo conectando o mesmo objeto da classe `GeometricProgression` com dois objetos da classe `BarChart`. + +```Java +BarChart bc1 = new BarChart(true, '#'); +BarChart bc2 = new BarChart(false, '*'); + +GeometricProgression gp = new GeometricProgression(1, 2, 7); + +gp.connect(bc1); +gp.present(); + +gp.connect(bc2); +gp.present(); +``` + + # + ## + #### + ######## + ################ + ################################ + ################################################################ + * + * + * + * + * + * + * + +# Tarefa do Gráfico de Segundo Grau + +## Função de segundo grau + +Escreva uma classe `SecondDegree` cujos objetos produzam valores de uma função de segundo grau na abordagem **Push** e os enviem para um objeto `BarChart`. + +## Plotagem de parábola + +Escreva um programa que conecte um objeto da classe `SecondDegree` a um objeto da classe `BarChart` de forma que seja plotada uma parábola na abordagem **Push**. Por conta do comportamento da classe `BarChart`, a parábola será plotada virada, ou seja eixos X e Y trocados. diff --git a/java/src/pt/c08componentes/s01chartseq/s01push/chart/BarChart.java b/java/src/pt/c08componentes/s01chartseq/s01push/chart/BarChart.java new file mode 100644 index 000000000..d5e027fe1 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s01push/chart/BarChart.java @@ -0,0 +1,17 @@ +package pt.c08componentes.s01chartseq.s01push.chart; + +public class BarChart { + private boolean filled; + private char character; + + public BarChart(boolean filled, char character) { + this.filled = filled; + this.character = character; + } + + public void plot(int value) { + for (int v = 1; v < value; v++) + System.out.print((filled) ? character : ' '); + System.out.println(character); + } +} \ No newline at end of file diff --git a/java/src/pt/c08componentes/s01chartseq/s01push/sequence/GeometricProgression.java b/java/src/pt/c08componentes/s01chartseq/s01push/sequence/GeometricProgression.java new file mode 100644 index 000000000..af20db1b1 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s01push/sequence/GeometricProgression.java @@ -0,0 +1,31 @@ +package pt.c08componentes.s01chartseq.s01push.sequence; + +import pt.c08componentes.s01chartseq.s01push.chart.BarChart; + +public class GeometricProgression { + private int initial, + ratio, + n; + private BarChart output; + + public GeometricProgression(int initial, int ratio, int n) { + this.initial = initial; + this.ratio = ratio; + this.n = n; + this.output = null; + } + + public void connect(BarChart output) { + this.output = output; + } + + public void present() { + if (output != null) { + int value = initial; + for (int s = 1; s <= n; s++) { + output.plot(value); + value *= ratio; + } + } + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s01push/sequence/GeometricProgressionPre.java b/java/src/pt/c08componentes/s01chartseq/s01push/sequence/GeometricProgressionPre.java new file mode 100644 index 000000000..f7f71875b --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s01push/sequence/GeometricProgressionPre.java @@ -0,0 +1,27 @@ +package pt.c08componentes.s01chartseq.s01push.sequence; + +import pt.c08componentes.s01chartseq.s01push.chart.BarChart; + +public class GeometricProgressionPre { + private int initial, + ratio, + n; + private BarChart output; + + public GeometricProgressionPre(int initial, int ratio, int n, BarChart output) { + this.initial = initial; + this.ratio = ratio; + this.n = n; + this.output = output; + } + + public void present() { + if (output != null) { + int value = initial; + for (int s = 1; s <= n; s++) { + output.plot(value); + value *= ratio; + } + } + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s02pull/App0201GeoChart.java b/java/src/pt/c08componentes/s01chartseq/s02pull/App0201GeoChart.java new file mode 100644 index 000000000..0800e424f --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s02pull/App0201GeoChart.java @@ -0,0 +1,15 @@ +package pt.c08componentes.s01chartseq.s02pull; + +import pt.c08componentes.s01chartseq.s02pull.chart.BarChart; +import pt.c08componentes.s01chartseq.s02pull.sequence.GeometricProgression; + +public class App0201GeoChart { + public static void main(String args[]) { + GeometricProgression gp = new GeometricProgression(1, 2); + + BarChart bc = new BarChart(true, '#', 7); + + bc.connect(gp); + bc.plot(); + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s02pull/App0202GeoChartMultiple.java b/java/src/pt/c08componentes/s01chartseq/s02pull/App0202GeoChartMultiple.java new file mode 100644 index 000000000..2e990f230 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s02pull/App0202GeoChartMultiple.java @@ -0,0 +1,19 @@ +package pt.c08componentes.s01chartseq.s02pull; + +import pt.c08componentes.s01chartseq.s02pull.chart.BarChart; +import pt.c08componentes.s01chartseq.s02pull.sequence.GeometricProgression; + +public class App0202GeoChartMultiple { + public static void main(String args[]) { + GeometricProgression gp = new GeometricProgression(1, 2); + + BarChart bc1 = new BarChart(true, '#', 7); + BarChart bc2 = new BarChart(false, '*', 7); + + bc1.connect(gp); + bc1.plot(); + + bc2.connect(gp); + bc2.plot(); + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s02pull/README.md b/java/src/pt/c08componentes/s01chartseq/s02pull/README.md new file mode 100644 index 000000000..09821a182 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s02pull/README.md @@ -0,0 +1,171 @@ +# Classes pre-Componentes / Abordagem Pull + +*Documentação gerada a partir do Notebook Jupyter do mesmo exemplo em `notebooks/pt/s04components/s01chart/s02pull.ipynb`* + +# Componentes `GeometricProgresion` e `BarChart` trabalhando em conjunto via Pull + +Neste exemplo usaremos a abordagem **Pull**, ou seja, o objeto da classe `BarChart` controla todo o processo e solicita os valores para o objeto da classe `GeometricProgression`. + +## `GeometricProgression` abordagem Pull + +O `GeometricProgression` passa a atuar de forma passiva, aguardando que lhe solicitem valores através dos métodos `first` e `next`. + +Três modificações podem ser observadas: +1. a informação do número de valores plotados (`n`) passa para o `BarChart` que controla o processo; +2. o `BarChart` passa a ter a referência para o `GeometricProgression` que, por sua vez, não tem mais a referência e consequentemente o `connect`; +3. o método `present` que atuava ativamente gerando a sequência e enviando para o gráfico foi substituído por dois métodos (`first` e `next`) que atuam passivamente aguardando a solicitação de valor. + +## Classe `GeometricProgression` + +Gera uma sequência de números que crescem em progressão geométrica. + +* Atributos + * `initial` - valor inicial da sequência; + * `ratio` - taxa de crescimento da progressão; + * `current` - valor corrente (para controle interno). +* Métodos + * `first` - gera o primeiro valor da sequência e o retorna; + * `next` - gera o próximo valor da sequência (em relação à última solicitação) e o retorna. + + +```Java +public class GeometricProgression { + private int initial, + ratio; + private int current; + + public GeometricProgression(int initial, int ratio) { + this.initial = initial; + this.ratio = ratio; + current = initial; + } + + public int first() { + current = initial; + return current; + } + + public int next() { + current *= ratio; + return current; + } +} + +## `BarChart` abordagem Pull + +Três modificações podem ser observadas: +1. o método `plot` foi modificado -- em vez de plotar apenas uma barra, ele plota o gráfico inteiro, já que o `BarChart` controla o processo; +2. por causa da modificação (1), o `BarChart` passa a ter a informação de quantos valores serão plotados; +3. o `BarChart` passa a ter o método `connect`, já que ele guarda a referência para o objeto `GeometricProgression` para solicitar os valores. + +## `BarChart` Component + +Plota um gráfico de barras no console coletando ativamente dados a serem plotados. + +* Atributos + * `filled` - define se a plotagem será preenchida; + * `character` - define o caractere da plotagem; + * `n` - quantidade de valores na sequência; + * `sequence` - referência para um objeto da classe `BarChart`. +* Método + * `conect` - conecta dois objetos informando a um deles (`BarChart`) a identidade do outro `GeometricProgression`. + * `plot()` - plota o gráfico inteiro. + + +```Java +public class BarChart { + private boolean filled; + private char character; + private int n; + + private GeometricProgression sequence; + + public BarChart(boolean filled, char character, int n) { + this.filled = filled; + this.character = character; + this.n = n; + this.sequence = null; + } + + public void connect(GeometricProgression sequence) { + this.sequence = sequence; + } + + public void plot() { + if (sequence != null) { + int value = sequence.first(); + for (int s = 1; s <= n; s++) { + for (int v = 1; v < value; v++) + System.out.print((filled) ? character : ' '); + System.out.println(character); + value = sequence.next(); + } + } + } +} +``` + +## Criando e Conectando objetos - abordagem Pull + +Exemplo que cria um objeto da classe `GeometricProgression` outro da classe `BarChart` e os conecta através do novo método `connect`. Note que há uma inversão em relação a abordagem **Pull**. Aqui, o `BarChart` possui o método `connect` e se conecta ao `GeometricProgression` de quem ele solicitará os valores. + + +```Java +GeometricProgression gp = new GeometricProgression(1, 2); + +BarChart bc = new BarChart(true, '#', 7); + +bc.connect(gp); +bc.plot(); +``` + + # + ## + #### + ######## + ################ + ################################ + ################################################################ + +## Conectando o objeto `GeometricProgression` com dois objetos `BarChart` - abordagem Pull + +Exemplo conectando o mesmo objeto da classe `GeometricProgression` com dois objetos da classe `BarChart`. + + +```Java +GeometricProgression gp = new GeometricProgression(1, 2); + +BarChart bc1 = new BarChart(true, '#', 7); +BarChart bc2 = new BarChart(false, '*', 7); + +bc1.connect(gp); +bc1.plot(); + +bc2.connect(gp); +bc2.plot(); +``` + + # + ## + #### + ######## + ################ + ################################ + ################################################################ + * + * + * + * + * + * + * + +# Tarefa do Gráfico de Segundo Grau + +## Função de segundo grau + +Escreva uma classe `SecondDegree` cujos objetos produzam valores de uma função de segundo grau na abordagem **Pull**, ou seja, são produzidos sob demanda a partir de solicitação dos métodos `first` e `next`. + +## Plotagem de parábola + +Escreva um programa que conecte um objeto da classe `SecondDegree` a um objeto da classe `BarChart` de forma que seja plotada uma parábola na abordagem **Pull**. Por conta do comportamento da classe `BarChart`, a parábola será plotada virada, ou seja eixos X e Y trocados. diff --git a/java/src/pt/c08componentes/s01chartseq/s02pull/chart/BarChart.java b/java/src/pt/c08componentes/s01chartseq/s02pull/chart/BarChart.java new file mode 100644 index 000000000..e2f7e6327 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s02pull/chart/BarChart.java @@ -0,0 +1,34 @@ +package pt.c08componentes.s01chartseq.s02pull.chart; + +import pt.c08componentes.s01chartseq.s02pull.sequence.GeometricProgression; + +public class BarChart { + private boolean filled; + private char character; + private int n; + + private GeometricProgression sequence; + + public BarChart(boolean filled, char character, int n) { + this.filled = filled; + this.character = character; + this.n = n; + this.sequence = null; + } + + public void connect(GeometricProgression sequence) { + this.sequence = sequence; + } + + public void plot() { + if (sequence != null) { + int value = sequence.first(); + for (int s = 1; s <= n; s++) { + for (int v = 1; v < value; v++) + System.out.print((filled) ? character : ' '); + System.out.println(character); + value = sequence.next(); + } + } + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s02pull/sequence/GeometricProgression.java b/java/src/pt/c08componentes/s01chartseq/s02pull/sequence/GeometricProgression.java new file mode 100644 index 000000000..2d2b36631 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s02pull/sequence/GeometricProgression.java @@ -0,0 +1,23 @@ +package pt.c08componentes.s01chartseq.s02pull.sequence; + +public class GeometricProgression { + private int initial, + ratio; + private int current; + + public GeometricProgression(int initial, int ratio) { + this.initial = initial; + this.ratio = ratio; + current = initial; + } + + public int first() { + current = initial; + return current; + } + + public int next() { + current *= ratio; + return current; + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s03properties/App01ChartSequence.java b/java/src/pt/c08componentes/s01chartseq/s03properties/App01ChartSequence.java new file mode 100644 index 000000000..40f0fb3bf --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s03properties/App01ChartSequence.java @@ -0,0 +1,20 @@ +package pt.c08componentes.s01chartseq.s03properties; + +import pt.c08componentes.s01chartseq.s03properties.chart.BarChart; +import pt.c08componentes.s01chartseq.s03properties.sequence.GeometricProgression; + +public class App01ChartSequence { + public static void main(String args[]) { + GeometricProgression gp = new GeometricProgression(); + gp.setInitial(1); + gp.setRatio(2); + + BarChart bc = new BarChart(); + bc.setFilled(true); + bc.setCharacter('#'); + bc.setN(7); + + bc.connect(gp); + bc.plot(); + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s03properties/chart/BarChart.java b/java/src/pt/c08componentes/s01chartseq/s03properties/chart/BarChart.java new file mode 100644 index 000000000..e505c0536 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s03properties/chart/BarChart.java @@ -0,0 +1,57 @@ +package pt.c08componentes.s01chartseq.s03properties.chart; + +import pt.c08componentes.s01chartseq.s03properties.sequence.GeometricProgression; + +public class BarChart { + private boolean filled; + private char character; + private int n; + + private GeometricProgression sequence; + + public BarChart() { + filled = true; + character = '*'; + n = 3; + } + + public boolean isFilled() { + return filled; + } + + public void setFilled(boolean filled) { + this.filled = filled; + } + + public char getCharacter() { + return character; + } + + public void setCharacter(char character) { + this.character = character; + } + + public int getN() { + return n; + } + + public void setN(int n) { + this.n = n; + } + + public void connect(GeometricProgression sequence) { + this.sequence = sequence; + } + + public void plot() { + if (sequence != null) { + int value = sequence.first(); + for (int s = 1; s <= n; s++) { + for (int v = 1; v < value; v++) + System.out.print((filled) ? character : ' '); + System.out.println(character); + value = sequence.next(); + } + } + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s03properties/sequence/GeometricProgression.java b/java/src/pt/c08componentes/s01chartseq/s03properties/sequence/GeometricProgression.java new file mode 100644 index 000000000..963d55dfd --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s03properties/sequence/GeometricProgression.java @@ -0,0 +1,39 @@ +package pt.c08componentes.s01chartseq.s03properties.sequence; + +public class GeometricProgression { + private int initial, + ratio; + private int current; + + public GeometricProgression() { + initial = 1; + ratio = 2; + current = initial; + } + + public int getInitial() { + return initial; + } + + public void setInitial(int initial) { + this.initial = initial; + } + + public int getRatio() { + return ratio; + } + + public void setRatio(int ratio) { + this.ratio = ratio; + } + + public int first() { + current = initial; + return current; + } + + public int next() { + current *= ratio; + return current; + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s04interface/App02ChartSequence.java b/java/src/pt/c08componentes/s01chartseq/s04interface/App02ChartSequence.java new file mode 100644 index 000000000..152b5d031 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s04interface/App02ChartSequence.java @@ -0,0 +1,16 @@ +package pt.c08componentes.s01chartseq.s04interface; + +import pt.c08componentes.s01chartseq.s04interface.chart.BarChart; +import pt.c08componentes.s01chartseq.s04interface.chart.IChart; +import pt.c08componentes.s01chartseq.s04interface.sequence.GeometricProgression; +import pt.c08componentes.s01chartseq.s04interface.sequence.ISequence; + +public class App02ChartSequence { + public static void main(String args[]) { + ISequence gp = new GeometricProgression(1, 2); + + IChart bc = new BarChart(true, '#', 5, gp); + + bc.plot(); + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s04interface/chart/BarChart.java b/java/src/pt/c08componentes/s01chartseq/s04interface/chart/BarChart.java new file mode 100644 index 000000000..a3eaf704a --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s04interface/chart/BarChart.java @@ -0,0 +1,55 @@ +package pt.c08componentes.s01chartseq.s04interface.chart; + +import pt.c08componentes.s01chartseq.s04interface.sequence.ISequence; + +public class BarChart implements IChart { + private boolean filled; + private char character; + private int n; + + private ISequence sequence; + + public BarChart(boolean filled, char character, int n, + ISequence sequence) { + this.filled = filled; + this.character = character; + this.n = n; + this.sequence = sequence; + } + + public boolean isFilled() { + return filled; + } + + public void setFilled(boolean filled) { + this.filled = filled; + } + + public char getCharacter() { + return character; + } + + public void setCharacter(char character) { + this.character = character; + } + + public int getN() { + return n; + } + + public void setN(int n) { + this.n = n; + } + + public void plot() { + if (sequence != null) { + int value = sequence.first(); + for (int s = 1; s <= n; s++) { + for (int v = 1; v < value; v++) + System.out.print((filled) ? character : ' '); + System.out.println(character); + value = sequence.next(); + } + } + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s04interface/chart/IChart.java b/java/src/pt/c08componentes/s01chartseq/s04interface/chart/IChart.java new file mode 100644 index 000000000..493178e97 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s04interface/chart/IChart.java @@ -0,0 +1,5 @@ +package pt.c08componentes.s01chartseq.s04interface.chart; + +public interface IChart { + public void plot(); +} diff --git a/java/src/pt/c08componentes/s01chartseq/s04interface/sequence/GeometricProgression.java b/java/src/pt/c08componentes/s01chartseq/s04interface/sequence/GeometricProgression.java new file mode 100644 index 000000000..1b6e45eb4 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s04interface/sequence/GeometricProgression.java @@ -0,0 +1,39 @@ +package pt.c08componentes.s01chartseq.s04interface.sequence; + +public class GeometricProgression implements ISequence { + private int initial, + ratio; + private int current; + + public GeometricProgression(int initial, int ratio) { + this.initial = initial; + this.ratio = ratio; + current = initial; + } + + public int getInitial() { + return initial; + } + + public void setInitial(int initial) { + this.initial = initial; + } + + public int getRatio() { + return ratio; + } + + public void setRatio(int ratio) { + this.ratio = ratio; + } + + public int first() { + current = initial; + return current; + } + + public int next() { + current *= ratio; + return current; + } +} diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/ISequence.java b/java/src/pt/c08componentes/s01chartseq/s04interface/sequence/ISequence.java similarity index 55% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/ISequence.java rename to java/src/pt/c08componentes/s01chartseq/s04interface/sequence/ISequence.java index c1a0e2915..a1424c030 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/ISequence.java +++ b/java/src/pt/c08componentes/s01chartseq/s04interface/sequence/ISequence.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s02sequences.sequence; +package pt.c08componentes.s01chartseq.s04interface.sequence; public interface ISequence { public int first(); diff --git a/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/App03ChartSequence.java b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/App03ChartSequence.java new file mode 100644 index 000000000..6e1c5daa7 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/App03ChartSequence.java @@ -0,0 +1,25 @@ +package pt.c08componentes.s01chartseq.s05allinterfaces; + +import pt.c08componentes.s01chartseq.s05allinterfaces.chart.BarChart; +import pt.c08componentes.s01chartseq.s05allinterfaces.chart.IBarChartProperties; +import pt.c08componentes.s01chartseq.s05allinterfaces.chart.IChart; +import pt.c08componentes.s01chartseq.s05allinterfaces.chart.IRSequence; +import pt.c08componentes.s01chartseq.s05allinterfaces.sequence.GeometricProgression; +import pt.c08componentes.s01chartseq.s05allinterfaces.sequence.IGeometricProgressionProperties; +import pt.c08componentes.s01chartseq.s05allinterfaces.sequence.ISequence; + +public class App03ChartSequence { + public static void main(String args[]) { + IGeometricProgressionProperties gp = new GeometricProgression(); + gp.setInitial(1); + gp.setRatio(2); + + IBarChartProperties bc = new BarChart(); + bc.setFilled(true); + bc.setCharacter('#'); + bc.setN(5); + + ((IRSequence)bc).connect((ISequence)gp); + ((IChart)bc).plot(); + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/chart/BarChart.java b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/chart/BarChart.java new file mode 100644 index 000000000..30b3cda3c --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/chart/BarChart.java @@ -0,0 +1,57 @@ +package pt.c08componentes.s01chartseq.s05allinterfaces.chart; + +import pt.c08componentes.s01chartseq.s05allinterfaces.sequence.ISequence; + +public class BarChart implements IChart, IRSequence, IBarChartProperties { + private boolean filled; + private char character; + private int n; + + private ISequence sequence; + + public BarChart() { + filled = true; + character = '*'; + n = 3; + } + + public boolean isFilled() { + return filled; + } + + public void setFilled(boolean filled) { + this.filled = filled; + } + + public char getCharacter() { + return character; + } + + public void setCharacter(char character) { + this.character = character; + } + + public int getN() { + return n; + } + + public void setN(int n) { + this.n = n; + } + + public void connect(ISequence sequence) { + this.sequence = sequence; + } + + public void plot() { + if (sequence != null) { + int value = sequence.first(); + for (int s = 1; s <= n; s++) { + for (int v = 1; v < value; v++) + System.out.print((filled) ? character : ' '); + System.out.println(character); + value = sequence.next(); + } + } + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/chart/IBarChartProperties.java b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/chart/IBarChartProperties.java new file mode 100644 index 000000000..85a3850e6 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/chart/IBarChartProperties.java @@ -0,0 +1,12 @@ +package pt.c08componentes.s01chartseq.s05allinterfaces.chart; + +public interface IBarChartProperties { + public boolean isFilled(); + public void setFilled(boolean filled); + + public char getCharacter(); + public void setCharacter(char character); + + public int getN(); + public void setN(int n); +} diff --git a/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/chart/IChart.java b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/chart/IChart.java new file mode 100644 index 000000000..231d4f9bb --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/chart/IChart.java @@ -0,0 +1,5 @@ +package pt.c08componentes.s01chartseq.s05allinterfaces.chart; + +public interface IChart { + public void plot(); +} diff --git a/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/chart/IRSequence.java b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/chart/IRSequence.java new file mode 100644 index 000000000..c4b30e7e5 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/chart/IRSequence.java @@ -0,0 +1,7 @@ +package pt.c08componentes.s01chartseq.s05allinterfaces.chart; + +import pt.c08componentes.s01chartseq.s05allinterfaces.sequence.ISequence; + +public interface IRSequence { + public void connect(ISequence sequence); +} diff --git a/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/sequence/GeometricProgression.java b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/sequence/GeometricProgression.java new file mode 100644 index 000000000..6072f7f2f --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/sequence/GeometricProgression.java @@ -0,0 +1,39 @@ +package pt.c08componentes.s01chartseq.s05allinterfaces.sequence; + +public class GeometricProgression implements ISequence, IGeometricProgressionProperties { + private int initial, + ratio; + private int current; + + public GeometricProgression() { + initial = 1; + ratio = 2; + current = initial; + } + + public int getInitial() { + return initial; + } + + public void setInitial(int initial) { + this.initial = initial; + } + + public int getRatio() { + return ratio; + } + + public void setRatio(int ratio) { + this.ratio = ratio; + } + + public int first() { + current = initial; + return current; + } + + public int next() { + current *= ratio; + return current; + } +} diff --git a/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/sequence/IGeometricProgressionProperties.java b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/sequence/IGeometricProgressionProperties.java new file mode 100644 index 000000000..ed974d819 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/sequence/IGeometricProgressionProperties.java @@ -0,0 +1,9 @@ +package pt.c08componentes.s01chartseq.s05allinterfaces.sequence; + +public interface IGeometricProgressionProperties { + public int getInitial(); + public void setInitial(int initial); + + public int getRatio(); + public void setRatio(int ratio); +} diff --git a/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/sequence/ISequence.java b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/sequence/ISequence.java new file mode 100644 index 000000000..c56453ffd --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s05allinterfaces/sequence/ISequence.java @@ -0,0 +1,6 @@ +package pt.c08componentes.s01chartseq.s05allinterfaces.sequence; + +public interface ISequence { + public int first(); + public int next(); +} diff --git a/java/src/pt/c08componentes/s01chartseq/s06components/App04ChartSequence.java b/java/src/pt/c08componentes/s01chartseq/s06components/App04ChartSequence.java new file mode 100644 index 000000000..b5ae8fb51 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s06components/App04ChartSequence.java @@ -0,0 +1,22 @@ +package pt.c08componentes.s01chartseq.s06components; + +import pt.c08componentes.s01chartseq.s06components.chart.BarChart; +import pt.c08componentes.s01chartseq.s06components.chart.IBarChart; +import pt.c08componentes.s01chartseq.s06components.sequence.GeometricProgression; +import pt.c08componentes.s01chartseq.s06components.sequence.IGeometricProgression; + +public class App04ChartSequence { + public static void main(String args[]) { + IGeometricProgression gp = new GeometricProgression(); + gp.setInitial(1); + gp.setRatio(2); + + IBarChart bc = new BarChart(); + bc.setFilled(true); + bc.setCharacter('#'); + bc.setN(5); + + bc.connect(gp); + bc.plot(); + } +} diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/BarChart.java b/java/src/pt/c08componentes/s01chartseq/s06components/chart/BarChart.java similarity index 89% rename from eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/BarChart.java rename to java/src/pt/c08componentes/s01chartseq/s06components/chart/BarChart.java index 32fcd1b14..f0bf7592f 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/BarChart.java +++ b/java/src/pt/c08componentes/s01chartseq/s06components/chart/BarChart.java @@ -1,6 +1,6 @@ -package pt.c08componentes.s01chartseq.s01start.chart; +package pt.c08componentes.s01chartseq.s06components.chart; -import pt.c08componentes.s01chartseq.s01start.sequence.ISequence; +import pt.c08componentes.s01chartseq.s06components.sequence.ISequence; public class BarChart implements IBarChart { private boolean filled; diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/IBarChart.java b/java/src/pt/c08componentes/s01chartseq/s06components/chart/IBarChart.java similarity index 60% rename from eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/IBarChart.java rename to java/src/pt/c08componentes/s01chartseq/s06components/chart/IBarChart.java index 2ea3a6e0a..39b1ecb21 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/IBarChart.java +++ b/java/src/pt/c08componentes/s01chartseq/s06components/chart/IBarChart.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s01start.chart; +package pt.c08componentes.s01chartseq.s06components.chart; public interface IBarChart extends IChart, IBarChartProperties, IRSequence { diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/IBarChartProperties.java b/java/src/pt/c08componentes/s01chartseq/s06components/chart/IBarChartProperties.java similarity index 80% rename from eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/IBarChartProperties.java rename to java/src/pt/c08componentes/s01chartseq/s06components/chart/IBarChartProperties.java index 125e25c74..e74b9ba17 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s01start/chart/IBarChartProperties.java +++ b/java/src/pt/c08componentes/s01chartseq/s06components/chart/IBarChartProperties.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s01start.chart; +package pt.c08componentes.s01chartseq.s06components.chart; public interface IBarChartProperties { public boolean isFilled(); diff --git a/java/src/pt/c08componentes/s01chartseq/s06components/chart/IChart.java b/java/src/pt/c08componentes/s01chartseq/s06components/chart/IChart.java new file mode 100644 index 000000000..bc38bbed3 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s06components/chart/IChart.java @@ -0,0 +1,5 @@ +package pt.c08componentes.s01chartseq.s06components.chart; + +public interface IChart { + public void plot(); +} diff --git a/java/src/pt/c08componentes/s01chartseq/s06components/chart/IRSequence.java b/java/src/pt/c08componentes/s01chartseq/s06components/chart/IRSequence.java new file mode 100644 index 000000000..d46f3e4c8 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s06components/chart/IRSequence.java @@ -0,0 +1,7 @@ +package pt.c08componentes.s01chartseq.s06components.chart; + +import pt.c08componentes.s01chartseq.s06components.sequence.ISequence; + +public interface IRSequence { + public void connect(ISequence sequence); +} diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s01start/sequence/GeometricProgression.java b/java/src/pt/c08componentes/s01chartseq/s06components/sequence/GeometricProgression.java similarity index 91% rename from eclipse/src/pt/c08componentes/s01chartseq/s01start/sequence/GeometricProgression.java rename to java/src/pt/c08componentes/s01chartseq/s06components/sequence/GeometricProgression.java index 28dc6cdc7..b94d34263 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s01start/sequence/GeometricProgression.java +++ b/java/src/pt/c08componentes/s01chartseq/s06components/sequence/GeometricProgression.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s01start.sequence; +package pt.c08componentes.s01chartseq.s06components.sequence; public class GeometricProgression implements IGeometricProgression { private int initial, diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s01start/sequence/IGeometricProgression.java b/java/src/pt/c08componentes/s01chartseq/s06components/sequence/IGeometricProgression.java similarity index 62% rename from eclipse/src/pt/c08componentes/s01chartseq/s01start/sequence/IGeometricProgression.java rename to java/src/pt/c08componentes/s01chartseq/s06components/sequence/IGeometricProgression.java index fed89acf0..a04dbb9df 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s01start/sequence/IGeometricProgression.java +++ b/java/src/pt/c08componentes/s01chartseq/s06components/sequence/IGeometricProgression.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s01start.sequence; +package pt.c08componentes.s01chartseq.s06components.sequence; public interface IGeometricProgression extends ISequence, IGeometricProgressionProperties { diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s01start/sequence/IGeometricProgressionProperties.java b/java/src/pt/c08componentes/s01chartseq/s06components/sequence/IGeometricProgressionProperties.java similarity index 75% rename from eclipse/src/pt/c08componentes/s01chartseq/s01start/sequence/IGeometricProgressionProperties.java rename to java/src/pt/c08componentes/s01chartseq/s06components/sequence/IGeometricProgressionProperties.java index 3d4fcb590..8d8fd06a2 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s01start/sequence/IGeometricProgressionProperties.java +++ b/java/src/pt/c08componentes/s01chartseq/s06components/sequence/IGeometricProgressionProperties.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s01start.sequence; +package pt.c08componentes.s01chartseq.s06components.sequence; public interface IGeometricProgressionProperties { public int getInitial(); diff --git a/java/src/pt/c08componentes/s01chartseq/s06components/sequence/ISequence.java b/java/src/pt/c08componentes/s01chartseq/s06components/sequence/ISequence.java new file mode 100644 index 000000000..bd7533a80 --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s06components/sequence/ISequence.java @@ -0,0 +1,6 @@ +package pt.c08componentes.s01chartseq.s06components.sequence; + +public interface ISequence { + public int first(); + public int next(); +} diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/App02ChartSequence.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/App05ChartSequence.java similarity index 54% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/App02ChartSequence.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/App05ChartSequence.java index 9f8b4f2d0..dcec558f6 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/App02ChartSequence.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/App05ChartSequence.java @@ -1,13 +1,13 @@ -package pt.c08componentes.s01chartseq.s02sequences; +package pt.c08componentes.s01chartseq.s07multiple; -import pt.c08componentes.s01chartseq.s02sequences.chart.GraphicBarChart; -import pt.c08componentes.s01chartseq.s02sequences.chart.IBarChart; -import pt.c08componentes.s01chartseq.s02sequences.sequence.Fibonacci; -import pt.c08componentes.s01chartseq.s02sequences.sequence.GeometricProgression; -import pt.c08componentes.s01chartseq.s02sequences.sequence.IMathRatioSequence; -import pt.c08componentes.s01chartseq.s02sequences.sequence.IMathSequence; +import pt.c08componentes.s01chartseq.s07multiple.chart.GraphicBarChart; +import pt.c08componentes.s01chartseq.s07multiple.chart.IBarChart; +import pt.c08componentes.s01chartseq.s07multiple.sequence.Fibonacci; +import pt.c08componentes.s01chartseq.s07multiple.sequence.GeometricProgression; +import pt.c08componentes.s01chartseq.s07multiple.sequence.IMathRatioSequence; +import pt.c08componentes.s01chartseq.s07multiple.sequence.IMathSequence; -public class App02ChartSequence { +public class App05ChartSequence { public static void main(String args[]) { System.out.println("Geometric Progression:"); diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/BarChart.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/BarChart.java similarity index 81% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/BarChart.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/chart/BarChart.java index e322ba5a2..ca5f8463c 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/BarChart.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/BarChart.java @@ -1,6 +1,6 @@ -package pt.c08componentes.s01chartseq.s02sequences.chart; +package pt.c08componentes.s01chartseq.s07multiple.chart; -import pt.c08componentes.s01chartseq.s02sequences.sequence.ISequence; +import pt.c08componentes.s01chartseq.s07multiple.sequence.ISequence; public abstract class BarChart implements IBarChart { protected boolean filled; diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/ConsoleBarChart.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/ConsoleBarChart.java similarity index 92% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/ConsoleBarChart.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/chart/ConsoleBarChart.java index 603f36a25..5d634379d 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/ConsoleBarChart.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/ConsoleBarChart.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s02sequences.chart; +package pt.c08componentes.s01chartseq.s07multiple.chart; public class ConsoleBarChart extends BarChart { private char character; diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/GraphicBarChart.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/GraphicBarChart.java similarity index 95% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/GraphicBarChart.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/chart/GraphicBarChart.java index fce36dbfa..7b2ba5595 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/GraphicBarChart.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/GraphicBarChart.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s02sequences.chart; +package pt.c08componentes.s01chartseq.s07multiple.chart; import java.util.ArrayList; import java.util.List; diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/IBarChart.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/IBarChart.java similarity index 60% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/IBarChart.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/chart/IBarChart.java index d8dcba4a2..67885c87c 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/IBarChart.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/IBarChart.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s02sequences.chart; +package pt.c08componentes.s01chartseq.s07multiple.chart; public interface IBarChart extends IChart, IRSequence, IBarChartProperties { diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/IBarChartProperties.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/IBarChartProperties.java similarity index 73% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/IBarChartProperties.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/chart/IBarChartProperties.java index a01ae1109..2d6b97604 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/chart/IBarChartProperties.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/IBarChartProperties.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s02sequences.chart; +package pt.c08componentes.s01chartseq.s07multiple.chart; public interface IBarChartProperties { public boolean isFilled(); diff --git a/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/IChart.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/IChart.java new file mode 100644 index 000000000..7c710190b --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/IChart.java @@ -0,0 +1,5 @@ +package pt.c08componentes.s01chartseq.s07multiple.chart; + +public interface IChart { + public void plot(); +} diff --git a/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/IRSequence.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/IRSequence.java new file mode 100644 index 000000000..8e31dd45e --- /dev/null +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/chart/IRSequence.java @@ -0,0 +1,7 @@ +package pt.c08componentes.s01chartseq.s07multiple.chart; + +import pt.c08componentes.s01chartseq.s07multiple.sequence.ISequence; + +public interface IRSequence { + public void connect(ISequence sequence); +} diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/ArithmeticProgression.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/ArithmeticProgression.java similarity index 83% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/ArithmeticProgression.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/ArithmeticProgression.java index cbf3594c4..0e88c68d7 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/ArithmeticProgression.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/ArithmeticProgression.java @@ -1,6 +1,4 @@ -package pt.c08componentes.s01chartseq.s02sequences.sequence; - -import pt.c06patterns.factory.s10components.sequence.IMathRatioSequence; +package pt.c08componentes.s01chartseq.s07multiple.sequence; public class ArithmeticProgression implements IMathRatioSequence { private int initial, diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/Fibonacci.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/Fibonacci.java similarity index 93% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/Fibonacci.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/Fibonacci.java index df18d4138..19f3180c9 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/Fibonacci.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/Fibonacci.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s02sequences.sequence; +package pt.c08componentes.s01chartseq.s07multiple.sequence; public class Fibonacci implements IMathSequence { private int initialCurrent, initialNext; diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/GeometricProgression.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/GeometricProgression.java similarity index 91% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/GeometricProgression.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/GeometricProgression.java index 2d5ed8eb0..5eebc79de 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/GeometricProgression.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/GeometricProgression.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s02sequences.sequence; +package pt.c08componentes.s01chartseq.s07multiple.sequence; public class GeometricProgression implements IMathRatioSequence { private int initial, diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/IMathRatioSequence.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/IMathRatioSequence.java similarity index 60% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/IMathRatioSequence.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/IMathRatioSequence.java index 902000c8e..65767fb6e 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/IMathRatioSequence.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/IMathRatioSequence.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s02sequences.sequence; +package pt.c08componentes.s01chartseq.s07multiple.sequence; public interface IMathRatioSequence extends IMathSequence, ISeqRatioProperties { diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/IMathSequence.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/IMathSequence.java similarity index 58% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/IMathSequence.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/IMathSequence.java index ae1db7ae2..000731e61 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/IMathSequence.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/IMathSequence.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s02sequences.sequence; +package pt.c08componentes.s01chartseq.s07multiple.sequence; public interface IMathSequence extends ISequence, ISeqInitialProperties { diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/ISeqInitialProperties.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/ISeqInitialProperties.java similarity index 64% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/ISeqInitialProperties.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/ISeqInitialProperties.java index 3ee72042d..3bb5f52ac 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/ISeqInitialProperties.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/ISeqInitialProperties.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s02sequences.sequence; +package pt.c08componentes.s01chartseq.s07multiple.sequence; public interface ISeqInitialProperties { public int getInitial(); diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/ISeqRatioProperties.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/ISeqRatioProperties.java similarity index 63% rename from eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/ISeqRatioProperties.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/ISeqRatioProperties.java index 1c8d98ce5..235ccd191 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s02sequences/sequence/ISeqRatioProperties.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/ISeqRatioProperties.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s02sequences.sequence; +package pt.c08componentes.s01chartseq.s07multiple.sequence; public interface ISeqRatioProperties { public int getRatio(); diff --git a/eclipse/src/pt/c08componentes/s01chartseq/s01start/sequence/ISequence.java b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/ISequence.java similarity index 56% rename from eclipse/src/pt/c08componentes/s01chartseq/s01start/sequence/ISequence.java rename to java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/ISequence.java index 8e53c1923..d7019ee33 100644 --- a/eclipse/src/pt/c08componentes/s01chartseq/s01start/sequence/ISequence.java +++ b/java/src/pt/c08componentes/s01chartseq/s07multiple/sequence/ISequence.java @@ -1,4 +1,4 @@ -package pt.c08componentes.s01chartseq.s01start.sequence; +package pt.c08componentes.s01chartseq.s07multiple.sequence; public interface ISequence { public int first(); diff --git a/labs/2021/05-services/notebook/geoknowledge.ipynb b/labs/2021/05-services/notebook/geoknowledge.ipynb index d64c93bb9..3fbc3136a 100644 --- a/labs/2021/05-services/notebook/geoknowledge.ipynb +++ b/labs/2021/05-services/notebook/geoknowledge.ipynb @@ -37,7 +37,7 @@ "text": [ "[\n", " {\n", - " \"place_id\": 117197145,\n", + " \"place_id\": 131665170,\n", " \"licence\": \"Data \\u00a9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright\",\n", " \"osm_type\": \"way\",\n", " \"osm_id\": 118482151,\n", @@ -53,7 +53,7 @@ " \"class\": \"tourism\",\n", " \"type\": \"museum\",\n", " \"importance\": 0.6921686892957473,\n", - " \"icon\": \"https://nominatim.openstreetmap.org/ui/mapicons//tourist_museum.p.20.png\"\n", + " \"icon\": \"https://nominatim.openstreetmap.org/ui/mapicons/tourist_museum.p.20.png\"\n", " }\n", "]\n" ] @@ -114,7 +114,7 @@ "text": [ "{\n", " \"version\": \"0.6\",\n", - " \"generator\": \"CGImap 0.8.5 (1711473 spike-07.openstreetmap.org)\",\n", + " \"generator\": \"CGImap 0.8.8 (3136443 spike-06.openstreetmap.org)\",\n", " \"copyright\": \"OpenStreetMap and contributors\",\n", " \"attribution\": \"http://www.openstreetmap.org/copyright\",\n", " \"license\": \"http://opendatacommons.org/licenses/odbl/1-0/\",\n", @@ -2665,7 +2665,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -2679,7 +2679,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/labs/2021/05-services/notebook/lab5-base.ipynb b/labs/2021/05-services/notebook/lab5-base.ipynb index a125033ec..71fd93bd7 100644 --- a/labs/2021/05-services/notebook/lab5-base.ipynb +++ b/labs/2021/05-services/notebook/lab5-base.ipynb @@ -629,7 +629,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -643,7 +643,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/labs/2021/05-services/notebook/lab5-tarefas.ipynb b/labs/2021/05-services/notebook/lab5-tarefas.ipynb index 6c2ff8126..289c7193c 100644 --- a/labs/2021/05-services/notebook/lab5-tarefas.ipynb +++ b/labs/2021/05-services/notebook/lab5-tarefas.ipynb @@ -82,7 +82,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -96,7 +96,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/labs/2022/04-mvc/README.md b/labs/2022/04-mvc/README.md index 72baa6af3..2679501e5 100644 --- a/labs/2022/04-mvc/README.md +++ b/labs/2022/04-mvc/README.md @@ -1,5 +1,5 @@ # MVC e Event-driven App -*Lab de Componentização e Reúso de Software 14/08/2021* +*Lab de Componentização e Reúso de Software 20/08/2022* ## Tarefa 1 diff --git a/labs/2022/04-mvc/solucoes/README.md b/labs/2022/04-mvc/solucoes/README.md new file mode 100644 index 000000000..f1602b684 --- /dev/null +++ b/labs/2022/04-mvc/solucoes/README.md @@ -0,0 +1,32 @@ +# Modelo para Apresentação do Lab04 - MVC + +Estrutura de pastas: + +~~~ +├── README.md <- arquivo apresentando a tarefa +│ +├── images <- arquivos de imagens usadas no documento +│ +└── app <- apps do MIT App Inventor exportados em formato `aia` +~~~ + +# Aluno +* `` + +# Tarefa 1 - App no MIT App Inventor + +> Coloque as imagens PNG da captura de seis telas do seu aplicativo: +> * tela 1 - captura da tela completa de design de interface +> * tela 2 - captura de tela do app com nenhum produto selecionado +> * tela 3 - captura de tela do app com primeiro produto selecionado +> * tela 4 - captura de tela do app com segundo produto selecionado +> * tela 5 - compra de um dos produtos efetivada +> * tela 6 - diagrama de blocos do aplicativo +> +> Coloque um link para o arquivo do aplicativo exportado a partir do MIT App Inventor em formato `aia`. Ele estará dentro da pasta `app`. + +# Tarefa 2 - Diagrama de Componentes dirigida a Eventos + +> Coloque a imagem PNG do diagrama, conforme exemplo a seguir: +> +> ![Diagrama Eventos](images/mit-app-inventor-events.png) diff --git a/labs/2022/05-multilevel/README.md b/labs/2022/05-multilevel/README.md new file mode 100644 index 000000000..8c9e24286 --- /dev/null +++ b/labs/2022/05-multilevel/README.md @@ -0,0 +1,13 @@ +# Composição Multinível, Serviços e REST +*Lab de Componentização e Reúso de Software 03/09/2022* + +Elabore um protótipo de uma interface gráfica com um usuário no MIT App Inventor no qual: +* ou se digite o nome de um romance e o aplicativo mostre dados desse romance recuperados da DBPedia; +* ou se digite o número do quadrinho e o aplicativo mostre dados sobre ele do xkcd. + +Serão considerados pontos de qualidade: +* se a app mostrar a imagem do romance (DBPedia) +* se aceitar com espaços e converter para underscore (DBPedia) +* se houver tratamento de erros + +No caso da DBPedia, o usuário não deve digitar o .json. No caso do xkcd, não é suficiente mostrar a imagem dos quadrinhos, porque isso foi feito em sala. Devem ser mostrados outros dados, como título, ano de publicação etc. diff --git a/labs/2022/05-multilevel/notebook/geoknowledge.ipynb b/labs/2022/05-multilevel/notebook/geoknowledge.ipynb new file mode 100644 index 000000000..3fbc3136a --- /dev/null +++ b/labs/2022/05-multilevel/notebook/geoknowledge.ipynb @@ -0,0 +1,2687 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Geo Knowldege\n", + "\n", + "Importação das bibliotecas Python:" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import requests\n", + "import json" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## REST API do OpenStreetMap para Query" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[\n", + " {\n", + " \"place_id\": 131665170,\n", + " \"licence\": \"Data \\u00a9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright\",\n", + " \"osm_type\": \"way\",\n", + " \"osm_id\": 118482151,\n", + " \"boundingbox\": [\n", + " \"51.4785512\",\n", + " \"51.4799711\",\n", + " \"-112.7909406\",\n", + " \"-112.7894948\"\n", + " ],\n", + " \"lat\": \"51.4792159\",\n", + " \"lon\": \"-112.79012880289648\",\n", + " \"display_name\": \"Royal Tyrrell Museum, 1500, North Dinosaur Trail, Nacmine, Drumheller, Alberta, T0J 0Y1, Canada\",\n", + " \"class\": \"tourism\",\n", + " \"type\": \"museum\",\n", + " \"importance\": 0.6921686892957473,\n", + " \"icon\": \"https://nominatim.openstreetmap.org/ui/mapicons/tourist_museum.p.20.png\"\n", + " }\n", + "]\n" + ] + } + ], + "source": [ + "url_template = \"http://nominatim.openstreetmap.org/search?format={format}&q={query}\"\n", + "format = \"json\"\n", + "query = \"Royal Tyrrell Museum\"\n", + "\n", + "url = url_template.replace(\"{format}\", format)\\\n", + " .replace(\"{query}\", query)\n", + "\n", + "data = requests.get(url)\n", + "museum_ref = data.json()\n", + "print(json.dumps(museum_ref, indent=3))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Extraindo o Identificador OSM" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "118482151\n" + ] + } + ], + "source": [ + "print(museum_ref[0][\"osm_id\"])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## REST API do OpenStreetMap para Elementos (Node, Way e Relation)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\n", + " \"version\": \"0.6\",\n", + " \"generator\": \"CGImap 0.8.8 (3136443 spike-06.openstreetmap.org)\",\n", + " \"copyright\": \"OpenStreetMap and contributors\",\n", + " \"attribution\": \"http://www.openstreetmap.org/copyright\",\n", + " \"license\": \"http://opendatacommons.org/licenses/odbl/1-0/\",\n", + " \"elements\": [\n", + " {\n", + " \"type\": \"way\",\n", + " \"id\": 118482151,\n", + " \"timestamp\": \"2019-09-18T22:46:21Z\",\n", + " \"version\": 8,\n", + " \"changeset\": 74647295,\n", + " \"user\": \"Matthew Darwin\",\n", + " \"uid\": 5633991,\n", + " \"nodes\": [\n", + " 1332553185,\n", + " 1332553271,\n", + " 1332553255,\n", + " 1332553305,\n", + " 1332553328,\n", + " 1332553167,\n", + " 1332553161,\n", + " 1332553259,\n", + " 1332553297,\n", + " 1332553188,\n", + " 1332553286,\n", + " 1332553203,\n", + " 1332553376,\n", + " 1332553228,\n", + " 1332553187,\n", + " 1332553223,\n", + " 2424823058,\n", + " 1332553226,\n", + " 1332553212,\n", + " 1332553231,\n", + " 1332553325,\n", + " 1332553350,\n", + " 1332553172,\n", + " 1332553276,\n", + " 1332553344,\n", + " 1332553202,\n", + " 1332553159,\n", + " 1332553250,\n", + " 1332553217,\n", + " 1332553278,\n", + " 1332553324,\n", + " 1332553272,\n", + " 1332553185\n", + " ],\n", + " \"tags\": {\n", + " \"addr:city\": \"Drumheller\",\n", + " \"addr:housenumber\": \"1500\",\n", + " \"addr:street\": \"North Dinosaur Trail\",\n", + " \"alt_name\": \"Royal Tyrrell Museum of Paleontology\",\n", + " \"building\": \"yes\",\n", + " \"museum\": \"paleontology\",\n", + " \"name\": \"Royal Tyrrell Museum\",\n", + " \"tourism\": \"museum\",\n", + " \"website\": \"http://www.tyrrellmuseum.com/\",\n", + " \"wikidata\": \"Q1472318\",\n", + " \"wikipedia\": \"en:Royal Tyrrell Museum of Palaeontology\"\n", + " }\n", + " }\n", + " ]\n", + "}\n" + ] + } + ], + "source": [ + "url_template = \"https://api.openstreetmap.org/api/0.6/{element_type}/{id}.{format}\"\n", + "\n", + "element_type = \"way\" # types: node, way, or relation\n", + "id = str(museum_ref[0][\"osm_id\"])\n", + "format = \"json\"\n", + "\n", + "url = url_template.replace(\"{element_type}\", element_type)\\\n", + " .replace(\"{id}\", id)\\\n", + " .replace(\"{format}\", format)\n", + "\n", + "data = requests.get(url)\n", + "museum_way = data.json()\n", + "print(json.dumps(museum_way, indent=3))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Extraindo o Identificador DBPedia" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "en:Royal Tyrrell Museum of Palaeontology\n" + ] + } + ], + "source": [ + "print(museum_way[\"elements\"][0][\"tags\"][\"wikipedia\"])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## REST API do DBPedia" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\n", + " \"http://en.wikipedia.org/wiki/Royal_Tyrrell_Museum_of_Palaeontology\": {\n", + " \"http://xmlns.com/foaf/0.1/primaryTopic\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_dinosaur_parks\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Ancient_Echoes_Interpretive_Centre\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Canmore_Museum_and_Geoscience_Centre\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/David_McCurdy_Baird\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Provincial_and_territorial_museums_of_Canada\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Ankylosaurinae\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Barnum_Brown\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_geologists\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Albertonykus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Saurornitholestes\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Medusaceratops\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_Upper_Canada_College_alumni\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Fukui_Prefectural_Dinosaur_Museum\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Navajodactylus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_dinosaur_specimens_with_documented_taphonomic_histories\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_dinosaur_specimens_with_preserved_soft_tissue\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Badlands\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Alberta\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Carcharodontosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Drumheller\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Alxasaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Jiangjunmiao\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Philip_J._Currie\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Dong_Zhiming\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Dilophosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Kevin_Taft\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/TMP\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageDisambiguates\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Serendipaceratops\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Latoplatecarpus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Stangerochampsa\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Danek_Mozdzenski\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/RTM\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageDisambiguates\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_people_from_Edmonton\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Albertadromeus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Dinosaur_Provincial_Park\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Wendy_Sloboda\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/1985_in_Canada\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/1992_in_paleontology\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Eugene_S._Gaffney\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Dispersituberoolithus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Kainai_Nation\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_dinosaur_species_on_display\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/The_Amazing_Race_Canada_1\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Timeline_of_ichthyosaur_research\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/2019_in_archosaur_paleontology\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_people_from_Brampton\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Thalattosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/James_Gurney\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Alberta_Highway_56\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Alberta_Highway_9\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Dinotown\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_natural_history_museums\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Tyrannosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_University_of_Toronto_alumni\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Tourism_in_Alberta\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Provincial_historic_sites_of_Alberta\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Acer_rousei\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Wessiea\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Gilchristosuchus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Ankylosauridae\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Nanhsiungchelyidae\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Hadrosauridae\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Ornithomimidae\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Basilemys\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Philip_J._Currie_Dinosaur_Museum\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Hilda_mega-bonebed\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/David_C._Evans_(paleontologist)\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Joseph_Tyrrell\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Canadian_Badlands_Passion_Play\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Ornitholestes\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Chasmosaurinae\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Albertonectes\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/World's_Largest_Dinosaur\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Xenoceratops\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Dinosaur_Trail\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Latenivenatrix\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Unescoceratops\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Borealopelta\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_fossils_with_consumulites\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Athabascasaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Wapuskanectes\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Wendiceratops\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_dinosaur_specimens_preserved_with_agonistic_and_feeding_traces\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Sikannisuchus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Darren_Tanke\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Scollard_Formation\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Brian_Cooley_(artist)\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_pathological_dinosaur_specimens\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Eorpa_(genus)\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Prognathodon\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Nadia_Fr\\u00f6bisch\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Royal_Tyrell_Museum\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageRedirects\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Royal_Tyrrell_Museum\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageRedirects\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Royal_Tyrrell\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageRedirects\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Paleontology\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageRedirects\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/The_Royal_Tyrrell_Museum_of_Paleontology\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageRedirects\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Tyrrell_Museum\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageRedirects\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Tyrrell_Museum_of_Palaeontology\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageRedirects\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/McAbee_Fossil_Beds\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_non-dinosaur_fossil_specimens_with_nicknames\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Alberta_Wilderness_Association\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Cananeuretus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Royal_Alberta_Museum\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\": {\n", + " \"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/Location100027167\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/Depository103177349\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/GeographicalArea108574314\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/ontology/Building\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/WikicatNaturalHistoryMuseums\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/ontology/Museum\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/WikicatMuseumsInCanada\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/Tract108673395\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://www.wikidata.org/entity/Q41176\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/WikicatDinosaurMuseums\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/ontology/AmusementParkAttraction\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://www.wikidata.org/entity/Q33506\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/WikicatFossilMuseums\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/WikicatProvincialHistoricSitesOfAlberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://schema.org/Place\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/YagoGeoEntity\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/YagoPermanentlyLocatedEntity\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/Whole100003553\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/Facility103315023\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/YagoLegalActorGeo\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/ontology/Place\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/ontology/Location\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/Artifact100021939\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/ontology/ArchitecturalStructure\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/Museum103800563\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/WikicatMuseumsEstablishedIn1985\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/Object100002684\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/Region108630985\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://www.w3.org/2002/07/owl#Thing\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/WikicatMuseumsInAlberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/Site108651247\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/WikicatNaturalHistoryMuseumsInCanada\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/class/yago/PhysicalEntity100001930\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing\"\n", + " }\n", + " ],\n", + " \"http://www.w3.org/2000/01/rdf-schema#label\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Royal Tyrrell Museum of Paleontology\",\n", + " \"lang\": \"nl\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Royal Tyrrell Museum of Palaeontology\",\n", + " \"lang\": \"en\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"\\u30ed\\u30a4\\u30e4\\u30eb\\u30fb\\u30c6\\u30a3\\u30ec\\u30eb\\u53e4\\u751f\\u7269\\u5b66\\u535a\\u7269\\u9928\",\n", + " \"lang\": \"ja\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Royal Tyrrell Museum\",\n", + " \"lang\": \"it\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Re\\u011da Muzeo de Paleontologio Tyrrell\",\n", + " \"lang\": \"eo\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"\\u041a\\u043e\\u0440\\u043e\\u043b\\u0456\\u0432\\u0441\\u044c\\u043a\\u0438\\u0439 \\u0422\\u0438\\u0440\\u0440\\u0435\\u043b\\u0456\\u0432\\u0441\\u044c\\u043a\\u0438\\u0439 \\u043c\\u0443\\u0437\\u0435\\u0439 \\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0456\\u0457\",\n", + " \"lang\": \"uk\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"\\u52a0\\u62ff\\u5927\\u7687\\u5bb6\\u8482\\u52d2\\u5c14\\u535a\\u7269\\u9986\",\n", + " \"lang\": \"zh\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"\\u041a\\u043e\\u0440\\u043e\\u043b\\u0435\\u0432\\u0441\\u043a\\u0438\\u0439 \\u0422\\u0438\\u0440\\u0440\\u0435\\u043b\\u043b\\u043e\\u0432\\u0441\\u043a\\u0438\\u0439 \\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0438\\u0447\\u0435\\u0441\\u043a\\u0438\\u0439 \\u043c\\u0443\\u0437\\u0435\\u0439\",\n", + " \"lang\": \"ru\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Museo Tyrrell\",\n", + " \"lang\": \"es\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Royal Tyrrell Museum of Palaeontology\",\n", + " \"lang\": \"cs\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Royal Tyrrell Museum of Palaeontology\",\n", + " \"lang\": \"in\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Mus\\u00e9e royal Tyrrell de pal\\u00e9ontologie\",\n", + " \"lang\": \"fr\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Royal Tyrrell Museum of Palaeontology\",\n", + " \"lang\": \"de\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Museu Reial Tyrrell de Paleontologia\",\n", + " \"lang\": \"ca\"\n", + " }\n", + " ],\n", + " \"http://www.w3.org/2000/01/rdf-schema#comment\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"\\u041a\\u043e\\u0440\\u043e\\u043b\\u0456\\u0432\\u0441\\u044c\\u043a\\u0438\\u0439 \\u0422\\u0438\\u0440\\u0440\\u0435\\u043b\\u0456\\u0432\\u0441\\u044c\\u043a\\u0438\\u0439 \\u043c\\u0443\\u0437\\u0435\\u0439 \\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0456\\u0457 (\\u0430\\u043d\\u0433\\u043b. Royal Tyrrell Museum) \\u2014 \\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0456\\u0447\\u043d\\u0438\\u0439 \\u043c\\u0443\\u0437\\u0435\\u0439, \\u0437\\u043d\\u0430\\u0445\\u043e\\u0434\\u0438\\u0442\\u044c\\u0441\\u044f \\u0437\\u0430 4 \\u043a\\u043c \\u0432\\u0456\\u0434 \\u043c\\u0456\\u0441\\u0442\\u0435\\u0447\\u043a\\u0430 \\u0456 \\u043d\\u0430 \\u043f\\u0456\\u0432\\u043d\\u0456\\u0447\\u043d\\u0438\\u0439-\\u0437\\u0430\\u0445\\u0456\\u0434 \\u0432\\u0456\\u0434 \\u043c\\u0456\\u0441\\u0442\\u0430 \\u041a\\u0430\\u043b\\u0433\\u0430\\u0440\\u0456. \\u0404 \\u0433\\u043e\\u043b\\u043e\\u0432\\u043d\\u0438\\u043c \\u043a\\u0430\\u043d\\u0430\\u0434\\u0441\\u044c\\u043a\\u0438\\u043c \\u0446\\u0435\\u043d\\u0442\\u0440\\u043e\\u043c \\u0434\\u043e\\u0441\\u043b\\u0456\\u0434\\u0436\\u0435\\u043d\\u044c \\u0443 \\u0433\\u0430\\u043b\\u0443\\u0437\\u0456 \\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0456\\u0457 \\u0456 \\u043c\\u0430\\u0454 \\u043f\\u043e\\u043d\\u0430\\u0434 18 000 \\u0441\\u043a\\u0430\\u043c'\\u044f\\u043d\\u0456\\u043b\\u043e\\u0441\\u0442\\u0435\\u0439 \\u0443 \\u043d\\u0430\\u0439\\u0431\\u0456\\u043b\\u044c\\u0448\\u043e\\u043c\\u0443 \\u0441\\u0445\\u043e\\u0432\\u0438\\u0449\\u0456 \\u0432 \\u041a\\u0430\\u043d\\u0430\\u0434\\u0456. \\u0429\\u043e\\u0440\\u0456\\u0447\\u043d\\u043e \\u043c\\u0443\\u0437\\u0435\\u0439 \\u0432\\u0456\\u0434\\u0432\\u0456\\u0434\\u0443\\u044e\\u0442\\u044c 400 \\u0442\\u0438\\u0441\\u044f\\u0447\\u0456 \\u0442\\u0443\\u0440\\u0438\\u0441\\u0442\\u0456\\u0432.\",\n", + " \"lang\": \"uk\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"El Museu Reial Tyrrell de Paleontologia (Royal Tyrrell Museum) \\u00e9s una popular atracci\\u00f3 tur\\u00edstica canadenca i un centre capdavanter en la investigaci\\u00f3 paleontol\\u00f2gica. \\u00c9s conegut per la seva col\\u00b7lecci\\u00f3 de m\\u00e9s de 120.000 f\\u00f2ssils i per les seves instal\\u00b7lacions d'investigaci\\u00f3. El museu va ser nomenat aix\\u00ed en honor de (1858-1957). Va ser inaugurat el 1985 i se li va donar l'estatus de \\\"real\\\" en reconeixement a la seva import\\u00e0ncia per la reina Isabel II el 1990.\",\n", + " \"lang\": \"ca\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Royal Tyrrell Museum adalah sebuah tempat wisata dan pusat riset palaeontologi Kanada yang dikenal karena mengkoleksi lebih dari 130,000 fosil. Royal Tyrrell Museum dioperasikan oleh Kementerian Budaya Alberta.\",\n", + " \"lang\": \"in\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"El Museo Real Tyrrel (en ingl\\u00e9s, Royal Tyrrell Museum), conocido todav\\u00eda hoy en d\\u00eda principalmente por su nombre de origien: Museo Tyrrell, es un museo de historia natural especializado en paleontolog\\u00eda. Est\\u00e1 ubicado en el a 6 kil\\u00f3metros del municipio de en la provincia de Alberta, en Canad\\u00e1. El museo se encuentra a 135 km de Calgary y es mundialmente conocido por sus abundantes y excepcionales colecciones de f\\u00f3siles y esqueletos de dinosaurios, y por sus laboratorios e instalaciones de investigaci\\u00f3n.\",\n", + " \"lang\": \"es\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Het Royal Tyrell Museum of Paleontology is een van de belangrijkste musea ter wereld over dinosauri\\u00ebrs. Het heeft een verzameling van meer dan 160.000 fossielen. Het ligt in Drumheller in de Canadese provincie Alberta op zowat 135 kilometer ten oosten van Calgary.\",\n", + " \"lang\": \"nl\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"\\u52a0\\u62ff\\u5927\\u7687\\u5bb6\\u8482\\u52d2\\u5c14\\u535a\\u7269\\u9986\\uff08\\u82f1\\u8a9e\\uff1aRoyal Tyrrell Museum of Palaeontology\\uff09\\uff0c\\u53c8\\u7a31\\u52a0\\u62ff\\u5927\\u6050\\u9f99\\u535a\\u7269\\u9986\\uff0c\\u662f\\u4f4d\\u65bc\\u52a0\\u62ff\\u5927\\u4e9e\\u4f2f\\u9054\\u7701\\u7684\\u81ea\\u7136\\u79d1\\u5b78\\u535a\\u7269\\u9986\\uff0c\\u7687\\u5bb6\\u8482\\u52d2\\u723e\\u535a\\u7269\\u9928\\u4e5f\\u662f\\u5168\\u7403\\u6700\\u5927\\u7684\\u53e4\\u751f\\u7269\\u535a\\u7269\\u9986\\uff0c\\u6536\\u85cf\\u4e16\\u754c\\u4e0a\\u6700\\u591a\\u7684\\u6050\\u9f99\\u5316\\u77f3\\u6807\\u672c\\uff0c\\u6bcf\\u5e74\\u6765\\u81ea\\u4e16\\u754c\\u5404\\u5730\\u7684\\u53c2\\u89c2\\u8005\\u7d04\\u670940\\u4e07\\u4eba\\u3002\\u76ee\\u524d\\uff0c\\u535a\\u7269\\u9928\\u7531\\u8ca0\\u8cac\\u7ba1\\u7406\\u53ca\\u71df\\u904b\\uff0c\\u8a72\\u9928\\u4e5f\\u662f\\uff08CMA\\uff09\\u3001\\uff08CHIN\\uff09\\u548c\\u7684\\u6210\\u54e1\\u3002 \\u52a0\\u62ff\\u5927\\u7687\\u5bb6\\u8482\\u52d2\\u723e\\u535a\\u7269\\u9928\\u6210\\u7acb\\u4e8e1985\\u5e74\\uff0c\\u70ba\\u7eaa\\u5ff51884\\u5e74\\u53d1\\u73b0\\u827e\\u4f2f\\u5854\\u9f99\\u9aa8\\u7684\\u52a0\\u62ff\\u5927\\u5730\\u8d28\\u5b66\\u5bb6\\u7ea6\\u745f\\u592b\\u00b7\\u8482\\u52d2\\u5c14\\uff0c\\u800c\\u5c07\\u535a\\u7269\\u9928\\u547d\\u540d\\u70ba\\u8482\\u52d2\\u723e\\u535a\\u7269\\u9928\\u3002\",\n", + " \"lang\": \"zh\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Il Royal Tyrrell Museum \\u00e8 un museo e un centro di ricerca paleontologico situato presso il giacimento fossilifero del tardo Cretaceo denominato \\\"Horseshoe Canyon Formation\\\", a circa 6 km a nord-ovest di (Alberta, Canada) e a circa 135 km a nord-est dalla citt\\u00e0 pi\\u00f9 grande dello stato, Calgary. \\u00c8 un'attrazione turistica gestita dal ministero della cultura dell'Alberta. ed ospita una collezione di pi\\u00f9 di 130.000 fossili. Il museo fa parte della (CMA), del (CHIN), e del (VMC) - Mus\\u00e9e virtuel du Canada.\",\n", + " \"lang\": \"it\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Royal Tyrrell Museum of Paleontology (\\u010desky:Kr\\u00e1lovsk\\u00e9 Tyrellovo muzeum paleontologie) je v\\u00fdznamn\\u00fdm paleontologick\\u00fdm muzeem v kanadsk\\u00e9 provincii Alberta. Jeho n\\u00e1zev je odvozen od p\\u0159\\u00edjmen\\u00ed prvn\\u00edho paleontologa, kter\\u00fd v oblasti Jelen\\u00ed \\u0159eky (Red Deer River) v roce 1884 objevil zkamen\\u011bliny m\\u00edstn\\u00edch dinosaur\\u016f.\",\n", + " \"lang\": \"cs\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Le mus\\u00e9e royal Tyrrell de pal\\u00e9ontologie (en anglais : Royal Tyrrell Museum of Palaeontology) est un mus\\u00e9e de pal\\u00e9ontologie situ\\u00e9 \\u00e0 Drumheller dans les badlands en Alberta (Canada). Fond\\u00e9 en 1985, plus de 600 000 personnes le visit\\u00e8rent d\\u00e8s sa premi\\u00e8re ann\\u00e9e d'activit\\u00e9. On y compte 10 galeries d'exposition. Le gigantesque mus\\u00e9e Tyrrell renferme plus de 80 000 sp\\u00e9cimens, y compris une quarantaine de squelettes complets de dinosaures dont un Tyrannosaurus rex et un Albertosaurus. On y trouve des \\u00e9l\\u00e9ments d'exposition \\u00e0 interaction tactile, des ordinateurs et des projections audiovisuelles.\",\n", + " \"lang\": \"fr\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"\\u041a\\u043e\\u0440\\u043e\\u043b\\u0435\\u0301\\u0432\\u0441\\u043a\\u0438\\u0439 \\u0422\\u0438\\u0440\\u0440\\u0435\\u0301\\u043b\\u043b\\u043e\\u0432\\u0441\\u043a\\u0438\\u0439 \\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0438\\u0301\\u0447\\u0435\\u0441\\u043a\\u0438\\u0439 \\u043c\\u0443\\u0437\\u0435\\u0301\\u0439 (\\u0430\\u043d\\u0433\\u043b. Royal Tyrrell Museum of Palaeontology) \\u2014 \\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0438\\u0447\\u0435\\u0441\\u043a\\u0438\\u0439 \\u043c\\u0443\\u0437\\u0435\\u0439, \\u0440\\u0430\\u0441\\u043f\\u043e\\u043b\\u043e\\u0436\\u0435\\u043d\\u043d\\u044b\\u0439 \\u0432 , \\u0432 \\u043e\\u0431\\u043b\\u0430\\u0441\\u0442\\u0438 \\u0431\\u0435\\u0434\\u043b\\u0435\\u043d\\u0434\\u0430 \\u0410\\u043b\\u044c\\u0431\\u0435\\u0440\\u0442\\u044b (\\u041a\\u0430\\u043d\\u0430\\u0434\\u0430). \\u041e\\u0441\\u043d\\u043e\\u0432\\u0430\\u043d \\u0432 1985 \\u0433\\u043e\\u0434\\u0443. \\u0417\\u0430 \\u0432\\u0441\\u0451 \\u0432\\u0440\\u0435\\u043c\\u044f \\u0441\\u0443\\u0449\\u0435\\u0441\\u0442\\u0432\\u043e\\u0432\\u0430\\u043d\\u0438\\u044f \\u0435\\u0433\\u043e \\u043f\\u043e\\u0441\\u0435\\u0442\\u0438\\u043b\\u043e \\u0431\\u043e\\u043b\\u0435\\u0435 600 000 \\u0447\\u0435\\u043b\\u043e\\u0432\\u0435\\u043a. \\u0412 \\u043c\\u0443\\u0437\\u0435\\u0435 \\u0438\\u043c\\u0435\\u0435\\u0442\\u0441\\u044f 10 \\u0432\\u044b\\u0441\\u0442\\u0430\\u0432\\u043e\\u0447\\u043d\\u044b\\u0445 \\u0433\\u0430\\u043b\\u0435\\u0440\\u0435\\u0439. \\u0412 \\u0433\\u0438\\u0433\\u0430\\u043d\\u0442\\u0441\\u043a\\u043e\\u043c \\u0422\\u0438\\u0440\\u0440\\u0435\\u043b\\u043b\\u043e\\u0432\\u0441\\u043a\\u043e\\u043c \\u043c\\u0443\\u0437\\u0435\\u0435 \\u0445\\u0440\\u0430\\u043d\\u0438\\u0442\\u0441\\u044f \\u0431\\u043e\\u043b\\u0435\\u0435 80 000 \\u044d\\u043a\\u0441\\u043f\\u043e\\u043d\\u0430\\u0442\\u043e\\u0432, \\u0432 \\u0442\\u043e\\u043c \\u0447\\u0438\\u0441\\u043b\\u0435 \\u0441\\u043e\\u0440\\u043e\\u043a \\u043f\\u043e\\u043b\\u043d\\u044b\\u0445 \\u0441\\u043a\\u0435\\u043b\\u0435\\u0442\\u043e\\u0432 \\u0434\\u0438\\u043d\\u043e\\u0437\\u0430\\u0432\\u0440\\u043e\\u0432, \\u0432 \\u0442\\u043e\\u043c \\u0447\\u0438\\u0441\\u043b\\u0435 \\u0432\\u0438\\u0434\\u043e\\u0432 Tyrannosaurus rex \\u0438 Albertosaurus. \\u0412 \\u0432\\u044b\\u0441\\u0442\\u0430\\u0432\\u043e\\u0447\\u043d\\u044b\\u0445 \\u0437\\u0430\\u043b\\u0430\\u0445 \\u0438\\u0441\\u043f\\u043e\\u043b\\u044c\\u0437\\u0443\\u044e\\u0442\\u0441\\u044f \\u0438\\u043d\\u0442\\u0435\\u0440\\u0430\\u043a\\u0442\\u0438\\u0432\\u043d\\u044b\\u0435 \\u0441\\u0435\\u043d\\u0441\\u043e\\u0440\\u043d\\u044b\\u0435 \\u044d\\u043b\\u0435\\u043c\\u0435\\u043d\\u0442\\u044b, \\u043a\\u043e\\u043c\\u043f\\u044c\\u044e\\u0442\\u0435\\u0440\\u044b \\u0438 \\u0430\\u0443\\u0434\\u0438\\u043e\\u0432\\u0438\\u0437\\u0443\\u0430\\u043b\\u044c\\u043d\\u044b\\u0435 \\u043f\\u0440\\u043e\\u0435\\u043a\\u0442\\u043e\\u0440\\u044b.\",\n", + " \"lang\": \"ru\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"\\u30ed\\u30a4\\u30e4\\u30eb\\u30fb\\u30c6\\u30a3\\u30ec\\u30eb\\u53e4\\u751f\\u7269\\u5b66\\u535a\\u7269\\u9928\\uff08\\u30ed\\u30a4\\u30e4\\u30eb\\u30fb\\u30c6\\u30a3\\u30ec\\u30eb\\u3053\\u305b\\u3044\\u3076\\u3064\\u304c\\u304f\\u306f\\u304f\\u3076\\u3064\\u304b\\u3093\\u3001The Royal Tyrrell Museum of Palaeontology\\uff09\\u306f\\u30ab\\u30ca\\u30c0\\u30a2\\u30eb\\u30d0\\u30fc\\u30bf\\u5dde\\u30c9\\u30e9\\u30e0\\u30d8\\u30e9\\u30fc\\u306e\\u30df\\u30c3\\u30c9\\u30e9\\u30f3\\u30c9\\u5dde\\u7acb\\u516c\\u5712\\u5185\\u306b\\u3042\\u308b\\u3001\\u6050\\u7adc\\u3068\\u30d0\\u30fc\\u30b8\\u30a7\\u30b9\\u52d5\\u7269\\u7fa4\\u306e\\u5316\\u77f3\\u306e\\u5c55\\u793a\\u3067\\u4e16\\u754c\\u7684\\u306b\\u6709\\u540d\\u306a\\u535a\\u7269\\u9928\\u3002\\u7279\\u306b\\u3001\\u6050\\u7adc\\u306b\\u95a2\\u3057\\u3066\\u306f\\u305d\\u306e\\u898f\\u6a21\\u306f\\u4e16\\u754c\\u6700\\u5927\\u7d1a\\u3067\\u3042\\u308b\\u3002\",\n", + " \"lang\": \"ja\"\n", + " }\n", + " ],\n", + " \"http://xmlns.com/foaf/0.1/name\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Royal Tyrrell Museum of Palaeontology\",\n", + " \"lang\": \"en\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"\",\n", + " \"lang\": \"en\"\n", + " }\n", + " ],\n", + " \"http://xmlns.com/foaf/0.1/homepage\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"https://tyrrellmuseum.com\"\n", + " }\n", + " ],\n", + " \"http://www.w3.org/2003/01/geo/wgs84_pos#lat\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": 51.47916793823242,\n", + " \"datatype\": \"http://www.w3.org/2001/XMLSchema#float\"\n", + " }\n", + " ],\n", + " \"http://www.w3.org/2003/01/geo/wgs84_pos#long\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": -112.7900009155273,\n", + " \"datatype\": \"http://www.w3.org/2001/XMLSchema#float\"\n", + " }\n", + " ],\n", + " \"http://xmlns.com/foaf/0.1/depiction\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://commons.wikimedia.org/wiki/Special:FilePath/Royal_tyrrell_entrance.JPG\"\n", + " }\n", + " ],\n", + " \"http://xmlns.com/foaf/0.1/isPrimaryTopicOf\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://en.wikipedia.org/wiki/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://www.w3.org/2003/01/geo/wgs84_pos#geometry\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"POINT(-112.79000091553 51.479167938232)\",\n", + " \"datatype\": \"http://www.openlinksw.com/schemas/virtrdf#Geometry\"\n", + " }\n", + " ],\n", + " \"http://purl.org/dc/terms/subject\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Paleontology_in_Alberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Natural_history_museums_in_Canada\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Dinosaur_museums\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Museums_established_in_1985\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Museums_in_Alberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Organizations_based_in_Canada_with_royal_patronage\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Burgess_Shale_fossils\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Buildings_and_structures_in_Drumheller\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Fossil_museums\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Provincial_historic_sites_of_Alberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:1985_establishments_in_Alberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Paleontology_in_Canada\"\n", + " }\n", + " ],\n", + " \"http://www.w3.org/2002/07/owl#sameAs\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://fr.dbpedia.org/resource/Mus\\u00e9e_royal_Tyrrell_de_pal\\u00e9ontologie\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://cs.dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://nl.dbpedia.org/resource/Royal_Tyrrell_Museum_of_Paleontology\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://de.dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://es.dbpedia.org/resource/Museo_Tyrrell\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://he.dbpedia.org/resource/\\u05de\\u05d5\\u05d6\\u05d9\\u05d0\\u05d5\\u05df_\\u05d8\\u05d9\\u05e8\\u05dc_\\u05d4\\u05de\\u05dc\\u05db\\u05d5\\u05ea\\u05d9\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://zh.dbpedia.org/resource/\\u52a0\\u62ff\\u5927\\u7687\\u5bb6\\u8482\\u52d2\\u5c14\\u535a\\u7269\\u9986\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://ru.dbpedia.org/resource/\\u041a\\u043e\\u0440\\u043e\\u043b\\u0435\\u0432\\u0441\\u043a\\u0438\\u0439_\\u0422\\u0438\\u0440\\u0440\\u0435\\u043b\\u043b\\u043e\\u0432\\u0441\\u043a\\u0438\\u0439_\\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0438\\u0447\\u0435\\u0441\\u043a\\u0438\\u0439_\\u043c\\u0443\\u0437\\u0435\\u0439\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://rdf.freebase.com/ns/m.04dq8x\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://sr.dbpedia.org/resource/\\u0422\\u0438\\u0440\\u0435\\u043b\\u043e\\u0432_\\u043a\\u0440\\u0430\\u0459\\u0435\\u0432\\u0441\\u043a\\u0438_\\u043c\\u0443\\u0437\\u0435\\u0458_\\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0438\\u0458\\u0435\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://yago-knowledge.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://simple.dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://ja.dbpedia.org/resource/\\u30ed\\u30a4\\u30e4\\u30eb\\u30fb\\u30c6\\u30a3\\u30ec\\u30eb\\u53e4\\u751f\\u7269\\u5b66\\u535a\\u7269\\u9928\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://ca.dbpedia.org/resource/Museu_Reial_Tyrrell_de_Paleontologia\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://uk.dbpedia.org/resource/\\u041a\\u043e\\u0440\\u043e\\u043b\\u0456\\u0432\\u0441\\u044c\\u043a\\u0438\\u0439_\\u0422\\u0438\\u0440\\u0440\\u0435\\u043b\\u0456\\u0432\\u0441\\u044c\\u043a\\u0438\\u0439_\\u043c\\u0443\\u0437\\u0435\\u0439_\\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0456\\u0457\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"https://global.dbpedia.org/id/Urrm\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://it.dbpedia.org/resource/Royal_Tyrrell_Museum\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://id.dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://eo.dbpedia.org/resource/Re\\u011da_Muzeo_de_Paleontologio_Tyrrell\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://www.wikidata.org/entity/Q1472318\"\n", + " }\n", + " ],\n", + " \"http://www.georss.org/georss/point\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"51.479166666666664 -112.79\"\n", + " }\n", + " ],\n", + " \"http://www.w3.org/2004/02/skos/core#closeMatch\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://www.grid.ac/institutes/grid.452737.0\"\n", + " }\n", + " ],\n", + " \"http://www.w3.org/ns/prov#wasDerivedFrom\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://en.wikipedia.org/wiki/Royal_Tyrrell_Museum_of_Palaeontology?oldid=1024210055&ns=0\"\n", + " }\n", + " ],\n", + " \"http://purl.org/linguistics/gold/hypernym\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Attraction\"\n", + " }\n", + " ],\n", + " \"http://schema.org/sameAs\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://viaf.org/viaf/124962175\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/visitors\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": 470000,\n", + " \"datatype\": \"http://www.w3.org/2001/XMLSchema#integer\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/established\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"1985-09-25\",\n", + " \"datatype\": \"http://www.w3.org/2001/XMLSchema#date\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/owner\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Executive_Council_of_Alberta\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Tertiary_education\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Vertebrate\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/File:California_Academy_of_Sciences_-_Interior_6_2017-06-09.jpg\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/File:Royal_Tyrell_fossil_lab.jpg\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/File:Royal_Tyrrell_Museum_from_the_viewpoint.jpg\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/File:Tyrrell_Museum_Badlands_from_the_interpretive_trail_6.jpg\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Buildings_and_structures_in_Drumheller\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/File:Joseph_Burr_Tyrrell_bust.jpg\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/File:Attacked_mammoth.jpg\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Sinraptor\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Thyreophora\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Natural_history_museums_in_Canada\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Invertebrate\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Paleocene\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/File:Nodosaur.jpg\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Cenozoic\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Support_group\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Burgess_Shale_fossils\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Tyrannosaurus\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Canadian_dollar\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Institute_of_Vertebrate_Paleontology_and_Paleoanthropology\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Palynology\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Cretaceous\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/List_of_natural_history_museums\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Premier_of_Alberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Alberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Northern_Canada\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Alxasaurus\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Shonisaurus\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Museums_established_in_1985\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Alberta_Museum\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Museums_in_Alberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Triceratops\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Late_Cretaceous\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Fossil_museums\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Midland_Provincial_Park\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Provincial_historic_sites_of_Alberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Albertosaurus\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Drumheller\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Primary_education\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Camarasaurus\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Badlands\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Executive_Council_of_Alberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Chinese_Communist_Revolution\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Lagerst\\u00e4tte\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Saskatchewan\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Holotype\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Early_Cretaceous\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Dinosaur_museums\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Calgary\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Peter_Lougheed\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Bone_bed\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Horseshoe_Canyon_Formation\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Organizations_based_in_Canada_with_royal_patronage\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Athabasca_oil_sands\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Triassic\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Paleontology_in_Alberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/China-Canada_Dinosaur_Project\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Borealopelta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Western_world\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Geological_Survey_of_Canada\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Trail\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Lorraine_Malach\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Elizabeth_II\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/File:Royal_Tyrrell_Museum_of_Palaeontology.jpg\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Downtown_Edmonton\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Burgess_Shale\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Paleontology\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Red_Deer_River\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Joseph_Tyrrell\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Specimens_of_Tyrannosaurus\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/List_of_museums_in_Alberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:1985_establishments_in_Alberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Dinosaur_Provincial_Park\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/World's_Largest_Dinosaur\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Category:Paleontology_in_Canada\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Paleozoic\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Manitoba\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Era_(geology)\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/wikiPageUsesTemplate\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Authority_control\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Official\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Convert\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Coord\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Sfn\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Portal_bar\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Commons_category\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Reflist\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Multiple_image\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Cite_journal\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Notefoot\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Notetag\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Alberta_parks\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Start_date_and_age\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Template:Infobox_museum\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/abstract\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Le mus\\u00e9e royal Tyrrell de pal\\u00e9ontologie (en anglais : Royal Tyrrell Museum of Palaeontology) est un mus\\u00e9e de pal\\u00e9ontologie situ\\u00e9 \\u00e0 Drumheller dans les badlands en Alberta (Canada). Fond\\u00e9 en 1985, plus de 600 000 personnes le visit\\u00e8rent d\\u00e8s sa premi\\u00e8re ann\\u00e9e d'activit\\u00e9. On y compte 10 galeries d'exposition. Le gigantesque mus\\u00e9e Tyrrell renferme plus de 80 000 sp\\u00e9cimens, y compris une quarantaine de squelettes complets de dinosaures dont un Tyrannosaurus rex et un Albertosaurus. On y trouve des \\u00e9l\\u00e9ments d'exposition \\u00e0 interaction tactile, des ordinateurs et des projections audiovisuelles. Important centre de recherche, le mus\\u00e9e Tyrrell offre \\u00e9galement \\u00e0 ses visiteurs la possibilit\\u00e9 d'observer le travail des scientifiques qui nettoient les os et pr\\u00e9parent les sp\\u00e9cimens destin\\u00e9s \\u00e0 \\u00eatre expos\\u00e9s. \\u00c0 cela s'ajoutent plusieurs sentiers de randonn\\u00e9es et des aires de pique-nique pour ceux et celles qui souhaiteraient explorer les paysages uniques des badlands.\",\n", + " \"lang\": \"fr\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"\\u041a\\u043e\\u0440\\u043e\\u043b\\u0435\\u0301\\u0432\\u0441\\u043a\\u0438\\u0439 \\u0422\\u0438\\u0440\\u0440\\u0435\\u0301\\u043b\\u043b\\u043e\\u0432\\u0441\\u043a\\u0438\\u0439 \\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0438\\u0301\\u0447\\u0435\\u0441\\u043a\\u0438\\u0439 \\u043c\\u0443\\u0437\\u0435\\u0301\\u0439 (\\u0430\\u043d\\u0433\\u043b. Royal Tyrrell Museum of Palaeontology) \\u2014 \\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0438\\u0447\\u0435\\u0441\\u043a\\u0438\\u0439 \\u043c\\u0443\\u0437\\u0435\\u0439, \\u0440\\u0430\\u0441\\u043f\\u043e\\u043b\\u043e\\u0436\\u0435\\u043d\\u043d\\u044b\\u0439 \\u0432 , \\u0432 \\u043e\\u0431\\u043b\\u0430\\u0441\\u0442\\u0438 \\u0431\\u0435\\u0434\\u043b\\u0435\\u043d\\u0434\\u0430 \\u0410\\u043b\\u044c\\u0431\\u0435\\u0440\\u0442\\u044b (\\u041a\\u0430\\u043d\\u0430\\u0434\\u0430). \\u041e\\u0441\\u043d\\u043e\\u0432\\u0430\\u043d \\u0432 1985 \\u0433\\u043e\\u0434\\u0443. \\u0417\\u0430 \\u0432\\u0441\\u0451 \\u0432\\u0440\\u0435\\u043c\\u044f \\u0441\\u0443\\u0449\\u0435\\u0441\\u0442\\u0432\\u043e\\u0432\\u0430\\u043d\\u0438\\u044f \\u0435\\u0433\\u043e \\u043f\\u043e\\u0441\\u0435\\u0442\\u0438\\u043b\\u043e \\u0431\\u043e\\u043b\\u0435\\u0435 600 000 \\u0447\\u0435\\u043b\\u043e\\u0432\\u0435\\u043a. \\u0412 \\u043c\\u0443\\u0437\\u0435\\u0435 \\u0438\\u043c\\u0435\\u0435\\u0442\\u0441\\u044f 10 \\u0432\\u044b\\u0441\\u0442\\u0430\\u0432\\u043e\\u0447\\u043d\\u044b\\u0445 \\u0433\\u0430\\u043b\\u0435\\u0440\\u0435\\u0439. \\u0412 \\u0433\\u0438\\u0433\\u0430\\u043d\\u0442\\u0441\\u043a\\u043e\\u043c \\u0422\\u0438\\u0440\\u0440\\u0435\\u043b\\u043b\\u043e\\u0432\\u0441\\u043a\\u043e\\u043c \\u043c\\u0443\\u0437\\u0435\\u0435 \\u0445\\u0440\\u0430\\u043d\\u0438\\u0442\\u0441\\u044f \\u0431\\u043e\\u043b\\u0435\\u0435 80 000 \\u044d\\u043a\\u0441\\u043f\\u043e\\u043d\\u0430\\u0442\\u043e\\u0432, \\u0432 \\u0442\\u043e\\u043c \\u0447\\u0438\\u0441\\u043b\\u0435 \\u0441\\u043e\\u0440\\u043e\\u043a \\u043f\\u043e\\u043b\\u043d\\u044b\\u0445 \\u0441\\u043a\\u0435\\u043b\\u0435\\u0442\\u043e\\u0432 \\u0434\\u0438\\u043d\\u043e\\u0437\\u0430\\u0432\\u0440\\u043e\\u0432, \\u0432 \\u0442\\u043e\\u043c \\u0447\\u0438\\u0441\\u043b\\u0435 \\u0432\\u0438\\u0434\\u043e\\u0432 Tyrannosaurus rex \\u0438 Albertosaurus. \\u0412 \\u0432\\u044b\\u0441\\u0442\\u0430\\u0432\\u043e\\u0447\\u043d\\u044b\\u0445 \\u0437\\u0430\\u043b\\u0430\\u0445 \\u0438\\u0441\\u043f\\u043e\\u043b\\u044c\\u0437\\u0443\\u044e\\u0442\\u0441\\u044f \\u0438\\u043d\\u0442\\u0435\\u0440\\u0430\\u043a\\u0442\\u0438\\u0432\\u043d\\u044b\\u0435 \\u0441\\u0435\\u043d\\u0441\\u043e\\u0440\\u043d\\u044b\\u0435 \\u044d\\u043b\\u0435\\u043c\\u0435\\u043d\\u0442\\u044b, \\u043a\\u043e\\u043c\\u043f\\u044c\\u044e\\u0442\\u0435\\u0440\\u044b \\u0438 \\u0430\\u0443\\u0434\\u0438\\u043e\\u0432\\u0438\\u0437\\u0443\\u0430\\u043b\\u044c\\u043d\\u044b\\u0435 \\u043f\\u0440\\u043e\\u0435\\u043a\\u0442\\u043e\\u0440\\u044b. \\u0411\\u0443\\u0434\\u0443\\u0447\\u0438 \\u043a\\u0440\\u0443\\u043f\\u043d\\u044b\\u043c \\u0438\\u0441\\u0441\\u043b\\u0435\\u0434\\u043e\\u0432\\u0430\\u0442\\u0435\\u043b\\u044c\\u0441\\u043a\\u0438\\u043c \\u0446\\u0435\\u043d\\u0442\\u0440\\u043e\\u043c, \\u0422\\u0438\\u0440\\u0440\\u0435\\u043b\\u043e\\u0432\\u0441\\u043a\\u0438\\u0439 \\u043c\\u0443\\u0437\\u0435\\u0439 \\u0442\\u0430\\u043a\\u0436\\u0435 \\u043f\\u0440\\u0435\\u0434\\u043e\\u0441\\u0442\\u0430\\u0432\\u043b\\u044f\\u0435\\u0442 \\u0441\\u0432\\u043e\\u0438\\u043c \\u043f\\u043e\\u0441\\u0435\\u0442\\u0438\\u0442\\u0435\\u043b\\u044f\\u043c \\u0432\\u043e\\u0437\\u043c\\u043e\\u0436\\u043d\\u043e\\u0441\\u0442\\u044c \\u043d\\u0430\\u0431\\u043b\\u044e\\u0434\\u0430\\u0442\\u044c \\u0437\\u0430 \\u0440\\u0430\\u0431\\u043e\\u0442\\u043e\\u0439 \\u0443\\u0447\\u0451\\u043d\\u044b\\u0445, \\u043e\\u0447\\u0438\\u0449\\u0430\\u044e\\u0449\\u0438\\u0445 \\u043a\\u043e\\u0441\\u0442\\u0438 \\u0438 \\u043f\\u043e\\u0434\\u0433\\u043e\\u0442\\u0430\\u0432\\u043b\\u0438\\u0432\\u0430\\u044e\\u0449\\u0438\\u0445 \\u0440\\u0430\\u0437\\u043d\\u044b\\u0435 \\u044d\\u043a\\u0441\\u043f\\u043e\\u043d\\u0430\\u0442\\u044b \\u0434\\u043b\\u044f \\u0432\\u044b\\u0441\\u0442\\u0430\\u0432\\u043e\\u043a. \\u041a\\u0440\\u043e\\u043c\\u0435 \\u0442\\u043e\\u0433\\u043e, \\u043d\\u0430 \\u0442\\u0435\\u0440\\u0440\\u0438\\u0442\\u043e\\u0440\\u0438\\u0438 \\u043c\\u0443\\u0437\\u0435\\u044f \\u043c\\u043d\\u043e\\u0433\\u043e \\u0442\\u0440\\u043e\\u043f \\u0434\\u043b\\u044f \\u043f\\u0440\\u043e\\u0433\\u0443\\u043b\\u043e\\u043a \\u0438 \\u0437\\u043e\\u043d \\u0434\\u043b\\u044f \\u043f\\u0438\\u043a\\u043d\\u0438\\u043a\\u043e\\u0432 \\u0434\\u043b\\u044f \\u0442\\u0435\\u0445, \\u043a\\u0442\\u043e \\u0445\\u043e\\u0442\\u0435\\u043b \\u0431\\u044b \\u043f\\u043e\\u0437\\u043d\\u0430\\u043a\\u043e\\u043c\\u0438\\u0442\\u044c\\u0441\\u044f \\u0441 \\u043f\\u0440\\u0438\\u0447\\u0443\\u0434\\u043b\\u0438\\u0432\\u044b\\u043c\\u0438 \\u043f\\u0435\\u0439\\u0437\\u0430\\u0436\\u0430\\u043c\\u0438 \\u0431\\u0435\\u0441\\u043f\\u043b\\u043e\\u0434\\u043d\\u044b\\u0445 \\u0437\\u0435\\u043c\\u0435\\u043b\\u044c \\u0411\\u044d\\u0434\\u043b\\u0435\\u043d\\u0434\\u0441.\",\n", + " \"lang\": \"ru\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"\\u52a0\\u62ff\\u5927\\u7687\\u5bb6\\u8482\\u52d2\\u5c14\\u535a\\u7269\\u9986\\uff08\\u82f1\\u8a9e\\uff1aRoyal Tyrrell Museum of Palaeontology\\uff09\\uff0c\\u53c8\\u7a31\\u52a0\\u62ff\\u5927\\u6050\\u9f99\\u535a\\u7269\\u9986\\uff0c\\u662f\\u4f4d\\u65bc\\u52a0\\u62ff\\u5927\\u4e9e\\u4f2f\\u9054\\u7701\\u7684\\u81ea\\u7136\\u79d1\\u5b78\\u535a\\u7269\\u9986\\uff0c\\u7687\\u5bb6\\u8482\\u52d2\\u723e\\u535a\\u7269\\u9928\\u4e5f\\u662f\\u5168\\u7403\\u6700\\u5927\\u7684\\u53e4\\u751f\\u7269\\u535a\\u7269\\u9986\\uff0c\\u6536\\u85cf\\u4e16\\u754c\\u4e0a\\u6700\\u591a\\u7684\\u6050\\u9f99\\u5316\\u77f3\\u6807\\u672c\\uff0c\\u6bcf\\u5e74\\u6765\\u81ea\\u4e16\\u754c\\u5404\\u5730\\u7684\\u53c2\\u89c2\\u8005\\u7d04\\u670940\\u4e07\\u4eba\\u3002\\u76ee\\u524d\\uff0c\\u535a\\u7269\\u9928\\u7531\\u8ca0\\u8cac\\u7ba1\\u7406\\u53ca\\u71df\\u904b\\uff0c\\u8a72\\u9928\\u4e5f\\u662f\\uff08CMA\\uff09\\u3001\\uff08CHIN\\uff09\\u548c\\u7684\\u6210\\u54e1\\u3002 \\u52a0\\u62ff\\u5927\\u7687\\u5bb6\\u8482\\u52d2\\u723e\\u535a\\u7269\\u9928\\u6210\\u7acb\\u4e8e1985\\u5e74\\uff0c\\u70ba\\u7eaa\\u5ff51884\\u5e74\\u53d1\\u73b0\\u827e\\u4f2f\\u5854\\u9f99\\u9aa8\\u7684\\u52a0\\u62ff\\u5927\\u5730\\u8d28\\u5b66\\u5bb6\\u7ea6\\u745f\\u592b\\u00b7\\u8482\\u52d2\\u5c14\\uff0c\\u800c\\u5c07\\u535a\\u7269\\u9928\\u547d\\u540d\\u70ba\\u8482\\u52d2\\u723e\\u535a\\u7269\\u9928\\u3002\",\n", + " \"lang\": \"zh\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Het Royal Tyrell Museum of Paleontology is een van de belangrijkste musea ter wereld over dinosauri\\u00ebrs. Het heeft een verzameling van meer dan 160.000 fossielen. Het ligt in Drumheller in de Canadese provincie Alberta op zowat 135 kilometer ten oosten van Calgary.\",\n", + " \"lang\": \"nl\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Il Royal Tyrrell Museum \\u00e8 un museo e un centro di ricerca paleontologico situato presso il giacimento fossilifero del tardo Cretaceo denominato \\\"Horseshoe Canyon Formation\\\", a circa 6 km a nord-ovest di (Alberta, Canada) e a circa 135 km a nord-est dalla citt\\u00e0 pi\\u00f9 grande dello stato, Calgary. \\u00c8 un'attrazione turistica gestita dal ministero della cultura dell'Alberta. ed ospita una collezione di pi\\u00f9 di 130.000 fossili. Il museo fa parte della (CMA), del (CHIN), e del (VMC) - Mus\\u00e9e virtuel du Canada.\",\n", + " \"lang\": \"it\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Royal Tyrrell Museum of Paleontology (\\u010desky:Kr\\u00e1lovsk\\u00e9 Tyrellovo muzeum paleontologie) je v\\u00fdznamn\\u00fdm paleontologick\\u00fdm muzeem v kanadsk\\u00e9 provincii Alberta. Jeho n\\u00e1zev je odvozen od p\\u0159\\u00edjmen\\u00ed prvn\\u00edho paleontologa, kter\\u00fd v oblasti Jelen\\u00ed \\u0159eky (Red Deer River) v roce 1884 objevil zkamen\\u011bliny m\\u00edstn\\u00edch dinosaur\\u016f. Muzeum bylo ofici\\u00e1ln\\u011b otev\\u0159eno dne 25. z\\u00e1\\u0159\\u00ed 1985. Nach\\u00e1z\\u00ed se ve vzd\\u00e1lenosti asi 6 kilometr\\u016f od m\\u011bsta Drumheller a zhruba 135 kilometr\\u016f od Calgary. Je um\\u00edst\\u011bno p\\u0159\\u00edmo v ter\\u00e9nu paleontologick\\u00fdch lokalit s fos\\u00edliemi dinosaur\\u016f z obdob\\u00ed svrchn\\u00ed k\\u0159\\u00eddy (souvrstv\\u00ed o st\\u00e1\\u0159\\u00ed zhruba 75 milion\\u016f let). Muzeum v sou\\u010dasnosti opatruje na 130 000 vzork\\u016f. Jednou z v\\u00fdznamn\\u00fdch postav, spojen\\u00fdch s touto instituc\\u00ed je paleontolog Philip J. Currie. Muzeum m\\u00e1 v\\u00fdm\\u011bru 11 200 m2 a je zam\\u011b\\u0159eno zejm\\u00e9na na zkamen\\u011bliny dinosaur\\u016f, ale tak\\u00e9 jin\\u00fdch prav\\u011bk\\u00fdch organism\\u016f. Muzeum Ka\\u017edoro\\u010dn\\u011b jej nav\\u0161t\\u00edv\\u00ed kolem 400 tis\\u00edc n\\u00e1v\\u0161t\\u011bvn\\u00edk\\u016f, v roce 2010 p\\u0159iv\\u00edtalo desetimili\\u00f3nt\\u00e9ho n\\u00e1v\\u0161t\\u011bvn\\u00edka.\",\n", + " \"lang\": \"cs\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"El Museo Real Tyrrel (en ingl\\u00e9s, Royal Tyrrell Museum), conocido todav\\u00eda hoy en d\\u00eda principalmente por su nombre de origien: Museo Tyrrell, es un museo de historia natural especializado en paleontolog\\u00eda. Est\\u00e1 ubicado en el a 6 kil\\u00f3metros del municipio de en la provincia de Alberta, en Canad\\u00e1. El museo se encuentra a 135 km de Calgary y es mundialmente conocido por sus abundantes y excepcionales colecciones de f\\u00f3siles y esqueletos de dinosaurios, y por sus laboratorios e instalaciones de investigaci\\u00f3n. El museo fue inaugurado como \\u00abMuseo Tyrrell\\u00bb (Tyrrell Museum) en 1985, en honor de Joseph Burr Tyrrell (1858-1957). En reconocimiento a su importancia, la reina Isabel II le dio el estatus de \\u00abreal\\u00bb en 1990, pasando desde entonces a llamarse oficialmente \\u00abMuseo Real Tyrrell\\u00bb (Royal Tyrrell Museum). La misi\\u00f3n del Museo Tyrrell consiste en conservar, proteger, presentar e interpretar la historia paleontol\\u00f3gica, en especial de la gran herencia f\\u00f3sil de Alberta. El museo depende del Ministerio de Cultura y del apoyo comunitario. Bruce Naylor fue el director del museo de 1992 hasta su muerte en abril de 2007. Bajo su direcci\\u00f3n, se estableci\\u00f3 un ambicioso programa de renovaci\\u00f3n, ampliando en 1.900m\\u00b2 y culminado con la nueva galer\\u00eda y espacio de exhibici\\u00f3n, en 2006-2007. Una serie de espectaculares galer\\u00edas cronol\\u00f3gicas exhiben las maravillas de 3.900 millones de a\\u00f1os de la vida sobre la Tierra. Entre ellas cientos de f\\u00f3siles de dinosaurios; una gran colecci\\u00f3n de f\\u00f3siles de esquistos de Burgess; un modelo a tama\\u00f1o real de un arrecife del periodo Dev\\u00f3nico; y un jard\\u00edn viviente del Cret\\u00e1cico con m\\u00e1s de 600 especies de plantas. Una ventana al laboratorio de preparaci\\u00f3n permite a los visitantes observar a los t\\u00e9cnicos preparando cuidadosamente los f\\u00f3siles para la investigaci\\u00f3n y exhibici\\u00f3n. Como ofertas adicionales hay visitas guiadas y autoguiadas a las tierras bald\\u00edas, una sala de pr\\u00e1cticas de ciencia, excavaci\\u00f3n simulada de f\\u00f3siles, identificaci\\u00f3n de f\\u00f3siles, programas escolares, campamentos de verano tanto para ni\\u00f1os como para familias, y otros muchos programas. En su primer a\\u00f1o de apertura el museo atrajo a 600.000 visitantes. Actualmente, una media de m\\u00e1s de trescientas mil personas visitan el museo anualmente.\",\n", + " \"lang\": \"es\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"El Museu Reial Tyrrell de Paleontologia (Royal Tyrrell Museum) \\u00e9s una popular atracci\\u00f3 tur\\u00edstica canadenca i un centre capdavanter en la investigaci\\u00f3 paleontol\\u00f2gica. \\u00c9s conegut per la seva col\\u00b7lecci\\u00f3 de m\\u00e9s de 120.000 f\\u00f2ssils i per les seves instal\\u00b7lacions d'investigaci\\u00f3. El museu va ser nomenat aix\\u00ed en honor de (1858-1957). Va ser inaugurat el 1985 i se li va donar l'estatus de \\\"real\\\" en reconeixement a la seva import\\u00e0ncia per la reina Isabel II el 1990. La seva missi\\u00f3 \\u00e9s conservar, protegir, presentar i interpretar la hist\\u00f2ria paleontol\\u00f2gica, especialment de la gran her\\u00e8ncia f\\u00f2ssil d'Alberta. El museu dep\\u00e8n del Ministeri de Cultura i del suport comunitari. Bruce Naylor va ser el director del museu de 1992 fins a la seva mort l'abril de 2007. Sota la seva direcci\\u00f3, es va establir un ambici\\u00f3s programa de renovaci\\u00f3, ampliant en 1.900 m\\u00b2 i culminat amb la nova galeria i espai d'exhibici\\u00f3, en 2006-2007.\",\n", + " \"lang\": \"ca\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"\\u041a\\u043e\\u0440\\u043e\\u043b\\u0456\\u0432\\u0441\\u044c\\u043a\\u0438\\u0439 \\u0422\\u0438\\u0440\\u0440\\u0435\\u043b\\u0456\\u0432\\u0441\\u044c\\u043a\\u0438\\u0439 \\u043c\\u0443\\u0437\\u0435\\u0439 \\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0456\\u0457 (\\u0430\\u043d\\u0433\\u043b. Royal Tyrrell Museum) \\u2014 \\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0456\\u0447\\u043d\\u0438\\u0439 \\u043c\\u0443\\u0437\\u0435\\u0439, \\u0437\\u043d\\u0430\\u0445\\u043e\\u0434\\u0438\\u0442\\u044c\\u0441\\u044f \\u0437\\u0430 4 \\u043a\\u043c \\u0432\\u0456\\u0434 \\u043c\\u0456\\u0441\\u0442\\u0435\\u0447\\u043a\\u0430 \\u0456 \\u043d\\u0430 \\u043f\\u0456\\u0432\\u043d\\u0456\\u0447\\u043d\\u0438\\u0439-\\u0437\\u0430\\u0445\\u0456\\u0434 \\u0432\\u0456\\u0434 \\u043c\\u0456\\u0441\\u0442\\u0430 \\u041a\\u0430\\u043b\\u0433\\u0430\\u0440\\u0456. \\u0404 \\u0433\\u043e\\u043b\\u043e\\u0432\\u043d\\u0438\\u043c \\u043a\\u0430\\u043d\\u0430\\u0434\\u0441\\u044c\\u043a\\u0438\\u043c \\u0446\\u0435\\u043d\\u0442\\u0440\\u043e\\u043c \\u0434\\u043e\\u0441\\u043b\\u0456\\u0434\\u0436\\u0435\\u043d\\u044c \\u0443 \\u0433\\u0430\\u043b\\u0443\\u0437\\u0456 \\u043f\\u0430\\u043b\\u0435\\u043e\\u043d\\u0442\\u043e\\u043b\\u043e\\u0433\\u0456\\u0457 \\u0456 \\u043c\\u0430\\u0454 \\u043f\\u043e\\u043d\\u0430\\u0434 18 000 \\u0441\\u043a\\u0430\\u043c'\\u044f\\u043d\\u0456\\u043b\\u043e\\u0441\\u0442\\u0435\\u0439 \\u0443 \\u043d\\u0430\\u0439\\u0431\\u0456\\u043b\\u044c\\u0448\\u043e\\u043c\\u0443 \\u0441\\u0445\\u043e\\u0432\\u0438\\u0449\\u0456 \\u0432 \\u041a\\u0430\\u043d\\u0430\\u0434\\u0456. \\u0429\\u043e\\u0440\\u0456\\u0447\\u043d\\u043e \\u043c\\u0443\\u0437\\u0435\\u0439 \\u0432\\u0456\\u0434\\u0432\\u0456\\u0434\\u0443\\u044e\\u0442\\u044c 400 \\u0442\\u0438\\u0441\\u044f\\u0447\\u0456 \\u0442\\u0443\\u0440\\u0438\\u0441\\u0442\\u0456\\u0432.\",\n", + " \"lang\": \"uk\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Royal Tyrrell Museum adalah sebuah tempat wisata dan pusat riset palaeontologi Kanada yang dikenal karena mengkoleksi lebih dari 130,000 fosil. Royal Tyrrell Museum dioperasikan oleh Kementerian Budaya Alberta.\",\n", + " \"lang\": \"in\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"\\u30ed\\u30a4\\u30e4\\u30eb\\u30fb\\u30c6\\u30a3\\u30ec\\u30eb\\u53e4\\u751f\\u7269\\u5b66\\u535a\\u7269\\u9928\\uff08\\u30ed\\u30a4\\u30e4\\u30eb\\u30fb\\u30c6\\u30a3\\u30ec\\u30eb\\u3053\\u305b\\u3044\\u3076\\u3064\\u304c\\u304f\\u306f\\u304f\\u3076\\u3064\\u304b\\u3093\\u3001The Royal Tyrrell Museum of Palaeontology\\uff09\\u306f\\u30ab\\u30ca\\u30c0\\u30a2\\u30eb\\u30d0\\u30fc\\u30bf\\u5dde\\u30c9\\u30e9\\u30e0\\u30d8\\u30e9\\u30fc\\u306e\\u30df\\u30c3\\u30c9\\u30e9\\u30f3\\u30c9\\u5dde\\u7acb\\u516c\\u5712\\u5185\\u306b\\u3042\\u308b\\u3001\\u6050\\u7adc\\u3068\\u30d0\\u30fc\\u30b8\\u30a7\\u30b9\\u52d5\\u7269\\u7fa4\\u306e\\u5316\\u77f3\\u306e\\u5c55\\u793a\\u3067\\u4e16\\u754c\\u7684\\u306b\\u6709\\u540d\\u306a\\u535a\\u7269\\u9928\\u3002\\u7279\\u306b\\u3001\\u6050\\u7adc\\u306b\\u95a2\\u3057\\u3066\\u306f\\u305d\\u306e\\u898f\\u6a21\\u306f\\u4e16\\u754c\\u6700\\u5927\\u7d1a\\u3067\\u3042\\u308b\\u3002\",\n", + " \"lang\": \"ja\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageExternalLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"https://tyrrellmuseum.com\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/website\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"https://tyrrellmuseum.com\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/image\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Sinraptor dongi.jpg\",\n", + " \"lang\": \"en\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Alxasaurus Tyrrell.jpg\",\n", + " \"lang\": \"en\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/width\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": 97,\n", + " \"datatype\": \"http://www.w3.org/2001/XMLSchema#integer\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": 123,\n", + " \"datatype\": \"http://www.w3.org/2001/XMLSchema#integer\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/caption\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Alxasaurus\",\n", + " \"lang\": \"en\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Sinraptor\",\n", + " \"lang\": \"en\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Entrance to the Royal Tyrrell Museum\",\n", + " \"lang\": \"en\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/align\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"right\",\n", + " \"lang\": \"en\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageLength\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"30034\",\n", + " \"datatype\": \"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/type\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Paleontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageRevisionID\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": 1024210055,\n", + " \"datatype\": \"http://www.w3.org/2001/XMLSchema#integer\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/location\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Drumheller, Alberta, Canada\",\n", + " \"lang\": \"en\"\n", + " },\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": 1500,\n", + " \"datatype\": \"http://www.w3.org/2001/XMLSchema#integer\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/thumbnail\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://commons.wikimedia.org/wiki/Special:FilePath/Royal_tyrrell_entrance.JPG?width=300\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageID\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": 1177220,\n", + " \"datatype\": \"http://www.w3.org/2001/XMLSchema#integer\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/name\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Royal Tyrrell Museum of Palaeontology\",\n", + " \"lang\": \"en\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/location\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Alberta\"\n", + " },\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Drumheller\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/foundingDate\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"1985-09-25\",\n", + " \"datatype\": \"http://www.w3.org/2001/XMLSchema#date\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/direction\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"horizontal\",\n", + " \"lang\": \"en\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/formerName\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Tyrrell Museum of Palaeontology\",\n", + " \"lang\": \"en\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/architect\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"BCW Architects\",\n", + " \"lang\": \"en\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/numberOfVisitors\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"470000\",\n", + " \"datatype\": \"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/footer\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"-1980.0\",\n", + " \"datatype\": \"http://dbpedia.org/datatype/second\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/type\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Paleontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/executiveDirector\": [\n", + " {\n", + " \"type\": \"literal\",\n", + " \"value\": \"Lisa Making\",\n", + " \"lang\": \"en\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Dillhoffia\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Lorraine_Malach\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Royal_Museum_(disambiguation)\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Montanoceratops\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Coronosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Stegoceras\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Styracosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Gorgosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Chasmosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Spinops\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Daspletosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Jane_Colwell-Danis\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Pachyrhinosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Regaliceratops\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_dinosaur_specimens_with_nicknames\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Midland_Provincial_Park\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Hesperonychus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/RTMP\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageDisambiguates\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Culture_of_Alberta\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Eotriceratops\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Timeline_of_Alberta_history\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Tyrrell\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageDisambiguates\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Tourism_in_Canada\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Scolosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Specimens_of_Tyrannosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/China-Canada_Dinosaur_Project\": {\n", + " \"http://dbpedia.org/property/participants\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_McGill_University_people\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Albertosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Tyrannosauridae\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Prosaurolophus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Hypacrosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Monarchy_in_Alberta\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Heritage_Minutes\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_Canadian_organizations_with_royal_prefix\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Clearwater_Formation\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Nichollssaura\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Apatoraptor\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Albertaceratops\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Dromaeosaurus\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/My_Prairie_Home_(film)\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/List_of_museums_in_Alberta\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Julius_T._Csotonyi\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Monty_Reid\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/John_Acorn\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Karen_Carr\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Elizabeth_Nicholls\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ],\n", + " \"http://dbpedia.org/property/workInstitution\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " },\n", + " \"http://dbpedia.org/resource/Nichollsemys\": {\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": [\n", + " {\n", + " \"type\": \"uri\",\n", + " \"value\": \"http://dbpedia.org/resource/Royal_Tyrrell_Museum_of_Palaeontology\"\n", + " }\n", + " ]\n", + " }\n", + "}\n" + ] + } + ], + "source": [ + "url_template = \"http://dbpedia.org/data/{concept}.{format}\"\n", + "concept = museum_way[\"elements\"][0][\"tags\"][\"wikipedia\"].replace(\" \", \"_\")\\\n", + " .replace(\"en:\", \"\")\n", + "format = \"json\"\n", + "\n", + "url = url_template.replace(\"{concept}\", concept)\\\n", + " .replace(\"{format}\", format)\n", + "\n", + "data = requests.get(url)\n", + "museum_dbpedia = data.json()\n", + "print(json.dumps(museum_dbpedia, indent=3))" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.7" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/labs/2022/05-multilevel/notebook/lab5-base.ipynb b/labs/2022/05-multilevel/notebook/lab5-base.ipynb new file mode 100644 index 000000000..71fd93bd7 --- /dev/null +++ b/labs/2022/05-multilevel/notebook/lab5-base.ipynb @@ -0,0 +1,651 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Acessando a DBPedia\n", + "\n", + "Considere a página na Wikipedia do livro [The Tin Drum](https://en.wikipedia.org/wiki/The_Tin_Drum).\n", + "\n", + "Há um nó equivalente na DBPedia em [The Tin Drum](http://dbpedia.org/page/The_Tin_Drum).\n", + "\n", + "## Carregando um nó da DBPedia\n", + "\n", + "A partir do que aprendemos na aula sobre APIs, é possível carregar o conteúdo em JSON desse nó da seguinte maneira:" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import io\n", + "import requests\n", + "import json" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\n", + " \"d\": {\n", + " \"results\": [\n", + " {\n", + " \"__metadata\": {\n", + " \"uri\": \"http://dbpedia.org/resource/The_Tin_Drum\"\n", + " },\n", + " \"http://www.w3.org/2000/01/rdf-schema#label\": \"Blaszany b\\u0119benek\",\n", + " \"http://www.w3.org/2002/07/owl#sameAs\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"https://global.dbpedia.org/id/54HrW\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Amanda_Palmer\"\n", + " }\n", + " },\n", + " \"http://www.w3.org/2000/01/rdf-schema#comment\": \"\\u300e\\u30d6\\u30ea\\u30ad\\u306e\\u592a\\u9f13\\u300f\\uff08\\u30d6\\u30ea\\u30ad\\u306e\\u305f\\u3044\\u3053\\u3001Die Blechtrommel\\uff09\\u306f\\u3001\\u30c9\\u30a4\\u30c4\\u306e\\u4f5c\\u5bb6\\u30ae\\u30e5\\u30f3\\u30bf\\u30fc\\u30fb\\u30b0\\u30e9\\u30b9\\u304c1959\\u5e74\\u306b\\u767a\\u8868\\u3057\\u305f\\u51e6\\u5973\\u4f5c\\u3067\\u3042\\u308a\\u9577\\u7bc7\\u5c0f\\u8aac\\u3067\\u3042\\u308b\\u3002\\u300e\\u732b\\u3068\\u9f20\\u300f\\uff081961\\u5e74\\uff09\\u3001\\u300e\\u72ac\\u306e\\u5e74\\u300f\\uff081963\\u5e74\\uff09\\u3068\\u7d9a\\u304f\\u3001\\u3044\\u308f\\u3086\\u308b\\u300c\\u30c0\\u30f3\\u30c4\\u30a3\\u30d2\\u4e09\\u90e8\\u4f5c\\u300d\\u306e\\u6700\\u521d\\u3092\\u98fe\\u308b\\u4f5c\\u54c1\\u3067\\u3042\\u308a\\u3001\\u7b2c\\u4e8c\\u6b21\\u4e16\\u754c\\u5927\\u6226\\u5f8c\\u306e\\u30c9\\u30a4\\u30c4\\u6587\\u5b66\\u306b\\u304a\\u3051\\u308b\\u6700\\u3082\\u91cd\\u8981\\u306a\\u4f5c\\u54c1\\u306e\\u4e00\\u3064\\u306b\\u6570\\u3048\\u3089\\u308c\\u308b\\u30021979\\u5e74\\u306b\\u30d5\\u30a9\\u30eb\\u30ab\\u30fc\\u30fb\\u30b7\\u30e5\\u30ec\\u30f3\\u30c9\\u30eb\\u30d5\\u306b\\u3088\\u3063\\u3066\\u6620\\u753b\\u5316\\u3055\\u308c\\u305f\\u3002\",\n", + " \"http://dbpedia.org/ontology/abstract\": \"Blecktrumman (originaltitel: Die Blechtrommel) \\u00e4r en roman fr\\u00e5n 1959 av G\\u00fcnter Grass. Denna artikel relaterad till sk\\u00f6nlitteratur av en tysk f\\u00f6rfattare saknar v\\u00e4sentlig information. Du kan hj\\u00e4lpa till genom att l\\u00e4gga till den.\",\n", + " \"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/class/yago/Disagreement107180787\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/translator\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Breon_Mitchell\"\n", + " }\n", + " },\n", + " \"http://purl.org/dc/elements/1.1/publisher\": \"Hermann Luchterhand Verlag\",\n", + " \"http://dbpedia.org/ontology/numberOfPages\": \"576\",\n", + " \"http://dbpedia.org/ontology/oclc\": \"3618781\",\n", + " \"http://dbpedia.org/property/wikiPageUsesTemplate\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Template:Infobox_book\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/genre\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Magic_realism\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/wikiPageExternalLink\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://www.dieterwunderlich.de/Grass_blechtrommel.htm\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/releaseDate\": \"1959\",\n", + " \"http://dbpedia.org/ontology/wikiPageID\": \"642383\",\n", + " \"http://dbpedia.org/property/dewey\": \"833.914\",\n", + " \"http://dbpedia.org/property/country\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/West_Germany\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/subsequentWork\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Cat_and_Mouse_(novella)\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/series\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Danzig_Trilogy\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/coverArtist\": \"G\\u00fcnter Grass\",\n", + " \"http://dbpedia.org/property/publisher\": \"Hermann Luchterhand Verlag\",\n", + " \"http://dbpedia.org/property/oclc\": \"3618781\",\n", + " \"http://xmlns.com/foaf/0.1/name\": \"Die Blechtrommel\",\n", + " \"http://xmlns.com/foaf/0.1/isPrimaryTopicOf\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://en.wikipedia.org/wiki/The_Tin_Drum\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/titleOrig\": \"Die Blechtrommel\",\n", + " \"http://dbpedia.org/property/caption\": \"Cover of the first German edition\",\n", + " \"http://purl.org/dc/terms/subject\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Category:Novels_about_Nazis\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/name\": \"The Tin Drum\",\n", + " \"http://purl.org/linguistics/gold/hypernym\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Novel\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/wikiPageLength\": \"15013\",\n", + " \"http://dbpedia.org/ontology/dcc\": \"833.914\",\n", + " \"http://www.w3.org/ns/prov#wasDerivedFrom\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://en.wikipedia.org/wiki/The_Tin_Drum?oldid=1012559301&ns=0\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/coverArtist\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/G\\u00fcnter_Grass\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/language\": \"German\",\n", + " \"http://dbpedia.org/property/author\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/G\\u00fcnter_Grass\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/translator\": \"Ralph Manheim, Breon Mitchell\",\n", + " \"http://dbpedia.org/ontology/wikiPageRevisionID\": \"1012559301\",\n", + " \"http://dbpedia.org/ontology/series\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Danzig_Trilogy\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/author\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/G\\u00fcnter_Grass\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/followedBy\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Cat_and_Mouse_(novella)\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/pages\": \"576\",\n", + " \"http://dbpedia.org/ontology/country\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/West_Germany\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/englishReleaseDate\": \"1961\",\n", + " \"http://dbpedia.org/ontology/literaryGenre\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Magic_realism\"\n", + " }\n", + " }\n", + " }\n", + " ],\n", + " \"__count\": \"1\"\n", + " }\n", + "}\n" + ] + } + ], + "source": [ + "url_drum = \"http://dbpedia.org/data/The_Tin_Drum.jsod\"\n", + "\n", + "data_drum = requests.get(url_drum)\n", + "json_drum = data_drum.json()\n", + "\n", + "print(json.dumps(json_drum, indent=3))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Acessando e navegando pelo Grafo\n", + "### Quem é autor de The Tin Drum?" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Autor de The Tin Drum: http://dbpedia.org/resource/Günter_Grass\n" + ] + } + ], + "source": [ + "grass = json_drum[\"d\"][\"results\"][0][\"http://dbpedia.org/ontology/author\"][\"__deferred\"][\"uri\"]\n", + "print(\"Autor de The Tin Drum: \" + grass)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\n", + " \"d\": {\n", + " \"results\": [\n", + " {\n", + " \"__metadata\": {\n", + " \"uri\": \"http://dbpedia.org/resource/The_Tin_Drum\"\n", + " },\n", + " \"http://www.w3.org/2000/01/rdf-schema#label\": \"Blaszany b\\u0119benek\",\n", + " \"http://www.w3.org/2002/07/owl#sameAs\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"https://global.dbpedia.org/id/54HrW\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/wikiPageWikiLink\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Amanda_Palmer\"\n", + " }\n", + " },\n", + " \"http://www.w3.org/2000/01/rdf-schema#comment\": \"\\u300e\\u30d6\\u30ea\\u30ad\\u306e\\u592a\\u9f13\\u300f\\uff08\\u30d6\\u30ea\\u30ad\\u306e\\u305f\\u3044\\u3053\\u3001Die Blechtrommel\\uff09\\u306f\\u3001\\u30c9\\u30a4\\u30c4\\u306e\\u4f5c\\u5bb6\\u30ae\\u30e5\\u30f3\\u30bf\\u30fc\\u30fb\\u30b0\\u30e9\\u30b9\\u304c1959\\u5e74\\u306b\\u767a\\u8868\\u3057\\u305f\\u51e6\\u5973\\u4f5c\\u3067\\u3042\\u308a\\u9577\\u7bc7\\u5c0f\\u8aac\\u3067\\u3042\\u308b\\u3002\\u300e\\u732b\\u3068\\u9f20\\u300f\\uff081961\\u5e74\\uff09\\u3001\\u300e\\u72ac\\u306e\\u5e74\\u300f\\uff081963\\u5e74\\uff09\\u3068\\u7d9a\\u304f\\u3001\\u3044\\u308f\\u3086\\u308b\\u300c\\u30c0\\u30f3\\u30c4\\u30a3\\u30d2\\u4e09\\u90e8\\u4f5c\\u300d\\u306e\\u6700\\u521d\\u3092\\u98fe\\u308b\\u4f5c\\u54c1\\u3067\\u3042\\u308a\\u3001\\u7b2c\\u4e8c\\u6b21\\u4e16\\u754c\\u5927\\u6226\\u5f8c\\u306e\\u30c9\\u30a4\\u30c4\\u6587\\u5b66\\u306b\\u304a\\u3051\\u308b\\u6700\\u3082\\u91cd\\u8981\\u306a\\u4f5c\\u54c1\\u306e\\u4e00\\u3064\\u306b\\u6570\\u3048\\u3089\\u308c\\u308b\\u30021979\\u5e74\\u306b\\u30d5\\u30a9\\u30eb\\u30ab\\u30fc\\u30fb\\u30b7\\u30e5\\u30ec\\u30f3\\u30c9\\u30eb\\u30d5\\u306b\\u3088\\u3063\\u3066\\u6620\\u753b\\u5316\\u3055\\u308c\\u305f\\u3002\",\n", + " \"http://dbpedia.org/ontology/abstract\": \"Blecktrumman (originaltitel: Die Blechtrommel) \\u00e4r en roman fr\\u00e5n 1959 av G\\u00fcnter Grass. Denna artikel relaterad till sk\\u00f6nlitteratur av en tysk f\\u00f6rfattare saknar v\\u00e4sentlig information. Du kan hj\\u00e4lpa till genom att l\\u00e4gga till den.\",\n", + " \"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/class/yago/Disagreement107180787\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/translator\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Breon_Mitchell\"\n", + " }\n", + " },\n", + " \"http://purl.org/dc/elements/1.1/publisher\": \"Hermann Luchterhand Verlag\",\n", + " \"http://dbpedia.org/ontology/numberOfPages\": \"576\",\n", + " \"http://dbpedia.org/ontology/oclc\": \"3618781\",\n", + " \"http://dbpedia.org/property/wikiPageUsesTemplate\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Template:Infobox_book\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/genre\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Magic_realism\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/wikiPageExternalLink\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://www.dieterwunderlich.de/Grass_blechtrommel.htm\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/releaseDate\": \"1959\",\n", + " \"http://dbpedia.org/ontology/wikiPageID\": \"642383\",\n", + " \"http://dbpedia.org/property/dewey\": \"833.914\",\n", + " \"http://dbpedia.org/property/country\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/West_Germany\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/subsequentWork\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Cat_and_Mouse_(novella)\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/series\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Danzig_Trilogy\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/coverArtist\": \"G\\u00fcnter Grass\",\n", + " \"http://dbpedia.org/property/publisher\": \"Hermann Luchterhand Verlag\",\n", + " \"http://dbpedia.org/property/oclc\": \"3618781\",\n", + " \"http://xmlns.com/foaf/0.1/name\": \"Die Blechtrommel\",\n", + " \"http://xmlns.com/foaf/0.1/isPrimaryTopicOf\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://en.wikipedia.org/wiki/The_Tin_Drum\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/titleOrig\": \"Die Blechtrommel\",\n", + " \"http://dbpedia.org/property/caption\": \"Cover of the first German edition\",\n", + " \"http://purl.org/dc/terms/subject\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Category:Novels_about_Nazis\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/name\": \"The Tin Drum\",\n", + " \"http://purl.org/linguistics/gold/hypernym\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Novel\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/wikiPageLength\": \"15013\",\n", + " \"http://dbpedia.org/ontology/dcc\": \"833.914\",\n", + " \"http://www.w3.org/ns/prov#wasDerivedFrom\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://en.wikipedia.org/wiki/The_Tin_Drum?oldid=1012559301&ns=0\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/coverArtist\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/G\\u00fcnter_Grass\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/language\": \"German\",\n", + " \"http://dbpedia.org/property/author\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/G\\u00fcnter_Grass\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/translator\": \"Ralph Manheim, Breon Mitchell\",\n", + " \"http://dbpedia.org/ontology/wikiPageRevisionID\": \"1012559301\",\n", + " \"http://dbpedia.org/ontology/series\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Danzig_Trilogy\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/ontology/author\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/G\\u00fcnter_Grass\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/followedBy\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Cat_and_Mouse_(novella)\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/pages\": \"576\",\n", + " \"http://dbpedia.org/ontology/country\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/West_Germany\"\n", + " }\n", + " },\n", + " \"http://dbpedia.org/property/englishReleaseDate\": \"1961\",\n", + " \"http://dbpedia.org/ontology/literaryGenre\": {\n", + " \"__deferred\": {\n", + " \"uri\": \"http://dbpedia.org/resource/Magic_realism\"\n", + " }\n", + " }\n", + " }\n", + " ],\n", + " \"__count\": \"1\"\n", + " }\n", + "}\n" + ] + } + ], + "source": [ + "url_template = \"http://dbpedia.org/data/{concept}.{format}\"\n", + "\n", + "concept = \"The Tin Drum\"\n", + "format = \"jsod\"\n", + "\n", + "concept = concept.replace(\" \", \"_\")\n", + "\n", + "url = url_template.replace(\"{concept}\", concept)\\\n", + " .replace(\"{format}\", format)\n", + "\n", + "data = requests.get(url)\n", + "js = data.json()\n", + "print(json.dumps(js, indent=3))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Tarefas 1 e 2\n", + "\n", + "As tarefas 1 e 2 descritas no outro notebook devem se basear nos exemplos da DBPedia apresentados acima." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# MeSH - Medical Subject Headings\n", + "\n", + "## Pesquisa para humanos\n", + "\n", + "Através do endereço [MeSH Search](https://meshb.nlm.nih.gov/search).\n", + "\n", + "Procure o termo: Myocardial Infarction.\n", + "\n", + "## Serviços para Máquinas\n", + "\n", + "É possível acessar os mesmos dados pela [API JSON](https://id.nlm.nih.gov/mesh/swagger/ui).\n", + "\n", + "Buscando o código de Myocardial Infarction:" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[]\n" + ] + } + ], + "source": [ + "url_template = \"https://id.nlm.nih.gov/mesh/lookup/descriptor?label={concept}&match={match}&limit={limit}\"\n", + "\n", + "concept = \"Arterial Hypertension\"\n", + "match = \"exact\"\n", + "limit = \"10\"\n", + "\n", + "concept = concept.replace(\" \", \"%20\")\n", + "\n", + "url = url_template.replace(\"{concept}\", concept)\\\n", + " .replace(\"{match}\", match)\\\n", + " .replace(\"{limit}\", limit)\n", + "\n", + "data = requests.get(url)\n", + "json_mi = data.json()\n", + "print(json.dumps(json_mi, indent=3))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Acessando o código do recurso:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "ename": "IndexError", + "evalue": "list index out of range", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0muri_mesh\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mjson_mi\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"resource\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"uri do recurso: \"\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0muri_mesh\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mbar\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrindex\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0muri_mesh\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"/\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"código do recurso: \"\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0muri_mesh\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mbar\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mIndexError\u001b[0m: list index out of range" + ] + } + ], + "source": [ + "uri_mesh = json_mi[0][\"resource\"]\n", + "print(\"uri do recurso: \" + uri_mesh)\n", + "bar = str.rindex(uri_mesh, \"/\")\n", + "print(\"código do recurso: \" + uri_mesh[bar+1:])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Acessando detalhes a partir do código:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "url_template = \"https://id.nlm.nih.gov/mesh/lookup/details?descriptor={code}\"\n", + "\n", + "code = uri_mesh[bar+1:]\n", + "\n", + "url = url_template.replace(\"{code}\", code)\n", + "\n", + "data = requests.get(url)\n", + "json_mid = data.json()\n", + "print(json.dumps(json_mid, indent=3))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Tarefa 3\n", + "\n", + "A tarefas 3 descrita no outro notebook deve se basear nos exemplos do MeSH apresentados acima." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Sequência OpenStreeMap e DBPedia\n", + "\n", + "## REST API do OpenStreetMap para Query" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "url_template = \"http://nominatim.openstreetmap.org/search?format={format}&q={query}\"\n", + "format = \"json\"\n", + "query = \"Royal Tyrrell Museum\"\n", + "\n", + "url = url_template.replace(\"{format}\", format)\\\n", + " .replace(\"{query}\", query)\n", + "\n", + "data = requests.get(url)\n", + "museum_ref = data.json()\n", + "print(json.dumps(museum_ref, indent=3))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Extraindo o Identificador OSM" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(museum_ref[0][\"osm_id\"])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## REST API do OpenStreetMap para Elementos (Node, Way e Relation)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "url_template = \"https://api.openstreetmap.org/api/0.6/{element_type}/{id}.{format}\"\n", + "\n", + "element_type = \"way\" # types: node, way, or relation\n", + "id = str(museum_ref[0][\"osm_id\"])\n", + "format = \"json\"\n", + "\n", + "url = url_template.replace(\"{element_type}\", element_type)\\\n", + " .replace(\"{id}\", id)\\\n", + " .replace(\"{format}\", format)\n", + "\n", + "data = requests.get(url)\n", + "museum_way = data.json()\n", + "print(json.dumps(museum_way, indent=3))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Extraindo o Identificador DBPedia" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(museum_way[\"elements\"][0][\"tags\"][\"wikipedia\"])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## REST API do DBPedia" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "url_template = \"http://dbpedia.org/data/{concept}.{format}\"\n", + "concept = museum_way[\"elements\"][0][\"tags\"][\"wikipedia\"].replace(\" \", \"_\")\\\n", + " .replace(\"en:\", \"\")\n", + "format = \"jsod\"\n", + "\n", + "url = url_template.replace(\"{concept}\", concept)\\\n", + " .replace(\"{format}\", format)\n", + "\n", + "data = requests.get(url)\n", + "museum_dbpedia = data.json()\n", + "print(json.dumps(museum_dbpedia, indent=3))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Tarefa 4\n", + "\n", + "A tarefa 4 descrita no outro notebook deve se basear nos exemplo de sequência OpenStreeMap/DBPedia apresentado acima." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.7" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/labs/2022/05-multilevel/notebook/lab5-tarefas.ipynb b/labs/2022/05-multilevel/notebook/lab5-tarefas.ipynb new file mode 100644 index 000000000..289c7193c --- /dev/null +++ b/labs/2022/05-multilevel/notebook/lab5-tarefas.ipynb @@ -0,0 +1,104 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "monetary-oakland", + "metadata": {}, + "source": [ + "# Laboratório 5 - Bloco 2\n", + "\n", + "Nas tarefas a seguir o número de células de resposta pode ser aumentado conforme a necessidade." + ] + }, + { + "cell_type": "markdown", + "id": "bridal-netscape", + "metadata": {}, + "source": [ + "## Tarefa 1\n", + "\n", + "### Carregue o nó de Tenda dos Milagres (da versão em inglês Tent of Miracles) em Python e mostre o conteúdo JSON." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "exciting-cement", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "id": "threatened-shepherd", + "metadata": {}, + "source": [ + "## Tarefa 2\n", + "### Recupere via Python e mostre o autor de Tenda dos Milagres?" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "subjective-bachelor", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "id": "specialized-playback", + "metadata": {}, + "source": [ + "## Tarefa 3\n", + "### Quais os termos usados para Aspirina (consulta JSON/MeSH em Python)?" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "about-sacramento", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "id": "uniform-worst", + "metadata": {}, + "source": [ + "## Tarefa 4\n", + "### Escolha algum lugar no OpenStreetMap e elabore a mesma sequência de três chamadas de serviços para o seu conceito." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "virgin-volunteer", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/labs/2022/05-multilevel/postman/GeoKnowledge.postman_collection.json b/labs/2022/05-multilevel/postman/GeoKnowledge.postman_collection.json new file mode 100644 index 000000000..e5c18c874 --- /dev/null +++ b/labs/2022/05-multilevel/postman/GeoKnowledge.postman_collection.json @@ -0,0 +1,122 @@ +{ + "info": { + "_postman_id": "0174a9fa-aa7f-487f-b26d-779d69753acc", + "name": "GeoKnowledge", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "OSM - Search", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://nominatim.openstreetmap.org/search?format=json&q=emilio muñoz 35 Madrid", + "protocol": "http", + "host": [ + "nominatim", + "openstreetmap", + "org" + ], + "path": [ + "search" + ], + "query": [ + { + "key": "format", + "value": "json" + }, + { + "key": "q", + "value": "emilio muñoz 35 Madrid" + } + ] + }, + "description": "[Full documentation](http://wiki.openstreetmap.org/wiki/Nominatim#Search)" + }, + "response": [] + }, + { + "name": "OSM - Element (Node, Way, or Relation)", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://api.openstreetmap.org/api/0.6/:type/:id", + "protocol": "https", + "host": [ + "api", + "openstreetmap", + "org" + ], + "path": [ + "api", + "0.6", + ":type", + ":id" + ], + "variable": [ + { + "key": "type", + "value": "node", + "description": "types: node, way, or relation" + }, + { + "key": "id", + "value": "" + } + ] + } + }, + "response": [] + }, + { + "name": "DBPedia - Data", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://dbpedia.org/data/:concept.:format", + "protocol": "http", + "host": [ + "dbpedia", + "org" + ], + "path": [ + "data", + ":concept.:format" + ], + "variable": [ + { + "key": "concept", + "value": "Royal_Tyrrell_Museum_of_Palaeontology", + "type": "text", + "enabled": true + }, + { + "key": "format", + "value": "json", + "type": "text", + "enabled": true + } + ] + } + }, + "response": [] + } + ] +} \ No newline at end of file diff --git a/labs/2022/05-multilevel/postman/Geocoders.postman_collection.json b/labs/2022/05-multilevel/postman/Geocoders.postman_collection.json new file mode 100644 index 000000000..68db368ec --- /dev/null +++ b/labs/2022/05-multilevel/postman/Geocoders.postman_collection.json @@ -0,0 +1,1332 @@ +{ + "info": { + "_postman_id": "8eaa7aa6-2b29-47c6-8e69-363aebee6f01", + "name": "Geocoders", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "ArcGIS Online (By Esri)", + "item": [ + { + "name": "ArcGIS Online - Get Token", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "tests[\"Token is present\"] = responseBody.has(\"token\");", + "", + "postman.setEnvironmentVariable(\"token\", jsonData.token);", + "" + ] + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "f", + "value": "json", + "type": "text" + }, + { + "key": "username", + "value": "{{username}}", + "type": "text" + }, + { + "key": "password", + "value": "{{password}}", + "type": "text" + }, + { + "key": "client", + "value": "referer", + "type": "text" + }, + { + "key": "ip", + "value": "{{referrerIp}}", + "type": "text" + }, + { + "key": "referer", + "value": "arcgis.com", + "type": "text" + }, + { + "key": "expiration", + "value": "21600", + "type": "text" + } + ] + }, + "url": { + "raw": "https://www.arcgis.com/sharing/rest/generateToken", + "protocol": "https", + "host": [ + "www", + "arcgis", + "com" + ], + "path": [ + "sharing", + "rest", + "generateToken" + ] + }, + "description": "[Full description of the service](http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Generate_Token/02r3000000m5000000/)" + }, + "response": [] + }, + { + "name": "ArcGIS Online - FindAddressCandidates", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var tests;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "var prScript" + ] + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "key": "SingleLine", + "value": "Calle emilio muñoz 35, Madrid", + "type": "text" + }, + { + "key": "categorforStoragey", + "value": "true", + "type": "text" + }, + { + "key": "outFields", + "value": "*", + "type": "text" + }, + { + "key": "f", + "value": "pjson", + "type": "text" + }, + { + "key": "token", + "value": "{{token}}", + "type": "text" + } + ] + }, + "url": { + "raw": "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates", + "protocol": "http", + "host": [ + "geocode", + "arcgis", + "com" + ], + "path": [ + "arcgis", + "rest", + "services", + "World", + "GeocodeServer", + "findAddressCandidates" + ] + }, + "description": "[Full description of the service](http://resources.arcgis.com/en/help/rest/apiref/candidates.html) \n// [World Geocoding Service](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm)\n// [View JS Demo: input autocomplete](http://developers.arcgis.com/javascript/samples/widget_directions_basic/)" + }, + "response": [] + }, + { + "name": "ArcGIS Online - Find", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var tests;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "var prScript" + ] + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "key": "text", + "value": "Calle emilio muñoz 35, Madrid", + "type": "text" + }, + { + "key": "categorforStoragey", + "value": "true", + "type": "text" + }, + { + "key": "outFields", + "value": "*", + "type": "text" + }, + { + "key": "f", + "value": "pjson", + "type": "text" + }, + { + "key": "token", + "value": "{{token}}", + "type": "text" + } + ] + }, + "url": { + "raw": "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find", + "protocol": "http", + "host": [ + "geocode", + "arcgis", + "com" + ], + "path": [ + "arcgis", + "rest", + "services", + "World", + "GeocodeServer", + "find" + ] + }, + "description": "Geocodes one location per request; the input address is specified in a single parameter.\n\n[Full description of the service](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find.htm)\n\n" + }, + "response": [] + }, + { + "name": "ArcGIS Online - geocodeAddresses", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var tests;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "var prScript" + ] + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/geocodeAddresses?addresses={ \"records\": [ { \"attributes\": { \"OBJECTID\": 1, \"Address\": \"Calle elena\", \"City\": \"Granada\" } }, { \"attributes\": { \"OBJECTID\": 2, \"Address\": \"Emilio Muñoz 35\", \"City\": \"Madrid\", \"Region\": \"CA\", \"Postal\": \"28037\" } } ] }&sourceCountry=ES&token={{token}}&f=pjson", + "protocol": "http", + "host": [ + "geocode", + "arcgis", + "com" + ], + "path": [ + "arcgis", + "rest", + "services", + "World", + "GeocodeServer", + "geocodeAddresses" + ], + "query": [ + { + "key": "addresses", + "value": "{ \"records\": [ { \"attributes\": { \"OBJECTID\": 1, \"Address\": \"Calle elena\", \"City\": \"Granada\" } }, { \"attributes\": { \"OBJECTID\": 2, \"Address\": \"Emilio Muñoz 35\", \"City\": \"Madrid\", \"Region\": \"CA\", \"Postal\": \"28037\" } } ] }" + }, + { + "key": "sourceCountry", + "value": "ES" + }, + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "f", + "value": "pjson" + } + ] + }, + "description": "[Full description of the service](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-geocode-addresses.htm)\n\n" + }, + "response": [] + }, + { + "name": "ArcGIS Online - reverseGeocode", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var tests;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "var prScript" + ] + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/reverseGeocode?token={{token}}&f=pjson&location=-3.626966,40.432546", + "protocol": "http", + "host": [ + "geocode", + "arcgis", + "com" + ], + "path": [ + "arcgis", + "rest", + "services", + "World", + "GeocodeServer", + "reverseGeocode" + ], + "query": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "f", + "value": "pjson" + }, + { + "key": "location", + "value": "-3.626966,40.432546" + } + ] + }, + "description": "[Full description of the service:](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-reverse-geocode.htm) //\n[View JS Demo](http://timw1984.github.io/WebApp-Location/)\n" + }, + "response": [] + }, + { + "name": "ArcGIS Online - suggest", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var tests;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "var prScript" + ] + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest?token={{token}}&f=pjson&location=-3.626966,40.432546&text=em&maxSuggestions=30", + "protocol": "http", + "host": [ + "geocode", + "arcgis", + "com" + ], + "path": [ + "arcgis", + "rest", + "services", + "World", + "GeocodeServer", + "suggest" + ], + "query": [ + { + "key": "token", + "value": "{{token}}" + }, + { + "key": "f", + "value": "pjson" + }, + { + "key": "location", + "value": "-3.626966,40.432546" + }, + { + "key": "text", + "value": "em" + }, + { + "key": "maxSuggestions", + "value": "30" + } + ] + }, + "description": "[Full description of the service](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-suggest.htm)\n\n" + }, + "response": [] + } + ] + }, + { + "name": "Bing", + "item": [ + { + "name": "Bing - Location by Query (Forward GeoCoder)", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://dev.virtualearth.net/REST/v1/Locations/calle emilio muñoz,madrid?o=json&key={{apikey}}", + "protocol": "http", + "host": [ + "dev", + "virtualearth", + "net" + ], + "path": [ + "REST", + "v1", + "Locations", + "calle emilio muñoz,madrid" + ], + "query": [ + { + "key": "o", + "value": "json" + }, + { + "key": "key", + "value": "{{apikey}}" + } + ] + }, + "description": "[Full documentation](https://msdn.microsoft.com/en-us/library/ff701711.aspx)" + }, + "response": [] + }, + { + "name": "Bing - Location by Point (Reverse GeoCoder)", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://dev.virtualearth.net/REST/v1/Locations/47.64054,-122.12934?o=json&key={{apikey}}", + "protocol": "http", + "host": [ + "dev", + "virtualearth", + "net" + ], + "path": [ + "REST", + "v1", + "Locations", + "47.64054,-122.12934" + ], + "query": [ + { + "key": "o", + "value": "json" + }, + { + "key": "key", + "value": "{{apikey}}" + } + ] + }, + "description": "[Full documentation](https://msdn.microsoft.com/en-us/library/ff701710.aspx)" + }, + "response": [] + }, + { + "name": "Bing - Location by Address", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://dev.virtualearth.net/REST/v1/Locations/US/WA/98052/Redmond/1%20Microsoft%20Way?o=json&key={{apikey}}", + "protocol": "http", + "host": [ + "dev", + "virtualearth", + "net" + ], + "path": [ + "REST", + "v1", + "Locations", + "US", + "WA", + "98052", + "Redmond", + "1%20Microsoft%20Way" + ], + "query": [ + { + "key": "o", + "value": "json" + }, + { + "key": "key", + "value": "{{apikey}}" + } + ] + }, + "description": "[Full documentation](https://msdn.microsoft.com/en-us/library/ff701714.aspx)" + }, + "response": [] + } + ] + }, + { + "name": "DataScienceToolkit", + "item": [ + { + "name": "DataScienceToolkit - Forward Geocoder", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://www.datasciencetoolkit.org/maps/api/geocode/json?sensor=false&address=nerja", + "protocol": "http", + "host": [ + "www", + "datasciencetoolkit", + "org" + ], + "path": [ + "maps", + "api", + "geocode", + "json" + ], + "query": [ + { + "key": "sensor", + "value": "false" + }, + { + "key": "address", + "value": "nerja" + } + ] + }, + "description": "[Full documentation](http://www.datasciencetoolkit.org/)" + }, + "response": [] + }, + { + "name": "DataScienceToolkit - Coordinates to Politics (Reverse Geocoder)", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://www.datasciencetoolkit.org/coordinates2politics/36.75278,-3.8744", + "protocol": "http", + "host": [ + "www", + "datasciencetoolkit", + "org" + ], + "path": [ + "coordinates2politics", + "36.75278,-3.8744" + ] + }, + "description": "[Full documentation](http://www.datasciencetoolkit.org/)" + }, + "response": [] + } + ] + }, + { + "name": "Google Maps", + "item": [ + { + "name": "Google - Forward Geocoding", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://maps.googleapis.com/maps/api/geocode/json?address=emilio muñoz madrid&key={{apikey}}", + "protocol": "https", + "host": [ + "maps", + "googleapis", + "com" + ], + "path": [ + "maps", + "api", + "geocode", + "json" + ], + "query": [ + { + "key": "address", + "value": "emilio muñoz madrid" + }, + { + "key": "key", + "value": "{{apikey}}" + } + ] + }, + "description": "[Full documentation](https://developers.google.com/maps/documentation/geocoding/intro#GeocodingRequests)" + }, + "response": [] + }, + { + "name": "Google - Reverse Geocoding", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&key={{apikey}}", + "protocol": "https", + "host": [ + "maps", + "googleapis", + "com" + ], + "path": [ + "maps", + "api", + "geocode", + "json" + ], + "query": [ + { + "key": "latlng", + "value": "40.714224,-73.961452" + }, + { + "key": "key", + "value": "{{apikey}}" + } + ] + }, + "description": "[Full documentation](https://developers.google.com/maps/documentation/geocoding/intro#ReverseGeocoding)" + }, + "response": [] + } + ] + }, + { + "name": "HERE", + "item": [ + { + "name": "HERE - Geocode Resource", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://geocoder.api.here.com/6.2/geocode.json?app_id={{appid}}&app_code={{appcode}}&gen=9&searchtext=Emilio muñoz,madrid", + "protocol": "https", + "host": [ + "geocoder", + "api", + "here", + "com" + ], + "path": [ + "6.2", + "geocode.json" + ], + "query": [ + { + "key": "app_id", + "value": "{{appid}}" + }, + { + "key": "app_code", + "value": "{{appcode}}" + }, + { + "key": "gen", + "value": "9" + }, + { + "key": "searchtext", + "value": "Emilio muñoz,madrid" + } + ] + }, + "description": "[Full documentation](https://developer.here.com/rest-apis/documentation/geocoder/topics/resource-geocode.html)" + }, + "response": [] + }, + { + "name": "HERE - Reverse Geocode Resource", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://geocoder.api.here.com/6.2/reversegeocode.json?app_id={{appid}}&app_code={{appcode}}&gen=9&prox=50.112,8.683,100&mode=retrieveAddresses", + "protocol": "https", + "host": [ + "geocoder", + "api", + "here", + "com" + ], + "path": [ + "6.2", + "reversegeocode.json" + ], + "query": [ + { + "key": "app_id", + "value": "{{appid}}" + }, + { + "key": "app_code", + "value": "{{appcode}}" + }, + { + "key": "gen", + "value": "9" + }, + { + "key": "prox", + "value": "50.112,8.683,100" + }, + { + "key": "mode", + "value": "retrieveAddresses" + } + ] + }, + "description": "[Full documentation](https://developer.here.com/rest-apis/documentation/geocoder/topics/resource-reverse-geocode.html)" + }, + "response": [] + }, + { + "name": "HERE - Landmark Geocode Request", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://geocoder.api.here.com/6.2/search.json?app_id={{appid}}&app_code={{appcode}}&gen=9&searchtext=Ferry+Building,+San+Francisco", + "protocol": "https", + "host": [ + "geocoder", + "api", + "here", + "com" + ], + "path": [ + "6.2", + "search.json" + ], + "query": [ + { + "key": "app_id", + "value": "{{appid}}" + }, + { + "key": "app_code", + "value": "{{appcode}}" + }, + { + "key": "gen", + "value": "9" + }, + { + "key": "searchtext", + "value": "Ferry+Building,+San+Francisco" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "MapQuest", + "item": [ + { + "name": "MapQuest - Forward GeoCode", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://www.mapquestapi.com/geocoding/v1/address?key={{key}}&location=Emilio muñoz 35, madrid", + "protocol": "http", + "host": [ + "www", + "mapquestapi", + "com" + ], + "path": [ + "geocoding", + "v1", + "address" + ], + "query": [ + { + "key": "key", + "value": "{{key}}" + }, + { + "key": "location", + "value": "Emilio muñoz 35, madrid" + } + ] + }, + "description": "[Full documentation](https://developer.mapquest.com/documentation/geocoding-api/)" + }, + "response": [] + }, + { + "name": "MapQuest - Forward GeoCode (5-box Input)", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://www.mapquestapi.com/geocoding/v1/address?key={{key}}&street=1600+Pennsylvania+Ave+NW&city=Washington&state=DC&postalCode=20500", + "protocol": "http", + "host": [ + "www", + "mapquestapi", + "com" + ], + "path": [ + "geocoding", + "v1", + "address" + ], + "query": [ + { + "key": "key", + "value": "{{key}}" + }, + { + "key": "street", + "value": "1600+Pennsylvania+Ave+NW" + }, + { + "key": "city", + "value": "Washington" + }, + { + "key": "state", + "value": "DC" + }, + { + "key": "postalCode", + "value": "20500" + } + ] + }, + "description": "[Full documentation](https://developer.mapquest.com/documentation/geocoding-api/#single)" + }, + "response": [] + }, + { + "name": "MapQuest - Reverse GeoCode", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://www.mapquestapi.com/geocoding/v1/reverse?key={{key}}&location=30.333472,-81.470448&includeRoadMetadata=true&includeNearestIntersection=true", + "protocol": "http", + "host": [ + "www", + "mapquestapi", + "com" + ], + "path": [ + "geocoding", + "v1", + "reverse" + ], + "query": [ + { + "key": "key", + "value": "{{key}}" + }, + { + "key": "location", + "value": "30.333472,-81.470448" + }, + { + "key": "includeRoadMetadata", + "value": "true" + }, + { + "key": "includeNearestIntersection", + "value": "true" + } + ] + }, + "description": "[Full documentation](https://developer.mapquest.com/documentation/geocoding-api/reverse/get/)" + }, + "response": [] + } + ] + }, + { + "name": "Mapbox", + "item": [ + { + "name": "Mapbox - Geocoding", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://api.mapbox.com/geocoding/v5/mapbox.places/emilio%20muñoz.json?access_token={{token}}", + "protocol": "https", + "host": [ + "api", + "mapbox", + "com" + ], + "path": [ + "geocoding", + "v5", + "mapbox.places", + "emilio%20muñoz.json" + ], + "query": [ + { + "key": "access_token", + "value": "{{token}}" + } + ] + }, + "description": "[Full documentation](https://www.mapbox.com/api-documentation/?language=JavaScript#request-format)" + }, + "response": [] + }, + { + "name": "Mapbox - Reverse Geocoding", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://api.mapbox.com/geocoding/v5/mapbox.places/-3.626966,40.432546.json?access_token={{token}}", + "protocol": "https", + "host": [ + "api", + "mapbox", + "com" + ], + "path": [ + "geocoding", + "v5", + "mapbox.places", + "-3.626966,40.432546.json" + ], + "query": [ + { + "key": "access_token", + "value": "{{token}}" + } + ] + }, + "description": "[Same as geocoding API](https://www.mapbox.com/api-documentation/?language=JavaScript#geocoding)" + }, + "response": [] + } + ] + }, + { + "name": "Mapzen", + "item": [ + { + "name": "Mapzen - Search (Forward Geocoding)", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://search.mapzen.com/v1/search?text=emilio muñoz, madrid&api_key={{apikey}}", + "protocol": "https", + "host": [ + "search", + "mapzen", + "com" + ], + "path": [ + "v1", + "search" + ], + "query": [ + { + "key": "text", + "value": "emilio muñoz, madrid" + }, + { + "key": "api_key", + "value": "{{apikey}}" + } + ] + }, + "description": "[Full documentation](https://mapzen.com/documentation/search/search/)" + }, + "response": [] + }, + { + "name": "Mapzen - Reverse Geocoding", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://search.mapzen.com/v1/reverse?api_key={{apikey}}&point.lat=48.858268&point.lon=2.294471", + "protocol": "https", + "host": [ + "search", + "mapzen", + "com" + ], + "path": [ + "v1", + "reverse" + ], + "query": [ + { + "key": "api_key", + "value": "{{apikey}}" + }, + { + "key": "point.lat", + "value": "48.858268" + }, + { + "key": "point.lon", + "value": "2.294471" + } + ] + }, + "description": "[Full documentation](https://mapzen.com/documentation/search/reverse/)" + }, + "response": [] + } + ] + }, + { + "name": "OSM", + "item": [ + { + "name": "OSM - Search", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://nominatim.openstreetmap.org/search?format=json&q=emilio muñoz 35 Madrid", + "protocol": "http", + "host": [ + "nominatim", + "openstreetmap", + "org" + ], + "path": [ + "search" + ], + "query": [ + { + "key": "format", + "value": "json" + }, + { + "key": "q", + "value": "emilio muñoz 35 Madrid" + } + ] + }, + "description": "[Full documentation](http://wiki.openstreetmap.org/wiki/Nominatim#Search)" + }, + "response": [] + }, + { + "name": "OSM - Reverse", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var tests;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "var prScript" + ] + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://nominatim.openstreetmap.org/reverse?format=json&lat=40.432546&lon=-3.626966", + "protocol": "http", + "host": [ + "nominatim", + "openstreetmap", + "org" + ], + "path": [ + "reverse" + ], + "query": [ + { + "key": "format", + "value": "json" + }, + { + "key": "lat", + "value": "40.432546" + }, + { + "key": "lon", + "value": "-3.626966" + } + ] + }, + "description": "[Full description of the service:](http://wiki.openstreetmap.org/wiki/Nominatim#Reverse_Geocoding)" + }, + "response": [] + }, + { + "name": "OSM - Address lookup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var tests;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "var prScript" + ] + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://nominatim.openstreetmap.org/lookup?osm_ids=R146656,W104393803,N240109189&format=json", + "protocol": "http", + "host": [ + "nominatim", + "openstreetmap", + "org" + ], + "path": [ + "lookup" + ], + "query": [ + { + "key": "osm_ids", + "value": "R146656,W104393803,N240109189" + }, + { + "key": "format", + "value": "json" + } + ] + }, + "description": "[Full description of the service:](http://wiki.openstreetmap.org/wiki/Nominatim#Address_lookup)" + }, + "response": [] + } + ] + }, + { + "name": "OpenCage", + "item": [ + { + "name": "OpenCage - Forward Geocoding", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://api.opencagedata.com/geocode/v1/json?q=emilio+mu%C3%B1oz+madrid&pretty=1&key={{api-key}}", + "protocol": "https", + "host": [ + "api", + "opencagedata", + "com" + ], + "path": [ + "geocode", + "v1", + "json" + ], + "query": [ + { + "key": "q", + "value": "emilio+mu%C3%B1oz+madrid" + }, + { + "key": "pretty", + "value": "1" + }, + { + "key": "key", + "value": "{{api-key}}" + } + ] + }, + "description": "[Full documentation](https://geocoder.opencagedata.com/api#forward)" + }, + "response": [] + }, + { + "name": "OpenCage - Reverse Geocoding", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://api.opencagedata.com/geocode/v1/json?q=-23.5373732,-46.8374628&pretty=1&key={{api-key}}", + "protocol": "https", + "host": [ + "api", + "opencagedata", + "com" + ], + "path": [ + "geocode", + "v1", + "json" + ], + "query": [ + { + "key": "q", + "value": "-23.5373732,-46.8374628" + }, + { + "key": "pretty", + "value": "1" + }, + { + "key": "key", + "value": "{{api-key}}" + } + ] + }, + "description": "[Full documentation](https://geocoder.opencagedata.com/api#reverse-resp)" + }, + "response": [] + }, + { + "name": "OpenCage - Forward with Google Compatibility", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://api.opencagedata.com/geocode/v1/google-v3-json?address=emilio+mu%C3%B1oz+madrid&pretty=1&key={{api-key}}", + "protocol": "https", + "host": [ + "api", + "opencagedata", + "com" + ], + "path": [ + "geocode", + "v1", + "google-v3-json" + ], + "query": [ + { + "key": "address", + "value": "emilio+mu%C3%B1oz+madrid" + }, + { + "key": "pretty", + "value": "1" + }, + { + "key": "key", + "value": "{{api-key}}" + } + ] + }, + "description": "[Full documentation](https://geocoder.opencagedata.com/api#google-compat)" + }, + "response": [] + } + ] + } + ] +} \ No newline at end of file diff --git a/labs/2022/05-multilevel/solucoes/README.md b/labs/2022/05-multilevel/solucoes/README.md new file mode 100644 index 000000000..7de6ce0bc --- /dev/null +++ b/labs/2022/05-multilevel/solucoes/README.md @@ -0,0 +1 @@ +## Dentro desta pasta deve estar a sua solução do laboratório. diff --git a/labs/2022/README.md b/labs/2022/README.md index 0b406e166..4a64be0aa 100644 --- a/labs/2022/README.md +++ b/labs/2022/README.md @@ -6,6 +6,7 @@ * [Laboratório 2](02-design/) * [Laboratório 3](03-composition/) * [Laboratório 4](04-mvc/) +* [Laboratório 5](05-multilevel/) ## Passos para submissão dos Laboratórios. diff --git a/labs/2023-1/02-model/README.md b/labs/2023-1/02-model/README.md new file mode 100644 index 000000000..416b51d79 --- /dev/null +++ b/labs/2023-1/02-model/README.md @@ -0,0 +1,36 @@ +# Exploring Components + +## Frameworks +* [Lit](https://lit.dev/) +* [Hybrids](https://hybrids.js.org) +* [Slim](https://slimjs.com) +* [Stencil](https://stenciljs.com/) +* [Bit](https://bit.dev/) +* [Lightning](https://developer.salesforce.com/docs/component-library/documentation/en/lwc) +* [React Components](https://reactjs.org/docs/react-component.html) +* [AngularJS Components](https://reactjs.org/docs/react-component.html) + +## Guidelines and Catalogs +* [Open Web Components](https://open-wc.org/) +* [Material](https://m3.material.io/) + +## Catalogs +* [Material Components](https://m3.material.io/components) +* [Lightning](https://developer.salesforce.com/docs/component-library/overview/components) +* [webcomponents.org](https://www.webcomponents.org/) +* [MUI](https://mui.com/material-ui/getting-started/overview/) + +## Workflows +* [Orange Widget](https://orange-widget-base.readthedocs.io/en/latest/) + +## Representations +* [MDX](https://mdxjs.com/) +* [Figma Material](https://material.io/blog/material-3-figma-design-kit) + +## Embedable + + +## Specializations +* Graphic Components +* Data Processing Components +* ML Components \ No newline at end of file diff --git a/navigate/README.md b/navigate/README.md new file mode 100644 index 000000000..dbfaa5d7e --- /dev/null +++ b/navigate/README.md @@ -0,0 +1,9 @@ +# Navegação pelo `component2learn` + +# Exemplos de componentes Java + +## Componentes Gráficos & Geradores de Números + +* Começando com Classes + * abordagem **Push** em [Java](../java/src/pt/c08componentes/s01chartseq/s01push/) (Eclipse ou VSCode) e [Notebook](../notebooks/pt/s04components/s01chart/s01push.ipynb) + * abordagem **Pull** em [Java](../java/src/pt/c08componentes/s01chartseq/s02pull/) (Eclipse ou VSCode) e [Notebook](../notebooks/pt/s04components/s01chart/s02pull.ipynb) \ No newline at end of file diff --git a/notebooks/pt/s04components/s01chart/s01push.ipynb b/notebooks/pt/s04components/s01chart/s01push.ipynb new file mode 100644 index 000000000..685e0f39d --- /dev/null +++ b/notebooks/pt/s04components/s01chart/s01push.ipynb @@ -0,0 +1,453 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Classes pre-Componentes / Abordagem Push" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Componentes `GeometricProgresion` e `BarChart` trabalhando em conjunto via Push\n", + "\n", + "Neste exemplo usaremos a abordagem **Push**, ou seja, o objeto da classe GeometricProgression controla todo o processo gerando a sequência de números e pede para o BarChart plotar cada valor.\n", + "\n", + "O `BarChart` atua de forma passiva, aguardando que lhe solicitem que plote algo.\n", + "\n", + "## `BarChart` Component\n", + "\n", + "Plota um gráfico de barras no console sob demanda.\n", + "\n", + "* Atributos\n", + " * `filled` - define se a plotagem será preenchida;\n", + " * `character` - define o caractere da plotagem.\n", + "* Método\n", + " * `plot()` - plota uma barra do gráfico." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "com.twosigma.beaker.javash.bkr3816f8ce.BarChart" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "public class BarChart {\n", + " private boolean filled;\n", + " private char character;\n", + " \n", + " public BarChart(boolean filled, char character) {\n", + " this.filled = filled;\n", + " this.character = character;\n", + " }\n", + "\n", + " public void plot(int value) {\n", + " for (int v = 1; v < value; v++)\n", + " System.out.print((filled) ? character : ' ');\n", + " System.out.println(character);\n", + " }\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Usando objetos da classe `BarChart`\n", + "\n", + "Abaixo um exemplo de como objetos da classe `BarChart` podem ser usados." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "##########\n", + "############\n", + "########\n", + "\n", + " *\n", + " *\n", + " *\n" + ] + }, + { + "data": { + "text/plain": [ + "null" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "BarChart bc1 = new BarChart(true, '#');\n", + "bc1.plot(10);\n", + "bc1.plot(12);\n", + "bc1.plot(8);\n", + "System.out.println();\n", + "\n", + "BarChart bc2 = new BarChart(false, '*');\n", + "bc2.plot(4);\n", + "bc2.plot(5);\n", + "bc2.plot(7);" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Classe `GeometricProgressionPre`\n", + "\n", + "Gera uma sequência de números que crescem em progressão geométrica.\n", + "\n", + "* Atributos\n", + " * `initial` - valor inicial da sequência;\n", + " * `ratio` - taxa de crescimento da progressão;\n", + " * `n` - quantidade de valores na sequência;\n", + " * `output` - referência para um objeto da classe `BarChart`.\n", + "* Métodos\n", + " * `present` - apresenta o gráfico exponencial (em conjunto com um objeto da classe `BarChart`)." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "com.twosigma.beaker.javash.bkr3816f8ce.GeometricProgressionPre" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "public class GeometricProgressionPre {\n", + " private int initial,\n", + " ratio,\n", + " n;\n", + " private BarChart output;\n", + "\n", + " public GeometricProgressionPre(int initial, int ratio, int n, BarChart output) {\n", + " this.initial = initial;\n", + " this.ratio = ratio;\n", + " this.n = n;\n", + " this.output = output;\n", + " }\n", + "\n", + " public void present() {\n", + " if (output != null) {\n", + " int value = initial;\n", + " for (int s = 1; s <= n; s++) {\n", + " output.plot(value);\n", + " value *= ratio;\n", + " }\n", + " }\n", + " }\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Criando objetos associados\n", + "\n", + "Exemplo que cria um objeto da classe `GeometricProgression` outro da classe `BarChart`. O objeto da classe `GeometricProgression` recebe uma referência do objeto `BarChart` no construtor para se relacionar com ele." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "#\n", + "##\n", + "####\n", + "########\n", + "################\n", + "################################\n", + "################################################################\n" + ] + }, + { + "data": { + "text/plain": [ + "null" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "BarChart bc = new BarChart(true, '#');\n", + "\n", + "GeometricProgressionPre gp = new GeometricProgressionPre(1, 2, 7, bc);\n", + "\n", + "gp.present();" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Classe `GeometricProgression`\n", + "\n", + "No `GeometricProgressionPre` a associação com o objeto `BarChart` foi feita pelo construtor, o que limita as possibilidades de combinação, por exemplo, quando queremos conectar a mesma progressão com diversos dispositivos de saída.\n", + "\n", + "### Usando Conectores\n", + "\n", + "Uma abordagem derivada dos componentes considera usar a ideia de conector para ligar dois objetos usando o método `connect`.\n", + "\n", + "* Métodos adicional\n", + " * `conect` - conecta dois objetos informando a um deles (`GeometricProgression`) a identidade do outro `BarChart`." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "com.twosigma.beaker.javash.bkr3816f8ce.GeometricProgression" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "public class GeometricProgression {\n", + " private int initial,\n", + " ratio,\n", + " n;\n", + " private BarChart output;\n", + "\n", + " public GeometricProgression(int initial, int ratio, int n) {\n", + " this.initial = initial;\n", + " this.ratio = ratio;\n", + " this.n = n;\n", + " this.output = null;\n", + " }\n", + " \n", + " public void connect(BarChart output) {\n", + " this.output = output;\n", + " }\n", + "\n", + " public void present() {\n", + " if (output != null) {\n", + " int value = initial;\n", + " for (int s = 1; s <= n; s++) {\n", + " output.plot(value);\n", + " value *= ratio;\n", + " }\n", + " }\n", + " }\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Criando e Conectando objetos - abordagem Push\n", + "\n", + "Exemplo que cria um objeto da classe `GeometricProgression` outro da classe `BarChart` e os conecta através do novo método `connect`. Por ser uma abordagem Push, o `GeometricProgression` tem a referência do `BarChart` e envia (“empurra”) valores para ele." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "#\n", + "##\n", + "####\n", + "########\n", + "################\n", + "################################\n", + "################################################################\n" + ] + }, + { + "data": { + "text/plain": [ + "null" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "BarChart bc = new BarChart(true, '#');\n", + "\n", + "GeometricProgression gp = new GeometricProgression(1, 2, 7);\n", + "\n", + "gp.connect(bc);\n", + "gp.present();" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Conectando o objeto `GeometricProgression` com dois objetos `BarChart` - abordagem Push\n", + "\n", + "Exemplo conectando o mesmo objeto da classe `GeometricProgression` com dois objetos da classe `BarChart`." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "#\n", + "##\n", + "####\n", + "########\n", + "################\n", + "################################\n", + "################################################################\n", + "*\n", + " *\n", + " *\n", + " *\n", + " *\n", + " *\n", + " *\n" + ] + }, + { + "data": { + "text/plain": [ + "null" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "BarChart bc1 = new BarChart(true, '#');\n", + "BarChart bc2 = new BarChart(false, '*');\n", + "\n", + "GeometricProgression gp = new GeometricProgression(1, 2, 7);\n", + "\n", + "gp.connect(bc1);\n", + "gp.present();\n", + "\n", + "gp.connect(bc2);\n", + "gp.present();" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Tarefa do Gráfico de Segundo Grau\n", + "\n", + "## Função de segundo grau\n", + "\n", + "Escreva uma classe `SecondDegree` cujos objetos produzam valores de uma função de segundo grau na abordagem **Push** e os enviem para um objeto `BarChart`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plotagem de parábola\n", + "\n", + "Escreva um programa que conecte um objeto da classe `SecondDegree` a um objeto da classe `BarChart` de forma que seja plotada uma parábola na abordagem **Push**. Por conta do comportamento da classe `BarChart`, a parábola será plotada virada, ou seja eixos X e Y trocados." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Java", + "language": "java", + "name": "java" + }, + "language_info": { + "codemirror_mode": "text/x-java", + "file_extension": ".java", + "mimetype": "", + "name": "Java", + "nbconverter_exporter": "", + "version": "1.8.0_152-release" + }, + "toc": { + "base_numbering": 1, + "nav_menu": {}, + "number_sections": false, + "sideBar": false, + "skip_h1_title": false, + "title_cell": "Table of Contents", + "title_sidebar": "Contents", + "toc_cell": false, + "toc_position": {}, + "toc_section_display": false, + "toc_window_display": false + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/notebooks/pt/s04components/s01chart/s02pull.ipynb b/notebooks/pt/s04components/s01chart/s02pull.ipynb new file mode 100644 index 000000000..4a6027948 --- /dev/null +++ b/notebooks/pt/s04components/s01chart/s02pull.ipynb @@ -0,0 +1,324 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Classes pre-Componentes / Abordagem Pull" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Componentes `GeometricProgresion` e `BarChart` trabalhando em conjunto via Pull\n", + "\n", + "Neste exemplo usaremos a abordagem **Pull**, ou seja, o objeto da classe `BarChart` controla todo o processo e solicita os valores para o objeto da classe `GeometricProgression`.\n", + "\n", + "## `GeometricProgression` abordagem Pull\n", + "\n", + "O `GeometricProgression` passa a atuar de forma passiva, aguardando que lhe solicitem valores através dos métodos `first` e `next`.\n", + "\n", + "Três modificações podem ser observadas:\n", + "1. a informação do número de valores plotados (`n`) passa para o `BarChart` que controla o processo;\n", + "2. o `BarChart` passa a ter a referência para o `GeometricProgression` que, por sua vez, não tem mais a referência e consequentemente o `connect`;\n", + "3. o método `present` que atuava ativamente gerando a sequência e enviando para o gráfico foi substituído por dois métodos (`first` e `next`) que atuam passivamente aguardando a solicitação de valor.\n", + "\n", + "## Classe `GeometricProgression`\n", + "\n", + "Gera uma sequência de números que crescem em progressão geométrica.\n", + "\n", + "* Atributos\n", + " * `initial` - valor inicial da sequência;\n", + " * `ratio` - taxa de crescimento da progressão;\n", + " * `current` - valor corrente (para controle interno).\n", + "* Métodos\n", + " * `first` - gera o primeiro valor da sequência e o retorna;\n", + " * `next` - gera o próximo valor da sequência (em relação à última solicitação) e o retorna." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "com.twosigma.beaker.javash.bkr7589615f.GeometricProgression" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "public class GeometricProgression {\n", + " private int initial,\n", + " ratio;\n", + " private int current;\n", + " \n", + " public GeometricProgression(int initial, int ratio) {\n", + " this.initial = initial;\n", + " this.ratio = ratio;\n", + " current = initial;\n", + " }\n", + " \n", + " public int first() {\n", + " current = initial;\n", + " return current;\n", + " }\n", + " \n", + " public int next() {\n", + " current *= ratio;\n", + " return current;\n", + " }\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## `BarChart` abordagem Pull\n", + "\n", + "Três modificações podem ser observadas:\n", + "1. o método `plot` foi modificado -- em vez de plotar apenas uma barra, ele plota o gráfico inteiro, já que o `BarChart` controla o processo;\n", + "2. por causa da modificação (1), o `BarChart` passa a ter a informação de quantos valores serão plotados;\n", + "3. o `BarChart` passa a ter o método `connect`, já que ele guarda a referência para o objeto `GeometricProgression` para solicitar os valores.\n", + "\n", + "## `BarChart` Component\n", + "\n", + "Plota um gráfico de barras no console coletando ativamente dados a serem plotados.\n", + "\n", + "* Atributos\n", + " * `filled` - define se a plotagem será preenchida;\n", + " * `character` - define o caractere da plotagem;\n", + " * `n` - quantidade de valores na sequência;\n", + " * `sequence` - referência para um objeto da classe `BarChart`.\n", + "* Método\n", + " * `conect` - conecta dois objetos informando a um deles (`BarChart`) a identidade do outro `GeometricProgression`.\n", + " * `plot()` - plota o gráfico inteiro." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "com.twosigma.beaker.javash.bkr7589615f.BarChart" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "public class BarChart {\n", + " private boolean filled;\n", + " private char character;\n", + " private int n;\n", + " \n", + " private GeometricProgression sequence;\n", + " \n", + " public BarChart(boolean filled, char character, int n) {\n", + " this.filled = filled;\n", + " this.character = character;\n", + " this.n = n;\n", + " this.sequence = null;\n", + " }\n", + "\n", + " public void connect(GeometricProgression sequence) {\n", + " this.sequence = sequence;\n", + " }\n", + " \n", + " public void plot() {\n", + " if (sequence != null) {\n", + " int value = sequence.first();\n", + " for (int s = 1; s <= n; s++) {\n", + " for (int v = 1; v < value; v++)\n", + " System.out.print((filled) ? character : ' ');\n", + " System.out.println(character);\n", + " value = sequence.next();\n", + " }\n", + " }\n", + " }\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Criando e Conectando objetos - abordagem Pull\n", + "\n", + "Exemplo que cria um objeto da classe `GeometricProgression` outro da classe `BarChart` e os conecta através do novo método `connect`. Note que há uma inversão em relação a abordagem **Pull**. Aqui, o `BarChart` possui o método `connect` e se conecta ao `GeometricProgression` de quem ele solicitará os valores." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "#\n", + "##\n", + "####\n", + "########\n", + "################\n", + "################################\n", + "################################################################\n" + ] + }, + { + "data": { + "text/plain": [ + "null" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "GeometricProgression gp = new GeometricProgression(1, 2);\n", + "\n", + "BarChart bc = new BarChart(true, '#', 7);\n", + "\n", + "bc.connect(gp);\n", + "bc.plot();" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Conectando o objeto `GeometricProgression` com dois objetos `BarChart` - abordagem Pull\n", + "\n", + "Exemplo conectando o mesmo objeto da classe `GeometricProgression` com dois objetos da classe `BarChart`." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "#\n", + "##\n", + "####\n", + "########\n", + "################\n", + "################################\n", + "################################################################\n", + "*\n", + " *\n", + " *\n", + " *\n", + " *\n", + " *\n", + " *\n" + ] + }, + { + "data": { + "text/plain": [ + "null" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "GeometricProgression gp = new GeometricProgression(1, 2);\n", + "\n", + "BarChart bc1 = new BarChart(true, '#', 7);\n", + "BarChart bc2 = new BarChart(false, '*', 7);\n", + "\n", + "bc1.connect(gp);\n", + "bc1.plot();\n", + "\n", + "bc2.connect(gp);\n", + "bc2.plot();" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Tarefa do Gráfico de Segundo Grau\n", + "\n", + "## Função de segundo grau\n", + "\n", + "Escreva uma classe `SecondDegree` cujos objetos produzam valores de uma função de segundo grau na abordagem **Pull**, ou seja, são produzidos sob demanda a partir de solicitação dos métodos `first` e `next`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plotagem de parábola\n", + "\n", + "Escreva um programa que conecte um objeto da classe `SecondDegree` a um objeto da classe `BarChart` de forma que seja plotada uma parábola na abordagem **Pull**. Por conta do comportamento da classe `BarChart`, a parábola será plotada virada, ou seja eixos X e Y trocados." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Java", + "language": "java", + "name": "java" + }, + "language_info": { + "codemirror_mode": "text/x-java", + "file_extension": ".java", + "mimetype": "", + "name": "Java", + "nbconverter_exporter": "", + "version": "1.8.0_152-release" + }, + "toc": { + "base_numbering": 1, + "nav_menu": {}, + "number_sections": false, + "sideBar": false, + "skip_h1_title": false, + "title_cell": "Table of Contents", + "title_sidebar": "Contents", + "toc_cell": false, + "toc_position": {}, + "toc_section_display": false, + "toc_window_display": false + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/project/2021/README.md b/project/2021/README.md index 4bef90f1a..e17d67d72 100644 --- a/project/2021/README.md +++ b/project/2021/README.md @@ -1,6 +1,6 @@ # Projeto Final de 2021 -Veja a [Especificação em PDF](trabalho-rcs-2021-v02.pdf). O template de submissão está na pasta de templates. +Veja a [Especificação em PDF](trabalho-rcs-2021-v01.pdf). O template de submissão está na pasta de templates. ## Passos para submissão dos Laboratórios. diff --git a/project/2022/README.md b/project/2022/README.md new file mode 100644 index 000000000..78fbb047f --- /dev/null +++ b/project/2022/README.md @@ -0,0 +1,12 @@ +# Projeto Final de 2022 + +Veja a [Especificação em PDF](trabalho-rcs-2022-v01.pdf). O template de submissão está na pasta de templates. + +## Passos para submissão dos Laboratórios. + + * Faça fork deste repositório. Este fork deve ser independente daquele dos labs e será um único por equipe. + * No seu fork, dentro da pasta de `[solucoes]`, crie uma nova pasta com prefixo "equipe" e o número da equipe, exemplo: `equipe01`. + * Faça o commit dos arquivos pedidos na descrição do projeto. + * Até a data de submissão estabelecida crie um pull request para esse repositório. + +### Observação importante: Não altere nenhum arquivo que não permita o merge automático do pull request a esse repositório. Pull requests conflitantes não serão aceitos. diff --git a/project/2022/solucoes/README.md b/project/2022/solucoes/README.md new file mode 100644 index 000000000..e86dbdc10 --- /dev/null +++ b/project/2022/solucoes/README.md @@ -0,0 +1,182 @@ +# Template para a Entrega do Projeto Final + +# Estrutura de Arquivos e Pastas + +A seguir é apresentada a estrutura de pastas esperada para entrega do projeto: + +~~~ +├── README.md <- arquivo com o relatório do projeto +│ +├── images <- arquivos de imagens usadas no documento +│ +└── resources <- outros recursos (se houver) +~~~ + +Na raiz deve haver um arquivo de nome `README.md` contendo a apresentação da equipe e relatório do projeto, como detalhado na seção seguinte. + +# Modelo para Apresentação da Equipe e Relatório do Projeto + +Segue abaixo o modelo de como devem ser documentadas as entregas. Tudo o que for indicado entre `<...>` indica algo que deve ser substituído pelo indicado. +> Além disso, tudo o que aparecer neste modo de citação também se refere algo que deve ser substituído pelo indicado. No modelo são colocados exemplos ilustrativos, que serão substituídos pelos da sua apresentação. + +Para a construção dos diagramas, devem ser usados modelos disponíveis em: [Diagramas de Referência do Projeto Final](https://docs.google.com/presentation/d/1HWiTx0HU781sf3A7sdAda_LQeMHqbvIXkh-uSRDo0Js/edit?usp=sharing). Há versões em PPT e ODT no diretório [resources/](resources/). + +# Modelo para Apresentação da Equipe e Relatório do Projeto + +# Projeto `` + +# Equipe +* `` + +# Projeto GitHub Original +* `` + +# Nível 1 + +> Apresente aqui o detalhamento do Nível 1 conforme detalhado na especificação com, no mínimo, as seguintes subseções: + +## Diagrama Geral do Nível 1 + +> Apresente um diagrama conforme o modelo a seguir: + +![Modelo de diagrama no nível 1](images/diagrama-barramento.png) + +### Detalhamento da interação de componentes + +> O detalhamento deve seguir um formato de acordo com o exemplo a seguir: + +* O componente `Leilão` inicia o leilão publicando no barramento a mensagem de tópico "`auction/{auctionId}/start`" através da interface `AuctionStart`, iniciando um leilão. +* Os componentes Loja assinam no barramento mensagens de tópico "`auction/+/start`" através da interface `AuctionEngage`. Quando recebe uma mensagem… + +> Para cada componente será apresentado um documento conforme o modelo a seguir: + +## Componente `` + +> Resumo do papel do componente e serviços que ele oferece. + +> Diagrama do componente, conforme exemplo a seguir: + +![Componente](diagrama-componente-mensagens.png) + +**Interfaces** +> Listagem das interfaces do componente. + +As interfaces listadas são detalhadas a seguir: + +## Detalhamento das Interfaces + +### Interface `` + +> Resumo do papel da interface. + +> Dados da interface podem ser apresentados em formato texto, conforme exemplo: + +* Type: `sink` +* Topic: `pedido/+/entrega` +* Message type: `Order` + +> Ou em formato de imagem, conforme exemplo: + +![Diagrama de Interface de Mensagens](images/diagrama-interface-mensagens.png) + +> Diagrama representando o esquema das mensagens JSON utilizadas na interface, pode ser em formato texto conforme exemplo: + +~~~json +{ + orderId: string, + dueDate: date, + total: number, + items: [ + { + itemid: string, + quantity: number + } + ] +} +~~~ + +> Ou em formato de imagem, conforme exemplo: + +![Diagrama de Mensagens JSON](images/diagrama-interface-json.png) + +# Nível 2 + +> Apresente aqui o detalhamento do Nível 2 conforme detalhado na especificação com, no mínimo, as seguintes subseções: + +## Diagrama do Nível 2 + +> Apresente um diagrama conforme o modelo a seguir: + +> ![Modelo de diagrama no nível 2](images/diagrama-subcomponentes.png) + +### Detalhamento da interação de componentes + +> O detalhamento deve seguir um formato de acordo com o exemplo a seguir: + +* O componente `Entrega Pedido Compra` assina no barramento mensagens de tópico "`pedido/+/entrega`" através da interface `Solicita Entrega`. + * Ao receber uma mensagem de tópico "`pedido/+/entrega`", dispara o início da entrega de um conjunto de produtos. +* Os componentes `Solicita Estoque` e `Solicita Compra` se comunicam com componentes externos pelo barramento: + * Para consultar o estoque, o componente `Solicita Estoque` publica no barramento uma mensagem de tópico "`produto//estoque/consulta`" através da interface `Consulta Estoque` e assina mensagens de tópico "`produto//estoque/status`" através da interface `Posição Estoque` que retorna a disponibilidade do produto. + +> Para cada componente será apresentado um documento conforme o modelo a seguir: + +## Componente `` + +> Resumo do papel do componente e serviços que ele oferece. + +![Componente](images/diagrama-componente.png) + +**Interfaces** +> Listagem das interfaces do componente. + +As interfaces listadas são detalhadas a seguir: + +## Detalhamento das Interfaces + +### Interface `` + +![Diagrama da Interface](images/diagrama-interface-itableproducer.png) + +> Resumo do papel da interface. + +Método | Objetivo +-------| -------- +`` | `` + +## Exemplos: + +### Interface `ITableProducer` + +![Diagrama da Interface](images/diagrama-interface-itableproducer.png) + +Interface provida por qualquer fonte de dados que os forneça na forma de uma tabela. + +Método | Objetivo +-------| -------- +`requestAttributes` | Retorna um vetor com o nome de todos os atributos (colunas) da tabela. +`requestInstances` | Retorna uma matriz em que cada linha representa uma instância e cada coluna o valor do respectivo atributo (a ordem dos atributos é a mesma daquela fornecida por `requestAttributes`. + +### Interface `IDataSetProperties` + +![Diagrama da Interface](images/diagrama-interface-idatasetproperties.png) + +Define o recurso (usualmente o caminho para um arquivo em disco) que é a fonte de dados. + +Método | Objetivo +-------| -------- +`getDataSource` | Retorna o caminho da fonte de dados. +`setDataSource` | Define o caminho da fonte de dados, informado através do parâmetro `dataSource`. + +## Diagrama do Nível 3 + +> Apresente uma imagem com a captura de tela de seu protótipo feito no MIT App Inventor, conforme modelo a seguir: + +![Captura de Tela do Protótipo](images/captura-prototipo.png) + +> Apresente o diagrama referente ao protótipo conforme o modelo a seguir: + +![Modelo de diagrama no nível 2](images/diagrama-prototipo.png) + +### Detalhamento da interação de componentes + +> O detalhamento deve seguir o mesmo formato usado no Nível 2. diff --git a/project/2022/trabalho-rcs-2022-v01.pdf b/project/2022/trabalho-rcs-2022-v01.pdf new file mode 100644 index 000000000..9b3fa55c5 Binary files /dev/null and b/project/2022/trabalho-rcs-2022-v01.pdf differ diff --git a/service/RCS.postman_collection.json b/service/RCS.postman_collection.json new file mode 100644 index 000000000..69d491d76 --- /dev/null +++ b/service/RCS.postman_collection.json @@ -0,0 +1,115 @@ +{ + "info": { + "_postman_id": "7d4f831c-74f7-4bd0-9a15-d11c1af6b66e", + "name": "RCS", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "7375845" + }, + "item": [ + { + "name": "DBPedia - Data", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://dbpedia.org/data/:concept", + "protocol": "http", + "host": [ + "dbpedia", + "org" + ], + "path": [ + "data", + ":concept" + ], + "variable": [ + { + "key": "concept", + "value": "Tent_of_Miracles_(novel).json" + } + ] + } + }, + "response": [] + }, + { + "name": "xkcd", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "https://xkcd.com/:comicid/info.0.json", + "protocol": "https", + "host": [ + "xkcd", + "com" + ], + "path": [ + ":comicid", + "info.0.json" + ], + "variable": [ + { + "key": "comicid", + "value": null, + "description": "Number of the comic to retrieve.\n" + } + ] + } + }, + "response": [] + }, + { + "name": "Open Street Map", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://nominatim.openstreetmap.org/search?format=json&q=Royal Tyrrell Museum", + "protocol": "http", + "host": [ + "nominatim", + "openstreetmap", + "org" + ], + "path": [ + "search" + ], + "query": [ + { + "key": "format", + "value": "json" + }, + { + "key": "q", + "value": "Royal Tyrrell Museum" + } + ] + } + }, + "response": [] + }, + { + "name": "TheMealDB", + "request": { + "method": "GET", + "header": [] + }, + "response": [] + } + ] +} \ No newline at end of file diff --git a/templates/2022/README.md b/templates/2022/README.md index 787647a54..8e8415350 100644 --- a/templates/2022/README.md +++ b/templates/2022/README.md @@ -1,5 +1,11 @@ # Template para Entrega dos Laboratórios Individuais e Projeto em Grupo +# Template do Projeto + +O projeto deve seguir o template detalhado na pasta: + +* [Projeto](project/) + # Templates de Laboratórios Cada laboratório tem seu template que está especificado dentro da respectiva pasta: diff --git a/templates/2022/lab05/README.md b/templates/2022/lab05/README.md new file mode 100644 index 000000000..43a280a96 --- /dev/null +++ b/templates/2022/lab05/README.md @@ -0,0 +1,24 @@ +# Modelo para Apresentação do Lab04 - MVC + +Estrutura de pastas: + +~~~ +├── README.md <- arquivo apresentando a tarefa +│ +├── images <- arquivos de imagens usadas no documento +│ +└── app <- apps do MIT App Inventor exportados em formato `aia` +~~~ + +# Aluno +* `` + +# Tarefa + +> Coloque as imagens PNG da captura das seguintes telas do seu aplicativo: +> * tela 1 - captura da tela completa de design de interface +> * tela 2 - captura de tela do app sem digitar romance +> * tela 3 - captura de tela do app com romance digitado e resultado retornado +> * tela 4 - (opcional) captura de tela do app quando acontece um erro +> +> Coloque um link para o arquivo do aplicativo exportado a partir do MIT App Inventor em formato `aia`. Ele estará dentro da pasta `app`. diff --git a/templates/2022/lab05/images/aplicativo.png b/templates/2022/lab05/images/aplicativo.png new file mode 100644 index 000000000..a660ed915 Binary files /dev/null and b/templates/2022/lab05/images/aplicativo.png differ diff --git a/templates/2022/lab05/images/blocks.png b/templates/2022/lab05/images/blocks.png new file mode 100644 index 000000000..7ad1fb936 Binary files /dev/null and b/templates/2022/lab05/images/blocks.png differ diff --git a/templates/2022/lab05/images/design.png b/templates/2022/lab05/images/design.png new file mode 100644 index 000000000..c5427bf32 Binary files /dev/null and b/templates/2022/lab05/images/design.png differ diff --git a/templates/2022/lab05/images/mit-app-inventor-events.png b/templates/2022/lab05/images/mit-app-inventor-events.png new file mode 100644 index 000000000..4b6a6f2d6 Binary files /dev/null and b/templates/2022/lab05/images/mit-app-inventor-events.png differ diff --git a/templates/2022/project/README.md b/templates/2022/project/README.md new file mode 100644 index 000000000..e86dbdc10 --- /dev/null +++ b/templates/2022/project/README.md @@ -0,0 +1,182 @@ +# Template para a Entrega do Projeto Final + +# Estrutura de Arquivos e Pastas + +A seguir é apresentada a estrutura de pastas esperada para entrega do projeto: + +~~~ +├── README.md <- arquivo com o relatório do projeto +│ +├── images <- arquivos de imagens usadas no documento +│ +└── resources <- outros recursos (se houver) +~~~ + +Na raiz deve haver um arquivo de nome `README.md` contendo a apresentação da equipe e relatório do projeto, como detalhado na seção seguinte. + +# Modelo para Apresentação da Equipe e Relatório do Projeto + +Segue abaixo o modelo de como devem ser documentadas as entregas. Tudo o que for indicado entre `<...>` indica algo que deve ser substituído pelo indicado. +> Além disso, tudo o que aparecer neste modo de citação também se refere algo que deve ser substituído pelo indicado. No modelo são colocados exemplos ilustrativos, que serão substituídos pelos da sua apresentação. + +Para a construção dos diagramas, devem ser usados modelos disponíveis em: [Diagramas de Referência do Projeto Final](https://docs.google.com/presentation/d/1HWiTx0HU781sf3A7sdAda_LQeMHqbvIXkh-uSRDo0Js/edit?usp=sharing). Há versões em PPT e ODT no diretório [resources/](resources/). + +# Modelo para Apresentação da Equipe e Relatório do Projeto + +# Projeto `` + +# Equipe +* `` + +# Projeto GitHub Original +* `` + +# Nível 1 + +> Apresente aqui o detalhamento do Nível 1 conforme detalhado na especificação com, no mínimo, as seguintes subseções: + +## Diagrama Geral do Nível 1 + +> Apresente um diagrama conforme o modelo a seguir: + +![Modelo de diagrama no nível 1](images/diagrama-barramento.png) + +### Detalhamento da interação de componentes + +> O detalhamento deve seguir um formato de acordo com o exemplo a seguir: + +* O componente `Leilão` inicia o leilão publicando no barramento a mensagem de tópico "`auction/{auctionId}/start`" através da interface `AuctionStart`, iniciando um leilão. +* Os componentes Loja assinam no barramento mensagens de tópico "`auction/+/start`" através da interface `AuctionEngage`. Quando recebe uma mensagem… + +> Para cada componente será apresentado um documento conforme o modelo a seguir: + +## Componente `` + +> Resumo do papel do componente e serviços que ele oferece. + +> Diagrama do componente, conforme exemplo a seguir: + +![Componente](diagrama-componente-mensagens.png) + +**Interfaces** +> Listagem das interfaces do componente. + +As interfaces listadas são detalhadas a seguir: + +## Detalhamento das Interfaces + +### Interface `` + +> Resumo do papel da interface. + +> Dados da interface podem ser apresentados em formato texto, conforme exemplo: + +* Type: `sink` +* Topic: `pedido/+/entrega` +* Message type: `Order` + +> Ou em formato de imagem, conforme exemplo: + +![Diagrama de Interface de Mensagens](images/diagrama-interface-mensagens.png) + +> Diagrama representando o esquema das mensagens JSON utilizadas na interface, pode ser em formato texto conforme exemplo: + +~~~json +{ + orderId: string, + dueDate: date, + total: number, + items: [ + { + itemid: string, + quantity: number + } + ] +} +~~~ + +> Ou em formato de imagem, conforme exemplo: + +![Diagrama de Mensagens JSON](images/diagrama-interface-json.png) + +# Nível 2 + +> Apresente aqui o detalhamento do Nível 2 conforme detalhado na especificação com, no mínimo, as seguintes subseções: + +## Diagrama do Nível 2 + +> Apresente um diagrama conforme o modelo a seguir: + +> ![Modelo de diagrama no nível 2](images/diagrama-subcomponentes.png) + +### Detalhamento da interação de componentes + +> O detalhamento deve seguir um formato de acordo com o exemplo a seguir: + +* O componente `Entrega Pedido Compra` assina no barramento mensagens de tópico "`pedido/+/entrega`" através da interface `Solicita Entrega`. + * Ao receber uma mensagem de tópico "`pedido/+/entrega`", dispara o início da entrega de um conjunto de produtos. +* Os componentes `Solicita Estoque` e `Solicita Compra` se comunicam com componentes externos pelo barramento: + * Para consultar o estoque, o componente `Solicita Estoque` publica no barramento uma mensagem de tópico "`produto//estoque/consulta`" através da interface `Consulta Estoque` e assina mensagens de tópico "`produto//estoque/status`" através da interface `Posição Estoque` que retorna a disponibilidade do produto. + +> Para cada componente será apresentado um documento conforme o modelo a seguir: + +## Componente `` + +> Resumo do papel do componente e serviços que ele oferece. + +![Componente](images/diagrama-componente.png) + +**Interfaces** +> Listagem das interfaces do componente. + +As interfaces listadas são detalhadas a seguir: + +## Detalhamento das Interfaces + +### Interface `` + +![Diagrama da Interface](images/diagrama-interface-itableproducer.png) + +> Resumo do papel da interface. + +Método | Objetivo +-------| -------- +`` | `` + +## Exemplos: + +### Interface `ITableProducer` + +![Diagrama da Interface](images/diagrama-interface-itableproducer.png) + +Interface provida por qualquer fonte de dados que os forneça na forma de uma tabela. + +Método | Objetivo +-------| -------- +`requestAttributes` | Retorna um vetor com o nome de todos os atributos (colunas) da tabela. +`requestInstances` | Retorna uma matriz em que cada linha representa uma instância e cada coluna o valor do respectivo atributo (a ordem dos atributos é a mesma daquela fornecida por `requestAttributes`. + +### Interface `IDataSetProperties` + +![Diagrama da Interface](images/diagrama-interface-idatasetproperties.png) + +Define o recurso (usualmente o caminho para um arquivo em disco) que é a fonte de dados. + +Método | Objetivo +-------| -------- +`getDataSource` | Retorna o caminho da fonte de dados. +`setDataSource` | Define o caminho da fonte de dados, informado através do parâmetro `dataSource`. + +## Diagrama do Nível 3 + +> Apresente uma imagem com a captura de tela de seu protótipo feito no MIT App Inventor, conforme modelo a seguir: + +![Captura de Tela do Protótipo](images/captura-prototipo.png) + +> Apresente o diagrama referente ao protótipo conforme o modelo a seguir: + +![Modelo de diagrama no nível 2](images/diagrama-prototipo.png) + +### Detalhamento da interação de componentes + +> O detalhamento deve seguir o mesmo formato usado no Nível 2. diff --git a/templates/2022/project/images/captura-prototipo.png b/templates/2022/project/images/captura-prototipo.png new file mode 100644 index 000000000..3df1478d3 Binary files /dev/null and b/templates/2022/project/images/captura-prototipo.png differ diff --git a/templates/2022/project/images/diagrama-barramento.png b/templates/2022/project/images/diagrama-barramento.png new file mode 100644 index 000000000..3fd1353b9 Binary files /dev/null and b/templates/2022/project/images/diagrama-barramento.png differ diff --git a/templates/2022/project/images/diagrama-componente.png b/templates/2022/project/images/diagrama-componente.png new file mode 100644 index 000000000..0c093c24d Binary files /dev/null and b/templates/2022/project/images/diagrama-componente.png differ diff --git a/templates/2022/project/images/diagrama-interface-idatasetproperties.png b/templates/2022/project/images/diagrama-interface-idatasetproperties.png new file mode 100644 index 000000000..ea0f411c0 Binary files /dev/null and b/templates/2022/project/images/diagrama-interface-idatasetproperties.png differ diff --git a/templates/2022/project/images/diagrama-interface-itableproducer.png b/templates/2022/project/images/diagrama-interface-itableproducer.png new file mode 100644 index 000000000..af1bd08c6 Binary files /dev/null and b/templates/2022/project/images/diagrama-interface-itableproducer.png differ diff --git a/templates/2022/project/images/diagrama-interface-mensagens.png b/templates/2022/project/images/diagrama-interface-mensagens.png new file mode 100644 index 000000000..b9f2ec2de Binary files /dev/null and b/templates/2022/project/images/diagrama-interface-mensagens.png differ diff --git a/templates/2022/project/images/diagrama-prototipo.png b/templates/2022/project/images/diagrama-prototipo.png new file mode 100644 index 000000000..a50e6b8cf Binary files /dev/null and b/templates/2022/project/images/diagrama-prototipo.png differ diff --git a/templates/2022/project/images/diagrama-subcomponentes.png b/templates/2022/project/images/diagrama-subcomponentes.png new file mode 100644 index 000000000..4904d33dc Binary files /dev/null and b/templates/2022/project/images/diagrama-subcomponentes.png differ diff --git a/web/README.md b/web/README.md new file mode 100644 index 000000000..8dbbd8429 --- /dev/null +++ b/web/README.md @@ -0,0 +1,59 @@ +# ChatGPT Answer + +To synchronize the JavaScript property names with HTML attribute names in Web Components, you can use the following conventions: + +1. Define the JavaScript property name using camelCase convention. For example, `backgroundColor`. + +2. Define the HTML attribute name using kebab-case convention. For example, `background-color`. + +3. Use the `attributeChangedCallback()` method to monitor changes in the HTML attribute, and update the corresponding JavaScript property accordingly. + +Here's an example of how to define a custom element that synchronizes a JavaScript property with an HTML attribute using the conventions described above: + +```javascript +class MyElement extends HTMLElement { + constructor() { + super(); + + // Define the JavaScript property + this.backgroundColor = ''; + + // Define the observed HTML attribute + this.observedAttributes = ['background-color']; + } + + // The attributeChangedCallback() method is called when the observed attribute is changed + attributeChangedCallback(attrName, oldValue, newValue) { + // Convert the kebab-case attribute name to camelCase property name + const propName = attrName.replace(/-([a-z])/g, (match, letter) => letter.toUpperCase()); + + // Update the corresponding JavaScript property + this[propName] = newValue; + } + + // Define the getter and setter for the JavaScript property + get backgroundColor() { + return this.getAttribute('background-color'); + } + + set backgroundColor(value) { + this.setAttribute('background-color', value); + } +} + +// Define the custom element +customElements.define('my-element', MyElement); +``` + +With this code, you can now use the `my-element` element in HTML like this: + +```html + +``` + +And in JavaScript, you can access the `backgroundColor` property of the element like this: + +```javascript +const myElement = document.querySelector('my-element'); +console.log(myElement.backgroundColor); // Output: "red" +``` \ No newline at end of file diff --git a/web/comparison/README.md b/web/comparison/README.md new file mode 100644 index 000000000..28e3f12d5 --- /dev/null +++ b/web/comparison/README.md @@ -0,0 +1,65 @@ +# Lab Notes + +This lab has three modalities: +* **production** (`dist/index.html`) - in which webpack packs modules together and can be processed strait by the browser; +* **map** (`dist/index-map.html`) - presented in its raw version with a mapping reference to external libraries; +* **development** (`dist/index-dev.html`) - presented in its raw version and refers to packages installed locally via npm. + +~~~ +npx webpack +~~~ + +There is a `' + }), + new HtmlWebpackPlugin({ + inject: false, + filename: 'index-dev.html', + template: './template/index.html', + lib: '../js/test.js', + map: '' + }) + ] +~~~ + +The clause `inject:false` avoids automatic injection of the javascript packaged before. The `lib` and `map` properties are dynamically replaced in the template. + +# Installation Commands + +1. installing webpack: `npm install webpack webpack-cli --save-dev` +2. installing HtmlWebpackPlugin: `npm install --save-dev html-webpack-plugin` +3. installing http-server: `npm install @web/dev-server --save-dev` \ No newline at end of file diff --git a/web/comparison/dist/index-dev.html b/web/comparison/dist/index-dev.html new file mode 100644 index 000000000..e0466b847 --- /dev/null +++ b/web/comparison/dist/index-dev.html @@ -0,0 +1,39 @@ + + + + + + Oid component sample + + +
+

component-raw-1-element

+ +
+
+

component-raw-2-protected

+ +
+
+

component-raw-3-private

+ +
+
+

component-oid-1

+ +
+
+

component-oid-2

+ +
+
+

component-oid-3-private

+ +
+
+

component-lit

+ +
+ + + \ No newline at end of file diff --git a/web/comparison/dist/index-map.html b/web/comparison/dist/index-map.html new file mode 100644 index 000000000..9105aef1e --- /dev/null +++ b/web/comparison/dist/index-map.html @@ -0,0 +1,39 @@ + + + + + + Oid component sample + + +
+

component-raw-1-element

+ +
+
+

component-raw-2-protected

+ +
+
+

component-raw-3-private

+ +
+
+

component-oid-1

+ +
+
+

component-oid-2

+ +
+
+

component-oid-3-private

+ +
+
+

component-lit

+ +
+ + + \ No newline at end of file diff --git a/web/comparison/dist/index.html b/web/comparison/dist/index.html new file mode 100644 index 000000000..982e07eb8 --- /dev/null +++ b/web/comparison/dist/index.html @@ -0,0 +1,39 @@ + + + + + + Oid component sample + + +
+

component-raw-1-element

+ +
+
+

component-raw-2-protected

+ +
+
+

component-raw-3-private

+ +
+
+

component-oid-1

+ +
+
+

component-oid-2

+ +
+
+

component-oid-3-private

+ +
+
+

component-lit

+ +
+ + + \ No newline at end of file diff --git a/web/comparison/dist/test-pack.js b/web/comparison/dist/test-pack.js new file mode 100644 index 000000000..3a3252465 --- /dev/null +++ b/web/comparison/dist/test-pack.js @@ -0,0 +1,216 @@ +/* + * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "./js/test.js": +/*!********************!*\ + !*** ./js/test.js ***! + \********************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _raw_component_raw_1_element_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../raw/component-raw-1-element.js */ \"./raw/component-raw-1-element.js\");\n/* harmony import */ var _raw_component_raw_2_protected_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../raw/component-raw-2-protected.js */ \"./raw/component-raw-2-protected.js\");\n/* harmony import */ var _raw_component_raw_3_private_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../raw/component-raw-3-private.js */ \"./raw/component-raw-3-private.js\");\n/* harmony import */ var _oid_component_oid_1_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../oid/component-oid-1.js */ \"./oid/component-oid-1.js\");\n/* harmony import */ var _oid_component_oid_2_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../oid/component-oid-2.js */ \"./oid/component-oid-2.js\");\n/* harmony import */ var _oid_component_oid_3_private_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../oid/component-oid-3-private.js */ \"./oid/component-oid-3-private.js\");\n/* harmony import */ var _lit_component_lit_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../lit/component-lit.js */ \"./lit/component-lit.js\");\n\n\n\n\n\n\n\n\nfunction testComponent () {\n const compSet = [\n {element: 'component-raw-1-element', cclass: _raw_component_raw_1_element_js__WEBPACK_IMPORTED_MODULE_0__.ComponentRaw1},\n {element: 'component-raw-2-protected', cclass: _raw_component_raw_2_protected_js__WEBPACK_IMPORTED_MODULE_1__.ComponentRaw2},\n {element: 'component-raw-3-private', cclass: _raw_component_raw_3_private_js__WEBPACK_IMPORTED_MODULE_2__.ComponentRaw3},\n {element: 'component-oid-1', cclass: _oid_component_oid_1_js__WEBPACK_IMPORTED_MODULE_3__.ComponentOid1},\n {element: 'component-oid-2', cclass: _oid_component_oid_2_js__WEBPACK_IMPORTED_MODULE_4__.ComponentOid2},\n {element: 'component-oid-3-private', cclass: _oid_component_oid_3_private_js__WEBPACK_IMPORTED_MODULE_5__.ComponentOid3},\n {element: 'component-lit', cclass: _lit_component_lit_js__WEBPACK_IMPORTED_MODULE_6__.ComponentLit}\n ]\n\n for (const c of compSet) {\n console.log(`=== ${c.element} ===`)\n const block = document.querySelector('#' + c.element + '-block')\n\n // testing straight property assignment\n const component1 = new c.cclass\n console.log('--- component structure')\n console.log(component1)\n component1.name = 'Doriana'\n console.log(`--- straight assignment (name): ${component1.name}`)\n\n // testing element attribute assignment\n const component2 = document.createElement(c.element)\n component2.setAttribute('name', 'Quincas')\n console.log(`--- element attribute assignment (name): ${component2.name}`)\n block.appendChild(component2)\n\n // testing reactivity 1\n const component3 = document.createElement(c.element)\n block.appendChild(component3)\n component3.name = 'Alcebiades'\n console.log(`--- reactivity 1 (name): ${component3.name}`)\n \n // testing reactivity 2\n const component4 = document.createElement(c.element)\n block.appendChild(component4)\n component4.setAttribute('name', 'Mila')\n console.log(`--- reactivity 2 (name): ${component4.name}`)\n }\n}\n\ntestComponent()\n\n//# sourceURL=webpack:///./js/test.js?"); + +/***/ }), + +/***/ "./lit/component-lit.js": +/*!******************************!*\ + !*** ./lit/component-lit.js ***! + \******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ComponentLit\": () => (/* binding */ ComponentLit)\n/* harmony export */ });\n/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lit */ \"./node_modules/lit/index.js\");\n\n\nclass ComponentLit extends lit__WEBPACK_IMPORTED_MODULE_0__.LitElement {\n static properties = {\n name: {}\n };\n // Define scoped styles right with your component, in plain CSS\n static styles = lit__WEBPACK_IMPORTED_MODULE_0__.css`\n :host {\n color: blue;\n }\n `;\n\n // Render the UI as a function of component state\n render() {\n return lit__WEBPACK_IMPORTED_MODULE_0__.html`

Hello, ${this.name}

`;\n }\n}\n\ncustomElements.define('component-lit', ComponentLit);\n\n//# sourceURL=webpack:///./lit/component-lit.js?"); + +/***/ }), + +/***/ "./oid/component-oid-1.js": +/*!********************************!*\ + !*** ./oid/component-oid-1.js ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ComponentOid1\": () => (/* binding */ ComponentOid1)\n/* harmony export */ });\nclass ComponentOid1 extends HTMLElement {\n connectedCallback () {\n this.render()\n }\n\n static builder () {\n Object.defineProperty(ComponentOid1.prototype, 'name', {\n get: function() {\n return this._name\n },\n set: function(newValue) {\n this._name = newValue\n this.render()\n }\n })\n }\n\n static get observedAttributes() {\n return ['name']\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n switch (name) {\n case 'name': this.name = newValue\n }\n } \n\n render () {\n this.innerHTML = `

Hello, ${this.name}

`\n }\n}\n\nComponentOid1.builder()\n\ncustomElements.define('component-oid-1', ComponentOid1)\n\n//# sourceURL=webpack:///./oid/component-oid-1.js?"); + +/***/ }), + +/***/ "./oid/component-oid-2.js": +/*!********************************!*\ + !*** ./oid/component-oid-2.js ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ComponentOid2\": () => (/* binding */ ComponentOid2)\n/* harmony export */ });\nclass ComponentOid2 extends HTMLElement {\n static spec = {\n properties: ['name']\n }\n\n connectedCallback () {\n this.render()\n }\n\n static get observedAttributes() {\n return this.spec.properties\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n this[name] = newValue\n }\n\n render () {\n this.innerHTML = `

Hello, ${this.name}

`\n }\n}\n\nComponentOid2.spec.properties.forEach((property) => {\n Object.defineProperty(ComponentOid2.prototype, property, {\n get: function() {return this['_' + property]},\n set: function(newValue) {\n this['_' + property] = newValue\n this.render()\n }\n })\n})\n\ncustomElements.define('component-oid-2', ComponentOid2)\n\n//# sourceURL=webpack:///./oid/component-oid-2.js?"); + +/***/ }), + +/***/ "./oid/component-oid-3-private.js": +/*!****************************************!*\ + !*** ./oid/component-oid-3-private.js ***! + \****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ComponentOid3\": () => (/* binding */ ComponentOid3)\n/* harmony export */ });\nclass ComponentOid3 extends HTMLElement {\n #name\n\n connectedCallback () {\n this.render()\n }\n\n static builder () {\n Object.defineProperty(ComponentOid3.prototype, 'name', {\n get: function() {\n return this.#name\n },\n set: function(newValue) {\n this.#name = newValue\n this.render()\n }\n })\n }\n\n static get observedAttributes() {\n return ['name']\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n switch (name) {\n case 'name': this.name = newValue\n }\n } \n\n render () {\n this.innerHTML = `

Hello, ${this.name}

`\n }\n}\n\nComponentOid3.builder()\n\ncustomElements.define('component-oid-3-private', ComponentOid3)\n\n//# sourceURL=webpack:///./oid/component-oid-3-private.js?"); + +/***/ }), + +/***/ "./raw/component-raw-1-element.js": +/*!****************************************!*\ + !*** ./raw/component-raw-1-element.js ***! + \****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ComponentRaw1\": () => (/* binding */ ComponentRaw1)\n/* harmony export */ });\nclass ComponentRaw1 extends HTMLElement {\n connectedCallback () {\n this.render()\n }\n\n static get observedAttributes() {\n return ['name']\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n this.render()\n } \n\n get name() {\n return this.getAttribute('name')\n }\n\n set name(newValue) {\n this.setAttribute('name', newValue)\n this.render()\n }\n\n render () {\n this.innerHTML = `

Hello, ${this.name}

`\n }\n}\n\ncustomElements.define('component-raw-1-element', ComponentRaw1)\n\n//# sourceURL=webpack:///./raw/component-raw-1-element.js?"); + +/***/ }), + +/***/ "./raw/component-raw-2-protected.js": +/*!******************************************!*\ + !*** ./raw/component-raw-2-protected.js ***! + \******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ComponentRaw2\": () => (/* binding */ ComponentRaw2)\n/* harmony export */ });\nclass ComponentRaw2 extends HTMLElement {\n connectedCallback () {\n this.render()\n }\n\n static get observedAttributes() {\n return ['name']\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n switch (name) {\n case 'name': this.name = newValue\n }\n } \n\n get name() {\n return this._name\n }\n\n set name(newValue) {\n this._name = newValue\n this.render()\n }\n\n render () {\n this.innerHTML = `

Hello, ${this.name}

`\n }\n}\n\ncustomElements.define('component-raw-2-protected', ComponentRaw2)\n\n//# sourceURL=webpack:///./raw/component-raw-2-protected.js?"); + +/***/ }), + +/***/ "./raw/component-raw-3-private.js": +/*!****************************************!*\ + !*** ./raw/component-raw-3-private.js ***! + \****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ComponentRaw3\": () => (/* binding */ ComponentRaw3)\n/* harmony export */ });\nclass ComponentRaw3 extends HTMLElement {\n #name\n \n connectedCallback () {\n this.render()\n }\n\n static get observedAttributes() {\n return ['name']\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n switch (name) {\n case 'name': this.name = newValue\n }\n } \n\n get name() {\n return this.#name\n }\n\n set name(newValue) {\n this.#name = newValue\n this.render()\n }\n\n render () {\n this.innerHTML = `

Hello, ${this.name}

`\n }\n}\n\ncustomElements.define('component-raw-3-private', ComponentRaw3)\n\n//# sourceURL=webpack:///./raw/component-raw-3-private.js?"); + +/***/ }), + +/***/ "./node_modules/@lit/reactive-element/development/css-tag.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@lit/reactive-element/development/css-tag.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CSSResult\": () => (/* binding */ CSSResult),\n/* harmony export */ \"adoptStyles\": () => (/* binding */ adoptStyles),\n/* harmony export */ \"css\": () => (/* binding */ css),\n/* harmony export */ \"getCompatibleStyle\": () => (/* binding */ getCompatibleStyle),\n/* harmony export */ \"supportsAdoptingStyleSheets\": () => (/* binding */ supportsAdoptingStyleSheets),\n/* harmony export */ \"unsafeCSS\": () => (/* binding */ unsafeCSS)\n/* harmony export */ });\n/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst NODE_MODE = false;\nconst global = NODE_MODE ? globalThis : window;\n/**\n * Whether the current browser supports `adoptedStyleSheets`.\n */\nconst supportsAdoptingStyleSheets = global.ShadowRoot &&\n (global.ShadyCSS === undefined || global.ShadyCSS.nativeShadow) &&\n 'adoptedStyleSheets' in Document.prototype &&\n 'replace' in CSSStyleSheet.prototype;\nconst constructionToken = Symbol();\nconst cssTagCache = new WeakMap();\n/**\n * A container for a string of CSS text, that may be used to create a CSSStyleSheet.\n *\n * CSSResult is the return value of `css`-tagged template literals and\n * `unsafeCSS()`. In order to ensure that CSSResults are only created via the\n * `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.\n */\nclass CSSResult {\n constructor(cssText, strings, safeToken) {\n // This property needs to remain unminified.\n this['_$cssResult$'] = true;\n if (safeToken !== constructionToken) {\n throw new Error('CSSResult is not constructable. Use `unsafeCSS` or `css` instead.');\n }\n this.cssText = cssText;\n this._strings = strings;\n }\n // This is a getter so that it's lazy. In practice, this means stylesheets\n // are not created until the first element instance is made.\n get styleSheet() {\n // If `supportsAdoptingStyleSheets` is true then we assume CSSStyleSheet is\n // constructable.\n let styleSheet = this._styleSheet;\n const strings = this._strings;\n if (supportsAdoptingStyleSheets && styleSheet === undefined) {\n const cacheable = strings !== undefined && strings.length === 1;\n if (cacheable) {\n styleSheet = cssTagCache.get(strings);\n }\n if (styleSheet === undefined) {\n (this._styleSheet = styleSheet = new CSSStyleSheet()).replaceSync(this.cssText);\n if (cacheable) {\n cssTagCache.set(strings, styleSheet);\n }\n }\n }\n return styleSheet;\n }\n toString() {\n return this.cssText;\n }\n}\nconst textFromCSSResult = (value) => {\n // This property needs to remain unminified.\n if (value['_$cssResult$'] === true) {\n return value.cssText;\n }\n else if (typeof value === 'number') {\n return value;\n }\n else {\n throw new Error(`Value passed to 'css' function must be a 'css' function result: ` +\n `${value}. Use 'unsafeCSS' to pass non-literal values, but take care ` +\n `to ensure page security.`);\n }\n};\n/**\n * Wrap a value for interpolation in a {@linkcode css} tagged template literal.\n *\n * This is unsafe because untrusted CSS text can be used to phone home\n * or exfiltrate data to an attacker controlled site. Take care to only use\n * this with trusted input.\n */\nconst unsafeCSS = (value) => new CSSResult(typeof value === 'string' ? value : String(value), undefined, constructionToken);\n/**\n * A template literal tag which can be used with LitElement's\n * {@linkcode LitElement.styles} property to set element styles.\n *\n * For security reasons, only literal string values and number may be used in\n * embedded expressions. To incorporate non-literal values {@linkcode unsafeCSS}\n * may be used inside an expression.\n */\nconst css = (strings, ...values) => {\n const cssText = strings.length === 1\n ? strings[0]\n : values.reduce((acc, v, idx) => acc + textFromCSSResult(v) + strings[idx + 1], strings[0]);\n return new CSSResult(cssText, strings, constructionToken);\n};\n/**\n * Applies the given styles to a `shadowRoot`. When Shadow DOM is\n * available but `adoptedStyleSheets` is not, styles are appended to the\n * `shadowRoot` to [mimic spec behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).\n * Note, when shimming is used, any styles that are subsequently placed into\n * the shadowRoot should be placed *before* any shimmed adopted styles. This\n * will match spec behavior that gives adopted sheets precedence over styles in\n * shadowRoot.\n */\nconst adoptStyles = (renderRoot, styles) => {\n if (supportsAdoptingStyleSheets) {\n renderRoot.adoptedStyleSheets = styles.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet);\n }\n else {\n styles.forEach((s) => {\n const style = document.createElement('style');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const nonce = global['litNonce'];\n if (nonce !== undefined) {\n style.setAttribute('nonce', nonce);\n }\n style.textContent = s.cssText;\n renderRoot.appendChild(style);\n });\n }\n};\nconst cssResultFromStyleSheet = (sheet) => {\n let cssText = '';\n for (const rule of sheet.cssRules) {\n cssText += rule.cssText;\n }\n return unsafeCSS(cssText);\n};\nconst getCompatibleStyle = supportsAdoptingStyleSheets ||\n (NODE_MODE && global.CSSStyleSheet === undefined)\n ? (s) => s\n : (s) => s instanceof CSSStyleSheet ? cssResultFromStyleSheet(s) : s;\n//# sourceMappingURL=css-tag.js.map\n\n//# sourceURL=webpack:///./node_modules/@lit/reactive-element/development/css-tag.js?"); + +/***/ }), + +/***/ "./node_modules/@lit/reactive-element/development/reactive-element.js": +/*!****************************************************************************!*\ + !*** ./node_modules/@lit/reactive-element/development/reactive-element.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CSSResult\": () => (/* reexport safe */ _css_tag_js__WEBPACK_IMPORTED_MODULE_0__.CSSResult),\n/* harmony export */ \"ReactiveElement\": () => (/* binding */ ReactiveElement),\n/* harmony export */ \"adoptStyles\": () => (/* reexport safe */ _css_tag_js__WEBPACK_IMPORTED_MODULE_0__.adoptStyles),\n/* harmony export */ \"css\": () => (/* reexport safe */ _css_tag_js__WEBPACK_IMPORTED_MODULE_0__.css),\n/* harmony export */ \"defaultConverter\": () => (/* binding */ defaultConverter),\n/* harmony export */ \"getCompatibleStyle\": () => (/* reexport safe */ _css_tag_js__WEBPACK_IMPORTED_MODULE_0__.getCompatibleStyle),\n/* harmony export */ \"notEqual\": () => (/* binding */ notEqual),\n/* harmony export */ \"supportsAdoptingStyleSheets\": () => (/* reexport safe */ _css_tag_js__WEBPACK_IMPORTED_MODULE_0__.supportsAdoptingStyleSheets),\n/* harmony export */ \"unsafeCSS\": () => (/* reexport safe */ _css_tag_js__WEBPACK_IMPORTED_MODULE_0__.unsafeCSS)\n/* harmony export */ });\n/* harmony import */ var _css_tag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css-tag.js */ \"./node_modules/@lit/reactive-element/development/css-tag.js\");\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar _a, _b, _c, _d;\nvar _e;\n/**\n * Use this module if you want to create your own base class extending\n * {@link ReactiveElement}.\n * @packageDocumentation\n */\n\n// In the Node build, this import will be injected by Rollup:\n// import {HTMLElement, customElements} from '@lit-labs/ssr-dom-shim';\n\nconst NODE_MODE = false;\nconst global = NODE_MODE ? globalThis : window;\nif (NODE_MODE) {\n (_a = global.customElements) !== null && _a !== void 0 ? _a : (global.customElements = customElements);\n}\nconst DEV_MODE = true;\nlet requestUpdateThenable;\nlet issueWarning;\nconst trustedTypes = global\n .trustedTypes;\n// Temporary workaround for https://crbug.com/993268\n// Currently, any attribute starting with \"on\" is considered to be a\n// TrustedScript source. Such boolean attributes must be set to the equivalent\n// trusted emptyScript value.\nconst emptyStringForBooleanAttribute = trustedTypes\n ? trustedTypes.emptyScript\n : '';\nconst polyfillSupport = DEV_MODE\n ? global.reactiveElementPolyfillSupportDevMode\n : global.reactiveElementPolyfillSupport;\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings = ((_b = global.litIssuedWarnings) !== null && _b !== void 0 ? _b : (global.litIssuedWarnings = new Set()));\n // Issue a warning, if we haven't already.\n issueWarning = (code, warning) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n issueWarning('dev-mode', `Lit is in dev mode. Not recommended for production!`);\n // Issue polyfill support warning.\n if (((_c = global.ShadyDOM) === null || _c === void 0 ? void 0 : _c.inUse) && polyfillSupport === undefined) {\n issueWarning('polyfill-support-missing', `Shadow DOM is being polyfilled via \\`ShadyDOM\\` but ` +\n `the \\`polyfill-support\\` module has not been loaded.`);\n }\n requestUpdateThenable = (name) => ({\n then: (onfulfilled, _onrejected) => {\n issueWarning('request-update-promise', `The \\`requestUpdate\\` method should no longer return a Promise but ` +\n `does so on \\`${name}\\`. Use \\`updateComplete\\` instead.`);\n if (onfulfilled !== undefined) {\n onfulfilled(false);\n }\n },\n });\n}\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event) => {\n const shouldEmit = global\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(new CustomEvent('lit-debug', {\n detail: event,\n }));\n }\n : undefined;\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\n/*@__INLINE__*/\nconst JSCompiler_renameProperty = (prop, _obj) => prop;\nconst defaultConverter = {\n toAttribute(value, type) {\n switch (type) {\n case Boolean:\n value = value ? emptyStringForBooleanAttribute : null;\n break;\n case Object:\n case Array:\n // if the value is `null` or `undefined` pass this through\n // to allow removing/no change behavior.\n value = value == null ? value : JSON.stringify(value);\n break;\n }\n return value;\n },\n fromAttribute(value, type) {\n let fromValue = value;\n switch (type) {\n case Boolean:\n fromValue = value !== null;\n break;\n case Number:\n fromValue = value === null ? null : Number(value);\n break;\n case Object:\n case Array:\n // Do *not* generate exception when invalid JSON is set as elements\n // don't normally complain on being mis-configured.\n // TODO(sorvell): Do generate exception in *dev mode*.\n try {\n // Assert to adhere to Bazel's \"must type assert JSON parse\" rule.\n fromValue = JSON.parse(value);\n }\n catch (e) {\n fromValue = null;\n }\n break;\n }\n return fromValue;\n },\n};\n/**\n * Change function that returns true if `value` is different from `oldValue`.\n * This method is used as the default for a property's `hasChanged` function.\n */\nconst notEqual = (value, old) => {\n // This ensures (old==NaN, value==NaN) always returns false\n return old !== value && (old === old || value === value);\n};\nconst defaultPropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n reflect: false,\n hasChanged: notEqual,\n};\n/**\n * The Closure JS Compiler doesn't currently have good support for static\n * property semantics where \"this\" is dynamic (e.g.\n * https://github.com/google/closure-compiler/issues/3177 and others) so we use\n * this hack to bypass any rewriting by the compiler.\n */\nconst finalized = 'finalized';\n/**\n * Base element class which manages element properties and attributes. When\n * properties change, the `update` method is asynchronously called. This method\n * should be supplied by subclassers to render updates as desired.\n * @noInheritDoc\n */\nclass ReactiveElement\n// In the Node build, this `extends` clause will be substituted with\n// `(globalThis.HTMLElement ?? HTMLElement)`.\n//\n// This way, we will first prefer any global `HTMLElement` polyfill that the\n// user has assigned, and then fall back to the `HTMLElement` shim which has\n// been imported (see note at the top of this file about how this import is\n// generated by Rollup). Note that the `HTMLElement` variable has been\n// shadowed by this import, so it no longer refers to the global.\n extends HTMLElement {\n constructor() {\n super();\n this.__instanceProperties = new Map();\n /**\n * True if there is a pending update as a result of calling `requestUpdate()`.\n * Should only be read.\n * @category updates\n */\n this.isUpdatePending = false;\n /**\n * Is set to `true` after the first update. The element code cannot assume\n * that `renderRoot` exists before the element `hasUpdated`.\n * @category updates\n */\n this.hasUpdated = false;\n /**\n * Name of currently reflecting property\n */\n this.__reflectingProperty = null;\n this._initialize();\n }\n /**\n * Adds an initializer function to the class that is called during instance\n * construction.\n *\n * This is useful for code that runs against a `ReactiveElement`\n * subclass, such as a decorator, that needs to do work for each\n * instance, such as setting up a `ReactiveController`.\n *\n * ```ts\n * const myDecorator = (target: typeof ReactiveElement, key: string) => {\n * target.addInitializer((instance: ReactiveElement) => {\n * // This is run during construction of the element\n * new MyController(instance);\n * });\n * }\n * ```\n *\n * Decorating a field will then cause each instance to run an initializer\n * that adds a controller:\n *\n * ```ts\n * class MyElement extends LitElement {\n * @myDecorator foo;\n * }\n * ```\n *\n * Initializers are stored per-constructor. Adding an initializer to a\n * subclass does not add it to a superclass. Since initializers are run in\n * constructors, initializers will run in order of the class hierarchy,\n * starting with superclasses and progressing to the instance's class.\n *\n * @nocollapse\n */\n static addInitializer(initializer) {\n var _a;\n this.finalize();\n ((_a = this._initializers) !== null && _a !== void 0 ? _a : (this._initializers = [])).push(initializer);\n }\n /**\n * Returns a list of attributes corresponding to the registered properties.\n * @nocollapse\n * @category attributes\n */\n static get observedAttributes() {\n // note: piggy backing on this to ensure we're finalized.\n this.finalize();\n const attributes = [];\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n this.elementProperties.forEach((v, p) => {\n const attr = this.__attributeNameForProperty(p, v);\n if (attr !== undefined) {\n this.__attributeToPropertyMap.set(attr, p);\n attributes.push(attr);\n }\n });\n return attributes;\n }\n /**\n * Creates a property accessor on the element prototype if one does not exist\n * and stores a {@linkcode PropertyDeclaration} for the property with the\n * given options. The property setter calls the property's `hasChanged`\n * property option or uses a strict identity check to determine whether or not\n * to request an update.\n *\n * This method may be overridden to customize properties; however,\n * when doing so, it's important to call `super.createProperty` to ensure\n * the property is setup correctly. This method calls\n * `getPropertyDescriptor` internally to get a descriptor to install.\n * To customize what properties do when they are get or set, override\n * `getPropertyDescriptor`. To customize the options for a property,\n * implement `createProperty` like this:\n *\n * ```ts\n * static createProperty(name, options) {\n * options = Object.assign(options, {myOption: true});\n * super.createProperty(name, options);\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n static createProperty(name, options = defaultPropertyDeclaration) {\n var _a;\n // if this is a state property, force the attribute to false.\n if (options.state) {\n // Cast as any since this is readonly.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n options.attribute = false;\n }\n // Note, since this can be called by the `@property` decorator which\n // is called before `finalize`, we ensure finalization has been kicked off.\n this.finalize();\n this.elementProperties.set(name, options);\n // Do not generate an accessor if the prototype already has one, since\n // it would be lost otherwise and that would never be the user's intention;\n // Instead, we expect users to call `requestUpdate` themselves from\n // user-defined accessors. Note that if the super has an accessor we will\n // still overwrite it\n if (!options.noAccessor && !this.prototype.hasOwnProperty(name)) {\n const key = typeof name === 'symbol' ? Symbol() : `__${name}`;\n const descriptor = this.getPropertyDescriptor(name, key, options);\n if (descriptor !== undefined) {\n Object.defineProperty(this.prototype, name, descriptor);\n if (DEV_MODE) {\n // If this class doesn't have its own set, create one and initialize\n // with the values in the set from the nearest ancestor class, if any.\n if (!this.hasOwnProperty('__reactivePropertyKeys')) {\n this.__reactivePropertyKeys = new Set((_a = this.__reactivePropertyKeys) !== null && _a !== void 0 ? _a : []);\n }\n this.__reactivePropertyKeys.add(name);\n }\n }\n }\n }\n /**\n * Returns a property descriptor to be defined on the given named property.\n * If no descriptor is returned, the property will not become an accessor.\n * For example,\n *\n * ```ts\n * class MyElement extends LitElement {\n * static getPropertyDescriptor(name, key, options) {\n * const defaultDescriptor =\n * super.getPropertyDescriptor(name, key, options);\n * const setter = defaultDescriptor.set;\n * return {\n * get: defaultDescriptor.get,\n * set(value) {\n * setter.call(this, value);\n * // custom action.\n * },\n * configurable: true,\n * enumerable: true\n * }\n * }\n * }\n * ```\n *\n * @nocollapse\n * @category properties\n */\n static getPropertyDescriptor(name, key, options) {\n return {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get() {\n return this[key];\n },\n set(value) {\n const oldValue = this[name];\n this[key] = value;\n this.requestUpdate(name, oldValue, options);\n },\n configurable: true,\n enumerable: true,\n };\n }\n /**\n * Returns the property options associated with the given property.\n * These options are defined with a `PropertyDeclaration` via the `properties`\n * object or the `@property` decorator and are registered in\n * `createProperty(...)`.\n *\n * Note, this method should be considered \"final\" and not overridden. To\n * customize the options for a given property, override\n * {@linkcode createProperty}.\n *\n * @nocollapse\n * @final\n * @category properties\n */\n static getPropertyOptions(name) {\n return this.elementProperties.get(name) || defaultPropertyDeclaration;\n }\n /**\n * Creates property accessors for registered properties, sets up element\n * styling, and ensures any superclasses are also finalized. Returns true if\n * the element was finalized.\n * @nocollapse\n */\n static finalize() {\n if (this.hasOwnProperty(finalized)) {\n return false;\n }\n this[finalized] = true;\n // finalize any superclasses\n const superCtor = Object.getPrototypeOf(this);\n superCtor.finalize();\n // Create own set of initializers for this class if any exist on the\n // superclass and copy them down. Note, for a small perf boost, avoid\n // creating initializers unless needed.\n if (superCtor._initializers !== undefined) {\n this._initializers = [...superCtor._initializers];\n }\n this.elementProperties = new Map(superCtor.elementProperties);\n // initialize Map populated in observedAttributes\n this.__attributeToPropertyMap = new Map();\n // make any properties\n // Note, only process \"own\" properties since this element will inherit\n // any properties defined on the superClass, and finalization ensures\n // the entire prototype chain is finalized.\n if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) {\n const props = this.properties;\n // support symbols in properties (IE11 does not support this)\n const propKeys = [\n ...Object.getOwnPropertyNames(props),\n ...Object.getOwnPropertySymbols(props),\n ];\n // This for/of is ok because propKeys is an array\n for (const p of propKeys) {\n // note, use of `any` is due to TypeScript lack of support for symbol in\n // index types\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.createProperty(p, props[p]);\n }\n }\n this.elementStyles = this.finalizeStyles(this.styles);\n // DEV mode warnings\n if (DEV_MODE) {\n const warnRemovedOrRenamed = (name, renamed = false) => {\n if (this.prototype.hasOwnProperty(name)) {\n issueWarning(renamed ? 'renamed-api' : 'removed-api', `\\`${name}\\` is implemented on class ${this.name}. It ` +\n `has been ${renamed ? 'renamed' : 'removed'} ` +\n `in this version of LitElement.`);\n }\n };\n warnRemovedOrRenamed('initialize');\n warnRemovedOrRenamed('requestUpdateInternal');\n warnRemovedOrRenamed('_getUpdateComplete', true);\n }\n return true;\n }\n /**\n * Takes the styles the user supplied via the `static styles` property and\n * returns the array of styles to apply to the element.\n * Override this method to integrate into a style management system.\n *\n * Styles are deduplicated preserving the _last_ instance in the list. This\n * is a performance optimization to avoid duplicated styles that can occur\n * especially when composing via subclassing. The last item is kept to try\n * to preserve the cascade order with the assumption that it's most important\n * that last added styles override previous styles.\n *\n * @nocollapse\n * @category styles\n */\n static finalizeStyles(styles) {\n const elementStyles = [];\n if (Array.isArray(styles)) {\n // Dedupe the flattened array in reverse order to preserve the last items.\n // Casting to Array works around TS error that\n // appears to come from trying to flatten a type CSSResultArray.\n const set = new Set(styles.flat(Infinity).reverse());\n // Then preserve original order by adding the set items in reverse order.\n for (const s of set) {\n elementStyles.unshift((0,_css_tag_js__WEBPACK_IMPORTED_MODULE_0__.getCompatibleStyle)(s));\n }\n }\n else if (styles !== undefined) {\n elementStyles.push((0,_css_tag_js__WEBPACK_IMPORTED_MODULE_0__.getCompatibleStyle)(styles));\n }\n return elementStyles;\n }\n /**\n * Returns the property name for the given attribute `name`.\n * @nocollapse\n */\n static __attributeNameForProperty(name, options) {\n const attribute = options.attribute;\n return attribute === false\n ? undefined\n : typeof attribute === 'string'\n ? attribute\n : typeof name === 'string'\n ? name.toLowerCase()\n : undefined;\n }\n /**\n * Internal only override point for customizing work done when elements\n * are constructed.\n *\n * @internal\n */\n _initialize() {\n var _a;\n this.__updatePromise = new Promise((res) => (this.enableUpdating = res));\n this._$changedProperties = new Map();\n this.__saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this.requestUpdate();\n (_a = this.constructor._initializers) === null || _a === void 0 ? void 0 : _a.forEach((i) => i(this));\n }\n /**\n * Registers a `ReactiveController` to participate in the element's reactive\n * update cycle. The element automatically calls into any registered\n * controllers during its lifecycle callbacks.\n *\n * If the element is connected when `addController()` is called, the\n * controller's `hostConnected()` callback will be immediately called.\n * @category controllers\n */\n addController(controller) {\n var _a, _b;\n ((_a = this.__controllers) !== null && _a !== void 0 ? _a : (this.__controllers = [])).push(controller);\n // If a controller is added after the element has been connected,\n // call hostConnected. Note, re-using existence of `renderRoot` here\n // (which is set in connectedCallback) to avoid the need to track a\n // first connected state.\n if (this.renderRoot !== undefined && this.isConnected) {\n (_b = controller.hostConnected) === null || _b === void 0 ? void 0 : _b.call(controller);\n }\n }\n /**\n * Removes a `ReactiveController` from the element.\n * @category controllers\n */\n removeController(controller) {\n var _a;\n // Note, if the indexOf is -1, the >>> will flip the sign which makes the\n // splice do nothing.\n (_a = this.__controllers) === null || _a === void 0 ? void 0 : _a.splice(this.__controllers.indexOf(controller) >>> 0, 1);\n }\n /**\n * Fixes any properties set on the instance before upgrade time.\n * Otherwise these would shadow the accessor and break these properties.\n * The properties are stored in a Map which is played back after the\n * constructor runs. Note, on very old versions of Safari (<=9) or Chrome\n * (<=41), properties created for native platform properties like (`id` or\n * `name`) may not have default values set in the element constructor. On\n * these browsers native properties appear on instances and therefore their\n * default value will overwrite any element default (e.g. if the element sets\n * this.id = 'id' in the constructor, the 'id' will become '' since this is\n * the native platform default).\n */\n __saveInstanceProperties() {\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n this.constructor.elementProperties.forEach((_v, p) => {\n if (this.hasOwnProperty(p)) {\n this.__instanceProperties.set(p, this[p]);\n delete this[p];\n }\n });\n }\n /**\n * Returns the node into which the element should render and by default\n * creates and returns an open shadowRoot. Implement to customize where the\n * element's DOM is rendered. For example, to render into the element's\n * childNodes, return `this`.\n *\n * @return Returns a node into which to render.\n * @category rendering\n */\n createRenderRoot() {\n var _a;\n const renderRoot = (_a = this.shadowRoot) !== null && _a !== void 0 ? _a : this.attachShadow(this.constructor.shadowRootOptions);\n (0,_css_tag_js__WEBPACK_IMPORTED_MODULE_0__.adoptStyles)(renderRoot, this.constructor.elementStyles);\n return renderRoot;\n }\n /**\n * On first connection, creates the element's renderRoot, sets up\n * element styling, and enables updating.\n * @category lifecycle\n */\n connectedCallback() {\n var _a;\n // create renderRoot before first update.\n if (this.renderRoot === undefined) {\n this.renderRoot = this.createRenderRoot();\n }\n this.enableUpdating(true);\n (_a = this.__controllers) === null || _a === void 0 ? void 0 : _a.forEach((c) => { var _a; return (_a = c.hostConnected) === null || _a === void 0 ? void 0 : _a.call(c); });\n }\n /**\n * Note, this method should be considered final and not overridden. It is\n * overridden on the element instance with a function that triggers the first\n * update.\n * @category updates\n */\n enableUpdating(_requestedUpdate) { }\n /**\n * Allows for `super.disconnectedCallback()` in extensions while\n * reserving the possibility of making non-breaking feature additions\n * when disconnecting at some point in the future.\n * @category lifecycle\n */\n disconnectedCallback() {\n var _a;\n (_a = this.__controllers) === null || _a === void 0 ? void 0 : _a.forEach((c) => { var _a; return (_a = c.hostDisconnected) === null || _a === void 0 ? void 0 : _a.call(c); });\n }\n /**\n * Synchronizes property values when attributes change.\n *\n * Specifically, when an attribute is set, the corresponding property is set.\n * You should rarely need to implement this callback. If this method is\n * overridden, `super.attributeChangedCallback(name, _old, value)` must be\n * called.\n *\n * See [using the lifecycle callbacks](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks)\n * on MDN for more information about the `attributeChangedCallback`.\n * @category attributes\n */\n attributeChangedCallback(name, _old, value) {\n this._$attributeToProperty(name, value);\n }\n __propertyToAttribute(name, value, options = defaultPropertyDeclaration) {\n var _a;\n const attr = this.constructor.__attributeNameForProperty(name, options);\n if (attr !== undefined && options.reflect === true) {\n const converter = ((_a = options.converter) === null || _a === void 0 ? void 0 : _a.toAttribute) !==\n undefined\n ? options.converter\n : defaultConverter;\n const attrValue = converter.toAttribute(value, options.type);\n if (DEV_MODE &&\n this.constructor.enabledWarnings.indexOf('migration') >= 0 &&\n attrValue === undefined) {\n issueWarning('undefined-attribute-value', `The attribute value for the ${name} property is ` +\n `undefined on element ${this.localName}. The attribute will be ` +\n `removed, but in the previous version of \\`ReactiveElement\\`, ` +\n `the attribute would not have changed.`);\n }\n // Track if the property is being reflected to avoid\n // setting the property again via `attributeChangedCallback`. Note:\n // 1. this takes advantage of the fact that the callback is synchronous.\n // 2. will behave incorrectly if multiple attributes are in the reaction\n // stack at time of calling. However, since we process attributes\n // in `update` this should not be possible (or an extreme corner case\n // that we'd like to discover).\n // mark state reflecting\n this.__reflectingProperty = name;\n if (attrValue == null) {\n this.removeAttribute(attr);\n }\n else {\n this.setAttribute(attr, attrValue);\n }\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n /** @internal */\n _$attributeToProperty(name, value) {\n var _a;\n const ctor = this.constructor;\n // Note, hint this as an `AttributeMap` so closure clearly understands\n // the type; it has issues with tracking types through statics\n const propName = ctor.__attributeToPropertyMap.get(name);\n // Use tracking info to avoid reflecting a property value to an attribute\n // if it was just set because the attribute changed.\n if (propName !== undefined && this.__reflectingProperty !== propName) {\n const options = ctor.getPropertyOptions(propName);\n const converter = typeof options.converter === 'function'\n ? { fromAttribute: options.converter }\n : ((_a = options.converter) === null || _a === void 0 ? void 0 : _a.fromAttribute) !== undefined\n ? options.converter\n : defaultConverter;\n // mark state reflecting\n this.__reflectingProperty = propName;\n this[propName] = converter.fromAttribute(value, options.type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n );\n // mark state not reflecting\n this.__reflectingProperty = null;\n }\n }\n /**\n * Requests an update which is processed asynchronously. This should be called\n * when an element should update based on some state not triggered by setting\n * a reactive property. In this case, pass no arguments. It should also be\n * called when manually implementing a property setter. In this case, pass the\n * property `name` and `oldValue` to ensure that any configured property\n * options are honored.\n *\n * @param name name of requesting property\n * @param oldValue old value of requesting property\n * @param options property options to use instead of the previously\n * configured options\n * @category updates\n */\n requestUpdate(name, oldValue, options) {\n let shouldRequestUpdate = true;\n // If we have a property key, perform property update steps.\n if (name !== undefined) {\n options =\n options ||\n this.constructor.getPropertyOptions(name);\n const hasChanged = options.hasChanged || notEqual;\n if (hasChanged(this[name], oldValue)) {\n if (!this._$changedProperties.has(name)) {\n this._$changedProperties.set(name, oldValue);\n }\n // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `_reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n if (options.reflect === true && this.__reflectingProperty !== name) {\n if (this.__reflectingProperties === undefined) {\n this.__reflectingProperties = new Map();\n }\n this.__reflectingProperties.set(name, options);\n }\n }\n else {\n // Abort the request if the property should not be considered changed.\n shouldRequestUpdate = false;\n }\n }\n if (!this.isUpdatePending && shouldRequestUpdate) {\n this.__updatePromise = this.__enqueueUpdate();\n }\n // Note, since this no longer returns a promise, in dev mode we return a\n // thenable which warns if it's called.\n return DEV_MODE\n ? requestUpdateThenable(this.localName)\n : undefined;\n }\n /**\n * Sets up the element to asynchronously update.\n */\n async __enqueueUpdate() {\n this.isUpdatePending = true;\n try {\n // Ensure any previous update has resolved before updating.\n // This `await` also ensures that property changes are batched.\n await this.__updatePromise;\n }\n catch (e) {\n // Refire any previous errors async so they do not disrupt the update\n // cycle. Errors are refired so developers have a chance to observe\n // them, and this can be done by implementing\n // `window.onunhandledrejection`.\n Promise.reject(e);\n }\n const result = this.scheduleUpdate();\n // If `scheduleUpdate` returns a Promise, we await it. This is done to\n // enable coordinating updates with a scheduler. Note, the result is\n // checked to avoid delaying an additional microtask unless we need to.\n if (result != null) {\n await result;\n }\n return !this.isUpdatePending;\n }\n /**\n * Schedules an element update. You can override this method to change the\n * timing of updates by returning a Promise. The update will await the\n * returned Promise, and you should resolve the Promise to allow the update\n * to proceed. If this method is overridden, `super.scheduleUpdate()`\n * must be called.\n *\n * For instance, to schedule updates to occur just before the next frame:\n *\n * ```ts\n * override protected async scheduleUpdate(): Promise {\n * await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n * super.scheduleUpdate();\n * }\n * ```\n * @category updates\n */\n scheduleUpdate() {\n return this.performUpdate();\n }\n /**\n * Performs an element update. Note, if an exception is thrown during the\n * update, `firstUpdated` and `updated` will not be called.\n *\n * Call `performUpdate()` to immediately process a pending update. This should\n * generally not be needed, but it can be done in rare cases when you need to\n * update synchronously.\n *\n * Note: To ensure `performUpdate()` synchronously completes a pending update,\n * it should not be overridden. In LitElement 2.x it was suggested to override\n * `performUpdate()` to also customizing update scheduling. Instead, you should now\n * override `scheduleUpdate()`. For backwards compatibility with LitElement 2.x,\n * scheduling updates via `performUpdate()` continues to work, but will make\n * also calling `performUpdate()` to synchronously process updates difficult.\n *\n * @category updates\n */\n performUpdate() {\n var _a, _b;\n // Abort any update if one is not pending when this is called.\n // This can happen if `performUpdate` is called early to \"flush\"\n // the update.\n if (!this.isUpdatePending) {\n return;\n }\n debugLogEvent === null || debugLogEvent === void 0 ? void 0 : debugLogEvent({ kind: 'update' });\n // create renderRoot before first update.\n if (!this.hasUpdated) {\n // Produce warning if any class properties are shadowed by class fields\n if (DEV_MODE) {\n const shadowedProperties = [];\n (_a = this.constructor.__reactivePropertyKeys) === null || _a === void 0 ? void 0 : _a.forEach((p) => {\n var _a;\n if (this.hasOwnProperty(p) && !((_a = this.__instanceProperties) === null || _a === void 0 ? void 0 : _a.has(p))) {\n shadowedProperties.push(p);\n }\n });\n if (shadowedProperties.length) {\n throw new Error(`The following properties on element ${this.localName} will not ` +\n `trigger updates as expected because they are set using class ` +\n `fields: ${shadowedProperties.join(', ')}. ` +\n `Native class fields and some compiled output will overwrite ` +\n `accessors used for detecting changes. See ` +\n `https://lit.dev/msg/class-field-shadowing ` +\n `for more information.`);\n }\n }\n }\n // Mixin instance properties once, if they exist.\n if (this.__instanceProperties) {\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.__instanceProperties.forEach((v, p) => (this[p] = v));\n this.__instanceProperties = undefined;\n }\n let shouldUpdate = false;\n const changedProperties = this._$changedProperties;\n try {\n shouldUpdate = this.shouldUpdate(changedProperties);\n if (shouldUpdate) {\n this.willUpdate(changedProperties);\n (_b = this.__controllers) === null || _b === void 0 ? void 0 : _b.forEach((c) => { var _a; return (_a = c.hostUpdate) === null || _a === void 0 ? void 0 : _a.call(c); });\n this.update(changedProperties);\n }\n else {\n this.__markUpdated();\n }\n }\n catch (e) {\n // Prevent `firstUpdated` and `updated` from running when there's an\n // update exception.\n shouldUpdate = false;\n // Ensure element can accept additional updates after an exception.\n this.__markUpdated();\n throw e;\n }\n // The update is no longer considered pending and further updates are now allowed.\n if (shouldUpdate) {\n this._$didUpdate(changedProperties);\n }\n }\n /**\n * Invoked before `update()` to compute values needed during the update.\n *\n * Implement `willUpdate` to compute property values that depend on other\n * properties and are used in the rest of the update process.\n *\n * ```ts\n * willUpdate(changedProperties) {\n * // only need to check changed properties for an expensive computation.\n * if (changedProperties.has('firstName') || changedProperties.has('lastName')) {\n * this.sha = computeSHA(`${this.firstName} ${this.lastName}`);\n * }\n * }\n *\n * render() {\n * return html`SHA: ${this.sha}`;\n * }\n * ```\n *\n * @category updates\n */\n willUpdate(_changedProperties) { }\n // Note, this is an override point for polyfill-support.\n // @internal\n _$didUpdate(changedProperties) {\n var _a;\n (_a = this.__controllers) === null || _a === void 0 ? void 0 : _a.forEach((c) => { var _a; return (_a = c.hostUpdated) === null || _a === void 0 ? void 0 : _a.call(c); });\n if (!this.hasUpdated) {\n this.hasUpdated = true;\n this.firstUpdated(changedProperties);\n }\n this.updated(changedProperties);\n if (DEV_MODE &&\n this.isUpdatePending &&\n this.constructor.enabledWarnings.indexOf('change-in-update') >= 0) {\n issueWarning('change-in-update', `Element ${this.localName} scheduled an update ` +\n `(generally because a property was set) ` +\n `after an update completed, causing a new update to be scheduled. ` +\n `This is inefficient and should be avoided unless the next update ` +\n `can only be scheduled as a side effect of the previous update.`);\n }\n }\n __markUpdated() {\n this._$changedProperties = new Map();\n this.isUpdatePending = false;\n }\n /**\n * Returns a Promise that resolves when the element has completed updating.\n * The Promise value is a boolean that is `true` if the element completed the\n * update without triggering another update. The Promise result is `false` if\n * a property was set inside `updated()`. If the Promise is rejected, an\n * exception was thrown during the update.\n *\n * To await additional asynchronous work, override the `getUpdateComplete`\n * method. For example, it is sometimes useful to await a rendered element\n * before fulfilling this Promise. To do this, first await\n * `super.getUpdateComplete()`, then any subsequent state.\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n get updateComplete() {\n return this.getUpdateComplete();\n }\n /**\n * Override point for the `updateComplete` promise.\n *\n * It is not safe to override the `updateComplete` getter directly due to a\n * limitation in TypeScript which means it is not possible to call a\n * superclass getter (e.g. `super.updateComplete.then(...)`) when the target\n * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).\n * This method should be overridden instead. For example:\n *\n * ```ts\n * class MyElement extends LitElement {\n * override async getUpdateComplete() {\n * const result = await super.getUpdateComplete();\n * await this._myChild.updateComplete;\n * return result;\n * }\n * }\n * ```\n *\n * @return A promise of a boolean that resolves to true if the update completed\n * without triggering another update.\n * @category updates\n */\n getUpdateComplete() {\n return this.__updatePromise;\n }\n /**\n * Controls whether or not `update()` should be called when the element requests\n * an update. By default, this method always returns `true`, but this can be\n * customized to control when to update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n shouldUpdate(_changedProperties) {\n return true;\n }\n /**\n * Updates the element. This method reflects property values to attributes.\n * It can be overridden to render and keep updated element DOM.\n * Setting properties inside this method will *not* trigger\n * another update.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n update(_changedProperties) {\n if (this.__reflectingProperties !== undefined) {\n // Use forEach so this works even if for/of loops are compiled to for\n // loops expecting arrays\n this.__reflectingProperties.forEach((v, k) => this.__propertyToAttribute(k, this[k], v));\n this.__reflectingProperties = undefined;\n }\n this.__markUpdated();\n }\n /**\n * Invoked whenever the element is updated. Implement to perform\n * post-updating tasks via DOM APIs, for example, focusing an element.\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n updated(_changedProperties) { }\n /**\n * Invoked when the element is first updated. Implement to perform one time\n * work on the element after update.\n *\n * ```ts\n * firstUpdated() {\n * this.renderRoot.getElementById('my-text-area').focus();\n * }\n * ```\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n * @category updates\n */\n firstUpdated(_changedProperties) { }\n}\n_e = finalized;\n/**\n * Marks class as having finished creating properties.\n */\nReactiveElement[_e] = true;\n/**\n * Memoized list of all element properties, including any superclass properties.\n * Created lazily on user subclasses when finalizing the class.\n * @nocollapse\n * @category properties\n */\nReactiveElement.elementProperties = new Map();\n/**\n * Memoized list of all element styles.\n * Created lazily on user subclasses when finalizing the class.\n * @nocollapse\n * @category styles\n */\nReactiveElement.elementStyles = [];\n/**\n * Options used when calling `attachShadow`. Set this property to customize\n * the options for the shadowRoot; for example, to create a closed\n * shadowRoot: `{mode: 'closed'}`.\n *\n * Note, these options are used in `createRenderRoot`. If this method\n * is customized, options should be respected if possible.\n * @nocollapse\n * @category rendering\n */\nReactiveElement.shadowRootOptions = { mode: 'open' };\n// Apply polyfills if available\npolyfillSupport === null || polyfillSupport === void 0 ? void 0 : polyfillSupport({ ReactiveElement });\n// Dev mode warnings...\nif (DEV_MODE) {\n // Default warning set.\n ReactiveElement.enabledWarnings = ['change-in-update'];\n const ensureOwnWarnings = function (ctor) {\n if (!ctor.hasOwnProperty(JSCompiler_renameProperty('enabledWarnings', ctor))) {\n ctor.enabledWarnings = ctor.enabledWarnings.slice();\n }\n };\n ReactiveElement.enableWarning = function (warning) {\n ensureOwnWarnings(this);\n if (this.enabledWarnings.indexOf(warning) < 0) {\n this.enabledWarnings.push(warning);\n }\n };\n ReactiveElement.disableWarning = function (warning) {\n ensureOwnWarnings(this);\n const i = this.enabledWarnings.indexOf(warning);\n if (i >= 0) {\n this.enabledWarnings.splice(i, 1);\n }\n };\n}\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for ReactiveElement usage.\n((_d = global.reactiveElementVersions) !== null && _d !== void 0 ? _d : (global.reactiveElementVersions = [])).push('1.6.1');\nif (DEV_MODE && global.reactiveElementVersions.length > 1) {\n issueWarning('multiple-versions', `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`);\n}\n//# sourceMappingURL=reactive-element.js.map\n\n//# sourceURL=webpack:///./node_modules/@lit/reactive-element/development/reactive-element.js?"); + +/***/ }), + +/***/ "./node_modules/lit-element/development/lit-element.js": +/*!*************************************************************!*\ + !*** ./node_modules/lit-element/development/lit-element.js ***! + \*************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CSSResult\": () => (/* reexport safe */ _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.CSSResult),\n/* harmony export */ \"LitElement\": () => (/* binding */ LitElement),\n/* harmony export */ \"ReactiveElement\": () => (/* reexport safe */ _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.ReactiveElement),\n/* harmony export */ \"UpdatingElement\": () => (/* binding */ UpdatingElement),\n/* harmony export */ \"_$LE\": () => (/* binding */ _$LE),\n/* harmony export */ \"_$LH\": () => (/* reexport safe */ lit_html__WEBPACK_IMPORTED_MODULE_1__._$LH),\n/* harmony export */ \"adoptStyles\": () => (/* reexport safe */ _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.adoptStyles),\n/* harmony export */ \"css\": () => (/* reexport safe */ _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.css),\n/* harmony export */ \"defaultConverter\": () => (/* reexport safe */ _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.defaultConverter),\n/* harmony export */ \"getCompatibleStyle\": () => (/* reexport safe */ _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.getCompatibleStyle),\n/* harmony export */ \"html\": () => (/* reexport safe */ lit_html__WEBPACK_IMPORTED_MODULE_1__.html),\n/* harmony export */ \"noChange\": () => (/* reexport safe */ lit_html__WEBPACK_IMPORTED_MODULE_1__.noChange),\n/* harmony export */ \"notEqual\": () => (/* reexport safe */ _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.notEqual),\n/* harmony export */ \"nothing\": () => (/* reexport safe */ lit_html__WEBPACK_IMPORTED_MODULE_1__.nothing),\n/* harmony export */ \"render\": () => (/* reexport safe */ lit_html__WEBPACK_IMPORTED_MODULE_1__.render),\n/* harmony export */ \"supportsAdoptingStyleSheets\": () => (/* reexport safe */ _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.supportsAdoptingStyleSheets),\n/* harmony export */ \"svg\": () => (/* reexport safe */ lit_html__WEBPACK_IMPORTED_MODULE_1__.svg),\n/* harmony export */ \"unsafeCSS\": () => (/* reexport safe */ _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.unsafeCSS)\n/* harmony export */ });\n/* harmony import */ var _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lit/reactive-element */ \"./node_modules/@lit/reactive-element/development/reactive-element.js\");\n/* harmony import */ var lit_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lit-html */ \"./node_modules/lit-html/development/lit-html.js\");\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar _a, _b, _c;\n/**\n * The main LitElement module, which defines the {@linkcode LitElement} base\n * class and related APIs.\n *\n * LitElement components can define a template and a set of observed\n * properties. Changing an observed property triggers a re-render of the\n * element.\n *\n * Import {@linkcode LitElement} and {@linkcode html} from this module to\n * create a component:\n *\n * ```js\n * import {LitElement, html} from 'lit-element';\n *\n * class MyElement extends LitElement {\n *\n * // Declare observed properties\n * static get properties() {\n * return {\n * adjective: {}\n * }\n * }\n *\n * constructor() {\n * this.adjective = 'awesome';\n * }\n *\n * // Define the element's template\n * render() {\n * return html`

your ${adjective} template here

`;\n * }\n * }\n *\n * customElements.define('my-element', MyElement);\n * ```\n *\n * `LitElement` extends {@linkcode ReactiveElement} and adds lit-html\n * templating. The `ReactiveElement` class is provided for users that want to\n * build their own custom element base classes that don't use lit-html.\n *\n * @packageDocumentation\n */\n\n\n\n\n// For backwards compatibility export ReactiveElement as UpdatingElement. Note,\n// IE transpilation requires exporting like this.\nconst UpdatingElement = _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.ReactiveElement;\nconst DEV_MODE = true;\nlet issueWarning;\nif (DEV_MODE) {\n // Ensure warnings are issued only 1x, even if multiple versions of Lit\n // are loaded.\n const issuedWarnings = ((_a = globalThis.litIssuedWarnings) !== null && _a !== void 0 ? _a : (globalThis.litIssuedWarnings = new Set()));\n // Issue a warning, if we haven't already.\n issueWarning = (code, warning) => {\n warning += ` See https://lit.dev/msg/${code} for more information.`;\n if (!issuedWarnings.has(warning)) {\n console.warn(warning);\n issuedWarnings.add(warning);\n }\n };\n}\n/**\n * Base element class that manages element properties and attributes, and\n * renders a lit-html template.\n *\n * To define a component, subclass `LitElement` and implement a\n * `render` method to provide the component's template. Define properties\n * using the {@linkcode LitElement.properties properties} property or the\n * {@linkcode property} decorator.\n */\nclass LitElement extends _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.ReactiveElement {\n constructor() {\n super(...arguments);\n /**\n * @category rendering\n */\n this.renderOptions = { host: this };\n this.__childPart = undefined;\n }\n /**\n * @category rendering\n */\n createRenderRoot() {\n var _a;\n var _b;\n const renderRoot = super.createRenderRoot();\n // When adoptedStyleSheets are shimmed, they are inserted into the\n // shadowRoot by createRenderRoot. Adjust the renderBefore node so that\n // any styles in Lit content render before adoptedStyleSheets. This is\n // important so that adoptedStyleSheets have precedence over styles in\n // the shadowRoot.\n (_a = (_b = this.renderOptions).renderBefore) !== null && _a !== void 0 ? _a : (_b.renderBefore = renderRoot.firstChild);\n return renderRoot;\n }\n /**\n * Updates the element. This method reflects property values to attributes\n * and calls `render` to render DOM via lit-html. Setting properties inside\n * this method will *not* trigger another update.\n * @param changedProperties Map of changed properties with old values\n * @category updates\n */\n update(changedProperties) {\n // Setting properties in `render` should not trigger an update. Since\n // updates are allowed after super.update, it's important to call `render`\n // before that.\n const value = this.render();\n if (!this.hasUpdated) {\n this.renderOptions.isConnected = this.isConnected;\n }\n super.update(changedProperties);\n this.__childPart = (0,lit_html__WEBPACK_IMPORTED_MODULE_1__.render)(value, this.renderRoot, this.renderOptions);\n }\n /**\n * Invoked when the component is added to the document's DOM.\n *\n * In `connectedCallback()` you should setup tasks that should only occur when\n * the element is connected to the document. The most common of these is\n * adding event listeners to nodes external to the element, like a keydown\n * event handler added to the window.\n *\n * ```ts\n * connectedCallback() {\n * super.connectedCallback();\n * addEventListener('keydown', this._handleKeydown);\n * }\n * ```\n *\n * Typically, anything done in `connectedCallback()` should be undone when the\n * element is disconnected, in `disconnectedCallback()`.\n *\n * @category lifecycle\n */\n connectedCallback() {\n var _a;\n super.connectedCallback();\n (_a = this.__childPart) === null || _a === void 0 ? void 0 : _a.setConnected(true);\n }\n /**\n * Invoked when the component is removed from the document's DOM.\n *\n * This callback is the main signal to the element that it may no longer be\n * used. `disconnectedCallback()` should ensure that nothing is holding a\n * reference to the element (such as event listeners added to nodes external\n * to the element), so that it is free to be garbage collected.\n *\n * ```ts\n * disconnectedCallback() {\n * super.disconnectedCallback();\n * window.removeEventListener('keydown', this._handleKeydown);\n * }\n * ```\n *\n * An element may be re-connected after being disconnected.\n *\n * @category lifecycle\n */\n disconnectedCallback() {\n var _a;\n super.disconnectedCallback();\n (_a = this.__childPart) === null || _a === void 0 ? void 0 : _a.setConnected(false);\n }\n /**\n * Invoked on each update to perform rendering tasks. This method may return\n * any value renderable by lit-html's `ChildPart` - typically a\n * `TemplateResult`. Setting properties inside this method will *not* trigger\n * the element to update.\n * @category rendering\n */\n render() {\n return lit_html__WEBPACK_IMPORTED_MODULE_1__.noChange;\n }\n}\n/**\n * Ensure this class is marked as `finalized` as an optimization ensuring\n * it will not needlessly try to `finalize`.\n *\n * Note this property name is a string to prevent breaking Closure JS Compiler\n * optimizations. See @lit/reactive-element for more information.\n */\nLitElement['finalized'] = true;\n// This property needs to remain unminified.\nLitElement['_$litElement$'] = true;\n// Install hydration if available\n(_b = globalThis.litElementHydrateSupport) === null || _b === void 0 ? void 0 : _b.call(globalThis, { LitElement });\n// Apply polyfills if available\nconst polyfillSupport = DEV_MODE\n ? globalThis.litElementPolyfillSupportDevMode\n : globalThis.litElementPolyfillSupport;\npolyfillSupport === null || polyfillSupport === void 0 ? void 0 : polyfillSupport({ LitElement });\n// DEV mode warnings\nif (DEV_MODE) {\n /* eslint-disable @typescript-eslint/no-explicit-any */\n // Note, for compatibility with closure compilation, this access\n // needs to be as a string property index.\n LitElement['finalize'] = function () {\n const finalized = _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.ReactiveElement.finalize.call(this);\n if (!finalized) {\n return false;\n }\n const warnRemovedOrRenamed = (obj, name, renamed = false) => {\n if (obj.hasOwnProperty(name)) {\n const ctorName = (typeof obj === 'function' ? obj : obj.constructor)\n .name;\n issueWarning(renamed ? 'renamed-api' : 'removed-api', `\\`${name}\\` is implemented on class ${ctorName}. It ` +\n `has been ${renamed ? 'renamed' : 'removed'} ` +\n `in this version of LitElement.`);\n }\n };\n warnRemovedOrRenamed(this, 'render');\n warnRemovedOrRenamed(this, 'getStyles', true);\n warnRemovedOrRenamed(this.prototype, 'adoptStyles');\n return true;\n };\n /* eslint-enable @typescript-eslint/no-explicit-any */\n}\n/**\n * END USERS SHOULD NOT RELY ON THIS OBJECT.\n *\n * Private exports for use by other Lit packages, not intended for use by\n * external users.\n *\n * We currently do not make a mangled rollup build of the lit-ssr code. In order\n * to keep a number of (otherwise private) top-level exports mangled in the\n * client side code, we export a _$LE object containing those members (or\n * helper methods for accessing private fields of those members), and then\n * re-export them for use in lit-ssr. This keeps lit-ssr agnostic to whether the\n * client-side code is being used in `dev` mode or `prod` mode.\n *\n * This has a unique name, to disambiguate it from private exports in\n * lit-html, since this module re-exports all of lit-html.\n *\n * @private\n */\nconst _$LE = {\n _$attributeToProperty: (el, name, value) => {\n // eslint-disable-next-line\n el._$attributeToProperty(name, value);\n },\n // eslint-disable-next-line\n _$changedProperties: (el) => el._$changedProperties,\n};\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for LitElement usage.\n((_c = globalThis.litElementVersions) !== null && _c !== void 0 ? _c : (globalThis.litElementVersions = [])).push('3.2.2');\nif (DEV_MODE && globalThis.litElementVersions.length > 1) {\n issueWarning('multiple-versions', `Multiple versions of Lit loaded. Loading multiple versions ` +\n `is not recommended.`);\n}\n//# sourceMappingURL=lit-element.js.map\n\n//# sourceURL=webpack:///./node_modules/lit-element/development/lit-element.js?"); + +/***/ }), + +/***/ "./node_modules/lit-html/development/is-server.js": +/*!********************************************************!*\ + !*** ./node_modules/lit-html/development/is-server.js ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isServer\": () => (/* binding */ isServer)\n/* harmony export */ });\n/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * @fileoverview\n *\n * This file exports a boolean const whose value will depend on what environment\n * the module is being imported from.\n */\nconst NODE_MODE = false;\n/**\n * A boolean that will be `true` in server environments like Node, and `false`\n * in browser environments. Note that your server environment or toolchain must\n * support the `\"node\"` export condition for this to be `true`.\n *\n * This can be used when authoring components to change behavior based on\n * whether or not the component is executing in an SSR context.\n */\nconst isServer = NODE_MODE;\n//# sourceMappingURL=is-server.js.map\n\n//# sourceURL=webpack:///./node_modules/lit-html/development/is-server.js?"); + +/***/ }), + +/***/ "./node_modules/lit-html/development/lit-html.js": +/*!*******************************************************!*\ + !*** ./node_modules/lit-html/development/lit-html.js ***! + \*******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"_$LH\": () => (/* binding */ _$LH),\n/* harmony export */ \"html\": () => (/* binding */ html),\n/* harmony export */ \"noChange\": () => (/* binding */ noChange),\n/* harmony export */ \"nothing\": () => (/* binding */ nothing),\n/* harmony export */ \"render\": () => (/* binding */ render),\n/* harmony export */ \"svg\": () => (/* binding */ svg)\n/* harmony export */ });\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar _a, _b, _c, _d;\nconst DEV_MODE = true;\nconst ENABLE_EXTRA_SECURITY_HOOKS = true;\nconst ENABLE_SHADYDOM_NOPATCH = true;\nconst NODE_MODE = false;\n// Use window for browser builds because IE11 doesn't have globalThis.\nconst global = NODE_MODE ? globalThis : window;\n/**\n * Useful for visualizing and logging insights into what the Lit template system is doing.\n *\n * Compiled out of prod mode builds.\n */\nconst debugLogEvent = DEV_MODE\n ? (event) => {\n const shouldEmit = global\n .emitLitDebugLogEvents;\n if (!shouldEmit) {\n return;\n }\n global.dispatchEvent(new CustomEvent('lit-debug', {\n detail: event,\n }));\n }\n : undefined;\n// Used for connecting beginRender and endRender events when there are nested\n// renders when errors are thrown preventing an endRender event from being\n// called.\nlet debugLogRenderId = 0;\nlet issueWarning;\nif (DEV_MODE) {\n (_a = global.litIssuedWarnings) !== null && _a !== void 0 ? _a : (global.litIssuedWarnings = new Set());\n // Issue a warning, if we haven't already.\n issueWarning = (code, warning) => {\n warning += code\n ? ` See https://lit.dev/msg/${code} for more information.`\n : '';\n if (!global.litIssuedWarnings.has(warning)) {\n console.warn(warning);\n global.litIssuedWarnings.add(warning);\n }\n };\n issueWarning('dev-mode', `Lit is in dev mode. Not recommended for production!`);\n}\nconst wrap = ENABLE_SHADYDOM_NOPATCH &&\n ((_b = global.ShadyDOM) === null || _b === void 0 ? void 0 : _b.inUse) &&\n ((_c = global.ShadyDOM) === null || _c === void 0 ? void 0 : _c.noPatch) === true\n ? global.ShadyDOM.wrap\n : (node) => node;\nconst trustedTypes = global.trustedTypes;\n/**\n * Our TrustedTypePolicy for HTML which is declared using the html template\n * tag function.\n *\n * That HTML is a developer-authored constant, and is parsed with innerHTML\n * before any untrusted expressions have been mixed in. Therefor it is\n * considered safe by construction.\n */\nconst policy = trustedTypes\n ? trustedTypes.createPolicy('lit-html', {\n createHTML: (s) => s,\n })\n : undefined;\nconst identityFunction = (value) => value;\nconst noopSanitizer = (_node, _name, _type) => identityFunction;\n/** Sets the global sanitizer factory. */\nconst setSanitizer = (newSanitizer) => {\n if (!ENABLE_EXTRA_SECURITY_HOOKS) {\n return;\n }\n if (sanitizerFactoryInternal !== noopSanitizer) {\n throw new Error(`Attempted to overwrite existing lit-html security policy.` +\n ` setSanitizeDOMValueFactory should be called at most once.`);\n }\n sanitizerFactoryInternal = newSanitizer;\n};\n/**\n * Only used in internal tests, not a part of the public API.\n */\nconst _testOnlyClearSanitizerFactoryDoNotCallOrElse = () => {\n sanitizerFactoryInternal = noopSanitizer;\n};\nconst createSanitizer = (node, name, type) => {\n return sanitizerFactoryInternal(node, name, type);\n};\n// Added to an attribute name to mark the attribute as bound so we can find\n// it easily.\nconst boundAttributeSuffix = '$lit$';\n// This marker is used in many syntactic positions in HTML, so it must be\n// a valid element name and attribute name. We don't support dynamic names (yet)\n// but this at least ensures that the parse tree is closer to the template\n// intention.\nconst marker = `lit$${String(Math.random()).slice(9)}$`;\n// String used to tell if a comment is a marker comment\nconst markerMatch = '?' + marker;\n// Text used to insert a comment marker node. We use processing instruction\n// syntax because it's slightly smaller, but parses as a comment node.\nconst nodeMarker = `<${markerMatch}>`;\nconst d = NODE_MODE && global.document === undefined\n ? {\n createTreeWalker() {\n return {};\n },\n }\n : document;\n// Creates a dynamic marker. We never have to search for these in the DOM.\nconst createMarker = (v = '') => d.createComment(v);\nconst isPrimitive = (value) => value === null || (typeof value != 'object' && typeof value != 'function');\nconst isArray = Array.isArray;\nconst isIterable = (value) => isArray(value) ||\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n typeof (value === null || value === void 0 ? void 0 : value[Symbol.iterator]) === 'function';\nconst SPACE_CHAR = `[ \\t\\n\\f\\r]`;\nconst ATTR_VALUE_CHAR = `[^ \\t\\n\\f\\r\"'\\`<>=]`;\nconst NAME_CHAR = `[^\\\\s\"'>=/]`;\n// These regexes represent the five parsing states that we care about in the\n// Template's HTML scanner. They match the *end* of the state they're named\n// after.\n// Depending on the match, we transition to a new state. If there's no match,\n// we stay in the same state.\n// Note that the regexes are stateful. We utilize lastIndex and sync it\n// across the multiple regexes used. In addition to the five regexes below\n// we also dynamically create a regex to find the matching end tags for raw\n// text elements.\n/**\n * End of text is: `<` followed by:\n * (comment start) or (tag) or (dynamic tag binding)\n */\nconst textEndRegex = /<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g;\nconst COMMENT_START = 1;\nconst TAG_NAME = 2;\nconst DYNAMIC_TAG_NAME = 3;\nconst commentEndRegex = /-->/g;\n/**\n * Comments not started with