def __init__(self, basefile, collname, backend_root): BaseElement.__init__(self, basefile) self.filename = basefile["filename"] #TODO: move this out so that collname and backend_root can be dropped self.path = join(backend_root, collname, self.filename) self.versions = {} for version in iglob(self.path + ".*"): ext = splitext(version)[1][1:] self.versions[ext] = version
def __init__(self,basefile,collname,backend_root): BaseElement.__init__(self,basefile) self.filename = basefile["filename"] #TODO: move this out so that collname and backend_root can be dropped self.path = join(backend_root,collname,self.filename) self.versions = {} for version in iglob(self.path + ".*"): ext = splitext(version)[1][1:] self.versions[ext] = version
def __init__(self,basefile,collname,backend_root): BaseElement.__init__(self,basefile,collname) self.collection = collname self.filename = basefile["filename"] self.path = join(backend_root,collname,self.filename) self.classids = basefile["classids"] self.versions = {} for version in iglob(self.path + ".*"): ext = splitext(version)[1][1:] self.versions[ext] = version
def __init__(self, mod, basefile, collname): check_schema(mod, "basemodule", ["name", "arguments", "classids"], ["parameters", "connectors"]) check_schema(basefile, "basemodule", ["filename", "author", "license", "type", "modules"], ["source"]) BaseElement.__init__(self, basefile) self.name = mod["name"] self.arguments = mod["arguments"] self.classids = mod["classids"] self.parameters = Parameters(mod.get("parameters", {"types": {}}))
def __init__(self,mod,basefile,collname): check_schema(mod,"basemodule", ["name", "arguments","classids"], ["parameters","connectors"]) check_schema(basefile,"basemodule", ["filename","author","license","type","modules"], ["source"]) BaseElement.__init__(self,basefile) self.name = mod["name"] self.arguments = mod["arguments"] self.classids = mod["classids"] self.parameters = Parameters(mod.get("parameters",{"types" : {}}))
def __init__(self,basefile,collname,backend_root): BaseElement.__init__(self,basefile,collname) check_schema(basefile,"drawing", ["filename","author","license","type","classids"], ["source"] ) self.collection = collname self.filename = basefile["filename"] self.path = join(backend_root,collname,self.filename) self.classids = basefile["classids"] self.versions = {} for version in iglob(self.path + ".*"): ext = splitext(version)[1][1:] self.versions[ext] = version
def __init__(self, designtable, collname, backend_root): BaseElement.__init__(self, designtable, collname) check_schema(designtable, "basesolidworks", [ "filename", "author", "license", "type", "suffix", "params", "classes" ], ["source", "metadata"]) self.filename = designtable["filename"] self.path = join(backend_root, collname, self.filename) self.suffix = designtable["suffix"] self.outname = "%s-%s.xls" % (splitext(self.filename)[0], self.suffix) self.params = designtable["params"] self.metadata = designtable.get("metadata", {}) self.classes = [] for cl in designtable["classes"]: self.classes.append(DesignTableClass(cl))
def __init__(self,designtable,collname,backend_root): BaseElement.__init__(self,designtable,collname) check_schema(designtable,"basesolidworks", ["filename","author","license","type","suffix","params","classes"], ["source","metadata"] ) self.filename = designtable["filename"] self.path = join(backend_root,collname,self.filename) self.suffix = designtable["suffix"] self.outname = "%s-%s.xls" % (splitext(self.filename)[0],self.suffix) self.params = designtable["params"] self.metadata = designtable.get("metadata",{}) self.classes = [] for cl in designtable["classes"]: self.classes.append(DesignTableClass(cl))
def __init__(self,basefile,collname): BaseElement.__init__(self,basefile) self.filename = basefile["filename"] self.path = join(collname,self.filename)
def __init__(self,basefile,collname,backend_root): BaseElement.__init__(self,basefile,collname) self.filename = basefile["filename"] self.path = join(backend_root,collname,self.filename)
def __init__(self, basefile, collname): BaseElement.__init__(self, basefile) self.filename = basefile["filename"] self.path = join(collname, self.filename)
def __init__(self,basefile,collname,backend_root): BaseElement.__init__(self,basefile) self.filename = basefile["filename"] self.path = join(backend_root,collname,self.filename)