本文整理汇总了Python中XSDataCommon.XSData类的典型用法代码示例。如果您正苦于以下问题:Python XSData类的具体用法?Python XSData怎么用?Python XSData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了XSData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: buildChildren
def buildChildren(self, child_, nodeName_):
if child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'angle_alpha':
obj_ = XSDataAngle()
obj_.build(child_)
self.setAngle_alpha(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'angle_beta':
obj_ = XSDataAngle()
obj_.build(child_)
self.setAngle_beta(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'angle_gamma':
obj_ = XSDataAngle()
obj_.build(child_)
self.setAngle_gamma(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'length_a':
obj_ = XSDataLength()
obj_.build(child_)
self.setLength_a(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'length_b':
obj_ = XSDataLength()
obj_.build(child_)
self.setLength_b(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'length_c':
obj_ = XSDataLength()
obj_.build(child_)
self.setLength_c(obj_)
XSData.buildChildren(self, child_, nodeName_)
示例2: buildChildren
def buildChildren(self, child_, nodeName_):
if child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'title':
obj_ = XSDataString()
obj_.build(child_)
self.setTitle(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'long_name':
obj_ = XSDataString()
obj_.build(child_)
self.setLong_name(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'axis':
obj_ = XSDataNexusAxis()
obj_.build(child_)
self.axis.append(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'data':
obj_ = XSDataArray()
obj_.build(child_)
self.setData(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'signal':
obj_ = XSDataInteger()
obj_.build(child_)
self.setSignal(obj_)
XSData.buildChildren(self, child_, nodeName_)
示例3: buildChildren
def buildChildren(self, child_, nodeName_):
if child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'atom':
obj_ = XSDataAtom()
obj_.build(child_)
self.atom.append(obj_)
XSData.buildChildren(self, child_, nodeName_)
示例4: buildChildren
def buildChildren(self, child_, nodeName_):
if child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'plot':
obj_ = XSDataPlot()
obj_.build(child_)
self.plot.append(obj_)
XSData.buildChildren(self, child_, nodeName_)
示例5: buildChildren
def buildChildren(self, child_, nodeName_):
if child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'idN':
obj_ = XSDataString()
obj_.build(child_)
self.setIdN(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'dirN':
obj_ = XSDataFile()
obj_.build(child_)
self.setDirN(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'templateN':
obj_ = XSDataString()
obj_.build(child_)
self.setTemplateN(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'fromN':
obj_ = XSDataInteger()
obj_.build(child_)
self.setFromN(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'toN':
obj_ = XSDataInteger()
obj_.build(child_)
self.setToN(obj_)
XSData.buildChildren(self, child_, nodeName_)
示例6: exportChildren
def exportChildren(self, outfile, level, name_='XSDataXDSDetector'):
XSData.exportChildren(self, outfile, level, name_)
if self.__detector_name is not None:
self.detector_name.export(outfile, level, name_='detector_name')
else:
warnEmptyAttribute("detector_name", "XSDataString")
if self.__image_format is not None:
self.image_format.export(outfile, level, name_='image_format')
else:
warnEmptyAttribute("image_format", "XSDataString")
if self.__nx is not None:
self.nx.export(outfile, level, name_='nx')
else:
warnEmptyAttribute("nx", "XSDataInteger")
if self.__ny is not None:
self.ny.export(outfile, level, name_='ny')
else:
warnEmptyAttribute("ny", "XSDataInteger")
if self.__qx is not None:
self.qx.export(outfile, level, name_='qx')
else:
warnEmptyAttribute("qx", "XSDataDouble")
if self.__qy is not None:
self.qy.export(outfile, level, name_='qy')
else:
warnEmptyAttribute("qy", "XSDataDouble")
示例7: __init__
def __init__(self, graph=None, ytitle=None, xtitle=None, keypos=None, ymax=None, xmax=None, ymin=None, xmin=None, ysize=None, xsize=None, subTitle=None, title=None, plotType=None):
XSData.__init__(self, )
checkType("XSDataPlot", "Constructor of XSDataPlot", plotType, "string")
self.__plotType = plotType
checkType("XSDataPlot", "Constructor of XSDataPlot", title, "string")
self.__title = title
checkType("XSDataPlot", "Constructor of XSDataPlot", subTitle, "string")
self.__subTitle = subTitle
checkType("XSDataPlot", "Constructor of XSDataPlot", xsize, "double")
self.__xsize = xsize
checkType("XSDataPlot", "Constructor of XSDataPlot", ysize, "double")
self.__ysize = ysize
checkType("XSDataPlot", "Constructor of XSDataPlot", xmin, "double")
self.__xmin = xmin
checkType("XSDataPlot", "Constructor of XSDataPlot", ymin, "double")
self.__ymin = ymin
checkType("XSDataPlot", "Constructor of XSDataPlot", xmax, "double")
self.__xmax = xmax
checkType("XSDataPlot", "Constructor of XSDataPlot", ymax, "double")
self.__ymax = ymax
checkType("XSDataPlot", "Constructor of XSDataPlot", keypos, "string")
self.__keypos = keypos
checkType("XSDataPlot", "Constructor of XSDataPlot", xtitle, "string")
self.__xtitle = xtitle
checkType("XSDataPlot", "Constructor of XSDataPlot", ytitle, "string")
self.__ytitle = ytitle
if graph is None:
self.__graph = []
else:
checkType("XSDataPlot", "Constructor of XSDataPlot", graph, "list")
self.__graph = graph
示例8: exportChildren
def exportChildren(self, outfile, level, name_='XSDataNexusAxis'):
XSData.exportChildren(self, outfile, level, name_)
if self._title is not None:
self.title.export(outfile, level, name_='title')
else:
warnEmptyAttribute("title", "XSDataString")
if self._axis is not None:
self.axis.export(outfile, level, name_='axis')
else:
warnEmptyAttribute("axis", "XSDataInteger")
if self._primary is not None:
self.primary.export(outfile, level, name_='primary')
else:
warnEmptyAttribute("primary", "XSDataInteger")
if self._units is not None:
self.units.export(outfile, level, name_='units')
else:
warnEmptyAttribute("units", "XSDataString")
if self._long_name is not None:
self.long_name.export(outfile, level, name_='long_name')
else:
warnEmptyAttribute("long_name", "XSDataString")
if self._axisData is not None:
self.axisData.export(outfile, level, name_='axisData')
else:
warnEmptyAttribute("axisData", "XSDataArray")
示例9: exportChildren
def exportChildren(self, outfile, level, name_='XSDataXOalignCell'):
XSData.exportChildren(self, outfile, level, name_)
if self._angle_alpha is not None:
self.angle_alpha.export(outfile, level, name_='angle_alpha')
else:
warnEmptyAttribute("angle_alpha", "XSDataAngle")
if self._angle_beta is not None:
self.angle_beta.export(outfile, level, name_='angle_beta')
else:
warnEmptyAttribute("angle_beta", "XSDataAngle")
if self._angle_gamma is not None:
self.angle_gamma.export(outfile, level, name_='angle_gamma')
else:
warnEmptyAttribute("angle_gamma", "XSDataAngle")
if self._length_a is not None:
self.length_a.export(outfile, level, name_='length_a')
else:
warnEmptyAttribute("length_a", "XSDataLength")
if self._length_b is not None:
self.length_b.export(outfile, level, name_='length_b')
else:
warnEmptyAttribute("length_b", "XSDataLength")
if self._length_c is not None:
self.length_c.export(outfile, level, name_='length_c')
else:
warnEmptyAttribute("length_c", "XSDataLength")
示例10: buildChildren
def buildChildren(self, child_, nodeName_):
if child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'detector_name':
obj_ = XSDataString()
obj_.build(child_)
self.setDetector_name(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'image_format':
obj_ = XSDataString()
obj_.build(child_)
self.setImage_format(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'nx':
obj_ = XSDataInteger()
obj_.build(child_)
self.setNx(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'ny':
obj_ = XSDataInteger()
obj_.build(child_)
self.setNy(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'qx':
obj_ = XSDataDouble()
obj_.build(child_)
self.setQx(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'qy':
obj_ = XSDataDouble()
obj_.build(child_)
self.setQy(obj_)
XSData.buildChildren(self, child_, nodeName_)
示例11: __init__
def __init__(self, atom=None):
XSData.__init__(self, )
if atom is None:
self.__atom = []
else:
checkType("XSDataAtomicComposition", "Constructor of XSDataAtomicComposition", atom, "list")
self.__atom = atom
示例12: buildChildren
def buildChildren(self, child_, nodeName_):
if child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'b':
obj_ = XSDataBoolean()
obj_.build(child_)
self.setB(obj_)
XSData.buildChildren(self, child_, nodeName_)
示例13: buildChildren
def buildChildren(self, child_, nodeName_):
if child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'beamCentreX':
obj_ = XSDataLength()
obj_.build(child_)
self.setBeamCentreX(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'beamCentreY':
obj_ = XSDataLength()
obj_.build(child_)
self.setBeamCentreY(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'distance':
obj_ = XSDataLength()
obj_.build(child_)
self.setDistance(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'mosaicity':
obj_ = XSDataAngle()
obj_.build(child_)
self.setMosaicity(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'selectedSolutionNumber':
obj_ = XSDataInteger()
obj_.build(child_)
self.setSelectedSolutionNumber(obj_)
elif child_.nodeType == Node.ELEMENT_NODE and \
nodeName_ == 'labelitScreenSolution':
obj_ = XSDataLabelitScreenSolution()
obj_.build(child_)
self.labelitScreenSolution.append(obj_)
XSData.buildChildren(self, child_, nodeName_)
示例14: exportChildren
def exportChildren(self, outfile, level, name_='XSDataQuery'):
XSData.exportChildren(self, outfile, level, name_)
for item_ in self.getItem():
item_.export(outfile, level, name_='item')
if self.getItem() == []:
warnEmptyAttribute("item", "XSDataString")
if self.__removeItems is not None:
self.removeItems.export(outfile, level, name_='removeItems')
示例15: __init__
def __init__(self, removeItems=None, item=None):
XSData.__init__(self, )
if item is None:
self.__item = []
else:
checkType("XSDataQuery", "Constructor of XSDataQuery", item, "list")
self.__item = item
checkType("XSDataQuery", "Constructor of XSDataQuery", removeItems, "XSDataBoolean")
self.__removeItems = removeItems