Creates GMT entries from the pathways contained in the model.
@param model Model
@return a set of GMT entries
482534
public Collection<GMTEntry> convert(final Model model)
	{
		final Collection<GMTEntry> toReturn = new TreeSet<GMTEntry>(new Comparator<GMTEntry>() {
			@Override
			public int compare(GMTEntry o1, GMTEntry o2) {
				return o1.toString().compareTo(o2.toString());
			}
		});

		Model l3Model;
		// convert to level 3 in necessary
		if (model.getLevel() == BioPAXLevel.L2)
			l3Model = (new LevelUpgrader()).filter(model);
		else
			l3Model = model;

		//a modifiable copy of the set of all PRs in the model -
		//after all, it has all the ERs that do not belong to any pathway
		final Set<EntityReference> entityReferences =
				new HashSet<EntityReference>(l3Model.getObjects(EntityReference.class));

		final Set<Pathway> pathways = l3Model.getObjects(Pathway.class);
		for (Pathway pathway : pathways)
		{
			String name = (pathway.getDisplayName() == null) ? pathway.getStandardName() : pathway.getDisplayName();
			if(name == null || name.isEmpty())
				name = pathway.getUri();

			final Pathway currentPathway = pathway;
			final String currentPathwayName = name;

			LOG.debug("Begin converting " + currentPathwayName + " pathway, uri=" + currentPathway.getUri());
			final Set<EntityReference> ers = new HashSet<EntityReference>();
			final Traverser traverser = new AbstractTraverser(SimpleEditorMap.L3,
					Fetcher.nextStepFilter, Fetcher.objectPropertiesOnlyFilter) {
				@Override
				protected void visit(Object range, BioPAXElement domain, Model model, PropertyEditor editor)
				{
					BioPAXElement bpe = (BioPAXElement) range; //cast is safe (due to objectPropertiesOnlyFilter)
					if(bpe instanceof EntityReference) {
						ers.add((EntityReference) bpe);
					}
					if(bpe instanceof Pathway) {
						if(skipSubPathways)
						{	//do not traverse into the sub-pathway; log
							LOG.debug("Skipping sub-pathway: " + bpe.getUri());
						} else {
							traverse(bpe, model);
						}
					} else {
						traverse(bpe, model);
					}
				}
			};
			//run it - collect all PRs from the pathway
			traverser.traverse(currentPathway, null);

			if(!ers.isEmpty()) {
				LOG.debug("For pathway: " + currentPathwayName + " (" + currentPathway.getUri()
						+ "), got " + ers.size() + " ERs");
				// create GMT entries
				Collection<GMTEntry> entries = createGseaEntries(currentPathway.getUri(),
						currentPathwayName, getDataSource(currentPathway.getDataSource()), ers);
				if(!entries.isEmpty())
					toReturn.addAll(entries);
				entityReferences.removeAll(ers);//keep not processed PRs (a PR can be processed multiple times)
				LOG.debug("- collected " + entries.size() + "entries.");
			}
		}

		//when there're no pathways, only empty pathays, pathways w/o PRs, then use all/rest of PRs -
		//organize PRs by species (GSEA s/w can handle only same species identifiers in a data row)
		if(!entityReferences.isEmpty() && !skipOutsidePathways) {
			LOG.info("Creating entries for the rest of PRs (outside any pathway)...");
			toReturn.addAll(createGseaEntries("other","other", getDataSource(l3Model.getObjects(Provenance.class)),entityReferences));
		}

		return toReturn;
	}
588723
@RequestMapping(value = "group", method = RequestMethod.GET)
    public String newGroupGet(Model model) {
        model.addAttribute("groups",
                pathOverrideService.findAllGroups());
        return "groups";
    }
308313
public Set<SIFInteraction> searchSIF(final Model model)
	{
		if (miners == null) initMiners();

		final Map<SIFInteraction, SIFInteraction> map = new ConcurrentHashMap<SIFInteraction, SIFInteraction>();

		for (final SIFMiner miner : miners)
		{
			if (miner instanceof MinerAdapter)
				((MinerAdapter) miner).setIdMap(new HashMap<BioPAXElement, Set<String>>());

			Map<BioPAXElement,List<Match>> matches = Searcher.search(model, miner.getPattern());
			for (final List<Match> matchList : matches.values())
			{
				for (Match m : matchList)
				{
					Set<SIFInteraction> sifs = miner.createSIFInteraction(m, idFetcher);
					for (SIFInteraction sif : sifs)
					{
						if ( sif != null && sif.hasIDs() && !sif.sourceID.equals(sif.targetID)
								&& (types == null || types.contains(sif.type)) )
						{
							SIFInteraction existing = map.get(sif);
							if(existing != null)
								existing.mergeWith(sif);
							else
								map.put(sif, sif);
						}
					}
				}
			}
		}

		return new HashSet<SIFInteraction>(map.values());
	}
357408
@Override
    public Set<java.util.Map.Entry<Long, V>> entrySet() {
        return this.timeSeriesMap.entrySet();
    }
109847
public boolean isModelActive(ModelDescription model) {
        lockingMechanism.readLock().lock();
        try {
            ODocument node = getModel(model.toString());
            return OrientModelGraphUtils.getActiveFieldValue(node);
        } finally {
            lockingMechanism.readLock().unlock();
        }
    }
961560
public void addControls( final Model model )
    {
        final URIBuilder pagedURL;
        try {
            pagedURL = new URIBuilder( fragmentURL );
        }
        catch ( URISyntaxException e ) {
            throw new IllegalArgumentException( e );
        }

        final Resource fragmentId = model.createResource( fragmentURL );

        final Resource firstPageId =
                model.createResource(
                        pagedURL.setParameter(ILinkedDataFragmentRequest.PARAMETERNAME_PAGE,
                                              "1").toString() );

        fragmentId.addProperty( CommonResources.HYDRA_FIRSTPAGE, firstPageId );

        if ( pageNumber > 1) {
            final String prevPageNumber = Long.toString( pageNumber - 1 );
            final Resource prevPageId =
                    model.createResource(
                            pagedURL.setParameter(ILinkedDataFragmentRequest.PARAMETERNAME_PAGE,
                                                  prevPageNumber).toString() );

            fragmentId.addProperty( CommonResources.HYDRA_PREVIOUSPAGE, prevPageId );
        }

        if ( ! isLastPage ) {
            final String nextPageNumber = Long.toString( pageNumber + 1 );
            final Resource nextPageId =
                    model.createResource(
                            pagedURL.setParameter(ILinkedDataFragmentRequest.PARAMETERNAME_PAGE,
                                                  nextPageNumber).toString() );

            fragmentId.addProperty( CommonResources.HYDRA_NEXTPAGE, nextPageId );
        }
    }
828958
def model_path(cls, project, location, model):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/locations/{location}/models/{model}",
            project=project,
            location=location,
            model=model,
        )
858224
private static void summarizeGBMModel(ModelSummary summary, hex.gbm.GBM.GBMModel model) {
    // add generic fields such as column names
    summarizeModelCommonFields(summary, model);

    summary.model_algorithm = "GBM";

    JsonObject all_params = (model.get_params()).toJSON();
    summary.critical_parameters = whitelistJsonObject(all_params, GBM_critical_params);
    summary.secondary_parameters = whitelistJsonObject(all_params, GBM_secondary_params);
    summary.expert_parameters = whitelistJsonObject(all_params, GBM_expert_params);
  }
1326509
protected final FluentModelTImpl prepareInlineUpdate(FluentModelTImpl model) {
        FluentModelTImpl childResource = find(model.childResourceKey());
        if (childResource != null) {
            throw new IllegalArgumentException(pendingOperationMessage(model.name(), model.childResourceKey()));
        }
        model.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeUpdated);
        this.childCollection.put(model.childResourceKey(), model);
        return super.prepareForFutureCommitOrPostRun(model);
    }
157227
protected NavigationPanel<WizardModelStateMachine<T>> newNavigationPanel(
		Model<WizardModelStateMachine<T>> model)
	{
		final NavigationPanel<WizardModelStateMachine<T>> navigationPanel = new NavigationPanel<WizardModelStateMachine<T>>()
		{

			/** The Constant serialVersionUID. */
			private static final long serialVersionUID = 1L;

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected void onCancel()
			{
				AbstractWizardPanel.this.onCancel();
			}

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected void onFinish()
			{
				AbstractWizardPanel.this.onFinish();
			}

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected void onNext()
			{
				AbstractWizardPanel.this.onNext();
			}

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected void onPrevious()
			{
				AbstractWizardPanel.this.onPrevious();
			}
		};
		return navigationPanel;
	}
626727
public void addMetadata( final Model model )
    {
        final Resource datasetId = model.createResource( getDatasetURI() );
        final Resource fragmentId = model.createResource( fragmentURL );

        datasetId.addProperty( CommonResources.RDF_TYPE, CommonResources.VOID_DATASET );
        datasetId.addProperty( CommonResources.RDF_TYPE, CommonResources.HYDRA_COLLECTION );
        datasetId.addProperty( CommonResources.VOID_SUBSET, fragmentId );
        
        Literal itemsPerPage = model.createTypedLiteral(this.getMaxPageSize());
        datasetId.addProperty( CommonResources.HYDRA_ITEMSPERPAGE, itemsPerPage);

        fragmentId.addProperty( CommonResources.RDF_TYPE, CommonResources.HYDRA_COLLECTION );
        fragmentId.addProperty( CommonResources.RDF_TYPE, CommonResources.HYDRA_PAGEDCOLLECTION );
    }
1148811
public void setModel(@Nonnull final MindMap model, final boolean notifyModelChangeListeners) {
    this.lock();
    try {
      if (this.elementUnderEdit != null) {
        Utils.safeSwingBlockingCall(new Runnable() {
          @Override
          public void run() {
            endEdit(false);
          }
        });
      }

      final List<int[]> selectedPaths = new ArrayList<int[]>();
      for (final Topic t : this.selectedTopics) {
        selectedPaths.add(t.getPositionPath());
      }

      this.selectedTopics.clear();

      final MindMap oldModel = this.model;
      this.model = assertNotNull("Model must not be null", model);

      for (final PanelAwarePlugin p : MindMapPluginRegistry.getInstance().findFor(PanelAwarePlugin.class)) {
        p.onPanelModelChange(this, oldModel, this.model);
      }

      doLayout();
      revalidate();

      boolean selectionChanged = false;
      for (final int[] posPath : selectedPaths) {
        final Topic topic = this.model.findForPositionPath(posPath);
        if (topic == null) {
          selectionChanged = true;
        } else if (!MindMapUtils.isHidden(topic)) {
          this.selectedTopics.add(topic);
        }
      }
      if (selectionChanged) {
        fireNotificationSelectionChanged();
      }
      repaint();
    } finally {
      this.unlock();
      if (notifyModelChangeListeners) {
        fireNotificationMindMapChanged(true);
      }
    }
  }
347555
private void prepareModel(DescriptorRepository model)
    {
        TreeMap result = new TreeMap();

        for (Iterator it = model.getDescriptorTable().values().iterator(); it.hasNext();)
        {
            ClassDescriptor classDesc = (ClassDescriptor)it.next();

            if (classDesc.getFullTableName() == null)
            {
                // not mapped to a database table
                continue;
            }

            String elementName        = getElementName(classDesc);
            Table  mappedTable        = getTableFor(elementName);
            Map    columnsMap         = getColumnsFor(elementName);
            Map    requiredAttributes = getRequiredAttributes(elementName);
            List   classDescs         = getClassDescriptorsMappingTo(elementName);

            if (mappedTable == null)
            {
                mappedTable = _schema.findTable(classDesc.getFullTableName());
                if (mappedTable == null)
                {
                    continue;
                }
                columnsMap         = new TreeMap();
                requiredAttributes = new HashMap();
                classDescs         = new ArrayList();
                _elementToTable.put(elementName, mappedTable);
                _elementToClassDescriptors.put(elementName, classDescs);
                _elementToColumnMap.put(elementName, columnsMap);
                _elementToRequiredAttributesMap.put(elementName, requiredAttributes);
            }
            classDescs.add(classDesc);
            extractAttributes(classDesc, mappedTable, columnsMap, requiredAttributes);
        }
        extractIndirectionTables(model, _schema);
    }
295289
public <S extends Model> ResultKey save(S model) {
        List<Object> columnValues = AnimaUtils.toColumnValues(model, true);
        String       sql          = this.buildInsertSQL(model, columnValues);
        Connection   conn         = getConn();
        try {

            List<Object> params = columnValues.stream()
                    .filter(Objects::nonNull)
                    .collect(toList());

            return new ResultKey(conn.createQuery(sql)
                    .withParams(params)
                    .executeUpdate()
                    .getKey());
        } finally {
            this.closeConn(conn);
            this.clean(conn);
        }
    }
120578
public static function import(Model $model)
    {
        Utils\Utils::arrayPathSet(self::$models, self::getPath($model), $model);
    }
387779
public double[] getForwards(AnalyticModel model, double[] fixingTimes)
	{
		double[] values = new double[fixingTimes.length];

		for(int i=0; i<fixingTimes.length; i++) {
			values[i] = getForward(model, fixingTimes[i]);
		}

		return values;
	}
212392
@Override
    public String marshal( final TemplateModel model ) {
        model.putInSync();
        return this.xt.toXML( model );
    }