All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rosetta.hero-model.reg.rosetta Maven / Gradle / Ivy

There is a newer version: 9.22.0
Show newest version
namespace "test.reg"
version "test"

body Authority Shield <"Strategic Homeland Intervention, Enforcement and Logistics Division">

corpus Act "Avengers Initiative" Avengers <"The Avengers Initiative (a.k.a Phase 1; originally conceptualized as the Protector Initiative) was a secret project created by S.H.I.E.L.D. to create the Avengers, a response team comprised of the most able individuals humankind has to offer. The Initiative will defend Earth from imminent global threats that are beyond the warfighting capability of conventional military forces. ">

corpus Regulations "Sokovia Accords" SokoviaAccords <"The Sokovia Accords are a set of legal documents designed to regulate the activities of enhanced individuals, specifically those who work for either government agencies such as S.H.I.E.L.D. or for private organizations such as the Avengers">

segment rationale
segment rationale_author
segment structured_provision

segment section
segment field

report Shield Avengers SokoviaAccords in real-time
    from Person
    when HasSuperPowers
    with type SokoviaAccordsReport

type SokoviaAccordsReport:
    heroName string (1..1) <"Basic type - string">
        [ruleReference HeroName]
    dateOfBirth date (1..1) <"Basic type - date">
        [ruleReference DateOfBirth]
    nationality CountryEnum (1..1) <"Enum type">
        [ruleReference Nationality]
    hasSpecialAbilities boolean (1..1) <"Basic type - boolean">
        [ruleReference SpecialAbilities]
    powers PowerEnum (0..*) <"Enum type - multi cardinality">
        [ruleReference Powers]
    attribute AttributeReport (0..1)  <"Nested report">
    organisations OrganisationReport (0..*) <"Repeatable rule">
        [ruleReference HeroOrganisations]
    notModelled string (1..1) <"Not modelled">
        [ruleReference NotModelled]

type AttributeReport:
    heroInt int (1..1) <"Basic type - int">
        [ruleReference AttributeInt]
    heroNumber number (1..1) <"Basic type - number">
        [ruleReference AttributeNumber]
    heroTime time (1..1) <"Basic type - time">
        [ruleReference AttributeTime]
    heroZonedDateTime zonedDateTime (1..1) <"Record type - zonedDateTime">
        [ruleReference AttributeZonedDateTime]

type OrganisationReport: <"Repeated rule">
    name string (1..1)
        [ruleReference OrganisationName]
    isGovernmentAgency boolean (1..1)
        [ruleReference IsGovernmentAgency]
    country CountryEnum (1..1)
        [ruleReference OrganisationCountry]

eligibility rule HasSuperPowers from Person:
     filter hasSpecialAbilities

reporting rule HeroName from Person: <"Name">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "1" provision "Hero Name."]
    extract name as "Hero Name"

reporting rule DateOfBirth from Person: <"Date of birth">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "2" provision "Date of birth."]
    extract dateOfBirth as "Date of Birth"

reporting rule Nationality from Person: <"Nationality">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "2" provision "Nationality."]
    extract nationality as "Nationality"

reporting rule SpecialAbilities from Person: <"Has Special Abilities">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "3" provision "Has Special Abilities"]
    extract hasSpecialAbilities as "Has Special Abilities"

reporting rule Powers from Person: <"Super Power Name">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "4"  provision "Powers."]
    extract powers as "Powers"

reporting rule AttributeInt from Person: <"Attribute - Int">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "5"  provision "Attribute - Int."]
    extract attribute -> heroInt as "Attribute - Int"

reporting rule AttributeNumber from Person: <"Attribute - Number">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "6"  provision "Attribute - Number."]
    extract attribute -> heroNumber as "Attribute - Number"

reporting rule AttributeZonedDateTime from Person: <"Attribute - ZonedDateTime">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "7"  provision "Attribute - ZonedDateTime."]
    extract attribute -> heroZonedDateTime as "Attribute - ZonedDateTime"

reporting rule AttributeTime from Person: <"Attribute - Time">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "8"  provision "Attribute - Time."]
    extract attribute -> heroTime as "Attribute - Time"

reporting rule HeroOrganisations from Person: <"Has Special Abilities">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "9"  provision "."]
    extract organisations then extract OrganisationReport {
        name: OrganisationName,
        country: OrganisationCountry,
        isGovernmentAgency: IsGovernmentAgency
    } as "Hero Organisations"

reporting rule OrganisationName from Organisation: <"Organisation Name">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "10"  provision "."]
    extract name as "Organisation Name"

reporting rule OrganisationCountry from Organisation: <"Organisation Country">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "11"  provision "."]
    extract country as "Organisation Country"

reporting rule IsGovernmentAgency from Organisation: <"Is Government Agency">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "12"  provision "."]
    extract isGovernmentAgency as "Is Government Agency"

reporting rule NotModelled from Person: <"Not Modelled">
    [regulatoryReference Shield Avengers SokoviaAccords section "1" field "13"  provision "Not Modelled."]
    "Not modelled" as "Not Modelled"




© 2015 - 2024 Weber Informatics LLC | Privacy Policy