This commit is contained in:
		| @@ -1,5 +1,6 @@ | |||||||
| [law] | [law] | ||||||
| id = 10001622 | id = 10001622 | ||||||
|  | name = "ABGB" | ||||||
|  |  | ||||||
| [[law.classifiers]] | [[law.classifiers]] | ||||||
| name = "Theil" | name = "Theil" | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| [law] | [law] | ||||||
| id = 10001871 | id = 10001871 | ||||||
|  | name = "Ehegesetz" | ||||||
|  |  | ||||||
| [[law.classifiers]] | [[law.classifiers]] | ||||||
| name = "Abschnitt" | name = "Abschnitt" | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| [law] | [law] | ||||||
| id = 10002462 | id = 10002462 | ||||||
|  | name = "Konsumentenschutzgesetz" | ||||||
|  |  | ||||||
| [[law.classifiers]] | [[law.classifiers]] | ||||||
| name = "Hauptstück" | name = "Hauptstück" | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| [law] | [law] | ||||||
| id = 10002180 | id = 10002180 | ||||||
|  | name = "Markenschutzgesetz" | ||||||
|  |  | ||||||
| [[law.classifiers]] | [[law.classifiers]] | ||||||
| name = "Abschnitt" | name = "Abschnitt" | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| [law] | [law] | ||||||
| id = 10012703 | id = 10012703 | ||||||
|  | name = "Schifffahrtsgesetz" | ||||||
|  |  | ||||||
| [[law.classifiers]] | [[law.classifiers]] | ||||||
| name = "Teil" | name = "Teil" | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| [law] | [law] | ||||||
| id = 10002296 | id = 10002296 | ||||||
|  | name = "StGB" | ||||||
|  |  | ||||||
| [[law.classifiers]] | [[law.classifiers]] | ||||||
| name = "Teil" | name = "Teil" | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| [law] | [law] | ||||||
| id = 10001905 | id = 10001905 | ||||||
|  | name = "TEG" | ||||||
|  |  | ||||||
| [[law.classifiers]] | [[law.classifiers]] | ||||||
| name = "Abschnitt" | name = "Abschnitt" | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| [law] | [law] | ||||||
| id = 10001848 | id = 10001848 | ||||||
|  | name = "Urhebergesetz" | ||||||
|  |  | ||||||
| [[law.classifiers]] | [[law.classifiers]] | ||||||
| name = "Hauptstück" | name = "Hauptstück" | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| [law] | [law] | ||||||
| id = 20001917 | id = 20001917 | ||||||
|  | name = "Vereinsgesetz" | ||||||
|  |  | ||||||
| [[law.classifiers]] | [[law.classifiers]] | ||||||
| name = "Abschnitt" | name = "Abschnitt" | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| [law] | [law] | ||||||
| id = 20011654 | id = 20011654 | ||||||
|  | name = "Verbrauchergewährleistungsgesetz" | ||||||
|  |  | ||||||
| [[law.classifiers]] | [[law.classifiers]] | ||||||
| name = "Abschnitt" | name = "Abschnitt" | ||||||
|   | |||||||
| @@ -85,7 +85,6 @@ impl Config { | |||||||
|         if config.parser.move_para_headers_into_content { |         if config.parser.move_para_headers_into_content { | ||||||
|             parser.move_para_headers_into_content(); |             parser.move_para_headers_into_content(); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         Ok((config.law.id, builder, parser)) |         Ok((config.law.id, builder, parser)) | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -93,6 +92,7 @@ impl Config { | |||||||
| #[derive(Debug, Deserialize)] | #[derive(Debug, Deserialize)] | ||||||
| struct Law { | struct Law { | ||||||
|     id: usize, |     id: usize, | ||||||
|  |     name: String, | ||||||
|     classifiers: Vec<Classifier>, |     classifiers: Vec<Classifier>, | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -30,6 +30,7 @@ pub mod responsible; | |||||||
| /// That's our struct, holding all the information of the law text. | /// That's our struct, holding all the information of the law text. | ||||||
| #[derive(Debug, Serialize, Deserialize, PartialEq)] | #[derive(Debug, Serialize, Deserialize, PartialEq)] | ||||||
| pub struct Law { | pub struct Law { | ||||||
|  |     pub name: String, | ||||||
|     pub header: Vec<Heading>, |     pub header: Vec<Heading>, | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -84,7 +85,10 @@ impl From<LawBuilder> for Law { | |||||||
|             }); |             }); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         Self { header: ret } |         Self { | ||||||
|  |             header: ret, | ||||||
|  |             name: builder.name, | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -133,6 +137,8 @@ impl From<ClassifierInstance> for HeadingContent { | |||||||
| /// Is used to generate a law struct. It's organized mainly by classifier. | /// Is used to generate a law struct. It's organized mainly by classifier. | ||||||
| #[derive(Debug)] | #[derive(Debug)] | ||||||
| pub struct LawBuilder { | pub struct LawBuilder { | ||||||
|  |     name: String, | ||||||
|  |  | ||||||
|     /// Structure of the law text |     /// Structure of the law text | ||||||
|     classifiers: Vec<Classifier>, |     classifiers: Vec<Classifier>, | ||||||
|  |  | ||||||
| @@ -168,6 +174,7 @@ impl LawBuilder { | |||||||
|     /// Creates a new law builder. Adds classifier for known law texts. |     /// Creates a new law builder. Adds classifier for known law texts. | ||||||
|     pub fn new() -> Self { |     pub fn new() -> Self { | ||||||
|         Self { |         Self { | ||||||
|  |             name: "".into(), | ||||||
|             classifiers: Vec::new(), |             classifiers: Vec::new(), | ||||||
|             header: Vec::new(), |             header: Vec::new(), | ||||||
|             next_para_header: None, |             next_para_header: None, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user