本文整理汇总了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;
}
}
}
示例2: getLifeStage
import org.gbif.ecat.voc.LifeStage; //导入依赖的package包/类
@Enumerated(value = EnumType.STRING)
public LifeStage getLifeStage() {
return lifeStage;
}
示例3: setLifeStage
import org.gbif.ecat.voc.LifeStage; //导入依赖的package包/类
public void setLifeStage(LifeStage lifeStage) {
this.lifeStage = lifeStage;
}
示例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;
}
}
}