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

ioinformarics.oss.jackson.module.jsonld.JsonldGraph Maven / Gradle / Ivy

The newest version!
package ioinformarics.oss.jackson.module.jsonld;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;

/**
 * @author Alexander De Leon
 */
public class JsonldGraph extends BeanJsonldResource {


    JsonldGraph(Iterable graph, JsonNode context, String type, String id) {
        super(new JsonldGraphContainer(graph), context, type, id);
    }


    static class JsonldGraphContainer {
        @JsonProperty("@graph")
        @JsonInclude(JsonInclude.Include.NON_NULL)
        public final Iterable graph;

        JsonldGraphContainer(Iterable graph) {
            this.graph = graph;
        }
    }

    public interface Builder {
        static  JsonldGraphBuilder create() {
            return new JsonldGraphBuilder();
        }
    }
}







© 2015 - 2025 Weber Informatics LLC | Privacy Policy