Clean Structure of Textelr & SectionTa
This commit is contained in:
parent
fb9413ed24
commit
ff5077faaa
3 changed files with 132 additions and 83 deletions
|
@ -44,15 +44,22 @@ export {
|
||||||
type JorfArticleTexteNature,
|
type JorfArticleTexteNature,
|
||||||
type JorfArticleType,
|
type JorfArticleType,
|
||||||
type JorfSectionTa,
|
type JorfSectionTa,
|
||||||
|
type JorfSectionTaLienArt,
|
||||||
type JorfSectionTaLienArtEtat,
|
type JorfSectionTaLienArtEtat,
|
||||||
|
type JorfSectionTaLienSectionTa,
|
||||||
|
type JorfSectionTaLienSectionTaEtat,
|
||||||
type JorfSectionTaTexteNature,
|
type JorfSectionTaTexteNature,
|
||||||
|
type JorfSectionTaStructure,
|
||||||
type JorfTextelr,
|
type JorfTextelr,
|
||||||
type JorfTextelrEtat,
|
type JorfTextelrEtat,
|
||||||
|
type JorfTextelrLienArt,
|
||||||
type JorfTextelrLienArtEtat,
|
type JorfTextelrLienArtEtat,
|
||||||
type JorfTextelrLienArtNature,
|
type JorfTextelrLienArtNature,
|
||||||
type JorfTextelrLienArtOrigine,
|
type JorfTextelrLienArtOrigine,
|
||||||
|
type JorfTextelrLienSectionTa,
|
||||||
type JorfTextelrNature,
|
type JorfTextelrNature,
|
||||||
type JorfTextelrOrigine,
|
type JorfTextelrOrigine,
|
||||||
|
type JorfTextelrStructure,
|
||||||
type JorfTexteVersion,
|
type JorfTexteVersion,
|
||||||
type JorfTexteVersionLien,
|
type JorfTexteVersionLien,
|
||||||
type JorfTexteVersionLienNature,
|
type JorfTexteVersionLienNature,
|
||||||
|
@ -95,15 +102,22 @@ export {
|
||||||
type LegiArticleTexteNature,
|
type LegiArticleTexteNature,
|
||||||
type LegiArticleType,
|
type LegiArticleType,
|
||||||
type LegiSectionTa,
|
type LegiSectionTa,
|
||||||
|
type LegiSectionTaLienArt,
|
||||||
type LegiSectionTaLienArtEtat,
|
type LegiSectionTaLienArtEtat,
|
||||||
|
type LegiSectionTaLienSectionTa,
|
||||||
|
type LegiSectionTaLienSectionTaEtat,
|
||||||
|
type LegiSectionTaStructure,
|
||||||
type LegiSectionTaTexteNature,
|
type LegiSectionTaTexteNature,
|
||||||
type LegiTextelr,
|
type LegiTextelr,
|
||||||
type LegiTextelrEtat,
|
type LegiTextelrEtat,
|
||||||
|
type LegiTextelrLienArt,
|
||||||
type LegiTextelrLienArtEtat,
|
type LegiTextelrLienArtEtat,
|
||||||
type LegiTextelrLienArtOrigine,
|
type LegiTextelrLienArtOrigine,
|
||||||
|
type LegiTextelrLienSectionTa,
|
||||||
type LegiTextelrLienSectionTaEtat,
|
type LegiTextelrLienSectionTaEtat,
|
||||||
type LegiTextelrNature,
|
type LegiTextelrNature,
|
||||||
type LegiTextelrOrigine,
|
type LegiTextelrOrigine,
|
||||||
|
type LegiTextelrStructure,
|
||||||
type LegiTexteVersion,
|
type LegiTexteVersion,
|
||||||
type LegiTexteVersionEtat,
|
type LegiTexteVersionEtat,
|
||||||
type LegiTexteVersionLien,
|
type LegiTexteVersionLien,
|
||||||
|
|
|
@ -117,6 +117,8 @@ export interface JorfArticleTm {
|
||||||
|
|
||||||
export type JorfArticleType = (typeof allJorfArticleTypes)[number]
|
export type JorfArticleType = (typeof allJorfArticleTypes)[number]
|
||||||
|
|
||||||
|
// Section Texte Article
|
||||||
|
// Correspond à un niveau d'une table des matières
|
||||||
export interface JorfSectionTa {
|
export interface JorfSectionTa {
|
||||||
ID: string
|
ID: string
|
||||||
COMMENTAIRE?: string
|
COMMENTAIRE?: string
|
||||||
|
@ -142,26 +144,16 @@ export interface JorfSectionTa {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TITRE_TA?: string
|
TITRE_TA?: string
|
||||||
STRUCTURE_TA?: Array<{
|
STRUCTURE_TA?: JorfSectionTaStructure
|
||||||
LIEN_ART?: Array<{
|
}
|
||||||
|
|
||||||
|
export interface JorfSectionTaLienArt {
|
||||||
"@debut": string
|
"@debut": string
|
||||||
"@etat"?: JorfSectionTaLienArtEtat
|
"@etat"?: JorfSectionTaLienArtEtat
|
||||||
"@fin": string
|
"@fin": string
|
||||||
"@id": string
|
"@id": string
|
||||||
"@num"?: string
|
"@num"?: string
|
||||||
"@origine"?: JorfSectionTaLienArtOrigine
|
"@origine"?: JorfSectionTaLienArtOrigine
|
||||||
}>
|
|
||||||
LIEN_SECTION_TA?: Array<{
|
|
||||||
"#text"?: string
|
|
||||||
"@cid": string
|
|
||||||
"@debut": string
|
|
||||||
// "@etat"?: JorfSectionTaLienSectionTaEtat
|
|
||||||
"@fin": string
|
|
||||||
"@id": string
|
|
||||||
"@niv": number
|
|
||||||
"@url": string
|
|
||||||
}>
|
|
||||||
}>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type JorfSectionTaLienArtEtat =
|
export type JorfSectionTaLienArtEtat =
|
||||||
|
@ -170,9 +162,27 @@ export type JorfSectionTaLienArtEtat =
|
||||||
export type JorfSectionTaLienArtOrigine =
|
export type JorfSectionTaLienArtOrigine =
|
||||||
(typeof allJorfSectionTaLienArtOrigines)[number]
|
(typeof allJorfSectionTaLienArtOrigines)[number]
|
||||||
|
|
||||||
|
export interface JorfSectionTaLienSectionTa {
|
||||||
|
"#text"?: string
|
||||||
|
"@cid": string
|
||||||
|
"@debut": string
|
||||||
|
// "@etat"?: JorfSectionTaLienSectionTaEtat
|
||||||
|
"@fin": string
|
||||||
|
"@id": string
|
||||||
|
"@niv": number
|
||||||
|
"@url": string
|
||||||
|
}
|
||||||
|
|
||||||
export type JorfSectionTaLienSectionTaEtat =
|
export type JorfSectionTaLienSectionTaEtat =
|
||||||
(typeof allJorfSectionTaLienSectionTaEtats)[number]
|
(typeof allJorfSectionTaLienSectionTaEtats)[number]
|
||||||
|
|
||||||
|
// Structure d'une Section Texte Article
|
||||||
|
// Lien vers les sous-niveaux (articles ou Sections Texte Article) d'un niveau de table des matières
|
||||||
|
export interface JorfSectionTaStructure {
|
||||||
|
LIEN_ART?: JorfSectionTaLienArt[]
|
||||||
|
LIEN_SECTION_TA?: JorfSectionTaLienSectionTa[]
|
||||||
|
}
|
||||||
|
|
||||||
export type JorfSectionTaTexteNature =
|
export type JorfSectionTaTexteNature =
|
||||||
(typeof allJorfSectionTaTexteNatures)[number]
|
(typeof allJorfSectionTaTexteNatures)[number]
|
||||||
|
|
||||||
|
@ -214,27 +224,7 @@ export interface JorfTextelr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
STRUCT?: {
|
STRUCT?: JorfTextelrStructure
|
||||||
LIEN_ART?: Array<{
|
|
||||||
"@debut": string
|
|
||||||
"@etat"?: JorfTextelrLienArtEtat
|
|
||||||
"@fin": string
|
|
||||||
"@id": string
|
|
||||||
// "@nature"?: undefined
|
|
||||||
"@num"?: string
|
|
||||||
"@origine"?: JorfTextelrLienArtOrigine
|
|
||||||
}>
|
|
||||||
LIEN_SECTION_TA?: Array<{
|
|
||||||
"#text"?: string
|
|
||||||
"@cid": string
|
|
||||||
"@debut": string
|
|
||||||
// "@etat"?: undefined
|
|
||||||
"@fin": string
|
|
||||||
"@id": string
|
|
||||||
"@niv": number
|
|
||||||
"@url": string
|
|
||||||
}>
|
|
||||||
}
|
|
||||||
VERSIONS: {
|
VERSIONS: {
|
||||||
VERSION: Array<{
|
VERSION: Array<{
|
||||||
"@etat"?: JorfTextelrEtat
|
"@etat"?: JorfTextelrEtat
|
||||||
|
@ -250,6 +240,16 @@ export interface JorfTextelr {
|
||||||
|
|
||||||
export type JorfTextelrEtat = (typeof allJorfTextelrEtats)[number]
|
export type JorfTextelrEtat = (typeof allJorfTextelrEtats)[number]
|
||||||
|
|
||||||
|
export interface JorfTextelrLienArt {
|
||||||
|
"@debut": string
|
||||||
|
"@etat"?: JorfTextelrLienArtEtat
|
||||||
|
"@fin": string
|
||||||
|
"@id": string
|
||||||
|
// "@nature"?: undefined
|
||||||
|
"@num"?: string
|
||||||
|
"@origine"?: JorfTextelrLienArtOrigine
|
||||||
|
}
|
||||||
|
|
||||||
export type JorfTextelrLienArtEtat = (typeof allJorfTextelrLienArtEtats)[number]
|
export type JorfTextelrLienArtEtat = (typeof allJorfTextelrLienArtEtats)[number]
|
||||||
|
|
||||||
export type JorfTextelrLienArtNature =
|
export type JorfTextelrLienArtNature =
|
||||||
|
@ -262,6 +262,23 @@ export type JorfTextelrNature = (typeof allJorfTextelrNatures)[number]
|
||||||
|
|
||||||
export type JorfTextelrOrigine = (typeof allJorfTextelrOrigines)[number]
|
export type JorfTextelrOrigine = (typeof allJorfTextelrOrigines)[number]
|
||||||
|
|
||||||
|
export interface JorfTextelrLienSectionTa {
|
||||||
|
"#text"?: string
|
||||||
|
"@cid": string
|
||||||
|
"@debut": string
|
||||||
|
// "@etat"?: undefined
|
||||||
|
"@fin": string
|
||||||
|
"@id": string
|
||||||
|
"@niv": number
|
||||||
|
"@url": string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Structure du JorfTextelr
|
||||||
|
// Premier niveau de table des matières
|
||||||
|
export interface JorfTextelrStructure {
|
||||||
|
LIEN_ART?: JorfTextelrLienArt[]
|
||||||
|
LIEN_SECTION_TA?: JorfTextelrLienSectionTa[]
|
||||||
|
}
|
||||||
export interface JorfTexteVersion {
|
export interface JorfTexteVersion {
|
||||||
ABRO?: {
|
ABRO?: {
|
||||||
CONTENU: string // HTML
|
CONTENU: string // HTML
|
||||||
|
|
|
@ -104,6 +104,8 @@ export interface LegiArticleTm {
|
||||||
|
|
||||||
export type LegiArticleType = (typeof allLegiArticleTypes)[number]
|
export type LegiArticleType = (typeof allLegiArticleTypes)[number]
|
||||||
|
|
||||||
|
// Section Texte Article
|
||||||
|
// Correspond à un niveau d'une table des matières
|
||||||
export interface LegiSectionTa {
|
export interface LegiSectionTa {
|
||||||
COMMENTAIRE?: string
|
COMMENTAIRE?: string
|
||||||
CONTEXTE: {
|
CONTEXTE: {
|
||||||
|
@ -128,27 +130,17 @@ export interface LegiSectionTa {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ID: string
|
ID: string
|
||||||
STRUCTURE_TA?: Array<{
|
STRUCTURE_TA?: LegiSectionTaStructure
|
||||||
LIEN_ART?: Array<{
|
TITRE_TA?: string // Titre de la section (peut contenir des sauts de lignes à remplacer par des espaces)
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LegiSectionTaLienArt {
|
||||||
"@debut": string
|
"@debut": string
|
||||||
"@etat"?: LegiSectionTaLienArtEtat
|
"@etat"?: LegiSectionTaLienArtEtat
|
||||||
"@fin": string
|
"@fin": string
|
||||||
"@id": string
|
"@id": string
|
||||||
"@num"?: string
|
"@num"?: string
|
||||||
"@origine": LegiSectionTaLienArtOrigine
|
"@origine": LegiSectionTaLienArtOrigine
|
||||||
}>
|
|
||||||
LIEN_SECTION_TA?: Array<{
|
|
||||||
"#text"?: string
|
|
||||||
"@cid": string
|
|
||||||
"@debut": string
|
|
||||||
"@etat"?: LegiSectionTaLienSectionTaEtat
|
|
||||||
"@fin": string
|
|
||||||
"@id": string
|
|
||||||
"@niv": number
|
|
||||||
"@url": string
|
|
||||||
}>
|
|
||||||
}>
|
|
||||||
TITRE_TA?: string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type LegiSectionTaLienArtEtat =
|
export type LegiSectionTaLienArtEtat =
|
||||||
|
@ -157,9 +149,27 @@ export type LegiSectionTaLienArtEtat =
|
||||||
export type LegiSectionTaLienArtOrigine =
|
export type LegiSectionTaLienArtOrigine =
|
||||||
(typeof allLegiSectionTaLienArtOrigines)[number]
|
(typeof allLegiSectionTaLienArtOrigines)[number]
|
||||||
|
|
||||||
|
export interface LegiSectionTaLienSectionTa {
|
||||||
|
"#text"?: string
|
||||||
|
"@cid": string
|
||||||
|
"@debut": string
|
||||||
|
"@etat"?: LegiSectionTaLienSectionTaEtat
|
||||||
|
"@fin": string
|
||||||
|
"@id": string
|
||||||
|
"@niv": number
|
||||||
|
"@url": string
|
||||||
|
}
|
||||||
|
|
||||||
export type LegiSectionTaLienSectionTaEtat =
|
export type LegiSectionTaLienSectionTaEtat =
|
||||||
(typeof allLegiSectionTaLienSectionTaEtats)[number]
|
(typeof allLegiSectionTaLienSectionTaEtats)[number]
|
||||||
|
|
||||||
|
// Structure d'une Section Texte Article
|
||||||
|
// Lien vers les sous-niveaux (articles ou Sections Texte Article) d'un niveau de table des matières
|
||||||
|
export interface LegiSectionTaStructure {
|
||||||
|
LIEN_ART?: LegiSectionTaLienArt[]
|
||||||
|
LIEN_SECTION_TA?: LegiSectionTaLienSectionTa[]
|
||||||
|
}
|
||||||
|
|
||||||
export type LegiSectionTaTexteNature =
|
export type LegiSectionTaTexteNature =
|
||||||
(typeof allLegiSectionTaTexteNatures)[number]
|
(typeof allLegiSectionTaTexteNatures)[number]
|
||||||
|
|
||||||
|
@ -201,27 +211,7 @@ export interface LegiTextelr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
STRUCT?: {
|
STRUCT?: LegiTextelrStructure
|
||||||
LIEN_ART?: Array<{
|
|
||||||
"@debut": string
|
|
||||||
"@etat"?: LegiTextelrLienArtEtat
|
|
||||||
"@fin": string
|
|
||||||
"@id": string
|
|
||||||
// "@nature"?: undefined
|
|
||||||
"@num"?: string
|
|
||||||
"@origine": LegiTextelrLienArtOrigine
|
|
||||||
}>
|
|
||||||
LIEN_SECTION_TA?: Array<{
|
|
||||||
"#text": string
|
|
||||||
"@cid": string
|
|
||||||
"@debut": string
|
|
||||||
"@etat"?: LegiTextelrLienSectionTaEtat
|
|
||||||
"@fin": string
|
|
||||||
"@id": string
|
|
||||||
"@niv": number
|
|
||||||
"@url": string
|
|
||||||
}>
|
|
||||||
}
|
|
||||||
VERSIONS: {
|
VERSIONS: {
|
||||||
VERSION: Array<{
|
VERSION: Array<{
|
||||||
"@etat"?: LegiTextelrEtat
|
"@etat"?: LegiTextelrEtat
|
||||||
|
@ -237,11 +227,32 @@ export interface LegiTextelr {
|
||||||
|
|
||||||
export type LegiTextelrEtat = (typeof allLegiTextelrEtats)[number]
|
export type LegiTextelrEtat = (typeof allLegiTextelrEtats)[number]
|
||||||
|
|
||||||
|
export interface LegiTextelrLienArt {
|
||||||
|
"@debut": string
|
||||||
|
"@etat"?: LegiTextelrLienArtEtat
|
||||||
|
"@fin": string
|
||||||
|
"@id": string
|
||||||
|
// "@nature"?: undefined
|
||||||
|
"@num"?: string
|
||||||
|
"@origine": LegiTextelrLienArtOrigine
|
||||||
|
}
|
||||||
|
|
||||||
export type LegiTextelrLienArtEtat = (typeof allLegiTextelrLienArtEtats)[number]
|
export type LegiTextelrLienArtEtat = (typeof allLegiTextelrLienArtEtats)[number]
|
||||||
|
|
||||||
export type LegiTextelrLienArtOrigine =
|
export type LegiTextelrLienArtOrigine =
|
||||||
(typeof allLegiTextelrLienArtOrigines)[number]
|
(typeof allLegiTextelrLienArtOrigines)[number]
|
||||||
|
|
||||||
|
export interface LegiTextelrLienSectionTa {
|
||||||
|
"#text": string // Titre de la section
|
||||||
|
"@cid": string // ID de la Section Texte Article que la Section Texte Article a modifée ou égal à @id si pas de modification
|
||||||
|
"@debut": string // Date de début
|
||||||
|
"@etat"?: LegiTextelrLienSectionTaEtat
|
||||||
|
"@fin": string // Date de fin
|
||||||
|
"@id": string // ID de la Section Texte Article
|
||||||
|
"@niv": number // Niveau de profondeur de la section dans l'arborescence
|
||||||
|
"@url": string // Chemin du fichier XML de la Section Texte Article dans l'archive
|
||||||
|
}
|
||||||
|
|
||||||
export type LegiTextelrLienSectionTaEtat =
|
export type LegiTextelrLienSectionTaEtat =
|
||||||
(typeof allLegiTextelrLienSectionTaEtats)[number]
|
(typeof allLegiTextelrLienSectionTaEtats)[number]
|
||||||
|
|
||||||
|
@ -249,6 +260,13 @@ export type LegiTextelrNature = (typeof allLegiTextelrNatures)[number]
|
||||||
|
|
||||||
export type LegiTextelrOrigine = (typeof allLegiTextelrOrigines)[number]
|
export type LegiTextelrOrigine = (typeof allLegiTextelrOrigines)[number]
|
||||||
|
|
||||||
|
// Structure du LegiTextelr
|
||||||
|
// Premier niveau de table des matières
|
||||||
|
export interface LegiTextelrStructure {
|
||||||
|
LIEN_ART?: LegiTextelrLienArt[]
|
||||||
|
LIEN_SECTION_TA?: LegiTextelrLienSectionTa[]
|
||||||
|
}
|
||||||
|
|
||||||
export interface LegiTexteVersion {
|
export interface LegiTexteVersion {
|
||||||
ABRO?: {
|
ABRO?: {
|
||||||
CONTENU: string // HTML
|
CONTENU: string // HTML
|
||||||
|
|
Loading…
Reference in a new issue