Class ContextAttribute
- java.lang.Object
-
- eu.h2020.helios_social.core.context.ContextAttribute
-
public abstract class ContextAttribute extends java.lang.Object
This is an abstract base class for context attributes. A context attribute includes a name and a value. It can also be related to one or more context sources, and the value of the attribute may be determined by the sources (i.e. sensors or other data sources).
-
-
Constructor Summary
Constructors Constructor Description ContextAttribute(java.lang.String attributeName)
Creates an context attribute
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addContextSource(ContextSource source)
Adds a new context sourcejava.util.Iterator<ContextSource>
getContextSources()
Gets all the context sourcesjava.lang.String
getName()
Gets name of a context attributeabstract java.lang.Object
getValue()
Gets value of this context attribute.void
removeContextSource(ContextSource source)
Removes a context source
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets name of a context attribute- Returns:
- the name of this attribute
-
getValue
public abstract java.lang.Object getValue()
Gets value of this context attribute. This is an abstract method that should be implemented by the upper classes.- Returns:
- the value of this attribute
-
getContextSources
public java.util.Iterator<ContextSource> getContextSources()
Gets all the context sources- Returns:
- the context sources
-
addContextSource
public void addContextSource(ContextSource source)
Adds a new context source- Parameters:
source
- the context source
-
removeContextSource
public void removeContextSource(ContextSource source)
Removes a context source- Parameters:
source
- the context source
-
-