Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap APIs providing the data, in order to deal only with a normalized model #5

Open
jrub opened this issue Oct 24, 2015 · 1 comment

Comments

@jrub
Copy link
Owner

jrub commented Oct 24, 2015

Current situation:

  • SOLR API returns objects like:
{
        "uri": "http://www.zaragoza.es/ciudad/actividades/ficha_Agenda?codigo=110687",
        "id": "acto-110687",
        "imagen_s": "http://www.zaragoza.es/cont/paginas/actividades/imagen/exposiciones-museos.gif",
        "title": "Pablo Serrano 1908-1985. La colección",
        "entrada_t": "",
        "horario_t": "<div>Martes a sábado de 10 a 14 y de 18 a 21h. Domingos y festivos de 10 a 14h.</div>",
        "lugar_t": "<div>Martes a sábado de 10 a 14 y de 18 a 21h. Domingos y festivos de 10 a 14h.</div> IAACC Pablo Serrano  Pº María Agustín, 20 976280659 ",
        "fechaInicio_dt": "2013-03-13T23:00:00Z",
        "fechaFinal_dt": "2015-12-30T23:00:00Z",
        "nombrelugar_t": "IAACC Pablo Serrano ",
        "direccionlugar_t": "Pº María Agustín, 20",
        "telefonolugar_t": "976280659 ",
        "coordenadas_p_0_coordinate": 41.65143524573733,
        "coordenadas_p_1_coordinate": -0.890085235286286,
        "coordenadas_p": "41.65143524573733,-0.890085235286286",
        "descripcion_t": " El IAACC Pablo Serrano recupera la obra del escultor en la muestra  Pablo Serrano 1908-1985. La Colección , una nueva mirada y presentación de los fondos de la colección estable del Instituto. Se exponen de manera integrada un total de 95 obras de las cuales 66 son esculturas que se acompañan de dibujos, obra gráfica y documentos procedentes del archivo personal de Serrano que custodia el centro.  "
    },
  • SPARQL API returns objects like:
{
    "uri": {
        "type": "uri",
        "value": "http://www.zaragoza.es/api/recurso/cultura-ocio/evento-zaragoza/146459"
    },
    "id": {
        "type": "literal",
        "value": "146459"
    },
    "title": {
        "type": "typed-literal",
        "datatype": "http://www.w3.org/2001/XMLSchema#string",
        "value": "Blues Moon Zaragoza: Old Wood + Pike Cavalero"
    },
    "description": {
        "type": "typed-literal",
        "datatype": "http://www.w3.org/2001/XMLSchema#string",
        "value": "<p>Luna Llena organiza los d&iacute;as 16, 17, 23 y 14 de octubre en el Centro C&iacute;vico Universidad el festival Blues Moon 15 Zaragoza.</p>\r\n<ul>\r\n    <li>Viernes 16 de octubre. Red House + Alonso &amp; Arrazola Blues Band</li>\r\n    <li>S&aacute;bado 17 de octubre. Cotton Roots + Blues Whale</li>\r\n    <li>Viernes 23 de octubre. Hot Hands + Speakeasy</li>\r\n    <li>S&aacute;bado 24 de octubre. Old Wood + Pike Cavalero</li>\r\n</ul>"
    },
    "subEvent": {
        "type": "uri",
        "value": "http://www.zaragoza.es/api/recurso/cultura-ocio/evento-zaragoza/146459//rec-2119-2015-10-24"
    },
    "startDate": {
        "type": "literal",
        "value": "2015-10-24"
    },
    "endDate": {
        "type": "literal",
        "value": "2015-10-24"
    },
    "startTime": {
        "type": "typed-literal",
        "datatype": "http://www.w3.org/2001/XMLSchema#string",
        "value": "21:00"
    },
    "horario": {
        "type": "literal",
        "value": "<div>21:00h.</div>"
    },
    "precio": {
        "type": "literal",
        "value": "<div>12 euros anticipada y 15 euros en taquilla.</div>\r\n<div>Abono 36 euros.</div>\r\n<div> </div>\r\n<div>A la venta en aragontickets.com</div>"
    },
    "image": {
        "type": "literal",
        "value": "//zaragoza.es/cont/paginas/actividades/imagen/LunaBluesCartel definitivo1.jpg"
    },
    "lugar": {
        "type": "typed-literal",
        "datatype": "http://www.w3.org/2001/XMLSchema#string",
        "value": "Centro Cívico Universidad"
    },
    "direccion": {
        "type": "typed-literal",
        "datatype": "http://www.w3.org/2001/XMLSchema#string",
        "value": "C/ Violante de Hungría, 4"
    },
    "phone": {
        "type": "typed-literal",
        "datatype": "http://www.w3.org/2001/XMLSchema#string",
        "value": "976 721750"
    },
    "geo": {
        "type": "uri",
        "value": "http://www.zaragoza.es/api/recurso/geometry/WGS84/41.639439_-0.900667"
    },
    "latitud": {
        "type": "typed-literal",
        "datatype": "http://www.w3.org/2001/XMLSchema#double",
        "value": "41.6394"
    },
    "longitud": {
        "type": "typed-literal",
        "datatype": "http://www.w3.org/2001/XMLSchema#double",
        "value": "-0.900667"
    }
}
@jrub
Copy link
Owner Author

jrub commented Oct 24, 2015

This should allow to unify a few templates and controllers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant