Lex school 2011
-
Upload
christian-sifaqui -
Category
Technology
-
view
1.211 -
download
4
description
Transcript of Lex school 2011
LeyChile
Sept. 10, 2011Christian Sifaqui
Congreso Nacional de Chile
BCN roles
Parliamentary role, to be a relevant instrument, in the opinion of MPs and the Parliament, for the full accomplishment of their commitments and also the peering into new possible country scenarios
BCN roles
Parliamentary role, to be a relevant instrument, in the opinion of MPs and the Parliament, for the full accomplishment of their commitments and also the peering into new possible country scenarios
Societal role, to be the repository of the Archives of the Parliament, especially the history of law and parliamentary work
BCN roles
Parliamentary role, to be a relevant instrument, in the opinion of MPs and the Parliament, for the full accomplishment of their commitments and also the peering into new possible country scenarios
Societal role, to be the repository of the Archives of the Parliament, especially the history of law and parliamentary work
Public role, to be the space of knowledge and understanding of the areas of social priority for the country with emphasis on the political and legal
Biblioteca del Congreso Nacional
Metaphor¿Pharmacy? Books and Magazines loan;
Catalog
Biblioteca del Congreso Nacional
Metaphor¿Pharmacy? Books and Magazines loan;
Catalog¡Clinical laboratory! Chilean norms; Parliamentary
work; History of the Law; Parliamentary biographies; GIS; Parliamentary advisory, etc.
Legislation
Legislation
Set of norms (acts, laws, decrees) that frame the national juridical order
Legislation
Set of norms (acts, laws, decrees) that frame the national juridical order
Information that comes from the public sector; it is generated by public organizations and financed by public resources
Legislation
Set of norms (acts, laws, decrees) that frame the national juridical order
Information that comes from the public sector; it is generated by public organizations and financed by public resources
By nature of public interest (about general interest topics)
Legislation
Set of norms (acts, laws, decrees) that frame the national juridical order
Information that comes from the public sector; it is generated by public organizations and financed by public resources
By nature of public interest (about general interest topics)
High public value (generates citizen experience that can be considered valuable)
Legislation
Is indeed public information and must be of public domain
Legislative information on public domain
“Fulfillment of legal certainty” concept (founded expectation that citizens have about in-force legislation that must be met)
Legislative information on public domain
“Fulfillment of legal certainty” concept (founded expectation that citizens have about in-force legislation that must be met)
2 points of view:Juridical safety: guaranteed and founded
certainty that the norm will be accomplished
Legislative information on public domain
“Fulfillment of legal certainty” concept (founded expectation that citizens have about in-force legislation that must be met)
2 points of view:Juridical safety: guaranteed and founded
certainty that the norm will be accomplishedJuridical certainty: perception of the norm and
certainty of the content
Mechanism for the publication of the legislation
Publication mechanism: Official Gazette
Mechanism for the publication of the legislation
Publication mechanism: Official GazetteLegal fiction of knowledge:
Civil CodeArt. 7 “The publication of the law will be made by its
insertion in the Official Gazette, and from that date it will be known by everybody, and it will be mandatory.”
Art. 8 “Nobody will be able to plead ignorance of the law after it has entered into force.”
Art. 706 “...the error of law is a presumption of bad faith, that does not admit evidence to the contrary.”
Mechanism for the publication of the legislation
But in Chile:The Official Gazette is not freeThe publishing of the laws is basically about
modifying norms and not about texts in forceAccess to old legislation is very difficult
Example of a legal norm
Ley 22000
Artículo 1. abc.Artículo 2. def.Artículo 3. ghi.
Y por cuanto he tenido a bienaprobarlo y sancionarlo…
Example of a legal norm that modifies another
Ley 25345
Artículo 1. Modifica ley 22000 de la siguiente forma: reemplázase en el Artículo 1 las palabras “a” por “xyz”.
Y por cuanto he tenido a bienaprobarlo y sancionarlo…
Example: original and its update
Ley 22000
Artículo 1. abc.Artículo 2. def.Artículo 3. ghi.
Ley 22000
Artículo 1. abc.Artículo 2. def.Artículo 3. ghi.
Ley 22000
Artículo 1. xyzbc.Artículo 2. def.Artículo 3. ghi.
Ley 22000
Artículo 1. xyzbc.Artículo 2. def.Artículo 3. ghi.
t0 t1
Model
Biblioteca del Congreso Nacional
Biblioteca del Congreso Nacional
Ley 220001.- abc2.- def3.- ghi
Ley 220001.- abc2.- def3.- ghi
(original)1.- abc2.- def3.- ghi
(original)1.- abc2.- def3.- ghi
Diario oficialDiario oficial
Ley 22000Ley 22000
Model
Biblioteca del Congreso Nacional
Biblioteca del Congreso Nacional
Ley 253451.- Modificaley 22000
Art. 1sustitúyase a
por xyz
Ley 253451.- Modificaley 22000
Art. 1sustitúyase a
por xyz
(original)1.- abc2.- def3.- ghi
(original)1.- abc2.- def3.- ghi
(actualizado)1.- xyzbc
2.- def3.- ghi
(actualizado)1.- xyzbc
2.- def3.- ghi
Ley 253451.- Modificaley 22000
Art. 1sustitúyase a
por xyz
Ley 253451.- Modificaley 22000
Art. 1sustitúyase a
por xyz
Diario oficialDiario oficial
Ley 22000Ley 22000
Ley 25345Ley 25345
BCN
As a way to solve the “juridical certainty” for the Congress and also for the citizens, the BCN started in the 50’s an index card system collecting the references of the norms and also classified them by subject
BCN
In the late 70 this index card system was replaced by an IBM STAIRS system, which allowed automate this cards and annotations
Then in mod-90s, this system was replaced by a client-server system based on BASIS PLUS, which allowed to reconstruct the texts of the norms on the fly
Legis 1995-2009
Client-Server interface
Legis 1995-2009
Web interface
Legis 1995-2009
Web interface
Project “Ley Chile”
Project “Ley Chile”
The BCN is the de facto reference for the entire juridical and legislative community regarding to the generation of the updated versions of the legal norms (especially the laws)
Project “Ley Chile”
The BCN has a special expertise in the processing of the official publications of the legal norms in order to:Keep record of the legal norms that appear for the
first timeKeep record of the legal norms that modify other
normsKeep record of the links between norms (rules,
concordances, recasted texts and modifications)Make updated versions of the modified normsIncorporate technical notes that allow the users
have all the facts to make their own interpretation
Project “Ley Chile”
The BCN has rigorous quality control processes to provide high fidelity documentation regarding the sources
Project “Ley Chile”: phase 1 (2004-2006)
BCN knows what
BCN knows how
BCN needs help to write the documents for the procurement (tender)
Project “Ley Chile”: phase 1 (2004-2006)
Aimed primarily for use in the legislative process
Free access to citizensImprove the availability of the normJuridical certainty: access to current and
update normsEmphasis on quality of the contentSearch and navigation. Outputs in different
formatsDifferentiated services between registered
and anonymous users
Project “Ley Chile”: phase 1 (2004-2006)
Benefits of the new systemContent
Content migration and its improvementRemoving notes, norm structure and correction
Production management (Content Management)Integration with the architecture of the BCNImproving the quality content and managementProduction management
Search services, recovery and outputsFree access of the entire database for all citizens
Availability Acquisition of hardware
InteroperabilityExchange information with other state institutions.
Agreements with Agencies. Submit the updated norm
Project “Ley Chile”: phase 1 (2004-2006)
Modeling the “life” of a norm
Project “Ley Chile”: phase 1 (2004-2006)
Tender (a mix of HW and SW)Declared deserted
Project “Ley Chile”: phase 1 (2004-2006)
Tender (a mix of HW and SW)Declared deserted
I took over as Director
Project “Ley Chile”: phase 1 (2004-2006)
Tender (a mix of HW and SW)Declared deserted
I took over as Director
Rewriting bidding documents (changes in model, debugging use cases)
New tender (only SW)Award
Project “Ley Chile”: phase 2 (2007-2008)
Project Director
Project manager
CoordinationProduction
Coordination Services
Ley Chile Board
Director BCN
Under Director BCN
Heads of department BCN
Project “Ley Chile”: phase 2 (2007-2008)
Production managementNew way of processing norms
Project “Ley Chile”: phase 2 (2007-2008)
Production managementNew way of processing norms
ContentMigration (debugging, repairing, standards,
completeness)
Project “Ley Chile”: phase 2 (2007-2008)
Production managementNew way of processing norms
ContentMigration (debugging, repairing, standards,
completeness)
ServicesUsability, interaction, design
Project “Ley Chile”: phase 2 (2007-2008)
Production managementNew way of processing norms
ContentMigration (debugging, repairing, standards,
completeness)
ServicesUsability, interaction, design
AvailabilityAcquisition of ad-hoc hardware
Project “Ley Chile”: phase 2 (2007-2008)
Modeling the “structure” of a norm
Project “Ley Chile”: phase 2 (2007-2008)
Modeling the “visualization” of a norm
Project “Ley Chile”: phase 2 (2007-2008)
Use of activity diagrams (facilitates the understanding of business processes)
Project “Ley Chile”: phase 2 (2007-2008)
Architecture of the system
Outputformats
Project “Ley Chile”: phase 2 (2007-2008)
Architecture
Python
Cap
a d
e P
resen
tació
n Lóg
ica d
e
Negocio
A
cceso a
D
ato
s
Repositorio Documental
cx_ Oracle
Zope
ZXOracle DA
ZODB
Plone
Content Delivery
Content Managment
Web Services
Usuarios BCN Instituciones Usuarios Externos
CMFExternalFile
File System
Gestión y Auditoría
APILEGIS
Project “Ley Chile”: phase 2 (2007-2008)
Capa de Presentación
Capa de Negocios
Capa de Datos
HTTP
RDBMS(oracle)
Componentes API
API CM
AnalistaDocumental
Páginas WEB Dinámicas
Digitador WorkflowPlanificar OT
API Legis
Intranet
Producto Management
Ej: Páginas para Módulo Producción
Servicios WEB Módulos
WEBServices
ZOPE
Python
Usuarios BCN
Otros Sistemas BCN
“Servicios WEB”
Librerías
Python
Consulta Navegar Avanzada Vinculaciones
Web Services
Producto Delivery
Ej : Páginas para Búsqueda y Navegación
Convenios con instituciones
Usuarios Internet
“ServiciosWEB”
PLONE
Python
Productos
Páginas dinámicas ZPT-TAL
Project “Ley Chile”: phase 2 (2007-2008)
The retrieval mechanism of a norm from the XML database and its interactive navigation has been optimized to reduce the overload on the servers:the main processing is done in the browser of
each client, which parses the delivered XML, making heavy use of asynchronous JavaScript capabilities
Decision taken on 2006 (Google Chrome was released on 2008!)
Project “Ley Chile”: phase 2 (2007-2008)
Retrieval: the user selects a norm for navigating, the business layer makes a request to the database, which gets the XML for the entire norm
Project “Ley Chile”: phase 2 (2007-2008)
Retrieval: the user selects a norm for navigating, the business layer makes a request to the database, which gets the XML for the entire norm
Extracting version: the business layer extract the XML of the required version of the norm
Project “Ley Chile”: phase 2 (2007-2008)
Retrieval: the user selects a norm for navigating, the business layer makes a request to the database, which gets the XML for the entire norm
Extracting version: the business layer extract the XML of the required version of the norm
Parsing: the browser parses the received XML, creating a data structure that represents the hierarchical organization of the norm, which is shown graphically as a navigation tree
Project “Ley Chile”: phase 2 (2007-2008)
Retrieval: the user selects a norm for navigating, the business layer makes a request to the database, which gets the XML for the entire norm
Extracting version: the business layer extract the XML of the required version of the norm
Parsing: the browser parses the received XML, creating a data structure that represents the hierarchical organization of the norm, which is shown graphically as a navigation tree
Display: in a asynchronous form a dynamic HTML is generated with the text of the whole norm together with graphical elements, such as notes and metadata
Project “Ley Chile”: phase 2 (2007-2008)
Retrieval: the user selects a norm for navigating, the business layer makes a request to the database, which gets the XML for the entire norm
Extracting version: the business layer extract the XML of the required version of the norm
Parsing: the browser parses the received XML, creating a data structure that represents the hierarchical organization of the norm, which is shown graphically as a navigation tree
Display: in a asynchronous form a dynamic HTML is generated with the text of the whole norm together with graphical elements, such as notes and metadata
Navigation: as the user selects different parts of the norm, the same process is done, but for a part of the norm
Project “Ley Chile”: phase 2 (2007-2008)
Project “Ley Chile”: phase 2 (2007-2008)
Hardware architecture and sizing:For supporting the application services, we used
QUAD-core processors for the physical serversFor the database servers we use dual core
(database licenses restrictions) and 64-bits architecture (cpu 64-bit)
We physically separated the development and production environments
The internet platform includes load balancing and cache accelerator
We use ZEO architecture for scaling ZOPEProduction servers were conected via gigabit
networkDisk storage was provided by a centralized storage
(SAN)
Project “Ley Chile”: phase 2 (2007-2008)
AvailabilityAcquisition of hardware (original)
Project “Ley Chile”: phase 2 (2007-2008)
Tuning and evolutionWe incorporated a cache-balacning software on the front-endThe persistence of the sessions of the connected users was
handled in the databaseZEO cluster was not necessary, we set up two independent
ZOPE application servers, each one with two clients balanced with Varnish
We migrate the application servers to blade serversWe added several data cache services (PDF, precomputed
norms, etc.) kept in a shared NFS server (was a ZEO server initially)
We added a static content server (js, images and css)We added a norm previsualizing server for the production
environmentWe added “fault tolerance” and high availability for critical
servers (managed by VMWARE)
Hardware today
Reunión de directorio 10 marzo Arquitectura de Hardware
Servidorseparado
ServidorBLADE
Fault ToleranceAlta disponibilidad
R12D R22R20 20AR23DFTR11FT
Servidores VirtualizadosVMWARE
20BR21FT
Proyecto Ley Chile: etapa 2 (2007-2008)
- Acceso desde Intranet a aplicación Content Management- Pocos usuarios - Tiempo de respuesta: 5 segundos- Se agrega alta disponibilidad ni balance de carga.
Se habilitan los servicios de ZOPE para Content Management en modo Fault Tolerant.
Se Comparte el repositorio documental y el pool de conexiones.
- Acceso desde Internet a aplicación Content Delivery- Muchos usuarios - Tiempo de respuesta max.: 5 segundos- Necesita alta disponibilidad, cache y balance de carga.
Debido a esto se propone habilitar en la arquitectura Balanceador , Cache
Considerar pool de conexiones a la Base de Datos
Al mismo tiempo se debe considerar Cluster de Oracle (RAC) para el repositorio Documental.
R11:BalanceoY Caché
R23D: Cachéestático
R12 y R22D: Consulta, Navegación y WS
Usuarios Internet
WS otros sitemasBCN y Externos
Red Interna
R20A: Producción2 clientes
R20: ProducciónBalanceo, caché y 1 Cliente
Usuarios Producción * Ingreso *Actualización* Integración* Corrección
R20B:, vista previa norma
R21: NFS archivos compartidos: PDFs normas, precálculo,imágenes
Timeline
2004
Start project for the new version of the chilean law
Created a newsletter of the legislative work http://boletinlegislativo.bcn.cl
Timeline
2007
Start building phase of LeyChile
Timeline
2008
Launch blog http://bloglegal.bcn.cl Release http://www.leychile.cl
Migration
Detailed review (example: notes)
Right note. Located in the column 60
Text located in the position of a note. A note is detected
Migration
Detection of notes
L: indicates a normal line Notes
1: indicates the sequence
N: indicates the detection of a note
Migration
Initial conceptEmphasis on data transferMassive correction with external resources
"guided" by BCN
New approachTakes into account the quality of informationProvides mechanisms to improve the quality of
information“Transformation of data” over “transfer of data”
Migration
Carga y TransformaciónTexto
NormasLegis I
Correccionesautomáticas yvalidaciones
Planificador
Correccionesmanuales
y masivas (XLS)
Base de datosLey Chile
Supervisa todo el proceso, asigna trabajo a analistas, decide qué inconsistencias son obligatorias (errores)
Inconsistenciasen normas
No
Si
NormasRechazadas
Prep.Formatos
Migration
Migration environmentBases de Datos
BASISplus
Migración
Bases de Datosde corregida
Proceso
Proceso de Corrección
Base de DatosBASISplus
ExtractorIncremental
Base de Datosde Migración
Módulo de cuadraturamigración
Módulo de Verificación yCorrección
Control migraciónListados de
1…n
Listados de control explotación1…n
Listados de
1…n
Transformación y Carga Listado de
Rechazos 1..n
Ambiente ExplotaciónBASISPlus
Normas yvinculacionesextraídas1..n
Ambiente Migración
VerificaciónListados de
1…n
BCNServicios Digitales
BCNProducción
Ley
Migration
Data loading
Bases de Datosde corregida
Bases de DatosXML Migrada
Listados de Control carga
1…n
Base de Datosde MigraciónControl migración
Listado de
1…n
Generador y Carga XML LEGIS II
Listado de Rechazos 1..n
Módulo de CuadraturaCarga
OT Depuración
Proveedor
BCNProducciónLey
Migration
Too much effortSeparation of hundreds of thousands of notesReview and adapt the structures of normsSemi-automated process for debugging
Budget
Phase 2Development: US$ 380.000 + change
managementHardware: US$ 150.000Database license + training: US$ 100.000
Maintenance and support (reduced for 3 years)Content migration/debugging: US$ 100.000
Tuning
Layered modelDifferent layers that need to be reviewed
separately
Hardware
DatabaseORACLE
Business layerPlone-python
Presentation layerJavaScript
Balance layerPound-squid
Requires computers with
good performance
Pound-Squid was changed for Varnish
Profiling must be done
An external firm will be hired to
audit
Tuning
Actions takenAnalyze usage statistics
Days/hours a dayPercentage of logged users vs. anonymous usersMore searched normsMore navigated norms
Seen funcionality
Tuning
Presentation layerSymptom: slow by showing big norms (there are no more than 30,
codes)Solution: is a distributed system, we are betting that users will be use
better computers, because the application makes heavy use of JavaScript
Symptom: search is slowProblem: there are words with no meaning that generate many hitsSolution: to programm discard rules
Simple search:Restriction of keywords (case sensitive)Single letters: a, b…, A, B,…Law, decree,and so on. Use a parametric table for discarding phrasesPattern [one letter] spaces[number]*
Advanced search:To restrict only if the type Law is selectedSame as above
Symptom: slow for navigating big norms (codes)Problem: navigation is always full textPartial solution:
Recommend using PDF for the 30 big normsNavigation is always full-text, enable access to hit list at article level, without
loading the entire tree or optimize tree loadOptimize list of versions
Tuning
Load balancing layerSymptom: slow loading of the home page and navigation
between static pages, slow loading of static pagesProblem: there are 4 clients zope, but only one or two are
used, leaving the rest idleSolution: improve load balancing, manage connected
users to not lose the session during the balancing, a consultant was hired to install a server balancing that distinguishes connected sessions of anonymous, allowing also to cache pages.
Problem: Congress users use Legis. They are accustomed to a better response time but with much more limited functionality
Solution: To evaluate the possibility of creating a dedicated server
Tuning
Business layerSymptom: Zope shows CPU usage peaksSolution: profiling to investigate cause
Parameters SQL-AlchemyZope parameters
Problem: export process is done on the server, although it is very fast, consumes resources for a short period of time
Solution: cache files generated by the export. Low server load and improve response time
Each time a norm is exported, the file will be generated in the file system if it does not exist. If it exists the file will download directly
To keep the norms up to date, the cached file will be removed if it is modifiedSymptom: big norms are slowSolution:
improve the process of precalculating norms and the display of big normsmore storage space for precalculationNFS support for the serversAllow download of precalculated pdf for big norms from the hit list
Symptom: versions of a norm is slowCache of the versions apparently is not workingdelete versions
Tuning
DatabaseSymptom: big norms are slowSolution: identify double article with the name of
the article associated in titulo_parte. The objective is to promote access to parts of a big norm using advanced search
Symptom: hit list is slow to specific queriesSolution: optimize phrase search in advanced
searchSymptom: improve response times in generalsolution:
Optimize some critical stored proceduresTuning of Oracle according to current use
Interoperability: linking
This alternative works as a simple hyperlink that goes to the norm, in its updated version, displayed in the navigation module
Example: http://www.leychile.cl/Navegar?idNorma=141599
This link contains the parameter idNorma which is the unique number of the norm
As an alternative parameter (only for laws) the idLey parameter can be used
Example for the same norm: http://www.leychile.cl/Navegar?idLey=19628
By using this URL:
Interoperability: xml
Ley Chile provides the norm in XML according to a interchange schema (see www.aem.gob.cl):
http://www.leychile.cl/esquemas/EsquemaIntercambioNorma-v1-0.xsd
Documentation: http://www.leychile.cl/Plone/Legis/esquemas/accesoLeyesChilenas4.pdf
The server receives a request via HTTP with parameters opt=7 (service id) and the identification of the normwith either idNorma or idLey and returns the XML
Always will be delivered the updated version of the normExamples:
Get the law 18575: http://www.leychile.cl/Consulta/obtxml?opt=7&idLey=18575 Get the law 19846 by using its idhttp://www.leychile.cl/Consulta/obtxml?opt=7&idNorma=206396
Additional parameter, foot notes:notaPIE: if 1, the text will come with foot notes
Example:Get law 18575 with foot noteshttp://www.leychile.cl/Consulta/obtxml?opt=7&idLey=18575¬aPIE=1
Interoperability: xml
Example with output forhttp://www.leychile.cl/Consulta/obtxml?opt=7&idLey=20000
Interoperability: Contraloría
Consume Dictámenes asociados a una ley
Envía parámetros
Capa de Presentación
Capa de Negocios
Cap
a d
e I
nte
gra
ció
n
Usuarios Internetwww.leychile.cl
Contraloría
Parámetros:Número ley
Prepara lista de resultados
Requerimiento de dictámenes paracualquier ley
AJAX
AJAX
Sistema Ley Chile
c
Interoperability: Organizations
Servicio:Provee XMLde la norma
Recibe parámetrosCapa de
Negocios
Cap
a d
e I
nte
gra
ció
n
Requerimiento HTTP
OrganizacionesInstituciones
Parámetros:* Número ley/Identificador de la norma* Fecha Versión* Notas
Sistema Ley Chile
Repositorio Documental
Capa de Datos
http://www.leychile.cl/Consulta/obtxml?opt=7&idLey=18575
Esquema XML público de la norma (www.aem.gob.cl): http://www.leychile.cl/esquemas/EsquemaIntercambioNorma-v1-0.xsd
LeyChile 2009-
“Nickname”, nombre popular
LeyChile 2009-
LeyChile 2009-
Other way is by using a webservice http://www.leychile.cl/Consulta/obtxml?opt=61&cadena=[texto_a_buscar][&exacta=[1|]&cantidad=[5]]
Workflow: norm input
Norm input: mail from Official Gazette
Norm input: text file
Norm input: basic marking
Norm input: loading file with marks
Norm input: planification
Planification: video
PLANIFICACION.AVI
Norm input: video
INGRESO.AVI
Norm input: norm marking (images)
Norm input: norm marking (linking)
Hiperlink
HIPERVINCULO.AVI
Norm input: QA
Other workflows (more complex)
Updating normsDigitationetc.
Videos
GTA: video
GTA.AVI
CambiaPlanificaciónpor defecto
Solicitud Digitación
Perfil Planificador
OT para planificar
PlanificióndigitaciónExterna ?
OT Digitación Planificada
SI
Si
OT GTA Cerrada
No
Si
Genera OT Digitación
NO
Asignar etapa distribución
OT Digitación Planificada
Bandeja OT Digitación Digitador
Bandeja Distribucuón Digitador
DistribuirSeleccionar
Empresa Dig.
OT Digitación Planificada
Cargar Archivo
Tiene corrección de
pruebas ?
Archivo XMLInterno o Externo
No
OT Digitación Cerrada
Bandeja Ingreso Planificador Flujo de Ingreso
OT IngresoPara planificar
Revisa Archivo
SI
Aprueba ?
SINo
NOTA: Se chequea corrección de
pruebas una sola vez
Bandeja Corrección de Pruebas
Digitador
Best practices (some)
The hardest firstDefine satisfaction criteria to measure
successHave alternative plansAvoid turnoverIs a content system… content!Test, test and… testSave budget por change management
http://datos.bcn.cl
Open/Linked data
LeyChileLeyChile datos.bcn.cldatos.bcn.cl
Tripletas RDFOntologías OWL – RDF Schema
Endpoint Sparql – Interfaz Web WS - SOAP
Normas XML
Herramientas de generaciónde mashup del grafo
Internet
etc.etc.Linked data desde consultas
URI
URI
cl/ley/{numero}/data.{ext}
cl/ley/{numero}/{lang}@{fecha_version}/data.{ext}
Law 17.335 in its spanish version from march, 31 2011 in JSON format
cl/ley/17335/es@2011-03-31/data.json
Ontology for LeyChile
URI
HTML + RDFahttp://datos.bcn.cl/recurso/cl/LEY/20000/datos.html
n3http://datos.bcn.cl/recurso/cl/LEY/20000/datos.n3
RDFhttp://datos.bcn.cl/recurso/cl/LEY/20000/datos.rdf
JSONhttp://datos.bcn.cl/recurso/cl/LEY/20000/datos.json
ntripleshttp://datos.bcn.cl/recurso/cl/LEY/20000/datos.ntriples
Otro ejemplo:http://datos.bcn.cl/recurso/cl/DTO/ministerio-de-educacion/2004-09-21/173/es@2009-11-19/datos.html
Endpoint Sparql
List of organizations:
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX norms: <http://datos.bcn.cl/ontologies/bcn-norms#>
SELECT distinct ?nombre WHERE {?org norms:creatorOf ?o .?org norms:hasName ?nombre}
Endpoint Sparql
Version of a norm:
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX dc: <http://purl.org/dc/elements/1.1/>PREFIX norms: <http://datos.bcn.cl/ontologies/bcn-norms#>
SELECT ?n ?id_norma ?tipo ?nro ?prDate ?pbDate ?titulo ?lang ?html WHERE { ?n dc:identifier "206396" . ?n norms:hasNumber ?id_norma . ?n dc:title ?titulo . ?n dc:language ?lang . ?n norms:type ?tipo . ?n norms:hasNumber ?nro . ?n norms:promulgationDate ?prDate . ?n norms:publishDate ?pbDate . ?n norms:hasHtmlDocument ?html .}
Endpoint Sparql
Graph of a norm:
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT ?n ?p ?o WHERE { ?n rdf:about
"http://datos.bcn.cl/recurso/cl/LEY/ministerio-secretaria-general-de-gobierno/2003-01-04/19846/" .
?n ?p ?o .}
Endpoint Sparql
Graph of a norm:
http://datos.bcn.cl/recurso/cl/LEY/ministerio-secretaria-general-de-gobierno/2003-01-04/19846/datos.html
Endpoint Sparql
Vinculaciones de modificatorias:
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX dc: <http://purl.org/dc/elements/1.1/>PREFIX norms: <http://datos.bcn.cl/ontologies/bcn-norms#>
SELECT distinct ?n ?p ?modificatoria WHERE { ?n rdf:about "http://datos.bcn.cl/recurso/cl/LEY/ministerio-
secretaria-general-de-gobierno/2003-01-04/19846/" . ?n ?p ?modificatoria . ?n norms:isModifiedBy ?modificatoria .}