Class Code
java.lang.Object
org.episteme.social.law.Code
- All Implemented Interfaces:
Named
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArticle(Article article) Adds an article to the code.getArticle(String num) Retrieves an article by its numbering.Returns the list of articles contained in this code.Returns the category of the code.getDate()Returns the publication or effective date of the code.getId()Legacy getter for ID.getName()Returns the name of the legal code.voidremoveArticle(Article article) Removes an article from the code.
-
Constructor Details
-
Code
Minimal constructor for the legal code.- Parameters:
name- the name of the code
-
Code
Creates a new Code object.- Parameters:
name- the name of the code (e.g., "Code Civil")category- the legal category (e.g., "Civil Law")date- the date of promulgation or publicationarticles- the initial list of articles- Throws:
IllegalArgumentException- if any argument is null or if the list contains non-Article entities
-
-
Method Details
-
getName
-
getCategory
-
getDate
-
getArticles
-
addArticle
Adds an article to the code.- Parameters:
article- the article to add- Throws:
IllegalArgumentException- if article is null
-
removeArticle
Removes an article from the code.- Parameters:
article- the article to remove
-
getId
Legacy getter for ID. -
getArticle
-