当前位置: 首页>>代码示例>>Java>>正文


Java LifeStage类代码示例

本文整理汇总了Java中org.gbif.ecat.voc.LifeStage的典型用法代码示例。如果您正苦于以下问题:Java LifeStage类的具体用法?Java LifeStage怎么用?Java LifeStage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


LifeStage类属于org.gbif.ecat.voc包,在下文中一共展示了LifeStage类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: mapField

import org.gbif.ecat.voc.LifeStage; //导入依赖的package包/类
@Override
public final void mapField(final VernacularName object,
		final String fieldName, final String value) throws BindException {
	super.mapField(object, fieldName, value);

	Term term = getTermFactory().findTerm(fieldName);
	logger.info("Mapping " + fieldName + " " + " " + value + " to "
			+ object);
	if (term instanceof DcTerm) {
		DcTerm dcTerm = (DcTerm) term;
		switch (dcTerm) {
		case identifier:
			object.setIdentifier(value);
			break;
		case language:
			object.setLanguage(new Locale(value));
			break;
		case source:
			object.setSource(value);
			break;
		case temporal:
			object.setTemporal(value);
			break;
		default:
			break;
		}
	}

	// DwcTerms
	if (term instanceof DwcTerm) {
		DwcTerm dwcTerm = (DwcTerm) term;
		switch (dwcTerm) {
		case countryCode:
			object.setCountryCode(value);
			break;
		case lifeStage:
			object.setLifeStage(LifeStage.valueOf(value));
			break;
		case locality:
			object.setLocality(value);
			break;
		case locationID:
			object.setLocation(conversionService.convert(value, Location.class));
			break;
		case sex:
			object.setSex(Sex.valueOf(value));
			break;
		case taxonRemarks:
			object.setTaxonRemarks(value);
			break;
		case vernacularName:
			object.setVernacularName(value);
			break;
		default:
			break;
		}
	}

	// Gbif Terms
	if (term instanceof GbifTerm) {
		GbifTerm gbifTerm = (GbifTerm) term;
		switch(gbifTerm) {
		case organismPart:
			object.setOrganismPart(value);
			break;
		case isPlural:
			object.setPlural(conversionService.convert(value, Boolean.class));
		case isPreferredName:
			object.setPreferredName(conversionService.convert(value, Boolean.class));
		default:
			break;
		}
	}
}
 
开发者ID:RBGKew,项目名称:eMonocot,代码行数:75,代码来源:FieldSetMapper.java

示例2: getLifeStage

import org.gbif.ecat.voc.LifeStage; //导入依赖的package包/类
@Enumerated(value = EnumType.STRING)
public LifeStage getLifeStage() {
	return lifeStage;
}
 
开发者ID:RBGKew,项目名称:eMonocot,代码行数:5,代码来源:VernacularName.java

示例3: setLifeStage

import org.gbif.ecat.voc.LifeStage; //导入依赖的package包/类
public void setLifeStage(LifeStage lifeStage) {
	this.lifeStage = lifeStage;
}
 
开发者ID:RBGKew,项目名称:eMonocot,代码行数:4,代码来源:VernacularName.java

示例4: mapField

import org.gbif.ecat.voc.LifeStage; //导入依赖的package包/类
@Override
public final void mapField(final VernacularName object,
		final String fieldName, final String value) throws BindException {
	super.mapField(object, fieldName, value);

	Term term = getTermFactory().findTerm(fieldName);
	logger.debug("Mapping " + fieldName + " " + " " + value + " to " + object);
	if (term instanceof DcTerm) {
		DcTerm dcTerm = (DcTerm) term;
		switch (dcTerm) {
		case identifier:
			object.setIdentifier(value);
			break;
		case language:
			object.setLanguage(new Locale(value));
			break;
		case source:
			object.setSource(value);
			break;
		case temporal:
			object.setTemporal(value);
			break;
		default:
			break;
		}
	}

	// DwcTerms
	if (term instanceof DwcTerm) {
		DwcTerm dwcTerm = (DwcTerm) term;
		switch (dwcTerm) {
		case countryCode:
			object.setCountryCode(value);
			break;
		case lifeStage:
			object.setLifeStage(LifeStage.valueOf(value));
			break;
		case locality:
			object.setLocality(value);
			break;
		case locationID:
			object.setLocation(conversionService.convert(value, Location.class));
			break;
		case sex:
			object.setSex(Sex.valueOf(value));
			break;
		case taxonRemarks:
			object.setTaxonRemarks(value);
			break;
		case vernacularName:
			object.setVernacularName(value);
			break;
		default:
			break;
		}
	}

	// Gbif Terms
	if (term instanceof GbifTerm) {
		GbifTerm gbifTerm = (GbifTerm) term;
		switch(gbifTerm) {
		case organismPart:
			object.setOrganismPart(value);
			break;
		case isPlural:
			object.setPlural(conversionService.convert(value, Boolean.class));
		case isPreferredName:
			object.setPreferredName(conversionService.convert(value, Boolean.class));
		default:
			break;
		}
	}
}
 
开发者ID:RBGKew,项目名称:powop,代码行数:74,代码来源:FieldSetMapper.java


注:本文中的org.gbif.ecat.voc.LifeStage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。