Documentation ¶
Index ¶
Constants ¶
View Source
const ( CodeDeLArtisanat = "LEGITEXT000006075116" CodeDesAssurances = "LEGITEXT000006073984" CodeDeLAviationCivile = "LEGITEXT000006074234" CodeDuCinemaEtDeLImageAnimee = "LEGITEXT000020908868" CodeCivil = "LEGITEXT000006070721" CodeDeCommerce = "LEGITEXT000005634379" CodeDesCommunes = "LEGITEXT000006070162" CodeDesCommunesEtDeLaNouvelleCaledonie = "LEGITEXT000006070300" CodeDeLaConsommation = "LEGITEXT000006069565" CodeDeLaConstructionEtDeLHabitation = "LEGITEXT000006074096" CodeDeLaDefense = "LEGITEXT000006071307" CodeDeDeontologieDesArchitectes = "LEGITEXT000006074232" CodeDisciplinaireEtPenalDeLaMarineMarchande = "LEGITEXT000006071188" CodeDuDomaineDeLEtat = "LEGITEXT000006070208" CodeDuDomaineDeLEtatEtDesCollectivitesPubliquesAppliquableALaCollectiviteTerritorialeDeMayotte = "LEGITEXT000006074235" CodeDesDouanes = "LEGITEXT000006071570" CodeDesDouanesDeMayotte = "LEGITEXT000006071645" CodeDeLEducation = "LEGITEXT000006071191" CodeElectoral = "LEGITEXT000006070239" CodeDeLEnergie = "LEGITEXT000023983208" CodeDeLEntreeEtDuSejourDesEtrangersEtDuDroitDAsile = "LEGITEXT000006070158" CodeDeLEnvironnement = "LEGITEXT000006074220" CodeDeLExpropriationPourCauseDUtilitePublique = "LEGITEXT000006074224" CodeDeLaFamilleEtDeLAideSociale = "LEGITEXT000006072637" CodeForestierNouveau = "LEGITEXT000025244092" CodeGeneralDeLaProprieteDesPersonnesPubliques = "LEGITEXT000006070299" CodeGeneralDesCollectivitesTerritoriales = "LEGITEXT000006070633" CodeGeneralDesImpots = "LEGITEXT000006069577" CodeGeneralDesImpotsAnnexe1 = "LEGITEXT000006069568" CodeGeneralDesImpotsAnnexe2 = "LEGITEXT000006069569" CodeGeneralDesImpotsAnnexe3 = "LEGITEXT000006069574" CodeGeneralDesImpotsAnnexe4 = "LEGITEXT000006069576" CodeDesInstrumentsMonetairesEtDesMedailles = "LEGITEXT000006070666" CodeDesJuridictionsFinancieres = "LEGITEXT000006070249" CodeDeJusticeAdministrative = "LEGITEXT000006070933" CodeDeJusticeMilitaireNouveau = "LEGITEXT000006071360" CodeDeLaLegionDHonneurEtDeLaMedailleMilitaire = "LEGITEXT000006071007" LivreDesProceduresFiscales = "LEGITEXT000006069583" CodeDesMarchesPublics2006 = "LEGITEXT000005627819" CodeMinier = "LEGITEXT000006071785" CodeMinierNouveau = "LEGITEXT000023501962" CodeMonetaireEtFinancier = "LEGITEXT000006072026" CodeDeLaMutualite = "LEGITEXT000006074067" CodeDeLOrganisationJudiciare = "LEGITEXT000006071164" CodeDuPatrimoine = "LEGITEXT000006074236" CodePenal = "LEGITEXT000006070719" CodeDesPensionsCivilesEtMilitairesDeRetraite = "LEGITEXT000006070302" CodeDesPensionsDeRetraiteDesMarinsFrancaisDuCommerceDePecheOuDePlaisance = "LEGITEXT000006074066" CodeDesPensionsMilitairesDInvaliditeEtDesVictimesDeLaGuerre = "LEGITEXT000006074068" CodeDesPortsMaritimes = "LEGITEXT000006074233" CodeDesPostesEtDesCommunicationsElectroniques = "LEGITEXT000006070987" CodeDeProcedureCivile = "LEGITEXT000006070716" CodeDeProcedurePenale = "LEGITEXT000006071154" CodeDesProceduresCivilesDExecution = "LEGITEXT000025024948" CodeDeLaProprieteIntellectuelle = "LEGITEXT000006069414" CodeDeLaRecherche = "LEGITEXT000006071190" CodeDeLaRoute = "LEGITEXT000006074228" CodeRuralAncien = "LEGITEXT000006071366" CodeRuralEtDeLaPecheMaritime = "LEGITEXT000006071367" CodeDeLaSantePublique = "LEGITEXT000006072665" CodeDeLaSecuriteInterieure = "LEGITEXT000025503132" CodeDeLaSecuriteSociale = "LEGITEXT000006073189" CodeDuServiceNational = "LEGITEXT000006071335" CodeDuSport = "LEGITEXT000006071318" CodeDuTourisme = "LEGITEXT000006074073" CodeDesTransports = "LEGITEXT000023086525" CodeDuTravail = "LEGITEXT000006072050" CodeDuTravailApplicableAMayotte = "LEGITEXT000006072052" CodeDuTravailMaritime = "LEGITEXT000006072051" CodeDeLUrbanisme = "LEGITEXT000006074075" CodeDeLaVoirieRoutiere = "LEGITEXT000006070667" )
View Source
const ( StateActive = "VIGUEUR" StateModified = "MODIFIE" StateRevoked = "ABROGE" )
View Source
const ( LinkCodifies = "CODIFIE" LinkCodification = "CODIFICATION" LinkCreates = "CREE" LinkCreation = "CREATION" LinkModifies = "MODIFIE" LinkModification = "MODIFICATION" LinkCitation = "CITATION" LinkRetirement = "ABROGATION" LinkSource = "source" LinkTarget = "cible" )
View Source
const ( NatureCode = "CODE" NatureDecree = "DECRET" NatureDecreeLaw = "DECRET_LOI" NatureLaw = "LOI" NatureSentence = "ARRETE" NatureOrganicLaw = "LOI_ORGANIQUE" )
Variables ¶
View Source
var ( ReHtmlTag = regexp.MustCompile(`<[^>]*>`) ReWhiteSpaces = regexp.MustCompile(`\s+`) ReCR = regexp.MustCompile(`\n{2,}`) ReSpaces = regexp.MustCompile(` +`) ReSpacesAfterCR = regexp.MustCompile(`\n[ ]+`) ReLawNumber = regexp.MustCompile(`[0-9]{2,4}-[0-9]{2,4}(-[0-9]{2})?`) )
View Source
var Codes = []string{ CodeDeLArtisanat, CodeDesAssurances, CodeDeLAviationCivile, CodeDuCinemaEtDeLImageAnimee, CodeCivil, CodeDeCommerce, CodeDesCommunes, CodeDesCommunesEtDeLaNouvelleCaledonie, CodeDeLaConsommation, CodeDeLaConstructionEtDeLHabitation, CodeDeLaDefense, CodeDeDeontologieDesArchitectes, CodeDisciplinaireEtPenalDeLaMarineMarchande, CodeDuDomaineDeLEtat, CodeDuDomaineDeLEtatEtDesCollectivitesPubliquesAppliquableALaCollectiviteTerritorialeDeMayotte, CodeDuDomainePublicFluvialEtDeLaNavigationInterieure, CodeDesDouanes, CodeDesDouanesDeMayotte, CodeDeLEducation, CodeElectoral, CodeDeLEnergie, CodeDeLEntreeEtDuSejourDesEtrangersEtDuDroitDAsile, CodeDeLEnvironnement, CodeDeLExpropriationPourCauseDUtilitePublique, CodeDeLaFamilleEtDeLAideSociale, CodeForestierNouveau, CodeGeneralDeLaProprieteDesPersonnesPubliques, CodeGeneralDesCollectivitesTerritoriales, CodeGeneralDesImpots, CodeGeneralDesImpotsAnnexe1, CodeGeneralDesImpotsAnnexe2, CodeGeneralDesImpotsAnnexe3, CodeGeneralDesImpotsAnnexe4, CodeDesInstrumentsMonetairesEtDesMedailles, CodeDesJuridictionsFinancieres, CodeDeJusticeAdministrative, CodeDeJusticeMilitaireNouveau, CodeDeLaLegionDHonneurEtDeLaMedailleMilitaire, LivreDesProceduresFiscales, CodeDesMarchesPublics2006, CodeMinier, CodeMinierNouveau, CodeMonetaireEtFinancier, CodeDeLaMutualite, CodeDeLOrganisationJudiciare, CodeDuPatrimoine, CodePenal, CodeDesPensionsCivilesEtMilitairesDeRetraite, CodeDesPensionsDeRetraiteDesMarinsFrancaisDuCommerceDePecheOuDePlaisance, CodeDesPensionsMilitairesDInvaliditeEtDesVictimesDeLaGuerre, CodeDesPortsMaritimes, CodeDesPostesEtDesCommunicationsElectroniques, CodeDeProcedureCivile, CodeDeProcedurePenale, CodeDesProceduresCivilesDExecution, CodeDeLaProprieteIntellectuelle, CodeDeLaRecherche, CodeDeLaRoute, CodeRuralAncien, CodeRuralEtDeLaPecheMaritime, CodeDeLaSantePublique, CodeDeLaSecuriteInterieure, CodeDeLaSecuriteSociale, CodeDuServiceNational, CodeDuSport, CodeDuTourisme, CodeDesTransports, CodeDuTravail, CodeDuTravailApplicableAMayotte, CodeDuTravailMaritime, CodeDeLUrbanisme, CodeDeLaVoirieRoutiere, }
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { *CommonMeta Code *Code `xml:"-"` Section *Section `xml:"-"` VersionId string `xml:"-"` Number string `xml:"META>META_SPEC>META_ARTICLE>NUM"` State string `xml:"META>META_SPEC>META_ARTICLE>ETAT"` BeginDate string `xml:"META>META_SPEC>META_ARTICLE>DATE_DEBUT"` EndDate string `xml:"META>META_SPEC>META_ARTICLE>DATE_FIN"` Type string `xml:"META>META_SPEC>META_ARTICLE>TYPE"` Notice string `xml:"NOTA>CONTENU>p"` Body struct { Text string `xml:",innerxml"` } `xml:"BLOC_TEXTUEL>CONTENU"` VersionLinks []*Version `xml:"VERSIONS>VERSION"` Text *TextLink `xml:"CONTEXTE>TEXTE"` Links []*struct { Text string `xml:",chardata"` TextId string `xml:"cidTexte,attr"` Id string `xml:"id,attr"` TextSignDate string `xml:"datesignatexte,attr"` TextNature string `xml:"naturetexte,attr"` TextNor string `xml:"nortexte,attr"` Number string `xml:"num,attr"` TextNumber string `xml:"numtexte,attr"` Direction string `xml:"sens,attr"` LinkType string `xml:"typelien,attr"` } `xml:"LIENS>LIEN"` }
func NewArticleFromFile ¶
type Code ¶
type Code struct { *CommonMeta Id string `xml:"META>META_SPEC>META_TEXTE_CHRONICLE>CID"` Number string `xml:"META>META_SPEC>META_TEXTE_CHRONICLE>NUM"` SequenceNumber string `xml:"META>META_SPEC>META_TEXTE_CHRONICLE>NUM_SEQUENCE"` Nor string `xml:"META>META_SPEC>META_TEXTE_CHRONICLE>NOR"` PublishedDate string `xml:"META>META_SPEC>META_TEXTE_CHRONICLE>DATE_PUBLI"` TextDate string `xml:"META>META_SPEC>META_TEXTE_CHRONICLE>DATE_TEXTE"` LastModification string `xml:"META>META_SPEC>META_TEXTE_CHRONICLE>DERNIERE_MODIFICATION"` VersionsToCome []string `xml:"META>META_SPEC>META_TEXTE_CHRONICLE>VERSIONS_A_VENIR>VERSION_A_VENIR"` PublicationOrigin string `xml:"META>META_SPEC>META_TEXTE_CHRONICLE>ORIGINE_PUBLI"` PublicationBeginPage string `xml:"META>META_SPEC>META_TEXTE_CHRONICLE>PAGE_DEB_PUBLI"` PublicationEndPage string `xml:"META>META_SPEC>META_TEXTE_CHRONICLE>PAGE_FIN_PUBLI"` TOC []*TOCLink `xml:"STRUCT>LIEN_SECTION_TA"` // contains filtered or unexported fields }
func NewCodeFromFile ¶
type CommonMeta ¶
type LegiFrance ¶
type LegiFrance struct {
Path string
}
func NewLegiFrance ¶
func NewLegiFrance(dumpPath string) *LegiFrance
type Section ¶
type Section struct { Code *Code `xml:"-"` Id string `xml:"ID"` Title string `xml:"TITRE_TA"` TOC []*TOCLink `xml:"STRUCTURE_TA>LIEN_SECTION_TA"` ArticleLinks []*TOCLink `xml:"STRUCTURE_TA>LIEN_ART"` Text TextLink `xml:"CONTEXTE>TEXTE"` }
func NewSectionFromFile ¶
func (*Section) ArticlesWithChildren ¶
func (*Section) SubSections ¶
type TextLink ¶
type TextLink struct { Authority string `xml:"autorite,attr"` Id string `xml:"cid,attr"` PublishedDate string `xml:"date_publi,attr"` SignedDate string `xml:"date_signature,attr"` Ministry string `xml:"ministere,attr"` Nature string `xml:"nature,attr"` Nor string `xml:"nor,attr"` Number string `xml:"num,attr"` Title *struct { Title string `xml:",chardata"` ShortTitle string `xml:"c_titre_court,attr"` Id string `xml:"id_txt,attr"` BeginDate string `xml:"debut,attr"` EndDate string `xml:"fin,attr"` } `xml:"TITRE_TXT"` TOC *TOC `xml:"TM"` }
Click to show internal directories.
Click to hide internal directories.