All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lappsgrid.serialization.lif.ValueObject.groovy Maven / Gradle / Ivy

There is a newer version: 2.5.0
Show newest version
/*
 * Copyright 2014 The Language Application Grid
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package org.lappsgrid.serialization.lif

import com.fasterxml.jackson.annotation.JsonProperty

/**
 * A JSON-LD value object.
 * 

* While a value object may contains other keys, for our purposes we only need * the {@literal @}value and {@literal @}type keys. *

* This class isn't currently used anywhere anymore. * @author Keith Suderman */ class ValueObject { @JsonProperty('@value') String value @JsonProperty('@type') String type public ValueObject() { } public ValueObject(String type, String value) { this.type = type; this.value = value; } public ValueObject(Map map) { if (map == null) { return } this.type = map['type'] this.value = map['value'] } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy