SimpleResource¶
-
class
pyvo.registry.vao.
SimpleResource
(results, index)[source]¶ Bases:
pyvo.dal.query.Record
Deprecated since version 0.5: The SimpleResource class is deprecated and may be removed in a future version.
a dictionary for the resource metadata returned in one record of a registry query.
A SimpleResource acts as a dictionary, so in general, all attributes can be accessed by name via the [] operator, and the attribute names can by returned via the keys() function. For convenience, it also stores key values as properties; these include:
Deprecated since version 0.5: The SimpleResource class is deprecated and may be removed in a future version.
Attributes Summary
accessurl
the URL that can be used to access the service resource. If the capability
the name of the IVOA service capability. This will typically set to contentlevel
a list of content level labels that describe the intended audience description
the textual description of the resource. identifier
the IVOA identifier for the resource. In this interface, this ivoid
the IVOA identifier for the resource. In this interface, this publisher
the name of the organization responsible for providing this resource. shortname
the short name for the resource standardid
the IVOA identifier of the standard that this resource capability subject
a list of the subject keywords that describe this resource tags
a user-friendly label for the resource title
the title of the resource type
a list of the resource types that characterize this resource. waveband
a list of names of the wavebands that the resource provides data for Methods Summary
describe
([verbose, width, file])Print a summary description of this resource. search
(\*args, \*\*keys)assuming this resource refers to a searchable service, execute a to_service
()return an appropriate DALService subclass for this resource that Attributes Documentation
-
accessurl
¶ the URL that can be used to access the service resource. If the resource is not a service, this will typically be blank.
Note that this will always be returned as a native string–i.e. as unicode for Python 3 and as a byte-string for Python 2–making ready to use as a URL with urllib functions.
-
capability
¶ the name of the IVOA service capability. This will typically set to the value of the capability/@xsi:type attribute in the VOResource record (without the namespace prefix).
-
contentlevel
¶ a list of content level labels that describe the intended audience for this resource.
-
description
¶ the textual description of the resource.
See also
-
identifier
¶ the IVOA identifier for the resource. In this interface, this ID may be appended by a #-delimited suffix to point to a particular capability.
-
ivoid
¶ the IVOA identifier for the resource. In this interface, this ID may be appended by a #-delimited suffix to point to a particular capability.
-
publisher
¶ the name of the organization responsible for providing this resource.
-
shortname
¶ the short name for the resource
-
standardid
¶ the IVOA identifier of the standard that this resource capability supports.
-
subject
¶ a list of the subject keywords that describe this resource
a user-friendly label for the resource
-
title
¶ the title of the resource
-
type
¶ a list of the resource types that characterize this resource.
-
waveband
¶ a list of names of the wavebands that the resource provides data for
Methods Documentation
-
describe
(verbose=False, width=78, file=None)[source]¶ Print a summary description of this resource.
Parameters: verbose : bool
If false (default), only user-oriented information is printed; if true, additional information will be printed as well.
width : int
Format the description with given character-width.
out : writable file-like object
If provided, write information to this output stream. Otherwise, it is written to standard out.
-
search
(*args, **keys)[source]¶ assuming this resource refers to a searchable service, execute a search against the resource. This is equivalent to:
>>> self.to_service().search(*args, **keys)
The arguments provided should be appropriate for the service that the DAL service type would expect. See the documentation for the appropriate service type:
Service type Use the argument syntax for catalog pyvo.dal.scs.SCSService.search()
image pyvo.dal.sia.SIAService.search()
spectrum pyvo.dal.ssa.SSAService.search()
line pyvo.dal.sla.SLAService.search()
database not yet supported Raises: RuntimeError
if the resource does not describe a searchable service.
-