예제 #1
0
class Flight(xsd.ComplexType):
    tail_number = xsd.Attribute(xsd.String)
    type = xsd.Attribute(xsd.Integer, use=xsd.Use.OPTIONAL)
    takeoff_airport = xsd.Element(Airport)
    takeoff_datetime = xsd.Element(xsd.DateTime, minOccurs=0)
    landing_airport = xsd.Element(Airport)
    landing_datetime = xsd.Element(xsd.DateTime, minOccurs=0)
예제 #2
0
파일: xsd_test.py 프로젝트: Eveler/dmsic
 def test_attribute_nil(self):
     mixed = xsd.Attribute(xsd.Boolean, nillable=True, use=xsd.Use.OPTIONAL)
     xmlelement = etree.Element('complexType')
     mixed.render(xmlelement, 'mixed', xsd.NIL)
     expected_xml = b'<complexType mixed="nil"/>\n'
     xml = etree.tostring(xmlelement, pretty_print=True)
     self.assertEqual(expected_xml, xml)
예제 #3
0
파일: xsd_test.py 프로젝트: Eveler/dmsic
 def test_attribute_false(self):
     mixed = xsd.Attribute(xsd.Boolean)
     xmlelement = etree.Element('complexType')
     mixed.render(xmlelement, 'mixed', True)
     expected_xml = b'<complexType mixed="true"/>\n'
     xml = etree.tostring(xmlelement, pretty_print=True)
     self.assertEqual(expected_xml, xml)
예제 #4
0
class AsyncProcessingStatusData(xsd.ComplexType):
    INHERITANCE = None
    INDICATOR = xsd.Sequence
    # Id = xsd.Attribute(xsd.ID, use=xsd.Use.OPTIONAL)
    Id = xsd.Attribute(xsd.String, use=xsd.Use.OPTIONAL)
    AsyncProcessingStatus = xsd.Ref(__name__ + '.AsyncProcessingStatus')

    @classmethod
    def create(cls, AsyncProcessingStatus):
        instance = cls()
        instance.AsyncProcessingStatus = AsyncProcessingStatus
        return instance
예제 #5
0
class MessageTypeSelector(xsd.ComplexType):
    INHERITANCE = None
    INDICATOR = xsd.Sequence
    # Id = xsd.Attribute(xsd.ID, use=xsd.Use.OPTIONAL)
    Id = xsd.Attribute(xsd.String, use=xsd.Use.OPTIONAL)
    NamespaceURI = xsd.Element(xsd.AnyURI, minOccurs=0)
    # RootElementLocalName = xsd.Element(xsd.NCName, minOccurs=0)
    RootElementLocalName = xsd.Element(xsd.String, minOccurs=0)
    Timestamp = xsd.Element(xsd.DateTime)
    NodeID = xsd.Element(xsd.String, minOccurs=0)

    @classmethod
    def create(cls, Timestamp):
        instance = cls()
        instance.Timestamp = Timestamp
        return instance
예제 #6
0
class MessageMetadata(xsd.ComplexType):
    INHERITANCE = None
    INDICATOR = xsd.Sequence
    # Id = xsd.Attribute(xsd.ID, use=xsd.Use.OPTIONAL)
    Id = xsd.Attribute(xsd.String, use=xsd.Use.OPTIONAL)
    MessageId = xsd.Element(xsd.String, minOccurs=0)
    MessageType = xsd.Element(MessageTypeType)
    SendingTimestamp = xsd.Element(xsd.DateTime)
    DeliveryTimestamp = xsd.Element(xsd.DateTime, minOccurs=0)
    Status = xsd.Element(__name__ + '.InteractionStatusType', minOccurs=0)

    @classmethod
    def create(cls, MessageType, SendingTimestamp):
        instance = cls()
        instance.MessageType = MessageType
        instance.SendingTimestamp = SendingTimestamp
        return instance
예제 #7
0
class SenderProvidedResponseData(xsd.ComplexType):
    INHERITANCE = None
    INDICATOR = xsd.Sequence
    # Id = xsd.Attribute(xsd.ID, use=xsd.Use.OPTIONAL)
    Id = xsd.Attribute(xsd.String, use=xsd.Use.OPTIONAL)
    MessageID = xsd.Element(xsd.String)
    To = xsd.Element(xsd.String)
    MessagePrimaryContent = xsd.Ref(__name__ + '.MessagePrimaryContent')
    PersonalSignature = xsd.Element(__name__ + '.XMLDSigSignatureType',
                                    minOccurs=0)
    AttachmentHeaderList = xsd.Ref(__name__ + '.AttachmentHeaderList')
    RefAttachmentHeaderList = xsd.Ref(__name__ + '.RefAttachmentHeaderList')
    AsyncProcessingStatus = xsd.Ref(__name__ + '.AsyncProcessingStatus')

    @classmethod
    def create(cls, MessageID, To):
        instance = cls()
        instance.MessageID = MessageID
        instance.To = To
        return instance
예제 #8
0
class Request(xsd.ComplexType):
    INHERITANCE = None
    INDICATOR = xsd.Sequence
    # Id = xsd.Attribute(xsd.ID, use=xsd.Use.OPTIONAL)
    Id = xsd.Attribute(xsd.String, use=xsd.Use.OPTIONAL)
    SenderProvidedRequestData = xsd.Ref(__name__ +
                                        '.SenderProvidedRequestData')
    MessageMetadata = xsd.Ref(__name__ + '.MessageMetadata')
    FSAttachmentsList = xsd.Ref(__name__ + '.FSAttachmentsList')
    ReplyTo = xsd.Element(xsd.String, minOccurs=0)
    SenderInformationSystemSignature = xsd.Element(__name__ +
                                                   '.XMLDSigSignatureType',
                                                   minOccurs=0)

    @classmethod
    def create(cls, SenderProvidedRequestData, MessageMetadata):
        instance = cls()
        instance.SenderProvidedRequestData = SenderProvidedRequestData
        instance.MessageMetadata = MessageMetadata
        return instance
예제 #9
0
class SenderProvidedRequestData(xsd.ComplexType):
    INHERITANCE = None
    INDICATOR = xsd.Sequence
    # Id = xsd.Attribute(xsd.ID, use=xsd.Use.OPTIONAL)
    Id = xsd.Attribute(xsd.String, use=xsd.Use.OPTIONAL)
    MessageID = xsd.Element(xsd.String)
    ReferenceMessageID = xsd.Element(xsd.String, minOccurs=0)
    TransactionCode = xsd.Element(xsd.String, minOccurs=0)
    NodeID = xsd.Element(xsd.String, minOccurs=0)
    EOL = xsd.Element(xsd.DateTime, minOccurs=0)
    MessagePrimaryContent = xsd.Ref(__name__ + '.MessagePrimaryContent')
    PersonalSignature = xsd.Element(__name__ + '.XMLDSigSignatureType',
                                    minOccurs=0)
    AttachmentHeaderList = xsd.Ref(__name__ + '.AttachmentHeaderList')
    RefAttachmentHeaderList = xsd.Ref(__name__ + '.RefAttachmentHeaderList')
    TestMessage = xsd.Element(__name__ + '.Void', minOccurs=0)

    @classmethod
    def create(cls, MessageID, MessagePrimaryContent):
        instance = cls()
        instance.MessageID = MessageID
        instance.MessagePrimaryContent = MessagePrimaryContent
        return instance
예제 #10
0
파일: xsd_test.py 프로젝트: Eveler/dmsic
 class Test(xsd.ComplexType):
     value = xsd.Attribute(xsd.String,
                           nillable=True,
                           use=xsd.Use.OPTIONAL)
예제 #11
0
파일: xsd_test.py 프로젝트: Eveler/dmsic
class TBody(xsd.ComplexType):
    parts = xsd.Attribute(xsd.String)
    tBodyAttributes = xsd.Ref(TBodyAttributes)
예제 #12
0
파일: xsd_test.py 프로젝트: Eveler/dmsic
class TBodyAttributes(xsd.AttributeGroup):
    encodingStyle = xsd.Attribute(xsd.String, use=xsd.Use.OPTIONAL)
    use = xsd.Attribute(xsd.String)
    namespace = xsd.Attribute(xsd.String)
예제 #13
0
파일: xsd_test.py 프로젝트: Eveler/dmsic
 class A(xsd.ComplexType):
     name = xsd.Attribute(xsd.String)
예제 #14
0
파일: xsd_test.py 프로젝트: Eveler/dmsic
 class B(A):
     type = xsd.Attribute(xsd.String)
예제 #15
0
파일: xsd_test.py 프로젝트: Eveler/dmsic
class Aircraft(xsd.ComplexType):
    tail_number = xsd.Attribute(xsd.String)