Exemplo n.º 1
0
 def wrapped_string(self):
     """Create a string describing the Allegation split over multiple lines."""
     text = ""
     if self.fact:
         text += "\n" + indented("OF:")
         factor_text = indented(self.fact.wrapped_string, tabs=2)
         text += f"\n{str(factor_text)}"
     if self.pleading:
         text += "\n" + indented("FOUND IN:")
         factor_text = indented(str(self.pleading), tabs=2)
         text += f"\n{factor_text}"
     return super().__str__().format(text).strip()
Exemplo n.º 2
0
 def wrapped_string(self):
     """Create a string describing the Evidence split over multiple lines."""
     text = ""
     if self.exhibit:
         text += "\n" + indented("OF:")
         factor_text = indented(self.exhibit.wrapped_string, tabs=2)
         text += f"\n{str(factor_text)}"
     if self.to_effect:
         text += "\n" + indented("INDICATING:")
         factor_text = indented(self.to_effect.wrapped_string, tabs=2)
         text += f"\n{factor_text}"
     return super().__str__().format(text).strip()
Exemplo n.º 3
0
    def wrapped_string(self):
        """Create a string describing the Exhibit split over multiple lines."""
        text = ""
        if self.form:
            text += f"in the FORM {self.form}"
        if self.statement:
            text += "\n" + indented("WITH THE ASSERTION:")
            factor_text = indented(self.statement.wrapped_string, tabs=2)
            text += f"\n{factor_text},"
        if self.statement_attribution:
            text += "\n" + indented(
                f"ATTRIBUTED TO {self.statement_attribution.wrapped_string}")

        return super().__str__().format(text)
Exemplo n.º 4
0
    def __str__(self):

        text = "RESULT:"
        for f in self.outputs:
            text += "\n" + indented(f.wrapped_string)
        if self.inputs:
            text += "\nGIVEN:"
            for f in self.inputs:
                text += "\n" + indented(f.wrapped_string)
        if self.despite:
            text += "\nDESPITE:"
            for f in self.despite:
                text += "\n" + indented(f.wrapped_string)

        return text
Exemplo n.º 5
0
    def str_with_concrete_context(self) -> str:
        """
        Identify this Statement more verbosely, specifying which text is a concrete context factor.

        :returns:
            the same as the __str__ method, but with an added "SPECIFIC CONTEXT" section
        """
        text = str(self)
        concrete_context = [
            factor for factor in self.terms_without_nulls if not factor.generic
        ]
        if any(concrete_context) and not self.generic:
            text += "\n" + indented("SPECIFIC CONTEXT:")
            for factor in concrete_context:
                factor_text = indented(factor.wrapped_string, tabs=2)
                text += f"\n{str(factor_text)}"
        return text
Exemplo n.º 6
0
 def wrapped_string(self):
     """Wrap text in string representation of ``self``."""
     content = str(self.predicate._content_with_terms(self.terms))
     unwrapped = self.predicate._add_truth_to_content(content)
     text = wrapped(super().__str__().format(unwrapped))
     if self.standard_of_proof:
         text += "\n" + indented(
             f"by the STANDARD {self.standard_of_proof}")
     return text
Exemplo n.º 7
0
 def __str__(self):
     mandatory = "MUST" if self.mandatory else "MAY"
     universal = "ALWAYS" if self.universal else "SOMETIMES"
     text = (
         f"the Rule that the court {mandatory} {universal} impose the\n" +
         indented(str(self.procedure)))
     if self.enactments:
         text += "\n  GIVEN the ENACTMENT"
         if len(self.enactments) > 1:
             text += "S"
         text += ":"
         for enactment in self.enactments:
             text += "\n" + indented(str(enactment), tabs=2)
     if self.enactments_despite:
         text += "\n  DESPITE the ENACTMENT"
         if len(self.enactments_despite) > 1:
             text += "S"
         text += ":"
         for despite in self.enactments_despite:
             text += "\n" + indented(str(despite), tabs=2)
     return text
Exemplo n.º 8
0
 def __str__(self):
     action = (
         "consider UNDECIDED"
         if not self.decided
         else ("ACCEPT" if self.rule_valid else "REJECT")
     )
     exclusive = (
         (
             f" that the EXCLUSIVE way to reach "
             f"{self.rule.outputs[0].short_string} is"
         )
         if self.exclusive
         else ""
     )
     rule_text = indented(str(self.rule))
     return wrapped(f"the Holding to {action}{exclusive}") + f"\n{rule_text}"