Dynamically retrieves the next ontology in the list
352808
def _next_ontology(self):
        """"""
        currentfile = self.current['file']
        try:
            idx = self.all_ontologies.index(currentfile)
            return self.all_ontologies[idx+1]
        except:
            return self.all_ontologies[0]
23020
def action_listlocal(all_details=True):
    "  "

    options = get_localontologies()

    counter = 1
    # printDebug("------------------", 'comment')
    if not options:
        printDebug(
            "Your local library is empty. Use 'ontospy lib --bootstrap' to add some ontologies to it."
        )
        return
    else:
        if all_details:
            _print_table_ontologies()
        else:
            _print2cols_ontologies()

        while True:
            printDebug(
                "------------------\nSelect a model by typing its number: (enter=quit)",
                "important")
            var = input()
            if var == "" or var == "q":
                return None
            else:
                try:
                    _id = int(var)
                    ontouri = options[_id - 1]
                    # printDebug("\nYou selected:", "comment")
                    printDebug(
                        "---------\nYou selected: " + ontouri + "\n---------",
                        "green")
                    return ontouri
                except:
                    printDebug("Please enter a valid option.", "comment")
                    continue
1249416
protected Map<String,RDFNode> readNext() throws SparqlException {
    try {
      // read <result> or </results>
      int eventType = reader.nextTag();
      // if a closing element, then it should be </results>
      if (eventType == END_ELEMENT) {
        // already read the final result, so clean up and return nothing
        if (nameIs(RESULTS)) {
          cleanup();
          return null;
        }
        else throw new SparqlException("Bad element closure with: " + reader.getLocalName());
      }
      // we only expect a <result> here 
      testOpen(eventType, RESULT, "Expected a new result. Got :" +
          ((eventType == END_ELEMENT) ? "/" : "") + reader.getLocalName());

      Map<String,RDFNode> result = new HashMap<String,RDFNode>();
      // read <binding> list
      while ((eventType = reader.nextTag()) == START_ELEMENT && nameIs(BINDING)) {
        // get the name of the binding
        String name = reader.getAttributeValue(null, VAR_NAME);
        result.put(name, parseValue());
        testClose(reader.nextTag(), BINDING, "Single Binding not closed correctly");
      }

      // a non- <binding> was read, so it should have been a </result>
      testClose(eventType, RESULT, "Single Result not closed correctly");
      return result;
    } catch (XMLStreamException e) {
      throw new SparqlException("Error reading from XML stream", e);
    }
  }
345549
private List<OntologyTermSynonym> createSynonyms(OWLClass ontologyTerm) {
    return loader
        .getSynonyms(ontologyTerm)
        .stream()
        .map(this::createSynonym)
        .collect(Collectors.toList());
  }
1357771
public function next() {
    // the current oid was processed
    $this->processedOidList[] = $this->currentOid->__toString();

    $node = $this->persistenceFacade->load($this->currentOid);

    // collect navigable children for the given aggregation kinds
    $childOIDs = [];
    $mapper = $node->getMapper();
    $relations = $mapper->getRelations('child');
    $followAll = sizeof($this->aggregationKinds) == 0;
    foreach ($relations as $relation) {
      $aggregationKind = $relation->getOtherAggregationKind();
      if ($relation->getOtherNavigability() && ($followAll || in_array($aggregationKind, $this->aggregationKinds))) {
        $childValue = $node->getValue($relation->getOtherRole());
        if ($childValue != null) {
          $children = $relation->isMultiValued() ? $childValue : [$childValue];
          foreach ($children as $child) {
            $childOIDs[] = $child->getOID();
          }
        }
      }
    }
    $this->addToQueue($childOIDs, ++$this->currentDepth);

    // set current node
    if (sizeof($this->oidList) != 0) {
      list($oid, $depth) = array_pop($this->oidList);
      $oidStr = $oid->__toString();
      // not the last node -> search for unprocessed nodes
      while (sizeof($this->oidList) > 0 && in_array($oidStr, $this->processedOidList)) {
        list($oid, $depth) = array_pop($this->oidList);
        $oidStr = $oid->__toString();
      }
      // last node found, but it was processed already
      if (sizeof($this->oidList) == 0 && in_array($oidStr, $this->processedOidList)) {
        $this->end = true;
      }
      $this->currentOid = $oid;
      $this->currentDepth = $depth;
    }
    else {
      $this->end = true;
    }
    return $this;
  }
594900
def index_ontology(self, ont):
        
        self.merged_ontology.merge([ont])
        syns = ont.all_synonyms(include_label=True)
        
        include_id = self._is_meaningful_ids()
        logging.info("Include IDs as synonyms: {}".format(include_id))
        if include_id:
            for n in ont.nodes():
                v = n
                # Get fragment
                if v.startswith('http'):
                    v = re.sub('.*/','',v)
                    v = re.sub('.*#','',v)
                syns.append(Synonym(n, val=v, pred='label'))
        
        logging.info("Indexing {} syns in {}".format(len(syns),ont))
        logging.info("Distinct lexical values: {}".format(len(self.lmap.keys())))
        for syn in syns:
            self.index_synonym(syn, ont)
        for nid in ont.nodes():
            self.id_to_ontology_map[nid].append(ont)
920384
def next(self):
        """"""
        try:
            self._current = self.services.pop(0)
        except IndexError:
            raise StopIteration
        else:
            return self._current
824961
def ontologyConceptTree(self):
        
        treedict = {}
        if self.all_skos_concepts:
            treedict[0] = self.toplayer_skos
            for element in self.all_skos_concepts:
                if element.children():
                    treedict[element] = element.children()
            return treedict
        return treedict
974752
def next(self):
        """"""
        if not self.selected:
            self.cluster_view.next()
        else:
            self.similarity_view.next()
580713
private List<OntologyTermDynamicAnnotation> createDynamicAnnotations(OWLClass term) {
    return loader
        .getDatabaseIds(term)
        .stream()
        .map(this::createDynamicAnnotation)
        .collect(Collectors.toList());
  }
778499
def get_next(object_list)
      varbind_list = @mib.varbind_list(object_list, :NullValue)
      request = GetNextRequest.new(@@request_id.next, varbind_list)
      try_request(request)
    end
652518
def _list(self, uri, obj_class=None, list_all=False):
        
        resp, resp_body = self._retry_get(uri)
        if obj_class is None:
            obj_class = self.resource_class

        data = resp_body[self.plural_response_key]
        ret = [obj_class(self, res, loaded=False)
                for res in data if res]
        self._reset_paging("domain", resp_body)
        if list_all:
            dom_paging = self._paging.get("domain", {})
            while dom_paging.get("next_uri"):
                next_uri = dom_paging.get("next_uri")
                ret.extend(self._list(uri=next_uri, obj_class=obj_class,
                        list_all=False))
        return ret
546771
def next(self, fetch: bool = False, next_symbol: _NextSymbol = DEFAULT_NEXT_SYMBOL) -> _Next:
        

        def get_next():
            candidates = self.find('a', containing=next_symbol)

            for candidate in candidates:
                if candidate.attrs.get('href'):
                    # Support 'next' rel (e.g. reddit).
                    if 'next' in candidate.attrs.get('rel', []):
                        return candidate.attrs['href']

                    # Support 'next' in classnames.
                    for _class in candidate.attrs.get('class', []):
                        if 'next' in _class:
                            return candidate.attrs['href']

                    if 'page' in candidate.attrs['href']:
                        return candidate.attrs['href']

            try:
                # Resort to the last candidate.
                return candidates[-1].attrs['href']
            except IndexError:
                return None

        __next = get_next()
        if __next:
            url = self._make_absolute(__next)
        else:
            return None

        if fetch:
            return self.session.get(url)
        else:
            return url
756081
private void rechecksqlistpl()
    {
    	if(data != null)
    	{
    		Node[] childrens = ((SimpleNode)data).getChildren();
    		if(childrens != null && childrens.length > 0)
    		{
    			boolean switchcase = true;
    			for(Node node:childrens)
    			{
    				if(!(node instanceof ASTText))
    				{
    					switchcase = false;
    					break;
    				}
    			}
    			if(switchcase)
    			{
    				this.esInfo.setTpl(false);
    				 
    			}
    			else
    			{
    				this.esInfo.setTpl(true);
    			}
    		}
    		
    	}
    }
616177
@Override
  public T next() {
    final Object value = iterator.next();
    final T entity = mapper.fromReadValue(value);
    return entity;
  }
1161274
def map_ontologies():
    """"""
    if request.method == 'OPTIONS':
        return {}
    response = request.body.read().decode('utf-8')
    body = json.loads(response)
    stmts_json = body.get('statements')
    stmts = stmts_from_json(stmts_json)
    om = OntologyMapper(stmts, wm_ontomap, scored=True, symmetric=False)
    om.map_statements()
    return _return_stmts(stmts)
325955
def _list_and_update(self):
        
        initial_resources = getattr(self.api, self.list_method_name)(
            self.namespace,
            label_selector=self.label_selector,
            field_selector=self.field_selector,
            _request_timeout=self.request_timeout,
        )
        # This is an atomic operation on the dictionary!
        self.resources = {p.metadata.name: p for p in initial_resources.items}
        # return the resource version so we can hook up a watch
        return initial_resources.metadata.resource_version