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

org.mnode.ical4j.json.schema.SchemaServiceBuilder Maven / Gradle / Ivy

The newest version!
package org.mnode.ical4j.json.schema;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import net.fortuna.ical4j.model.Property;
import net.fortuna.ical4j.model.component.VAvailability;

public class SchemaServiceBuilder extends AbstractSchemaBuilder {

    public SchemaServiceBuilder() {
        super("Service");
    }

    @Override
    public JsonNode build() {
        ObjectNode node = createObjectNode();
        putIfNotNull("@id", node, component.getProperty(Property.UID));
        putIfNotNull("name", node, component.getProperty(Property.SUMMARY));
        putIfNotNull("description", node, component.getProperty(Property.DESCRIPTION));
        putIfNotNull("url", node, component.getProperty(Property.URL));
        return node;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy