Commit a7e85415 authored by Jiahang Chen's avatar Jiahang Chen
Browse files

clear up values

parent f9396be8
Pipeline #339886 passed with stage
in 14 seconds
from modelling_language.ml40.feature.property.value import Value
from ml.ml40.features.properties.values.value import Value
class DBH(Value):
def __init__(self, name, ref_managing_actor, dbh: float):
super(DBH, self).__init__(name=name,
ref_managing_actor=ref_managing_actor)
self.dbh = dbh
\ No newline at end of file
self.__dbh = dbh
@property
def dbh(self):
return self.__dbh
@dbh.setter
def dbh(self, value):
self.__dbh = value
\ No newline at end of file
......@@ -6,4 +6,12 @@ def __init__(self, name, ref_managing_actor, woodPiles: list):
super(LogTransportationJob, self).__init__(
name=name,
ref_managing_actor=ref_managing_actor)
self.woodPiles = woodPiles
self.__woodPiles = woodPiles
@property
def woodPiles(self):
return self.__woodPiles
@woodPiles.setter
def woodPiles(self, value):
self.__woodPiles.append(value)
from modelling_language.ml40.feature.property.value.document.report import Report
from ml.ml40.features.properties.values.documents.reports.report import Report
class AfforestationSuggestion(Report):
......
from modelling_language.ml40.feature.property.value.document.report import Report
from ml.ml40.features.properties.values.documents.reports.report import Report
class FellingSupportSuggestion(Report):
......
from modelling_language.ml40.feature.property.value.document.report import Report
from ml.ml40.features.properties.values.documents.reports.report import Report
class LogTransportationReport(Report):
......
from modelling_language.ml40.feature.property.value.document.report import Report
from ml.ml40.features.properties.values.documents.reports.report import Report
class SoilMoistureMeasurement(Report):
......
from modelling_language.fml40.feature.property.value import AbstractInventory
from modelling_language.ml40.feature.property.value import Value
from ml.fml40.features.properties.values.abstract_inventory import AbstractInventory
from ml.ml40.features.properties.values.value import Value
class InventoryData(Value):
def __init__(self):
self._data = []
def __init__(self, name, ref_managing_actor):
super(InventoryData, self).__init__(name=name,
ref_managing_actor=ref_managing_actor)
self.__data = []
@property
def data(self):
return self._data
return self.__data
@data.setter
def data(self, value: AbstractInventory):
self._data.append(value)
self.__data.append(value)
from modelling_language.ml40.feature.property.value import Value
from ml.ml40.features.properties.values.value import Value
class StemSegmentProperties(Value):
......@@ -6,8 +6,39 @@ def __init__(self, name, ref_managing_actor,
diameter: float, length: float, quality: str, woodType: str):
super(StemSegmentProperties, self).__init__(name=name,
ref_managing_actor=ref_managing_actor)
self.diameter = diameter
self.length = length
self.quality = quality
self.woodType = woodType
self.__diameter = diameter
self.__length = length
self.__quality = quality
self.__woodType = woodType
@property
def diameter(self):
return self.__diameter
@diameter.setter
def diameter(self, value):
self.__diameter = value
@property
def length(self):
return self.__length
@length.setter
def length(self, value):
self.__length = value
@property
def quality(self):
return self.__quality
@quality.setter
def quality(self, value):
self.__quality = value
@property
def woodType(self):
return self.__woodType
@woodType.setter
def woodType(self, value):
self.__woodType = value
from modelling_language.ml40.feature.property.value import Value
from ml.ml40.features.properties.values.value import Value
class Tilt(Value):
......@@ -6,5 +6,21 @@ def __init__(self, name, ref_managing_actor,
direction: float, tilt: float):
super(Tilt, self).__init__(name=name,
ref_managing_actor=ref_managing_actor)
self.direction = direction
self.tilt = tilt
self.__direction = direction
self.__tilt = tilt
@property
def direction(self):
return self.__direction
@direction.setter
def direction(self, value):
self.__direction = value
@property
def tilt(self):
return self.__tilt
@tilt.setter
def tilt(self, value):
self.__tilt = value
from modelling_language.ml40.feature.property.value import Value
from ml.ml40.features.properties.values.value import Value
class TreeData(Value):
pass
def __init__(self, name, ref_managing_actor):
super(TreeData, self).__init__(name=name,
ref_managing_actor=ref_managing_actor)
from modelling_language.ml40.feature.property.value import Value
from ml.ml40.features.properties.values.value import Value
class TreeType(Value):
def __init__(self, name, ref_managing_ref, conifer: bool):
def __init__(self, name, ref_managing_actor, conifer: bool):
super(TreeType, self).__init__(name=name,
ref_managing_ref=ref_managing_ref)
self.conifer = conifer
\ No newline at end of file
ref_managing_actor=ref_managing_actor)
self.__conifer = conifer
@property
def conifer(self):
return self.__conifer
@conifer.setter
def conifer(self, value):
self.__conifer = value
from ml.ml40.feature.properties.value.document.job import Job
from ml.ml40.features.properties.values.documents.jobs.job import Job
class GenericJob(Job):
......
......@@ -3,10 +3,10 @@
class Job(Document):
def __init__(self, name, ref_managing_actor):
def __init__(self, name, ref_managing_actor, job_status: JobStatus):
super(Job, self).__init__(name=name,
ref_managing_actor=ref_managing_actor)
self.__status = JobStatus(0)
self.__status = job_status
@property
def status(self):
......
......@@ -5,4 +5,12 @@ class JobList(Job):
def __init__(self, name, ref_managing_actor):
super(JobList, self).__init__(name=name,
ref_managing_actor=ref_managing_actor)
self.jobs = list()
self.__jobs = list()
@property
def jobs(self):
return self.__jobs
@jobs.setter
def jobs(self, value):
self.__jobs.append(value)
\ No newline at end of file
from ml.ml40.features.properties.property import Property
import copy
class Value(Property):
def __init__(self, name, ref_managing_actor):
super(Value, self).__init__(name=name, ref_managing_actor=ref_managing_actor)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment