forked from s_ranjbar/city_retrofit
21 lines
698 B
Python
21 lines
698 B
Python
"""
|
|
DeUsageParameters model the usage properties for a German building
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
|
"""
|
|
import xmltodict
|
|
from pathlib import Path
|
|
from usage.usage_feeders.helpers.us_function_to_usage import UsFunctionToUsage
|
|
|
|
|
|
class DeUsageParameters:
|
|
def __init__(self, city_objects):
|
|
self._city_objects = city_objects
|
|
|
|
# load De Library
|
|
path = str(Path.cwd() / 'data/usage/de_library.xml')
|
|
with open(path) as xml:
|
|
self._library = xmltodict.parse(xml.read())
|
|
for city_object in city_objects:
|
|
UsFunctionToUsage.function_to_usage(city_object.function)
|