/** * Sets the value of a property which is referred by the given JSON Pointer. * * @param pointer defines the hierarchical path to the property value to be set. * @param propertyValue the property value to be set. * @return a copy of this Feature with the given property value set. * @throws NullPointerException if any argument is {@code null}. */ default Feature setProperty(final CharSequence pointer, final JsonValue propertyValue) { return setProperty(JsonPointer.of(pointer), propertyValue); }
/** * Sets the value of a property which is referred by the given JSON Pointer. * * @param pointer defines the hierarchical path to the property value to be set. * @param propertyValue the property value to be set. * @return a copy of this Feature with the given property value set. * @throws NullPointerException if any argument is {@code null}. */ default Feature setProperty(final CharSequence pointer, final JsonValue propertyValue) { return setProperty(JsonPointer.of(pointer), propertyValue); }
/** * Sets the value of a property which is referred by the given JSON Pointer. * * @param pointer defines the hierarchical path to the property value to be set. * @param propertyValue the property value to be set. * @return a copy of this Feature with the given property value set. * @throws NullPointerException if any argument is {@code null}. */ default Feature setProperty(final CharSequence pointer, final long propertyValue) { return setProperty(JsonPointer.of(pointer), JsonValue.of(propertyValue)); }
/** * Sets the value of a property which is referred by the given JSON Pointer. * * @param pointer defines the hierarchical path to the property value to be set. * @param propertyValue the property value to be set. * @return a copy of this Feature with the given property value set. * @throws NullPointerException if any argument is {@code null}. */ default Feature setProperty(final CharSequence pointer, final boolean propertyValue) { return setProperty(JsonPointer.of(pointer), JsonValue.of(propertyValue)); }
/** * Sets the value of a property which is referred by the given JSON Pointer. * * @param pointer defines the hierarchical path to the property value to be set. * @param propertyValue the property value to be set. * @return a copy of this Feature with the given property value set. * @throws NullPointerException if any argument is {@code null}. */ default Feature setProperty(final CharSequence pointer, final String propertyValue) { return setProperty(JsonPointer.of(pointer), JsonValue.of(propertyValue)); }
/** * Sets the value of a property which is referred by the given JSON Pointer. * * @param pointer defines the hierarchical path to the property value to be set. * @param propertyValue the property value to be set. * @return a copy of this Feature with the given property value set. * @throws NullPointerException if any argument is {@code null}. */ default Feature setProperty(final CharSequence pointer, final double propertyValue) { return setProperty(JsonPointer.of(pointer), JsonValue.of(propertyValue)); }
/** * Sets the value of a property which is referred by the given JSON Pointer. * * @param pointer defines the hierarchical path to the property value to be set. * @param propertyValue the property value to be set. * @return a copy of this Feature with the given property value set. * @throws NullPointerException if any argument is {@code null}. */ default Feature setProperty(final CharSequence pointer, final int propertyValue) { return setProperty(JsonPointer.of(pointer), JsonValue.of(propertyValue)); }
/** * Sets the value of a property which is referred by the given JSON Pointer. * * @param pointer defines the hierarchical path to the property value to be set. * @param propertyValue the property value to be set. * @return a copy of this Feature with the given property value set. * @throws NullPointerException if any argument is {@code null}. */ default Feature setProperty(final CharSequence pointer, final long propertyValue) { return setProperty(JsonPointer.of(pointer), JsonValue.of(propertyValue)); }
/** * Sets the value of a property which is referred by the given JSON Pointer. * * @param pointer defines the hierarchical path to the property value to be set. * @param propertyValue the property value to be set. * @return a copy of this Feature with the given property value set. * @throws NullPointerException if any argument is {@code null}. */ default Feature setProperty(final CharSequence pointer, final int propertyValue) { return setProperty(JsonPointer.of(pointer), JsonValue.of(propertyValue)); }
/** * Sets the value of a property which is referred by the given JSON Pointer. * * @param pointer defines the hierarchical path to the property value to be set. * @param propertyValue the property value to be set. * @return a copy of this Feature with the given property value set. * @throws NullPointerException if any argument is {@code null}. */ default Feature setProperty(final CharSequence pointer, final String propertyValue) { return setProperty(JsonPointer.of(pointer), JsonValue.of(propertyValue)); }
/** * Sets the value of a property which is referred by the given JSON Pointer. * * @param pointer defines the hierarchical path to the property value to be set. * @param propertyValue the property value to be set. * @return a copy of this Feature with the given property value set. * @throws NullPointerException if any argument is {@code null}. */ default Feature setProperty(final CharSequence pointer, final boolean propertyValue) { return setProperty(JsonPointer.of(pointer), JsonValue.of(propertyValue)); }
/** * Sets the value of a property which is referred by the given JSON Pointer. * * @param pointer defines the hierarchical path to the property value to be set. * @param propertyValue the property value to be set. * @return a copy of this Feature with the given property value set. * @throws NullPointerException if any argument is {@code null}. */ default Feature setProperty(final CharSequence pointer, final double propertyValue) { return setProperty(JsonPointer.of(pointer), JsonValue.of(propertyValue)); }
@Override public Features setProperty(final String featureId, final JsonPointer propertyPath, final JsonValue propertyValue) { Feature feature = getFeatureOrNull(featureId); if (null != feature) { feature = feature.setProperty(propertyPath, propertyValue); } else { feature = ThingsModelFactory.newFeature(featureId, ThingsModelFactory.newFeaturePropertiesBuilder() .set(propertyPath, propertyValue) .build()); } return setFeature(feature); }
@Override public Features setProperty(final String featureId, final JsonPointer propertyPath, final JsonValue propertyValue) { Feature feature = getFeatureOrNull(featureId); if (null != feature) { feature = feature.setProperty(propertyPath, propertyValue); } else { feature = ThingsModelFactory.newFeature(featureId, ThingsModelFactory.newFeaturePropertiesBuilder() .set(propertyPath, propertyValue) .build()); } return setFeature(feature); }