
org.lappsgrid.serialization.lif.ValueObject.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of all Show documentation
Show all versions of all Show documentation
A pom the depends on all LAPPS Grid modules.
/*
* 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