com.fasterxml.jackson.annotation.JsonIgnore Java Examples

The following examples show how to use com.fasterxml.jackson.annotation.JsonIgnore. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SCIMUserAddressConf.java    From syncope with Apache License 2.0 6 votes vote down vote up
@JsonIgnore
public Map<String, String> asMap() {
    Map<String, String> map = new HashMap<>();

    if (formatted != null) {
        map.put("formatted", formatted);
    }
    if (streetAddress != null) {
        map.put("streetAddress", streetAddress);
    }
    if (locality != null) {
        map.put("locality", locality);
    }
    if (region != null) {
        map.put("region", region);
    }
    if (postalCode != null) {
        map.put("postalCode", postalCode);
    }
    if (country != null) {
        map.put("country", country);
    }

    return Collections.unmodifiableMap(map);
}
 
Example #2
Source File: DisplayGTK.java    From qemu-java with GNU General Public License v2.0 5 votes vote down vote up
@JsonIgnore
@Override
public java.util.List<java.lang.String> getFieldNames() {
	java.util.List<java.lang.String> names = super.getFieldNames();
	names.add("grab-on-hover");
	return names;
}
 
Example #3
Source File: OpenApiObjectGenerator.java    From flow with Apache License 2.0 5 votes vote down vote up
private Map<String, Schema> getPropertiesFromClassDeclaration(
        TypeDeclaration<?> typeDeclaration) {
    Map<String, Schema> properties = new TreeMap<>();
    for (FieldDeclaration field : typeDeclaration.getFields()) {
        if (field.isTransient() || field.isStatic()
                || field.isAnnotationPresent(JsonIgnore.class)) {
            continue;
        }
        Optional<String> fieldDescription = field.getJavadoc()
                .map(javadoc -> javadoc.getDescription().toText());
        field.getVariables().forEach(variableDeclarator -> {
            Schema propertySchema = parseTypeToSchema(
                    variableDeclarator.getType(),
                    fieldDescription.orElse(""));
            if (field.isAnnotationPresent(Nullable.class)
                    || GeneratorUtils.isTrue(propertySchema.getNullable())) {
                // Temporarily set nullable to indicate this property is
                // not required
                propertySchema.setNullable(true);
            }
            addFieldAnnotationsToSchema(field, propertySchema);
            properties.put(variableDeclarator.getNameAsString(),
                    propertySchema);
        });
    }
    return properties;
}
 
Example #4
Source File: MeasureCatalogueMeasure.java    From Knowage-Server with GNU Affero General Public License v3.0 5 votes vote down vote up
/**
 * Get the hierarchies of the associated dataset
 * @return
 */
@JsonIgnore
public Set<HierarchyWrapper> getHierarchies(){
	Set<HierarchyWrapper> hierarchies = new HashSet<HierarchyWrapper>();
	for (Iterator<MeasureCatalogueDimension> iterator = datasetDimensions.iterator(); iterator.hasNext();) {
		MeasureCatalogueDimension dimensionWrapper = (MeasureCatalogueDimension) iterator.next();
		hierarchies.add(dimensionWrapper.getHierarchy());
	}
	return hierarchies;
}
 
Example #5
Source File: IamSession.java    From super-cloudops with Apache License 2.0 5 votes vote down vote up
@JsonIgnore
@Override
public Collection<Object> getAttributeKeys() throws InvalidSessionException {
	Map<Object, Object> attributes = getAttributes();
	if (isNull(attributes)) {
		return emptySet();
	}
	return attributes.keySet();
}
 
Example #6
Source File: CpuInfoS390.java    From qemu-java with GNU General Public License v2.0 5 votes vote down vote up
@JsonIgnore
@Override
public java.util.List<java.lang.String> getFieldNames() {
	java.util.List<java.lang.String> names = super.getFieldNames();
	names.add("cpu-state");
	return names;
}
 
Example #7
Source File: Subscription.java    From tindroid with Apache License 2.0 5 votes vote down vote up
@JsonIgnore
public String getUnique() {
    if (topic == null) {
        return user;
    }
    if (user == null) {
        return topic;
    }
    return topic + ":" + user;
}
 
Example #8
Source File: QCryptoBlockOptionsBase.java    From qemu-java with GNU General Public License v2.0 5 votes vote down vote up
@JsonIgnore
@Override
public java.util.List<java.lang.String> getFieldNames() {
	java.util.List<java.lang.String> names = super.getFieldNames();
	names.add("format");
	return names;
}
 
Example #9
Source File: ConfigDocItem.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@JsonIgnore
@Override
public ConfigPhase getConfigPhase() {
    if (isConfigSection()) {
        return configDocSection.getConfigPhase();
    } else if (isConfigKey()) {
        return configDocKey.getConfigPhase();
    }

    return null;
}
 
Example #10
Source File: ListTransformSpec.java    From render with GNU General Public License v2.0 5 votes vote down vote up
@JsonIgnore
public TransformSpec getLastSpec() {
    final TransformSpec lastSpec;
    if ((specList.size() > 0)) {
        lastSpec = specList.get(specList.size() - 1);
    } else {
        lastSpec = null;
    }
    return lastSpec;
}
 
Example #11
Source File: WireTapStepParser.java    From camel-k-runtime with Apache License 2.0 5 votes vote down vote up
@JsonIgnore
public String getEndpointUri() {
    String answer = getUri();

    if (parameters != null) {
        try {
            answer = URISupport.appendParametersToURI(answer, parameters);
        } catch (URISyntaxException | UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        }
    }

    return answer;
}
 
Example #12
Source File: CpuModelCompareInfo.java    From qemu-java with GNU General Public License v2.0 5 votes vote down vote up
@JsonIgnore
@Override
public java.util.List<java.lang.String> getFieldNames() {
	java.util.List<java.lang.String> names = super.getFieldNames();
	names.add("result");
	names.add("responsible-properties");
	return names;
}
 
Example #13
Source File: InterfaceDescriptor.java    From okapi with Apache License 2.0 5 votes vote down vote up
/**
 * Get routing entries as list.
 */
@JsonIgnore
public List<RoutingEntry> getAllRoutingEntries() {
  List<RoutingEntry> all = new ArrayList<>();
  if (handlers != null) {
    Collections.addAll(all, handlers);
  }
  return all;
}
 
Example #14
Source File: SchemaInfoAlternate.java    From qemu-java with GNU General Public License v2.0 5 votes vote down vote up
@JsonIgnore
@Override
public java.util.List<java.lang.String> getFieldNames() {
	java.util.List<java.lang.String> names = super.getFieldNames();
	names.add("members");
	return names;
}
 
Example #15
Source File: Space.java    From xyz-hub with Apache License 2.0 5 votes vote down vote up
@JsonIgnore
public CacheProfile getCacheProfile(boolean skipCache, boolean autoConfig) {
  // Cache is manually deactivated, either for the space or for this specific request
  if (getCacheTTL() == 0 || skipCache) {
    return CacheProfile.NO_CACHE;
  }

  // Cache is manually set -> use those settings instead
  if (getCacheTTL() > 0) {
    return new CacheProfile(getCacheTTL() / 3, getCacheTTL(), Long.MAX_VALUE, getContentUpdatedAt());
  }

  // Automatic cache configuration is not active.
  if (!autoConfig) {
    return CacheProfile.NO_CACHE;
  }

  double volatility = getVolatility();
  long timeSinceLastUpdate = Service.currentTimeMillis() - getContentUpdatedAt();

  // 0 min to 2 min -> no cache
  if (timeSinceLastUpdate < 2 * CONTENT_UPDATED_AT_INTERVAL_MILLIS) {
    return CacheProfile.NO_CACHE;
  }

  // 2 min to (1 hour + volatility penalty time ) -> cache only in the service
  long volatilityPenalty = (long) (volatility * volatility * TimeUnit.DAYS.toMillis(7));
  if (timeSinceLastUpdate < TimeUnit.HOURS.toMillis(1) + volatilityPenalty) {
    return new CacheProfile(0, 0, CacheProfile.MAX_SERVICE_TTL, getContentUpdatedAt());
  }

  // no changes for more than (1 hour + volatility penalty time ) -> cache in the service and in the browser
  return new CacheProfile(TimeUnit.MINUTES.toMillis(3), TimeUnit.HOURS.toMillis(24), CacheProfile.MAX_SERVICE_TTL,
      getContentUpdatedAt());
}
 
Example #16
Source File: CreateContainerCmd.java    From docker-java with Apache License 2.0 5 votes vote down vote up
/**
 *
 * @deprecated see {@link #getHostConfig()}
 */
@Deprecated
@CheckForNull
@JsonIgnore
default Long getMemory() {
    return getHostConfig().getMemory();
}
 
Example #17
Source File: InterfaceDescriptor.java    From okapi with Apache License 2.0 5 votes vote down vote up
/**
 * checks if interface descriptor is certain type.
 * @param type type to check
 */
@JsonIgnore
public boolean isType(String type) {
  String haveType;
  if (id.startsWith("_")) {
    haveType = "system";
  } else if (interfaceType == null) {
    haveType = "proxy";
  } else {
    haveType = interfaceType;
  }
  return type.equals(haveType);
}
 
Example #18
Source File: SnapshotRuntimeData.java    From batfish with Apache License 2.0 5 votes vote down vote up
/**
 * Returns set of {@link NodeInterfacePair}s representing all interfaces with {@link
 * InterfaceRuntimeData#getLineUp() lineUp} set to {@code false}.
 */
@JsonIgnore
@Nonnull
public Set<NodeInterfacePair> getBlacklistedInterfaces() {
  return _runtimeData.entrySet().stream()
      .flatMap(
          nodeEntry ->
              nodeEntry.getValue().getInterfaces().entrySet().stream()
                  .filter(ifaceEntry -> Objects.equals(ifaceEntry.getValue().getLineUp(), false))
                  .map(
                      ifaceEntry ->
                          NodeInterfacePair.of(nodeEntry.getKey(), ifaceEntry.getKey())))
      .collect(ImmutableSet.toImmutableSet());
}
 
Example #19
Source File: PathMetadata.java    From incubator-taverna-language with Apache License 2.0 5 votes vote down vote up
@JsonIgnore
@Deprecated
public Path getFolder() {
	Proxy bundledAs = getBundledAs();
	if (bundledAs == null) {
		return null;
	}
	return bundledAs.getFolder();
}
 
Example #20
Source File: PlayerEquipment.java    From MantaroBot with GNU General Public License v3.0 5 votes vote down vote up
@JsonIgnore
public boolean equipItem(Item item) {
    EquipmentType type = getTypeFor(item);
    if (type == null || type.getType() != 0)
        return false;

    equipment.put(type, Items.idOf(item));
    if (item instanceof Breakable) //should always be?
        durability.put(type, ((Breakable) item).getMaxDurability());

    return true;
}
 
Example #21
Source File: FieldSegment.java    From ojai with Apache License 2.0 4 votes vote down vote up
@Override
@JsonIgnore
public NameSegment getNameSegment() {
  return this;
}
 
Example #22
Source File: Company.java    From Spring-Boot-Blog-REST-API with GNU Affero General Public License v3.0 4 votes vote down vote up
@JsonIgnore
@Override
public Long getUpdatedBy() {
	return super.getUpdatedBy();
}
 
Example #23
Source File: CreateEmoRoleRequest.java    From emodb with Apache License 2.0 4 votes vote down vote up
@JsonIgnore
public EmoRoleKey getRoleKey() {
    return _roleKey;
}
 
Example #24
Source File: AccumuloTable.java    From presto with Apache License 2.0 4 votes vote down vote up
@JsonIgnore
public String getFullTableName()
{
    return getFullTableName(schema, table);
}
 
Example #25
Source File: PhoenixSplit.java    From presto with Apache License 2.0 4 votes vote down vote up
@JsonIgnore
public PhoenixInputSplit getPhoenixInputSplit()
{
    return phoenixInputSplit.getPhoenixInputSplit();
}
 
Example #26
Source File: KGuildExt.java    From kyoko with MIT License 4 votes vote down vote up
@JsonIgnore
@Override
public boolean large() {
    return super.large();
}
 
Example #27
Source File: CandidateWorkHistory.java    From sdk-rest with MIT License 4 votes vote down vote up
@JsonIgnore
public void setCustomTextBlock2(String customTextBlock2) {
	this.customTextBlock2 = customTextBlock2;
}
 
Example #28
Source File: ClientCorporation.java    From sdk-rest with MIT License 4 votes vote down vote up
@JsonIgnore
public void setPhone(String phone) {
	this.phone = phone;
}
 
Example #29
Source File: UITaskMetric.java    From jstorm with Apache License 2.0 4 votes vote down vote up
@JsonIgnore
@Override
public List<ErrorEntity> getErrors() {
    return super.getErrors();
}
 
Example #30
Source File: FirstNestedDTO.java    From james-project with Apache License 2.0 4 votes vote down vote up
@JsonIgnore
public FirstNestedType toDomainObject() {
    return new FirstNestedType(foo);
}