Interface WotThingModelExtensionResolver
public interface WotThingModelExtensionResolver
Resolver for WoT (Web of Things) ThingModels - resolves "extensions"
tm:extends and "references"
tm:ref in ThingModels by fetching referenced models and merging their contents together into a resulting TM.- Since:
- 2.4.0
-
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.ditto.wot.model.ThingModelresolveThingModelExtensions(org.eclipse.ditto.wot.model.ThingModel thingModel, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Resolves the "extension" links (tm:extends) contained in the passedthingModeland merges them into the returned ThingModel.org.eclipse.ditto.wot.model.ThingModelresolveThingModelRefs(org.eclipse.ditto.wot.model.ThingModel thingModel, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Resolves the "references" (tm:ref) contained in the passedthingModeland merges them into the returned ThingModel.
-
Method Details
-
resolveThingModelExtensions
org.eclipse.ditto.wot.model.ThingModel resolveThingModelExtensions(org.eclipse.ditto.wot.model.ThingModel thingModel, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Resolves the "extension" links (tm:extends) contained in the passedthingModeland merges them into the returned ThingModel.- Parameters:
thingModel- the ThingModel to resolve extensions in.dittoHeaders- the DittoHeaders for possibly thrown DittoRuntimeExceptions.- Returns:
- a new ThingModel with resolved extensions based on the passed in model.
- Throws:
org.eclipse.ditto.wot.model.ThingDefinitionInvalidException- if a contained extended ThingModel did not contain a valid URL.org.eclipse.ditto.wot.model.WotThingModelNotAccessibleException- if an extended WoT ThingModel could not be fetched from its configured resource.org.eclipse.ditto.wot.model.WotThingModelInvalidException- if the fetched extended ThingModel could not be parsed/interpreted as correct WoT ThingModel.
-
resolveThingModelRefs
org.eclipse.ditto.wot.model.ThingModel resolveThingModelRefs(org.eclipse.ditto.wot.model.ThingModel thingModel, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Resolves the "references" (tm:ref) contained in the passedthingModeland merges them into the returned ThingModel.- Parameters:
thingModel- the ThingModel to resolve references in.dittoHeaders- the DittoHeaders for possibly thrown DittoRuntimeExceptions.- Returns:
- a new ThingModel with resolved references based on the passed in model.
- Throws:
org.eclipse.ditto.wot.model.ThingDefinitionInvalidException- if a contained referenced ThingModel did not contain a valid URL.org.eclipse.ditto.wot.model.WotThingModelNotAccessibleException- if a referenced WoT ThingModel could not be fetched from its configured resource.org.eclipse.ditto.wot.model.WotThingModelInvalidException- if the fetched referenced ThingModel could not be parsed/interpreted as correct WoT ThingModel.
-