Skip to content

Commit

Permalink
Update serialise_value.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nora-Olivia-Ammann committed Nov 15, 2024
1 parent 2b31398 commit 8a8ab88
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,26 @@ def serialise(self) -> dict[str, Any]:
return serialised


class SerialiseInterval(SerialiseValue):
"""A IntervalValue to be serialised."""


@dataclass
class Interval:
start: str
end: str

def interval_start(self) -> dict[str, str]: ...

def interval_end(self) -> dict[str, str]: ...

def _to_dict(self, inverval_value: str) -> dict[str, str]:
return {
"@type": "xsd:decimal",
"@value": inverval_value,
}


class SerialiseSimpletext(SerialiseValue):
"""A Simpletext to be serialised."""

Expand Down

0 comments on commit 8a8ab88

Please sign in to comment.