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

com.oceanprotocol.squid.models.service.MetadataService Maven / Gradle / Ivy

Go to download

Squid facilitate the interaction of java clients with the Ocean Protocol network

There is a newer version: 0.6.2
Show newest version
/*
 * Copyright 2018 Ocean Protocol Foundation
 * SPDX-License-Identifier: Apache-2.0
 */

package com.oceanprotocol.squid.models.service;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.oceanprotocol.squid.models.asset.AssetMetadata;

@JsonIgnoreProperties(ignoreUnknown = true)
@JsonPropertyOrder(alphabetic=true)
public class MetadataService extends Service {

    public static final String DEFAULT_SERVICE_DEFINITION_ID= "0";

    @JsonProperty
    public AssetMetadata metadata;

    public MetadataService()    {
        this.type= serviceTypes.Metadata.toString();
        this.serviceDefinitionId= DEFAULT_SERVICE_DEFINITION_ID;
    }

    public MetadataService(AssetMetadata metadata, String serviceEndpoint) {
        this(metadata, serviceEndpoint, DEFAULT_SERVICE_DEFINITION_ID);
    }

    public MetadataService(AssetMetadata metadata, String serviceEndpoint, String serviceDefinitionId)  {
        super(serviceTypes.Metadata, serviceEndpoint, serviceDefinitionId);
        this.metadata= metadata;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy