Ejemplo n.º 1
0
    def __init__(
        self, config=None, pos=None, _name='tableset', version='1.1', **kwargs
    ):
        HomogeneousList.__init__(self, TableSchema)
        Element.__init__(self, config, pos, _name, **kwargs)

        self._version = version
Ejemplo n.º 2
0
    def __init__(self, config=None, pos=None, **kwargs):
        super(Language, self).__init__(config=config, pos=pos, **kwargs)

        self.name = None
        self._versions = HomogeneousList(Version)
        self.description = None
        self._languagefeaturelists = HomogeneousList(LanguageFeatureList)
Ejemplo n.º 3
0
    def __init__(
        self, config=None, pos=None, _name='languageFeatures', **kwargs
    ):
        Element.__init__(self, config, pos, _name, **kwargs)
        HomogeneousList.__init__(self, LanguageFeature)

        self.type = kwargs.get('type')
        self._features = HomogeneousList(LanguageFeature)
Ejemplo n.º 4
0
    def __init__(self, config=None, pos=None, _name='schema', **kwargs):
        HomogeneousList.__init__(self, Table)
        Element.__init__(self, config, pos, _name, **kwargs)

        self._name = None
        self._title = None
        self._description = None
        self._utype = None
Ejemplo n.º 5
0
    def __init__(
        self, config=None, pos=None, _name='languageFeatures', **kwargs
    ):
        Element.__init__(self, config, pos, _name, **kwargs)
        HomogeneousList.__init__(self, LanguageFeature)

        self.type = kwargs.get('type')
        self._features = HomogeneousList(LanguageFeature)
Ejemplo n.º 6
0
    def __init__(self, config=None, pos=None, _name='capability', **kwargs):
        super(TableAccess, self).__init__(config, pos, _name, **kwargs)

        self._datamodels = HomogeneousList(DataModelType)
        self._languages = HomogeneousList(Language)
        self._outputformats = HomogeneousList(OutputFormat)
        self._uploadmethods = HomogeneousList(UploadMethod)
        self.retentionperiod = None
        self.executionduration = None
        self.outputlimit = None
        self.uploadlimit = None
Ejemplo n.º 7
0
    def __init__(self,
                 config=None,
                 pos=None,
                 _name='capability',
                 standardID=None,
                 **kwargs):
        super(Capability, self).__init__(config, pos, _name, **kwargs)

        self._description = None
        self._standardid = standardID

        self._validationlevels = HomogeneousList(ValidationLevel)
        self._interfaces = HomogeneousList(Interface)
Ejemplo n.º 8
0
    def __init__(
        self, config=None, pos=None, _name='table', version='1.1', **kwargs
    ):
        super().__init__(config, pos, _name, **kwargs)

        self._name = None
        self._title = None
        self._description = None
        self._utype = None
        self._type = kwargs.get("type")
        self._version = version

        self._columns = HomogeneousList(TableParam)
        self._foreignkeys = HomogeneousList(ForeignKey)
Ejemplo n.º 9
0
    def __init__(self, config=None, pos=None, _name='', std=None, **kwargs):
        super().__init__(
                config=config, pos=pos, _name=_name, **kwargs)

        self._datatype = None
        self._flags = HomogeneousList(str)
        self._std = _convert_boolean(std)
Ejemplo n.º 10
0
    def __init__(self, config=None, pos=None, _name='foreignKey', **kwargs):
        Element.__init__(self, config, pos, _name, **kwargs)

        self._targettable = None
        self._fkcolumns = HomogeneousList(FKColumn)
        self._description = None
        self._utype = None
Ejemplo n.º 11
0
    def __init__(self, config=None, pos=None, **kwargs):
        super().__init__(config=config, pos=pos, **kwargs)

        ivo_id = kwargs.get('ivo-id')

        self.mime = None
        self._aliases = HomogeneousList(str)
        self.ivo_id = ivo_id
Ejemplo n.º 12
0
    def __init__(self, config=None, pos=None, _name='availability', **kwargs):
        super(Availability, self).__init__(config, pos, _name, **kwargs)

        self._available = None
        self._upsince = None
        self._downat = None
        self._backat = None
        self._notes = HomogeneousList(six.text_type)
Ejemplo n.º 13
0
    def __init__(self, config=None, pos=None, _name='', **kwargs):
        super(ParamHTTP, self).__init__(config=config,
                                        pos=pos,
                                        _name=_name,
                                        **kwargs)

        self._querytypes = HomogeneousList(six.text_type)
        self._resulttype = None
Ejemplo n.º 14
0
    def __init__(self, config=None, pos=None, **kwargs):
        super(OutputFormat, self).__init__(config=config, pos=pos, **kwargs)

        ivo_id = kwargs.get('ivo-id')

        self.mime = None
        self._aliases = HomogeneousList(six.text_type)
        self.ivo_id = ivo_id
Ejemplo n.º 15
0
    def __init__(self,
                 config=None,
                 pos=None,
                 _name='interface',
                 version='1.0',
                 role=None,
                 **kwargs):
        super(Interface, self).__init__(config, pos, _name, **kwargs)

        self._xsi_type = kwargs.get('xsi:type')

        self._version = version
        self._role = role
        self._resulttype = None

        self._accessurls = HomogeneousList(AccessURL)
        self._securitymethods = HomogeneousList(SecurityMethod)
Ejemplo n.º 16
0
def test_exception_logging_origin():
    # The point here is to get an exception raised from another location
    # and make sure the error's origin is reported correctly

    from astropy.utils.collections import HomogeneousList

    l = HomogeneousList(int)  # noqa
    try:
        log.enable_exception_logging()
        with log.log_to_list() as log_list:
            l.append('foo')
    except TypeError as exc:
        sys.excepthook(*sys.exc_info())
        assert exc.args[0].startswith(
            "homogeneous list must contain only objects of type ")
    else:
        assert False
    assert len(log_list) == 1
    assert log_list[0].levelname == 'ERROR'
    assert log_list[0].message.startswith(
        "TypeError: homogeneous list must contain only objects of type ")
    assert log_list[0].origin == 'astropy.utils.collections'
Ejemplo n.º 17
0
def test_exception_logging_origin():
    # The point here is to get an exception raised from another location
    # and make sure the error's origin is reported correctly

    from astropy.utils.collections import HomogeneousList

    l = HomogeneousList(int)
    try:
        log.enable_exception_logging()
        with log.log_to_list() as log_list:
            l.append('foo')
    except TypeError as exc:
        sys.excepthook(*sys.exc_info())
        assert exc.args[0].startswith(
            "homogeneous list must contain only objects of type ")
    else:
        assert False
    assert len(log_list) == 1
    assert log_list[0].levelname == 'ERROR'
    assert log_list[0].message.startswith(
        "TypeError: homogeneous list must contain only objects of type ")
    assert log_list[0].origin == 'astropy.utils.collections'
Ejemplo n.º 18
0
 def __init__(self, config=None, pos=None, _name='parameters', **kwargs):
     HomogeneousList.__init__(self, Parameter)
     UWSElement.__init__(self, config, pos, _name, **kwargs)
Ejemplo n.º 19
0
 def __init__(self, config=None, pos=None, _name='parameters', **kwargs):
     """ """
     # Note: Above is a load-bearing empty comment.
     # Do not remove, or else the Sphinx build may fail (see PR #193).
     HomogeneousList.__init__(self, Parameter)
     UWSElement.__init__(self, config, pos, _name, **kwargs)
Ejemplo n.º 20
0
    def __init__(self, config=None, pos=None, _name='interface', **kwargs):
        super().__init__(config, pos, _name, **kwargs)

        self._wsdlurls = HomogeneousList(str)
Ejemplo n.º 21
0
    def __init__(self, config=None, pos=None, _name='interface', **kwargs):
        super(WebService, self).__init__(config, pos, _name, **kwargs)

        self._wsdlurls = HomogeneousList(six.text_type)
Ejemplo n.º 22
0
Archivo: tree.py Proyecto: trjaffe/pyvo
 def __init__(self, config=None, pos=None, _name='jobs', **kwargs):
     HomogeneousList.__init__(self, JobSummary)
     UWSElement.__init__(self, config, pos, _name, **kwargs)
Ejemplo n.º 23
0
 def __init__(self, config=None, pos=None, _name='capabilities', **kwargs):
     Element.__init__(self, config=config, pos=pos, **kwargs)
     HomogeneousList.__init__(self, vr.Capability)
Ejemplo n.º 24
0
 def __init__(self, config=None, pos=None, _name='parameters', **kwargs):
     HomogeneousList.__init__(self, Parameter)
     UWSElement.__init__(self, config, pos, _name, **kwargs)
Ejemplo n.º 25
0
 def __init__(self, config=None, pos=None, _name='results', **kwargs):
     HomogeneousList.__init__(self, Result)
     UWSElement.__init__(self, config, pos, _name, **kwargs)
Ejemplo n.º 26
0
 def __init__(self, config=None, pos=None, _name='results', **kwargs):
     HomogeneousList.__init__(self, Result)
     UWSElement.__init__(self, config, pos, _name, **kwargs)
Ejemplo n.º 27
0
    def __init__(self, config=None, pos=None, _name='', **kwargs):
        super().__init__(config=config, pos=pos, _name=_name, **kwargs)

        self._querytypes = HomogeneousList(str)
        self._resulttype = None