Search in sources :

Example 1 with MetadataFormat

use of org.mule.metadata.api.model.MetadataFormat in project mule by mulesoft.

the class TestMultiLevelKeyResolver method getInputMetadata.

@Override
public MetadataType getInputMetadata(MetadataContext context, LocationKey key) throws MetadataResolvingException, ConnectionException {
    checkLocationKey(key);
    final ObjectTypeBuilder objectBuilder = BaseTypeBuilder.create(new MetadataFormat(key.toString(), key.toString(), APPLICATION_JAVA_MIME_TYPE)).objectType();
    objectBuilder.addField().key("CONTINENT").value().stringType();
    objectBuilder.addField().key("COUNTRY").value().stringType();
    objectBuilder.addField().key("CITY").value().stringType();
    return objectBuilder.build();
}
Also used : MetadataFormat(org.mule.metadata.api.model.MetadataFormat) ObjectTypeBuilder(org.mule.metadata.api.builder.ObjectTypeBuilder)

Aggregations

ObjectTypeBuilder (org.mule.metadata.api.builder.ObjectTypeBuilder)1 MetadataFormat (org.mule.metadata.api.model.MetadataFormat)1