hub/catalogs/construction/nrel_catalog.py

35 lines
883 B
Python

"""
Greenery catalog
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group
Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
"""
import xmltodict
from pathlib import Path
from catalogs.catalog import Catalog
class NrelCatalog(Catalog):
def __init__(self, path):
archetypes = str(Path(path / 'us_archetypes.xml').resolve())
constructions = str(Path(path / 'us_constructions.xml').resolve())
with open(constructions) as xml:
self._constructions = xmltodict.parse(xml.read())
with open(archetypes) as xml:
self._archetypes = xmltodict.parse(xml.read())
self._windows = []
self._materials = []
self._constructions = []
self._archetypes = []
@property
def names(self, category=None):
nam
def entries(self, category=None):
pass
def get_entry(self, name):
pass