o1.legal

package o1.legal

Type members

Classlikes

class Corporation(val id: String, val seeksProfit: Boolean, name: String, contact: NaturalPerson) extends Entity with HumanOrganization

A Nation is a sovereign state such as Finland or Brazil.

A Nation is a sovereign state such as Finland or Brazil.

Value parameters:
contact

a contact person

id

an identifier that uniquely specifies the corporation

name

the name of the corporation

seeksProfit

whether the corporation seeks financial profit or not

class CourtCase(val plaintiff: Entity, val defendant: Entity)

Each instance of this class represents a single court case in which one Entity is the plaintiff and another is the defendant.

Each instance of this class represents a single court case in which one Entity is the plaintiff and another is the defendant.

This toy class represents no other information about the court case beyond the two legal entities involved.

Value parameters:
defendant

the entity that responds against an accusation in the case

plaintiff

the initiator of the court case

trait Entity(val name: String)

An Entity object represents a legal entity. A legal entity is essentially something that can sue or be sued in court, such as a person, a corporation, or a sovereign nation. That is, an Entity can be the plaintiff of the defendant in a CourtCase. (This is an approximation of the real-world concept.)

An Entity object represents a legal entity. A legal entity is essentially something that can sue or be sued in court, such as a person, a corporation, or a sovereign nation. That is, an Entity can be the plaintiff of the defendant in a CourtCase. (This is an approximation of the real-world concept.)

There are different kinds of legal entities; the trait Entity describes what is common to them all: they have a name, a contact person, and a kind, which is a textual description of the more specific type of the entity.

Value parameters:
name

the name of the legal entity, such as "Jane Doe" or "ACME Inc."

class FullCapacityPerson(personID: String, name: String) extends Entity with NaturalPerson

A FullCapacityPerson is a NaturalPerson that has no restrictions on their ability to function as a legal entity (due to being underage, indisposed, etc.).

A FullCapacityPerson is a NaturalPerson that has no restrictions on their ability to function as a legal entity (due to being underage, indisposed, etc.).

Value parameters:
name

the person’s name

personID

an identifier that uniquely specifies the individual person, such as a social security number

class GeographicalFeature(name: String, val kind: String, val representative: Entity) extends Entity with JuridicalPerson

A GeographicalFeature is a JuridicalPerson that is a natural, geographical feature such as river or a mountain. (Yes, there are jurisdictions in which geographical features such as the river Ganges are legal entities.)

A GeographicalFeature is a JuridicalPerson that is a natural, geographical feature such as river or a mountain. (Yes, there are jurisdictions in which geographical features such as the river Ganges are legal entities.)

Value parameters:
kind

the kind of the organization (examples: "river", "mountain")

name

the name of the organization

representative

another legal entity that acts in the interests of the geographical feature

class Group(val members: Vector[Entity]) extends Entity with JuridicalPerson

A Group is a group of legal persons who have united to act in their shared interest and are being treated as a single legal person.

A Group is a group of legal persons who have united to act in their shared interest and are being treated as a single legal person.

Groups do not have distinct names. The name of all Group objects is simply the string "group".

Value parameters:
members

the legal entities that form the group. This must be a non-empty collection. The first member is the leader of the group.

trait HumanOrganization(val contact: NaturalPerson) extends JuridicalPerson

A HumanOrganization is a JuridicalPerson that is social rather than natural. (Cf. GeographicalFeature.)

A HumanOrganization is a JuridicalPerson that is social rather than natural. (Cf. GeographicalFeature.)

This simple trait serves as a supertype for more specific kinds of HumanOrganization.

Value parameters:
contact

the contact person of the organization

object Illness extends Restriction

This singleton object represents the Restriction of being mentally or physically unable to function independently as a legal Entity. It has the description "mental and/or physical condition".

This singleton object represents the Restriction of being mentally or physically unable to function independently as a legal Entity. It has the description "mental and/or physical condition".

trait JuridicalPerson extends Entity

A JuridicalPerson is a legal entity that is not a single human being but still counts a “person” in a legal sense.

A JuridicalPerson is a legal entity that is not a single human being but still counts a “person” in a legal sense.

This simple trait serves as a supertype for the more specific kinds of JuridicalPerson, which its subtypes represent.

class Municipality(name: String, val nation: Nation, contact: NaturalPerson) extends Entity with HumanOrganization

A Municipality is a part of a Nation.

A Municipality is a part of a Nation.

Value parameters:
contact

a contact person for the municipality

name

the name of the municipality

nation

the nation the municipality is part of

class Nation(name: String, contact: NaturalPerson) extends Entity with HumanOrganization

A Nation is a sovereign state such as Finland or Brazil.

A Nation is a sovereign state such as Finland or Brazil.

Value parameters:
contact

a contact person for the nation’s goverment (yes, there’s just one)

name

the name of the nation

trait NaturalPerson(val personID: String) extends Entity

A NaturalPerson is a legal entity that is a single human being. In addition to a name, which every Entity has, a NaturalPerson has a personID.

A NaturalPerson is a legal entity that is a single human being. In addition to a name, which every Entity has, a NaturalPerson has a personID.

Value parameters:
personID

an identifier that uniquely specifies the individual person, such as a social security number

class ReducedCapacityPerson(personID: String, name: String, val restriction: Restriction, val guardian: FullCapacityPerson) extends Entity with NaturalPerson

A ReducedCapacityPerson is a NaturalPerson that has a Restriction on their ability to function independently as a legal entity (age, illness, etc.). As a consequence, they also have a FullCapacityPerson who serves as their guardian and representative.

A ReducedCapacityPerson is a NaturalPerson that has a Restriction on their ability to function independently as a legal entity (age, illness, etc.). As a consequence, they also have a FullCapacityPerson who serves as their guardian and representative.

Value parameters:
guardian

the person who represents the reduced-capacity person

name

the person’s name

personID

an identifier that uniquely specifies the individual person, such as a social security number

restriction

the reason why the person has reduced legal capacity

trait Restriction(val description: String)

A Restriction is a reason why a ReducedCapacityPerson cannot function independently as a legal entity.

A Restriction is a reason why a ReducedCapacityPerson cannot function independently as a legal entity.

object Underage extends Restriction

This singleton object represents the Restriction of being too young to function independently as a legal Entity. It has the description "age".

This singleton object represents the Restriction of being too young to function independently as a legal Entity. It has the description "age".