Java 类org.codehaus.jackson.annotate.JsonAnyGetter 实例源码

项目:gluu    文件:Extension.java   
/**
 * Return the value for the field with a given name and type.
 * 
 * @param field
 *        The name of the field to retrieve the value of.
 * @param extensionFieldType
 *        The type of the field.
 * @return The value for the field with the given name.
 * @throws NoSuchElementException
 *         if this schema does not contain a field of the given name.
 * @throws IllegalArgumentException
 *         if the given field is null or an empty string or if the extensionFieldType is null.
 */
@JsonAnyGetter
public <T> T getField(String field, ExtensionFieldType<T> extensionFieldType) {
    if (field == null || field.isEmpty()) {
        throw new IllegalArgumentException("Invalid field name");
    }
    if (extensionFieldType == null) {
        throw new IllegalArgumentException("Invalid field type");
    }

    if (!isFieldPresent(field)) {
        throw new NoSuchElementException("Field " + field + " not valid in this extension");
    }

    return extensionFieldType.fromString(fields.get(field).value);
}
项目:gbif-api    文件:VerbatimNameUsage.java   
/**
 * This private method is only for serialization via jackson and not exposed anywhere else!
 * It maps the verbatimField terms into properties with their full qualified name.
 */
@JsonAnyGetter
private Map<String, String> jsonVerbatimFields() {
  Map<String, String> extendedProps = Maps.newHashMap();
  for (Map.Entry<Term, String> prop : fields.entrySet()) {
    extendedProps.put(prop.getKey().qualifiedName(), prop.getValue());
  }
  return extendedProps;
}
项目:gbif-api    文件:VerbatimOccurrence.java   
/**
 * This private method is only for serialization via jackson and not exposed anywhere else!
 * It maps the verbatimField terms into properties with their full qualified name.
 */
@JsonAnyGetter
private Map<String, String> jsonVerbatimFields() { // note: for 1.6.0 MUST use non-getter name; otherwise doesn't matter
  Map<String, String> extendedProps = Maps.newHashMap();
  for (Map.Entry<Term, String> prop : verbatimFields.entrySet()) {
    extendedProps.put(prop.getKey().qualifiedName(), prop.getValue());
  }
  return extendedProps;
}
项目:gbif-api    文件:Occurrence.java   
/**
 * This private method is only for serialization via jackson and not exposed anywhere else!
 * It maps the verbatimField terms into properties with their simple name or qualified names for UnknownTerms.
 */
@JsonAnyGetter
private Map<String, String> jsonVerbatimFields() {
  Map<String, String> extendedProps = Maps.newHashMap();
  for (Map.Entry<Term, String> prop : getVerbatimFields().entrySet()) {
    Term t = prop.getKey();
    if (t instanceof UnknownTerm || PROPERTIES.contains(t.simpleName())) {
      extendedProps.put(t.qualifiedName(), prop.getValue());
    } else {
      // render all terms in controlled enumerations as simple names only - unless we have a property of that name already!
      extendedProps.put(t.simpleName(), prop.getValue());
    }
  }
  return extendedProps;
}
项目:GitHub    文件:Jackson1Annotator.java   
@Override
public void anyGetter(JMethod getter) {
    getter.annotate(JsonAnyGetter.class);
}
项目:ethereum-java-wallet    文件:Result.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:ethereum-java-wallet    文件:Transactions.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:ditb    文件:ColumnSchemaModel.java   
/**
 * @return the map for holding unspecified (user) attributes
 */
@XmlAnyAttribute
@JsonAnyGetter
public Map<QName,Object> getAny() {
  return attrs;
}
项目:ditb    文件:TableSchemaModel.java   
/**
 * @return the map for holding unspecified (user) attributes
 */
@XmlAnyAttribute
@JsonAnyGetter
public Map<QName,Object> getAny() {
  return attrs;
}
项目:skygiraffe-slackbot    文件:RegReportRq.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:ParametersMainRq.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Parameter.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Datum.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Action.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Row.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Parameter.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:WritebackRq.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:WBData.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:WritebackStatus.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:CheckWriteBackRq.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:ActionDataRq.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:ParametrizedReportRequest.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Team.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Action.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Payload.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:TokenResponse.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:SlackResponse.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:User.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:IntMessageRequest.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Attachment.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Channel.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Folder.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Data.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:SlicerMember.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:ReportMetaData.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Datum.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Action.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:AllowedMember.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:Navigation.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}
项目:skygiraffe-slackbot    文件:ReportSharedSlicer.java   
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
    return this.additionalProperties;
}