本文整理了Java中org.apache.solr.client.solrj.beans.Field
类的一些代码示例,展示了Field
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field
类的具体详情如下:
包路径:org.apache.solr.client.solrj.beans.Field
类名称:Field
暂无
代码示例来源:origin: culturecommunication/ginco
@Field
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
代码示例来源:origin: org.apache.solr/solr-solrj
private void storeName(Field annotation) {
if (annotation.value().equals(DEFAULT)) {
if (field != null) {
name = field.getName();
} else {
String setterName = setter.getName();
if (setterName.startsWith("set") && setterName.length() > 3) {
name = setterName.substring(3, 4).toLowerCase(Locale.ROOT) + setterName.substring(4);
} else {
name = setter.getName();
}
}
} else if (annotation.value().indexOf('*') >= 0) { //dynamic fields are annotated as @Field("categories_*")
//if the field was annotated as a dynamic field, convert the name into a pattern
//the wildcard (*) is supposed to be either a prefix or a suffix, hence the use of replaceFirst
name = annotation.value().replaceFirst("\\*", "\\.*");
dynamicFieldNamePatternMatcher = Pattern.compile("^"+name+"$");
} else {
name = annotation.value();
}
}
代码示例来源:origin: spring-projects/spring-data-solr
@Override
public boolean isChildProperty() {
Field fieldAnnotation = getFieldAnnotation();
if (fieldAnnotation != null && fieldAnnotation.child()) {
return true;
}
return findAnnotation(ChildDocument.class) != null;
}
}
代码示例来源:origin: org.apache.solr/solr-solrj
if (annotation.child()) {
populateChild(field.getGenericType());
} else {
if (annotation.child()) {
populateChild(type.getComponentType());
} else {
if (annotation.child()) throw new BindingException("Map should is not a valid type for a child document");
isContainedInMap = true;
if (annotation.child()) {
populateChild(type);
代码示例来源:origin: culturecommunication/ginco
@Field
public void setLexicalValue(String lexicalValue) {
this.lexicalValue = lexicalValue;
}
代码示例来源:origin: com.hynnet/solr-solrj
private void storeName(Field annotation) {
if (annotation.value().equals(DEFAULT)) {
if (field != null) {
name = field.getName();
} else {
String setterName = setter.getName();
if (setterName.startsWith("set") && setterName.length() > 3) {
name = setterName.substring(3, 4).toLowerCase(Locale.ROOT) + setterName.substring(4);
} else {
name = setter.getName();
}
}
} else if (annotation.value().indexOf('*') >= 0) { //dynamic fields are annotated as @Field("categories_*")
//if the field was annotated as a dynamic field, convert the name into a pattern
//the wildcard (*) is supposed to be either a prefix or a suffix, hence the use of replaceFirst
name = annotation.value().replaceFirst("\\*", "\\.*");
dynamicFieldNamePatternMatcher = Pattern.compile("^"+name+"$");
} else {
name = annotation.value();
}
}
代码示例来源:origin: com.hynnet/solr-solrj
if (annotation.child()) {
populateChild(field.getGenericType());
} else {
if (annotation.child()) {
populateChild(type.getComponentType());
} else {
if (annotation.child()) throw new BindingException("Map should is not a valid type for a child document");
isContainedInMap = true;
if (annotation.child()) {
populateChild(type);
代码示例来源:origin: culturecommunication/ginco
@Field
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
代码示例来源:origin: org.dspace.dependencies.solr/dspace-solr-solrj
private void storeName(Field annotation) {
if (annotation.value().equals(Field.DEFAULT)) {
if (field != null) {
name = field.getName();
} else {
String setterName = setter.getName();
if (setterName.startsWith("set") && setterName.length() > 3) {
name = setterName.substring(3, 4).toLowerCase() + setterName.substring(4);
} else {
name = setter.getName();
}
}
}
//dynamic fields are annotated as @Field("categories_*")
else if(annotation.value().indexOf('*') >= 0){
//if the field was annotated as a dynamic field, convert the name into a pattern
//the wildcard (*) is supposed to be either a prefix or a suffix, hence the use of replaceFirst
name = annotation.value().replaceFirst("\\*", "\\.*");
dynamicFieldNamePatternMatcher = Pattern.compile("^"+name+"$");
} else {
name = annotation.value();
}
}
代码示例来源:origin: culturecommunication/ginco
@Field
public void setLexicalValue(String lexicalValue) {
this.lexicalValue = lexicalValue;
}
代码示例来源:origin: spring-projects/spring-data-solr
private String readAnnotatedFieldName() {
String fieldName = null;
if (isAnnotationPresent(org.apache.solr.client.solrj.beans.Field.class)) {
fieldName = findAnnotation(org.apache.solr.client.solrj.beans.Field.class).value();
} else if (isAnnotationPresent(Indexed.class)) {
Indexed indexedAnnotation = findAnnotation(Indexed.class);
if (indexedAnnotation != null) {
fieldName = indexedAnnotation.value();
if (!StringUtils.hasText(fieldName)) {
fieldName = indexedAnnotation.name();
}
}
}
return fieldName;
}
代码示例来源:origin: ORCID/ORCID-Source
/**
*
* @author Angel Montenegro
*
*/
public class OrgDefinedFundingTypeSolrDocument {
@Field(SolrConstants.ORG_DEFINED_FUNDING_TYPE)
private String orgDefinedFundingType;
public String getOrgDefinedFundingType() {
return orgDefinedFundingType;
}
public void setOrgDefinedFundingType(String orgDefinedFundingType) {
this.orgDefinedFundingType = orgDefinedFundingType;
}
}
代码示例来源:origin: uk.ac.ebi.pride/protein-index-search
@Field(ProteinIdentifiedFields.ACCESSION)
private String accession;
@Field(ProteinIdentifiedFields.PROJECT_ACCESSIONS)
private Set<String> projectAccessions;
@Field(ProteinIdentifiedFields.ASSAY_ACCESSIONS)
private Set<String> assayAccessions;
@Field(ProteinIdentifiedFields.SYNONYMS)
private Set<String> synonyms;
@Field(ProteinIdentifiedFields.SEQUENCE)
private String sequence;
@Field(ProteinIdentifiedFields.DESCRIPTION)
private List<String> description;
代码示例来源:origin: openwide-java/artifact-listener
@Field
private String id;
@Field("a")
private String artifactId;
@Field("g")
private String groupId;
@Field
private List<String> ec;
@Field("p")
private String type;
@Field
private List<String> tags;
@Field
private Long timestamp;
@Field("v")
private String version;
代码示例来源:origin: ORCID/ORCID-Source
@Field(SolrConstants.ORG_DISAMBIGUATED_ID)
private Long orgDisambiguatedId;
@Field(SolrConstants.ORG_DISAMBIGUATED_NAME)
private String orgDisambiguatedName;
@Field(SolrConstants.ORG_DISAMBIGUATED_CITY)
private String orgDisambiguatedCity;
@Field(SolrConstants.ORG_DISAMBIGUATED_REGION)
private String orgDisambiguatedRegion;
@Field(SolrConstants.ORG_DISAMBIGUATED_COUNTRY)
private String orgDisambiguatedCountry;
@Field(SolrConstants.ORG_DISAMBIGUATED_TYPE)
private String orgDisambiguatedType;
@Field(SolrConstants.ORG_DISAMBIGUATED_POPULARITY)
private Integer orgDisambiguatedPopularity;
@Field(SolrConstants.ORG_NAMES)
private List<String> orgNames;
@Field(SolrConstants.ORG_DISAMBIGUATED_ID_FROM_SOURCE)
private String orgDisambiguatedIdFromSource;
@Field(SolrConstants.ORG_DISAMBIGUATED_ID_SOURCE_TYPE)
private String orgDisambiguatedIdSourceType;
代码示例来源:origin: opencb/opencga
@Field
private long uid;
@Field
private String studyId;
@Field
private String type;
@Field
private int creationYear;
@Field
private String creationMonth;
@Field
private int creationDay;
@Field
private String creationDayOfWeek;
@Field
private String status;
@Field
private int release;
@Field
private int numSamples;
代码示例来源:origin: uk.ac.ebi.pride/spectrum-index-search
@Field(SpectrumFields.ID)
private String id;
@Field(SpectrumFields.PROJECT_ACCESSION)
private String projectAccession;
@Field(SpectrumFields.ASSAY_ACCESSION)
private String assayAccession;
@Field(SpectrumFields.MS_LEVEL)
private int msLevel;
@Field(SpectrumFields.PRECURSOR_CHARGE)
private int precursorCharge;
@Field(SpectrumFields.PRECURSOR_MZ)
private double precursorMz;
@Field(SpectrumFields.PRECURSOR_INTENSITY)
private double precursorIntensity;
@Field(SpectrumFields.IDENTIFIED_SPECTRA)
private boolean identifiedSpectra;
@Field(SpectrumFields.PEAKS_INTENSITIES)
private String peaksIntensities;
@Field(SpectrumFields.PEAKS_MZ)
private String peaksMz;
代码示例来源:origin: USCDataScience/sparkler
@Field private String id;
@Field("crawl_id") private String crawlId;
@Field private String url;
@Field private String group;
@Field("fetch_timestamp") private Date fetchTimestamp;
@Field("discover_depth") private Integer discoverDepth = 0;
@Field("*_score") private Map<String, Double> score = new HashMap<>();
@Field private String status = ResourceStatus.UNFETCHED.toString();
@Field("last_updated_at") private Date lastUpdatedAt;
@Field("indexed_at") private Date indexedAt;
@Field private String hostname;
@Field private String parent;
@Field("dedupe_id") private String dedupeId;
代码示例来源:origin: opencb/opencga
@Field
private long uid;
@Field
private String studyId;
@Field
private int creationYear;
@Field
private String creationMonth;
@Field
private int creationDay;
@Field
private String creationDayOfWeek;
@Field
private String status;
@Field
private List<String> phenotypes;
@Field
private int numMembers;
@Field
private int expectedSize;
代码示例来源:origin: openwide-java/artifact-listener
@Field
private String id;
@Field(MavenCentralSearchApiConstants.ARTIFACT_FIELD)
private String artifactId;
@Field(MavenCentralSearchApiConstants.GROUP_FIELD)
private String groupId;
@Field
private List<String> ec = Lists.newArrayList();
@Field
private String latestVersion;
@Field(MavenCentralSearchApiConstants.TYPE_FIELD)
private String type;
@Field
private String repositoryId;
@Field
private List<String> text = Lists.newArrayList();
@Field
private Long timestamp;
@Field
private int versionCount;
内容来源于网络,如有侵权,请联系作者删除!