本文整理汇总了Java中org.gbif.dwc.terms.GbifTerm.gbifID方法的典型用法代码示例。如果您正苦于以下问题:Java GbifTerm.gbifID方法的具体用法?Java GbifTerm.gbifID怎么用?Java GbifTerm.gbifID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.gbif.dwc.terms.GbifTerm
的用法示例。
在下文中一共展示了GbifTerm.gbifID方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: selectVerbatimFields
import org.gbif.dwc.terms.GbifTerm; //导入方法依赖的package包/类
/**
* @return the select fields for the verbatim table in the simple download
*/
static List<InitializableField> selectVerbatimFields() {
ImmutableList.Builder<InitializableField> builder = ImmutableList.builder();
// always add the GBIF ID
builder.add(new InitializableField(GbifTerm.gbifID,
HiveColumns.columnFor(GbifTerm.gbifID),
HiveDataTypes.typeForTerm(GbifTerm.gbifID, true)));
for (Term term : DownloadTerms.DOWNLOAD_VERBATIM_TERMS) {
if (GbifTerm.gbifID == term) {
continue; // for safety, we code defensively as it may be added
}
builder.add(new InitializableField(term,
HiveColumns.VERBATIM_COL_PREFIX + term.simpleName().toLowerCase(),
// no escape needed due to prefix
HiveDataTypes.TYPE_STRING));
}
return builder.build();
}
示例2: selectDownloadFields
import org.gbif.dwc.terms.GbifTerm; //导入方法依赖的package包/类
/**
* @return the select fields for the interpreted table in the simple download
*/
private static List<InitializableField> selectDownloadFields(Set<Term> terms, boolean useInitializers) {
ImmutableList.Builder<InitializableField> builder = ImmutableList.builder();
// always add the GBIF ID
builder.add(new InitializableField(GbifTerm.gbifID,
HiveColumns.columnFor(GbifTerm.gbifID),
HiveDataTypes.typeForTerm(GbifTerm.gbifID, true)));
for (Term term : terms) {
if (GbifTerm.gbifID == term) {
continue; // for safety, we code defensively as it may be added
}
if (useInitializers && TermUtils.isInterpretedDate(term)) {
builder.add(new InitializableField(term, toISO8601Initializer(term), HiveDataTypes.TYPE_STRING));
} else if (useInitializers && HiveColumnsUtils.isHiveArray(term)){
builder.add(new InitializableField(term, String.format(JOIN_ARRAY_FMT,HiveColumns.columnFor(term)), HiveDataTypes.TYPE_STRING));
} else {
builder.add(new InitializableField(term, HiveColumns.columnFor(term), HiveDataTypes.TYPE_STRING));
}
}
return builder.build();
}
示例3: typeForTerm
import org.gbif.dwc.terms.GbifTerm; //导入方法依赖的package包/类
/**
* Provides the Hive data type to use for the given term and context (e.g. verbatim or interpreted) that it is being
* used.
*
* @param term to retrive the type for
* @param verbatimContext true if the term is being used in the verbatim context, otherwise false
*
* @return The correct hive type for the term in the context in which it is being used
*/
public static String typeForTerm(Term term, boolean verbatimContext) {
// regardless of context, the GBIF ID is always typed
if (GbifTerm.gbifID == term) {
return TYPED_TERMS.get(GbifTerm.gbifID);
} else if (verbatimContext) {
return TYPE_STRING; // verbatim are always string
} else {
return TYPED_TERMS.containsKey(term)
? TYPED_TERMS.get(term)
: TYPE_STRING; // interpreted term with a registered type
}
}
示例4: keyField
import org.gbif.dwc.terms.GbifTerm; //导入方法依赖的package包/类
/**
* Constructs the field for the primary key, which is a special case in that it needs a special mapping.
*/
private static InitializableField keyField() {
return new InitializableField(GbifTerm.gbifID,
HiveColumns.columnFor(GbifTerm.gbifID),
HiveDataTypes.typeForTerm(GbifTerm.gbifID, true)
// verbatim context
);
}
示例5: keyField
import org.gbif.dwc.terms.GbifTerm; //导入方法依赖的package包/类
/**
* Constructs the field for the primary key, which is a special case in that it needs a special mapping.
*/
private static HBaseField keyField() {
return new HBaseField(GbifTerm.gbifID,
HiveColumns.columnFor(GbifTerm.gbifID),
HiveDataTypes.typeForTerm(GbifTerm.gbifID, true),
HBASE_KEY_MAPPING
// special(!) mapping just for key
);
}