public abstract class ExternalComponent extends Object
An external component is a hard- or software component that is outside the
universAAL network and can be reached via a gateway
.
Instances of this class should be created only by instances of
CommunicationGateway
. The gateway that have created an instance can
be fetched by calling getGateway()
, which is important for the
instances of ComponentIntegrator
when they are notified by gateways
about the existence of external components.
To support gateways in mapping the ontological way of "addressing" in
universAAL to the kind of addressing in the external network, this class
provides the methods addPropMapping(String, ExternalDatapoint)
and
getDatapoint(String)
in terms of mapping ontological properties to
read- and writable datapoints. Gateways are expected to use this class as
means for grouping external datapoints that correspond to a distinct
component of a distinct type. Then, in each external component, all
properties mapped to the selected group of external datapoints must be
defined for that type in the used ontology. This type must be set by gateways
and can be fetched by calling getTypeURI()
. Thinking in terms of
devices, this means that all properties must belong to a single device whose
type is returned by getTypeURI()
.
Modifier | Constructor and Description |
---|---|
protected |
ExternalComponent(CommunicationGateway gw,
String componentURI,
String typeURI)
The constructor has been made 'protected' in order to force communication
gateways to create own subclasses so that each communication gateway can
create only instances defined by itself.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropMapping(String propURI,
ExternalDatapoint datapoint) |
String |
getComponentURI() |
ExternalDatapoint |
getDatapoint(String propURI) |
CommunicationGateway |
getGateway() |
String |
getTypeURI() |
protected ExternalComponent(CommunicationGateway gw, String componentURI, String typeURI)
public void addPropMapping(String propURI, ExternalDatapoint datapoint)
public ExternalDatapoint getDatapoint(String propURI)
public CommunicationGateway getGateway()
public String getComponentURI()
public String getTypeURI()
Copyright © 2018 universAAL Consortium. All rights reserved.