Skip to content

Commit

Permalink
REF: RAVENSData -> RavensImport
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudocubic committed Dec 18, 2024
1 parent 6394826 commit 0eba450
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ravens/xml/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .opendss2xml import DssExport
from .ravens2xml import RavensExport
from .xml2ravens import RavensImport
6 changes: 3 additions & 3 deletions ravens/xml/xml2ravens.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ def __iter__(self):
return iter(self.paths)


class RAVENSData:
class RavensImport:
def __init__(self, cim_profile_path: pathlib.PosixPath, schema_template: SchemaTemplate = None, prune_unncessary=False):
g = Graph()
self.rdf = g.parse("examples/IEEE13_Assets.xml", format="application/rdf+xml", publicID="urn:uuid:")
self.rdf = g.parse(cim_profile_path, format="application/rdf+xml", publicID="urn:uuid:")

self.cim_ns = "http://iec.ch/TC57/CIM100"
self.rdf_type = URIRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")
Expand Down Expand Up @@ -597,6 +597,6 @@ def dump(self, file_path: pathlib.PosixPath, indent=None):
if __name__ == "__main__":
pathlib.Path("out").mkdir(parents=True, exist_ok=True)

d = RAVENSData("examples/IEEE13_Assets.xml")
d = RavensImport("examples/IEEE13_Assets.xml")

d.dump("out/IEEE13_Assets.json", indent=2)

0 comments on commit 0eba450

Please sign in to comment.