Esempio n. 1
0
class ItemDef(OE.ODMElement):
    OID = T.OID(required=True)
    Name = T.Name(required=True)
    DataType = T.ValueSetString(required=True)
    Length = T.PositiveInteger()
    SignificantDigits = T.NonNegativeInteger()
    SASFieldName = T.SASName()
    SDSVarName = T.SASName()
    Origin = T.String()
    Comment = T.String()
    Description = T.ODMObject(element_class=Description)
    Question = T.ODMObject(element_class=Question)
    ExternalQuestion = T.ODMObject(element_class=ExternalQuestion)
    MeasurementUnitRef = T.ODMListObject(element_class=MeasurementUnitRef)
    RangeCheck = T.ODMListObject(element_class=RangeCheck)
    CodeListRef = T.ODMObject(element_class=CodeListRef)
    Alias = T.ODMListObject(element_class=Alias)
Esempio n. 2
0
class ItemDef(OE.ODMElement):
    """ represents ODM v2.0 ItemDef and can serialize as JSON or XML - ordering of properties matters """
    OID = T.OID(required=True)
    Name = T.Name(required=True)
    DataType = T.ValueSetString(required=True)
    Length = T.PositiveInteger()
    FractionDigits = T.NonNegativeInteger()
    DatasetVarName = T.Name()
    SDSVarName = T.SASName()
    CommentOID = T.String()
    Description = T.ODMObject(element_class=Description)
    Question = T.ODMObject(element_class=Question)
    ExternalQuestion = T.ODMObject(element_class=ExternalQuestion)
    MeasurementUnitRef = T.ODMListObject(element_class=MeasurementUnitRef)
    RangeCheck = T.ODMListObject(element_class=RangeCheck)
    CodeListRef = T.ODMObject(element_class=CodeListRef)
    Alias = T.ODMListObject(element_class=Alias)
Esempio n. 3
0
class ItemGroupDef(OE.ODMElement):
    OID = T.OID(required=True)
    Name = T.Name(required=True)
    Repeating = T.ValueSetString(required=True)
    IsReferenceData = T.ValueSetString(required=False)
    SASDatasetName = T.SASName()
    Domain = T.String()
    Origin = T.String()
    Purpose = T.String()
    Comment = T.String()
    Description = T.ODMObject(element_class=Description)
    ItemRef = T.ODMListObject(element_class=ItemRef)
    Alias = T.ODMListObject(element_class=Alias)

    def __len__(self):
        return len(self.ItemRef)

    def __getitem__(self, position):
        return self.ItemRef[position]

    def __iter__(self):
        return iter(self.ItemRef)