Gets dataset.

@param featurizer the featurizer
@return the dataset
482080
protected Dataset<Sequence> getDataset(SequenceFeaturizer<Annotation> featurizer) {
      Corpus c = Corpus
                    .builder()
                    .corpusType(corpusType)
                    .source(corpus)
                    .format(corpusFormat)
                    .build();
      AnnotatableType[] required = required();
      if (required.length > 0) {
         c = c.annotate(required);
      }
      return c.asSequenceDataSet(new BIOLabelMaker(trainingAnnotation, validTags()), featurizer);
   }
811911
def dataset_format(self):
        
        data = javabridge.call(self.jobject, "getDatasetFormat", "()Lweka/core/Instances;")
        if data is None:
            return None
        else:
            return Instances(data)
1333990
public static char[] getLabelsArray(Set dataSet) {
        switch (dataSet) {
            case COMPLETE:
                return LABELS_COMPLETE;
            case MERGE:
                return LABELS_MERGE;
            case BALANCED:
                return LABELS_BALANCED;
            case LETTERS:
                return LABELS_LETTERS;
            case DIGITS:
            case MNIST:
                return LABELS_DIGITS;
            default:
                throw new UnsupportedOperationException("Unknown Set: " + dataSet);
        }
    }
293581
private String getDataSource(Set<Provenance> provenances)
	{
		if(provenances.isEmpty()) return "N/A";
		
		Set<String> dsNames = new TreeSet<String>();
		for (Provenance provenance : provenances)
		{
			String name = provenance.getDisplayName();
			if(name == null) 
				name = provenance.getStandardName();
			if(name == null && !provenance.getName().isEmpty()) 
				name = provenance.getName().iterator().next();
			if (name != null && name.length() > 0)
				dsNames.add(name.toLowerCase());
		}
		
		return StringUtils.join(dsNames, ";");
	}
1135501
public <T extends DataSource> T getDataSource() {
        T dataSource = jndiLookup(PropertyKey.DATA_SOURCE_JNDI_NAME);
        if (dataSource != null) {
            return dataSource;
        }
        dataSource = instantiateClass(PropertyKey.DATA_SOURCE_CLASS_NAME);
        if (dataSource == null) {
            throw new IllegalArgumentException("The " + PropertyKey.DATA_SOURCE_CLASS_NAME + " property is mandatory!");
        }
        return applyDataSourceProperties(dataSource);
    }
828066
public List<Object> getAll(int dataSet) throws SerializationException {
		List<Object> result = new ArrayList<Object>();
		for (Iterator<DataSet> i = dataSets.iterator(); i.hasNext();) {
			DataSet ds = i.next();
			DataSetInfo info = ds.getInfo();
			if (info.getDataSetNumber() == dataSet) {
				result.add(getData(ds));
			}
		}
		return result;
	}
86557
@SneakyThrows
    public DataSource createDataSource() {
        DataSource result = (DataSource) Class.forName(dataSourceClassName).newInstance();
        Method[] methods = result.getClass().getMethods();
        for (Entry<String, Object> entry : properties.entrySet()) {
            if (SKIPPED_PROPERTY_NAMES.contains(entry.getKey())) {
                continue;
            }
            Optional<Method> setterMethod = findSetterMethod(methods, entry.getKey());
            if (setterMethod.isPresent()) {
                setterMethod.get().invoke(result, entry.getValue());
            }
        }
        return result;
    }
230433
def get_dataset(dataset_id,**kwargs):
    

    user_id = int(kwargs.get('user_id'))

    if dataset_id is None:
        return None
    try:
        dataset_rs = db.DBSession.query(Dataset.id,
                Dataset.type,
                Dataset.unit_id,
                Dataset.name,
                Dataset.hidden,
                Dataset.cr_date,
                Dataset.created_by,
                DatasetOwner.user_id,
                null().label('metadata'),
                case([(and_(Dataset.hidden=='Y', DatasetOwner.user_id is not None), None)],
                        else_=Dataset.value).label('value')).filter(
                Dataset.id==dataset_id).outerjoin(DatasetOwner,
                                    and_(DatasetOwner.dataset_id==Dataset.id,
                                    DatasetOwner.user_id==user_id)).one()

        rs_dict = dataset_rs._asdict()

        #convert the value row into a string as it is returned as a binary
        if dataset_rs.value is not None:
            rs_dict['value'] = str(dataset_rs.value)

        if dataset_rs.hidden == 'N' or (dataset_rs.hidden == 'Y' and dataset_rs.user_id is not None):
            metadata = db.DBSession.query(Metadata).filter(Metadata.dataset_id==dataset_id).all()
            rs_dict['metadata'] = metadata
        else:
            rs_dict['metadata'] = []

    except NoResultFound:
        raise HydraError("Dataset %s does not exist."%(dataset_id))


    dataset = namedtuple('Dataset', rs_dict.keys())(**rs_dict)

    return dataset
219776
def datasetsGenerator(self, request):
        
        return self._topLevelObjectGenerator(
            request, self.getDataRepository().getNumDatasets(),
            self.getDataRepository().getDatasetByIndex)
36845
public Dataset getDataset(String datasetName) {
    // [START ]
    Dataset dataset = bigquery.getDataset(datasetName);
    // [END ]
    return dataset;
  }
956405
def dataset(ctx, client, revision, datadir, format):
    """"""
    ctx.meta['renku.datasets.datadir'] = datadir

    if ctx.invoked_subcommand is not None:
        return

    if revision is None:
        datasets = client.datasets.values()
    else:
        datasets = client.datasets_from_commit(client.repo.commit(revision))

    DATASETS_FORMATS[format](client, datasets)
484120
private ResultSetMetaData getMetaData() {

        if (metadata == null) {
            try {
                metadata = resultSet.getMetaData();
            } catch (SQLException e) {
                throw new FacesException(e);
            }
        }
        return (metadata);

    }
643232
def get_dataset(catalog, identifier=None, title=None):
    """"""

    msg = "Se requiere un 'identifier' o 'title' para buscar el dataset."
    assert identifier or title, msg
    catalog = read_catalog_obj(catalog)

    # búsqueda optimizada por identificador
    if identifier:
        try:
            return _get_dataset_by_identifier(catalog, identifier)
        except BaseException:
            try:
                catalog._build_index()
                return _get_dataset_by_identifier(catalog, identifier)
            except BaseException:
                filtered_datasets = get_datasets(
                    catalog, {"dataset": {"identifier": identifier}})
    elif title:  # TODO: is this required?
        filtered_datasets = get_datasets(
            catalog, {"dataset": {"title": title}})

    if len(filtered_datasets) > 1:
        if identifier:
            raise ce.DatasetIdRepetitionError(
                identifier, filtered_datasets)
        elif title:
            # TODO: Improve exceptions module!
            raise ce.DatasetTitleRepetitionError(title, filtered_datasets)
    elif len(filtered_datasets) == 0:
        return None
    else:
        return filtered_datasets[0]
381854
public final Map<String, DataCollector> getDataCollectors() {
		final Map<String, DataCollector> collectorsRet = new HashMap<>();
		for (final Class<DataCollector> c : collectors) {
			DataCollector dc;
			try {
				dc = c.newInstance();
				collectorsRet.put(dc.getName(), dc);
			} catch (final InstantiationException e) {
				e.printStackTrace();
			} catch (final IllegalAccessException e) {
				e.printStackTrace();
			}
		}
		return collectorsRet;
	}
118348
@Override
    public FeatureCollector getCollector() {
        JiraMode mode = featureSettings.isJiraBoardAsTeam() ? JiraMode.Board : JiraMode.Team;
        FeatureCollector collector = FeatureCollector.prototype(mode);
        FeatureCollector existing = featureCollectorRepository.findByName(collector.getName());
        if (existing != null) {
            collector.setLastRefreshTime(existing.getLastRefreshTime());
        }
        return collector;
    }
90413
public DataAccessFactory getDataAccessFactory(ConfigurableListableBeanFactory beanFactory) {
        if (this.dataAccessFactory == null) {
            dataAccessFactory = new DataAccessFactoryAdapter(//
                    new SpringDataSourceFactoryDelegate(beanFactory));
        }
        return dataAccessFactory;
    }
1308328
public String getDataset() {
    if (isReference()) {
      final LibrarySet master = (LibrarySet) getCheckedRef(LibrarySet.class, "LibrarySet");
      return master.getDataset();
    }
    return this.dataset;
  }