本文整理匯總了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;
}
}
}