code stringlengths 1 18.2k |
|---|
def delete_activity(self, activity_id=None): """Deletes the Activity identified by the given Id. arg: activityId (osid.id.Id): the Id of the Activity to delete raise: NotFound - an Activity was not found identified by the given Id raise: NullArgument - activityId is null raise: OperationFailed - unable to complete requ... |
def can_lookup_objective_banks(self): """Tests if this user can perform ObjectiveBank lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may o... |
def get_objective_bank(self, objective_bank_id=None): """Gets the ObjectiveBank specified by its Id. In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned ObjectiveBank may have a different Id than requested, such as the case where a duplicate Id was assigned to a ObjectiveBank and retai... |
def get_objective_banks_by_ids(self, objective_bank_ids=None): """Gets a ObjectiveBankList corresponding to the given IdList. In plenary mode, the returned list contains all of the objective banks specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list... |
is None: raise NullArgument() banks = [] # The following runs really slow. Perhaps get all banks and then inspect result for ids for i in objective_bank_ids: bank = None url_path = construct_url('objective_banks', bank_id=i) try: bank = self._get_request(url_path) except (NotFound, OperationFailed): if self._objective_... |
def get_objective_banks_by_genus_type(self, objective_bank_genus_type=None): """Gets a ObjectiveBankList corresponding to the given objective bank genus Type which does not include objective banks of types derived from the specified Type. In plenary mode, the returned list contains all known objective banks or an error... |
def _record_extension(self, bank_id, key, value): """ To structure a record extension property bean """ record_bean = { 'value': value, 'displayName': self._text_bean(key), 'description': self._text_bean(key), 'displayLabel': self._text_bean(key), 'associatedId': str(bank_id) } return record_bean |
def get_objective_bank_form_for_create(self, objective_bank_record_types=None): """Gets the objective bank form for creating new objective banks. A new form should be requested for each create transaction. arg: objectiveBankRecordTypes (osid.type.Type): array of objective bank record types return: (osid.learning.Object... |
def create_objective_bank(self, objective_bank_form=None): """Creates a new ObjectiveBank. arg: objectiveBankForm (osid.learning.ObjectiveBankForm): the form for this ObjectiveBank return: (osid.learning.ObjectiveBankForm) - the new ObjectiveBank raise: IllegalState - objectiveBankForm already used in a create transact... |
ObjectiveBanks') try: if self._forms[objective_bank_form.get_id().get_identifier()] == CREATED: raise IllegalState('form already used in a create transaction') except KeyError: raise Unsupported('form did not originate from this session') if not objective_bank_form.is_valid(): raise InvalidArgument('one or more of the ... |
def can_update_objective_banks(self, objective_bank_id=None): # This should not have objective_bank_id argument! """Tests if this user can update ObjectiveBanks. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an ObjectiveBank will result in a Permissi... |
def get_objective_bank_form_for_update(self, objective_bank_id=None): """Gets the objective bank form for updating an existing objective bank. A new objective bank form should be requested for each update transaction. arg: objectiveBankId (osid.id.Id): the Id of the ObjectiveBank return: (osid.learning.ObjectiveBankFor... |
def get_objective_bank_record_types(self): """Gets the objective bank types available in Handcar. arg: None return: (osid.type.TypeList) - list of objective bank types raise: NotFound - objectiveBankTypes is not found raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure co... |
def update_objective_bank(self, objective_bank_form=None): """Updates an existing objective bank. arg: objectiveBankForm (osid.learning.ObjectiveBankForm): the form containing the elements to be updated raise: IllegalState - objectiveBankForm already used in an update transaction raise: InvalidArgument - the form conta... |
== UPDATED: raise IllegalState('form already used in an update transaction') except KeyError: raise Unsupported('form did not originate from this session') if not objective_bank_form.is_valid(): raise InvalidArgument('one or more of the form elements is invalid') url_path = construct_url('objective_banks') try: result ... |
def can_delete_objective_banks(self, objective_bank_id=None): # This should not have objective_bank_id argument! """Tests if this user can delete objective banks. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an ObjectiveBank will result in a Permiss... |
def delete_objective_bank(self, objective_bank_id=None): """Deletes an ObjectiveBank. arg: objectiveBankId (osid.id.Id): the Id of the ObjectiveBank to remove raise: NotFound - objectiveBankId not found raise: NullArgument - objectiveBankId is null raise: OperationFailed - unable to complete request raise: PermissionDe... |
def get_root_objective_bank_ids(self, alias): """Gets the root objective bank Ids in this hierarchy. return: (osid.id.IdList) - the root objective bank Ids raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure compliance: mandatory - This method must be implemented. """ url... |
def get_objective_bank_nodes(self, objective_bank_id=None, ancestor_levels=None, descendant_levels=None, include_siblings=None): """Gets a portion of the hierarchy for the given objective bank. arg: includeSiblings (boolean): true to include the siblings of the given node, false to omit the siblings return: (osid.learn... |
def create_objective_bank_hierarchy(self, alias, desc, genus): """ Create a bank hierarchy with the given alias :param alias: :return: """ url_path = self._urls.hierarchy() data = { 'id': re.sub(r'[ ]', '', alias.lower()), 'displayName': { 'text': alias }, 'description': { 'text': desc }, 'genusTypeId': str(genus) } re... |
def delete_objective_bank_hierarchy(self, alias): """ Delete this bank hierarchy :param alias: :return: """ url_path = self._urls.hierarchy(alias) return self._delete_request(url_path) |
def get_objective_bank_hierarchy(self, alias): """Gets the hierarchy associated with this session. return: (osid.hierarchy.Hierarchy) - the hierarchy associated with this session raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method mus... |
def add_root_objective_bank(self, alias=None, objective_bank_id=None): """Adds a root objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of an objective bank raise: AlreadyExists - ``objective_bank_id`` is already in hierarchy raise: NotFound - ``objective_bank_id`` not found raise: NullArgument - ``object... |
def remove_root_objective_bank(self, alias=None, objective_bank_id=None): """Removes a root objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of an objective bank raise: NotFound - ``objective_bank_id`` is not a root raise: NullArgument - ``objective_bank_id`` is ``null`` raise: OperationFailed - unable t... |
def add_child_objective_bank(self, objective_bank_id=None, parent_id=None, child_id=None): """Adds a child to an objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of an objective bank arg: child_id (osid.id.Id): the ``Id`` of the new child raise: AlreadyExists - ``objective_bank_id`` is already a parent o... |
def main(args): """first we need sorted genepreds""" cmd = ['sort',args.reference,'--gpd','--tempdir',args.tempdir,'--threads', str(args.threads),'-o',args.tempdir+'/ref.sorted.gpd'] sys.stderr.write(cmd+"\n") gpd_sort(cmd) cmd = ['sort',args.gpd,'--gpd','--tempdir',args.tempdir,'--threads', str(args.threads),'-o',args... |
= [x for x in rgpds if x.get_exon_count() == 1] single_annotated = [] single_unannotated = [] #print len(single_reference) #print len(single_unannotated) for gpd in my_unannotated: overs = sorted([x for x in single_reference if x.overlap_size(gpd) > 0],\ key=lambda y: y.avg_mutual_coverage(gpd), reverse=True) if len(ov... |
= no_annotation.pop(0) matched = False for i in range(0,len(finished)): if len([x for x in finished[i] if x.overlap_size(m) > 0]) > 0: finished[i].append(m) matched = True break if not matched: finished.append([m]) # now finished has gene groups original = [] for group in finished: gname = str(uuid.uuid4()) for member ... |
def _reExec(regex, string): '''This returns [full match, group1, group2, ...], just like JS.''' m = regex.search(string) if not m: return None return [m.group()] + list(m.groups()) |
def _jsTypeof(o): '''Return a string similar to JS's typeof.''' if o == None: return 'object' elif o == Undefined: return 'undefined' elif isinstance(o, bool): return 'boolean' if isinstance(o, int) or isinstance(o, float): return 'number' elif isinstance(o, list) or isinstance(o, dict): return 'object' elif isinstance... |
def match(sel, obj, arr=None, bailout_fn=None): '''Match a selector to an object, yielding the matched values. Args: sel: The JSONSelect selector to apply (a string) obj: The object against which to apply the selector arr: If sel contains ? characters, then the values in this array will be safely interpolated into the ... |
def get_display_name(self): """Gets a display name for this service implementation. return: (osid.locale.DisplayText) - a display name compliance: mandatory - This method must be implemented. """ return DisplayText({'text': profile.DISPLAYNAME, 'languageTypeId': profile.LANGUAGETYPEID, 'scriptTypeId': profile.SCRIPTTYP... |
def get_description(self): """Gets a description of this service implementation. return: (osid.locale.DisplayText) - a description compliance: mandatory - This method must be implemented. """ return DisplayText({'text': profile.DESCRIPTION, 'languageTypeId': profile.LANGUAGETYPEID, 'scriptTypeId': profile.SCRIPTTYPEID,... |
def get_manager(self, osid=None, impl_class_name=None, version=None): """Finds, loads and instantiates providers of OSID managers. Providers must conform to an OsidManager interface. The interfaces are defined in the OSID enumeration. For all OSID requests, an instance of ``OsidManager`` that implements the ``OsidManag... |
requested OSID *compliance: mandatory -- This method must be implemented.* *implementation notes*: After finding and instantiating the requested ``OsidManager,`` providers must invoke ``OsidManager.initialize(OsidRuntimeManager)`` where the environment is an instance of the current environment that includes the configu... |
+ impl_class_name + '.' + osid.lower() + '.managers') except ImportError: raise NotFound() try: manager = getattr(manager_module, osid.title() + 'Manager') except AttributeError: raise Unsupported() return manager |
def get_proxy_manager(self, osid=None, implementation=None, version=None): """Finds, loads and instantiates providers of OSID managers. Providers must conform to an ``OsidManager`` interface. The interfaces are defined in the OSID enumeration. For all OSID requests, an instance of ``OsidManager`` that implements the ``... |
requested OSID *compliance: mandatory -- This method must be implemented.* *implementation notes*: After finding and instantiating the requested ``OsidManager,`` providers must invoke ``OsidManager.initialize(OsidRuntimeManager)`` where the environment is an instance of the current environment that includes the configu... |
+ osid.lower() + '.managers') except ImportError: raise NotFound() try: proxy_manager = getattr(manager_module, osid.title() + 'ProxyManager') except AttributeError: raise Unsupported() return proxy_manager |
def get_agents_by_search(self, agent_query, agent_search): """Pass through to provider AgentSearchSession.get_agents_by_search""" # Implemented from azosid template for - # osid.resource.ResourceSearchSession.get_resources_by_search_template if not self._can('search'): raise PermissionDenied() return self._provider_ses... |
def get_type_data(name): """Return dictionary representation of type. Can be used to initialize primordium.type.primitives.Type """ name = name.upper() try: return { 'authority': 'birdland.mit.edu', 'namespace': 'calendar format', 'identifier': name, 'domain': 'Calendar Format Types', 'display_name': JEFFS_CALENDAR_FOR... |
def ffmpeg(*args, **kwargs): """Universal ffmpeg wrapper with progress and error handling""" ff = FFMPEG(*args, **kwargs) ff.start( stdin=kwargs.get("stdin", None), stdout=kwargs.get("stdout", None), stderr=kwargs.get("stderr", subprocess.PIPE) ) ff.wait(kwargs.get("progress_handler", None)) if ff.return_code: err = in... |
def get_proxy(self, input_): """Gets a proxy. :param input: a proxy condition :type input: ``osid.proxy.ProxyCondition`` :return: a proxy :rtype: ``osid.proxy.Proxy`` :raise: ``NullArgument`` -- ``input`` is ``null`` :raise: ``OperationFailed`` -- unable to complete request :raise: ``PermissionDenied`` -- authorization... |
def _init_metadata(self): """stub""" self._n_of_m_metadata = { 'element_id': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, 'nOfM'), 'element_label': 'nOfM', 'instructions': 'Student is expected to do N of M questions', 'required': False, 'read_only': False, 'linked': False, 'array': False... |
def set_n_of_m(self, value=None): """stub""" if value is None: raise NullArgument() if isinstance(value, bool): # because True / False are also int types... raise InvalidArgument('value must be integer') if value is not None and not isinstance(value, int): raise InvalidArgument('value must be integer') if self.get_n_of... |
def clear_n_of_m(self): """stub""" if (self.get_n_of_m_metadata().is_read_only() or self.get_n_of_m_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['nOfM'] = \ int(self._n_of_m_metadata['default_object_values'][0]) |
def has_unlock_previous(self): """stub""" if 'unlockPrevious' not in self.my_osid_object._my_map or \ self.my_osid_object._my_map['unlockPrevious'] is None: return False return True |
def _init_metadata(self): """stub""" self._min_string_length = None self._max_string_length = None self._unlock_previous_metadata = { 'element_id': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, 'unlock_previous'), 'element_label': 'unlock_previous', 'instructions': 'Indicator to UI on how... |
def set_unlock_previous(self, unlock_previous): """use a string -- for now, ``always`` and ``never`` are the options""" if unlock_previous is None: raise NullArgument('unlock_previous cannot be None') if unlock_previous is not None and not utilities.is_string(unlock_previous): raise InvalidArgument('unlock_previous mus... |
def clear_unlock_previous(self): """stub""" if (self.get_unlock_previous_metadata().is_read_only() or self.get_unlock_previous_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['unlockPrevious'] = \ str(self._unlock_previous_metadata['default_string_values'][0]) |
def _get_xml(self, metric): """Returns the channel element of the RSS feed""" self._opener = urllib2.build_opener() self._opener.addheaders = [('User-agent', self.user_agent)] if metric: url = self.base_url + '?w={0}&u=c'.format(self.woeid) else: url = self.base_url + '?w={0}'.format(self.woeid) return etree.parse( sel... |
def _parse_text(self, element_name, namespace=''): """ Returns the text, as a string, of the specified element in the specified namespace of the RSS feed. Takes element_name and namespace as strings. """ try: text = self._channel.find('.//' + namespace + element_name).text except AttributeError: raise Exception( 'Eleme... |
def _parse_attributes(self, element_name, package_class, namespace=''): """ Returns an instance of the package_class instantiated with a dictionary of the attributes from element_name in the specified namespace of the RSS feed. """ return package_class( self._channel.find( './/{0}{1}'.format(namespace, element_name) ).... |
def _parse_forecasts(self): """ Returns a list of instances of the forecast.Forecast class. Each instance of the class is instantiated with the attributes of the forecast elements in the RSS feed. """ forecasts = self._channel.findall( './/{0}{1}'.format(self.weather_namespace, 'forecast') ) return [Forecast(forecast.a... |
def _parse_image(self): """ Returns an instance of the image.Image class for the RSS feed. """ image = { 'title': self._channel.find('./image/title').text, 'width': int(self._channel.find('./image/width').text), 'height': int(self._channel.find('./image/height').text), 'link': self._channel.find('./image/link').text, '... |
def _parse_last_build_date(self): """ Returns the last build date of the RSS feed as datetime.datetime object. Returned datetime is not time-zone aware """ date = self._channel.find('lastBuildDate').text date = parser.parse(date, ignoretz=True) return date |
def forward_tcp(self, host, port): """Open a connection to host:port via an ssh tunnel. Args: host (str): The host to connect to. port (int): The port to connect to. Returns: A socket-like object that is connected to the provided host:port. """ return self.transport.open_channel( 'direct-tcpip', (host, port), self.tran... |
def _split_hostport(self, hostport, default_port=None): """Split a string in the format of '<host>:<port>' into it's component parts default_port will be used if a port is not included in the string Args: str ('<host>' or '<host>:<port>'): A string to split into it's parts Returns: two item tuple: (host, port) Raises: ... |
def _endpoint_to_target(self, endpoint): """Convert a URL into a host / port, or into a path to a unix domain socket Args: endpoint (str): A URL parsable by urlparse Returns: 3 item tuple: (host, port, path). host and port will None, and path will be not None if a a unix domain socket URL is passed path will be None if... |
def _get_proxy_info(self, _=None): """Generate a ProxyInfo class from a connected SSH transport Args: _ (None): Ignored. This is just here as the ProxyInfo spec requires it. Returns: SSHTunnelProxyInfo: A ProxyInfo with an active socket tunneled through SSH """ # parse the fleet endpoint url, to establish a tunnel to t... |
with this socket return SSHTunnelProxyInfo(sock=sock) |
def _single_request(self, method, *args, **kwargs): """Make a single request to the fleet API endpoint Args: method (str): A dot delimited string indicating the method to call. Example: 'Machines.List' *args: Passed directly to the method being called. **kwargs: Passed directly to the method being called. Returns: dict... |
# iterate over each token in the requested method for item in method.split('.'): # if it's the end of the line, pass our argument if method.endswith(item): _method = getattr(_method, item)(*args, **kwargs) else: # otherwise, just create an instance and move on _method = getattr(_method, item)() # Discovered endpoints l... |
def _request(self, method, *args, **kwargs): """Make a request with automatic pagination handling Args: method (str): A dot delimited string indicating the method to call. Example: 'Machines.List' *args: Passed directly to the method being called. **kwargs: Passed directly to the method being called. Note: This method ... |
include it in the request # We do this so we don't pass it in the initial request as we set it to False above if next_page_token: kwargs['nextPageToken'] = next_page_token # Make the request response = self._single_request(method, *args, **kwargs) # If there is a token for another page in the response, capture it for t... |
def create_unit(self, name, unit): """Create a new Unit in the cluster Create and modify Unit entities to communicate to fleet the desired state of the cluster. This simply declares what should be happening; the backend system still has to react to the changes in this desired state. The actual state of the system is co... |
def set_unit_desired_state(self, unit, desired_state): """Update the desired state of a unit running in the cluster Args: unit (str, Unit): The Unit, or name of the unit to update desired_state: State the user wishes the Unit to be in ("inactive", "loaded", or "launched") Returns: Unit: The unit that was updated Raises... |
def destroy_unit(self, unit): """Delete a unit from the cluster Args: unit (str, Unit): The Unit, or name of the unit to delete Returns: True: The unit was deleted Raises: fleet.v1.errors.APIError: Fleet returned a response code >= 400 """ # if we are given an object, grab it's name property # otherwise, convert to uni... |
def list_units(self): """Return the current list of the Units in the fleet cluster Yields: Unit: The next Unit in the cluster Raises: fleet.v1.errors.APIError: Fleet returned a response code >= 400 """ for page in self._request('Units.List'): for unit in page.get('units', []): yield Unit(client=self, data=unit) |
def get_unit(self, name): """Retreive a specifi unit from the fleet cluster by name Args: name (str): If specified, only this unit name is returned Returns: Unit: The unit identified by ``name`` in the fleet cluster Raises: fleet.v1.errors.APIError: Fleet returned a response code >= 400 """ return Unit(client=self, dat... |
def list_unit_states(self, machine_id=None, unit_name=None): """Return the current UnitState for the fleet cluster Args: machine_id (str): filter all UnitState objects to those originating from a specific machine unit_name (str): filter all UnitState objects to those related to a specific unit Yields: UnitState: The ne... |
def list_machines(self): """Retrieve a list of machines in the fleet cluster Yields: Machine: The next machine in the cluster Raises: fleet.v1.errors.APIError: Fleet returned a response code >= 400 """ # loop through each page of results for page in self._request('Machines.List'): # return each machine in the current p... |
def convert(cls, value, from_base, to_base): """ Convert value from a base to a base. :param value: the value to convert :type value: sequence of int :param int from_base: base of value :param int to_base: base of result :returns: the conversion result :rtype: list of int :raises ConvertError: if from_base is less than... |
def convert_to_int(value, from_base): """ Convert value to an int. :param value: the value to convert :type value: sequence of int :param int from_base: base of value :returns: the conversion result :rtype: int :raises ConvertError: if from_base is less than 2 :raises ConvertError: if elements in value outside bounds P... |
from_base + y, value, 0) |
def convert_from_int(value, to_base): """ Convert int value to a base. :param int value: the value to convert, must be at least 0 :param int to_base: base of result, must be at least 2 :returns: the conversion result :rtype: list of int :raises BasesValueError: if value is less than 0 :raises BasesValueError: if to_bas... |
def carry_in(value, carry, base): """ Add a carry digit to a number represented by ``value``. :param value: the value :type value: list of int :param int carry: the carry digit (>= 0) :param int base: the base (>= 2) :returns: carry-out and result :rtype: tuple of int * (list of int) Complexity: O(len(value)) """ if ba... |
carry, base) result.append(new_val) return (carry, list(reversed(result))) |
def create_key(self): """Create an API key.""" print("Creating key. Please input the following options:") name = input("Key name (optional): ") print("To make this key more secure, you should restrict the IP addresses that can use it. ") print("To use with all IPs, leave blank or use 0.0.0.0/0.") print("To use with a s... |
def list_keys(self): """List your API Keys.""" keys = self._curl_bitmex("/apiKey/") print(json.dumps(keys, sort_keys=True, indent=4)) |
def enable_key(self): """Enable an existing API Key.""" print("This command will enable a disabled key.") apiKeyID = input("API Key ID: ") try: key = self._curl_bitmex("/apiKey/enable", postdict={"apiKeyID": apiKeyID}) print("Key with ID %s enabled." % key["id"]) except: print("Unable to enable key, please try again.")... |
def disable_key(self): """Disable an existing API Key.""" print("This command will disable a enabled key.") apiKeyID = input("API Key ID: ") try: key = self._curl_bitmex("/apiKey/disable", postdict={"apiKeyID": apiKeyID}) print("Key with ID %s disabled." % key["id"]) except: print("Unable to disable key, please try aga... |
def delete_key(self): """Delete an existing API Key.""" print("This command will delete an API key.") apiKeyID = input("API Key ID: ") try: self._curl_bitmex("/apiKey/", postdict={"apiKeyID": apiKeyID}, verb='DELETE') print("Key with ID %s disabled." % apiKeyID) except: print("Unable to delete key, please try again.") ... |
def get_next_type(self): """Gets the next Type in this list. return: (osid.type.Type) - the next Type in this list. The has_next() method should be used to test that a next Type is available before calling this method. raise: IllegalState - no more elements available in this list raise: OperationFailed - unable to comp... |
def load(self, filename=None, refresh=False): """ Try to load the data from a pre existing data file if it exists. If the data file does not exist, refresh the data and save it in the data file for future use. The data file is a json file. :param filename: The filename to save or fetch the data from. :param refresh: Wh... |
def request(self, *args, **kwargs): """ Gets the request using the `_url` and converts it into a beautiful soup object. :param args: The args to pass on to `requests`. :param kwargs: The kwargs to pass on to `requests`. """ response = requests.request(*args, **kwargs) return BeautifulSoup.BeautifulSoup(response.text, "... |
def find_closest(self, color): """ Find the closest color in the system to the given rgb values. :param color: Tuple of r, g, b values (scaled to 255). :returns: Tuple of name and rgb closest to the given color. """ # Find distance between colors and find name based on closest color rgb = sRGBColor(*color) lab = conver... |
def get_asset_lookup_session(self): """Gets the ``OsidSession`` associated with the asset lookup service. return: (osid.repository.AssetLookupSession) - the new ``AssetLookupSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_asset_lookup()`` is ``false`` *compliance: optiona... |
def get_asset_lookup_session_for_repository(self, repository_id): """Gets the ``OsidSession`` associated with the asset lookup service for the given repository. arg: repository_id (osid.id.Id): the ``Id`` of the repository return: (osid.repository.AssetLookupSession) - the new ``AssetLookupSession`` raise: NotFound - `... |
def get_asset_query_session(self): """Gets an asset query session. return: (osid.repository.AssetQuerySession) - an ``AssetQuerySession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_asset_query()`` is ``false`` *compliance: optional -- This method must be implemented if ``suppo... |
def get_asset_query_session_for_repository(self, repository_id): """Gets an asset query session for the given repository. arg: repository_id (osid.id.Id): the ``Id`` of the repository return: (osid.repository.AssetQuerySession) - an ``AssetQuerySession`` raise: NotFound - ``repository_id`` not found raise: NullArgument... |
def get_asset_search_session(self): """Gets an asset search session. return: (osid.repository.AssetSearchSession) - an ``AssetSearchSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_asset_search()`` is ``false`` *compliance: optional -- This method must be implemented if ``... |
def get_asset_notification_session(self, asset_receiver): """Gets the notification session for notifications pertaining to asset changes. arg: asset_receiver (osid.repository.AssetReceiver): the notification callback return: (osid.repository.AssetNotificationSession) - an ``AssetNotificationSession`` raise: NullArgumen... |
def get_asset_notification_session_for_repository(self, asset_receiver, repository_id): """Gets the asset notification session for the given repository. arg: asset_receiver (osid.repository.AssetReceiver): the notification callback arg: repository_id (osid.id.Id): the ``Id`` of the repository return: (osid.repository.A... |
def get_asset_repository_session(self): """Gets the session for retrieving asset to repository mappings. return: (osid.repository.AssetRepositorySession) - an ``AssetRepositorySession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_asset_repository()`` is ``false`` *compliance: o... |
def get_asset_repository_assignment_session(self): """Gets the session for assigning asset to repository mappings. return: (osid.repository.AssetRepositoryAssignmentSession) - an ``AssetRepositoryAsignmentSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_asset_repository_as... |
def get_asset_composition_session(self): """Gets the session for retrieving asset compositions. return: (osid.repository.AssetCompositionSession) - an ``AssetCompositionSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_asset_composition()`` is ``false`` *compliance: optiona... |
def get_composition_query_session(self): """Gets a composition query session. return: (osid.repository.CompositionQuerySession) - a ``CompositionQuerySession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_composition_query()`` is ``false`` *compliance: optional -- This method mu... |
def get_composition_query_session_for_repository(self, repository_id): """Gets a composition query session for the given repository. arg: repository_id (osid.id.Id): the ``Id`` of the repository return: (osid.repository.CompositionQuerySession) - a ``CompositionQuerySession`` raise: NotFound - ``repository_id`` not fou... |
def get_composition_search_session(self): """Gets a composition search session. return: (osid.repository.CompositionSearchSession) - a ``CompositionSearchSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_composition_search()`` is ``false`` *compliance: optional -- This meth... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.