ContextIntegrator
Fri Jan 27 19:44:48 KST 2006
Root Package
Class Diagrams
diagram <default>
Subpackages
package Resources
package jess
package ucam
Classes
class CIRunner
class ContextDM
class ContextIntegrator
class ContextRepository
class FlashService
class HowFusion
class IdentityFusion
class InferenceEngine
class InterpretIntention
class RegistrationUser
class VotingMethod
class WhatFusion
class WhenFusion
class WhereFusion
class WhoFusion
class WhyFusion
Class Diagrams
Class Diagram <default>
package: <default>
Package Nodes
Resources
Class Nodes
CIRunner
ContextDM
ContextIntegrator
ContextRepository
FlashService
HowFusion
IdentityFusion
InferenceEngine
InterpretIntention
RegistrationUser
VotingMethod
WhatFusion
WhenFusion
WhereFusion
WhoFusion
WhyFusion
Package Node Detail
Package Resources
Class Detail
Class CIRunner
java.lang.Object
  |
  +--java.lang.Thread
       |
       +--ucam.ubiucam.ubiservice.contextintegrator.CIRunner
public class CIRunner
Extends:
java.lang.Thread
This class is ready to test ContextIntegrator with Communicator.


It registers the instance of ContextIntegrator and Communicator.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
   The Instance of ContextIntegrator Class
 
private Communicator
   The Instance of Communicator Class
 
Constructor Summary
public
   Initializes a newly CIRunTester Object.
 
Method Summary
public static void
main(String args)
Field Detail
m_CI
private ContextIntegrator m_CI
The Instance of ContextIntegrator Class

m_Comm
private Communicator m_Comm
The Instance of Communicator Class
Constructor Detail
CIRunner
public CIRunner()
Initializes a newly CIRunTester Object.

Method Detail
main
public static void main(String args)
Class ContextDM
public class ContextDM
This class is ready to make a decision for each element of IntegratedContext.


It registers the instance of IntegratedContext.
It registers the instance of WhoFusion, WhatFusion, WhereFusion,
WhenFusion, HowFusion, and WhyFusion.
It makes IntegratedContext by decision making process of each 5W1H context.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
public boolean
   The Value indicating if IntegratedContext is generated or not
 
private HowFusion
   The Instance of HowFusion
 
public IntegratedContext
   The Instance of IntegratedContext
 
private WhatFusion
   The Instance of WhatFusion
 
private WhenFusion
   The Instance of WhenFusion
 
private WhereFusion
   The Instance of WhereFusion
 
private WhoFusion
   The Instance of WhoFusion
 
private WhyFusion
   The Instance of WhyFusion
 
Constructor Summary
public
   It initializes a newly ContextDM Object.
 
Method Summary
public synchronized void
addHowContext(HowContext how)
   This method adds HowContext object.
 
public synchronized void
addWhatContext(SensorWhatContext what)
   This method adds WhatContext object.
 
public synchronized void
addWhenContext(WhenContext when)
   This method adds WhenContext object.
 
public synchronized void
addWhereContext(WhereContext where)
   This method adds WhereContext object.
 
public synchronized void
addWhoContext(WhoContext who)
   This method adds WhoContext object.
 
public synchronized void
addWhyContext(WhyContext why)
   This method adds WhyContext object.
 
public synchronized void
   This method makes decision to generate IntegratedContext


It checks whether the integration performs within a given interval.
 
public boolean
   This method represents whether IntegratedContext is generated or not.
 
public synchronized IntegratedContext
   This method returns the decided IntegratedContext.
 
public synchronized void
   This method removes all elements of 5W1H context objects.
 
Field Detail
m_FlagIntegratedContext
public boolean m_FlagIntegratedContext = false
The Value indicating if IntegratedContext is generated or not

m_HowFusion
private HowFusion m_HowFusion
The Instance of HowFusion

m_IntegratedContext
public IntegratedContext m_IntegratedContext
The Instance of IntegratedContext

m_WhatFusion
private WhatFusion m_WhatFusion
The Instance of WhatFusion

m_WhenFusion
private WhenFusion m_WhenFusion
The Instance of WhenFusion

m_WhereFusion
private WhereFusion m_WhereFusion
The Instance of WhereFusion

m_WhoFusion
private WhoFusion m_WhoFusion
The Instance of WhoFusion

m_WhyFusion
private WhyFusion m_WhyFusion
The Instance of WhyFusion
Constructor Detail
ContextDM
public ContextDM()
It initializes a newly ContextDM Object.


It generates the instances of IntegratedContext.
It also generates the instances of Classes for 5W1H fusion(Who, What, Where, When, How, and Why).
Method Detail
addHowContext
public synchronized void addHowContext(HowContext how)
This method adds HowContext object.


It stores HowContext object to the Vector of HowFusion.

addWhatContext
public synchronized void addWhatContext(SensorWhatContext what)
This method adds WhatContext object.


It stores SensorWhatContext object to the Vector of WhatFusion.

addWhenContext
public synchronized void addWhenContext(WhenContext when)
This method adds WhenContext object.


It stores WhenContext object to the Vector of WhenFusion.

addWhereContext
public synchronized void addWhereContext(WhereContext where)
This method adds WhereContext object.


It stores WhereContext object to the Vector of WhereFusion.

addWhoContext
public synchronized void addWhoContext(WhoContext who)
This method adds WhoContext object.


It stores WhoContext object to the Vector of WhoFusion.

addWhyContext
public synchronized void addWhyContext(WhyContext why)
This method adds WhyContext object.


It stores WhyContext object to the Vector of WhyFusion.

DecisionMaking
public synchronized void DecisionMaking()
This method makes decision to generate IntegratedContext


It checks whether the integration performs within a given interval.

getFlag
public boolean getFlag()
This method represents whether IntegratedContext is generated or not.

Returns:
a flag about the state of the integration.

getIntegratedContext
public synchronized IntegratedContext getIntegratedContext()
This method returns the decided IntegratedContext.


It gets IntegratedContext.
Returns:
IntegratedContext, if only if decision making occurs,
null, otherwise.

removeAllElements
public synchronized void removeAllElements()
This method removes all elements of 5W1H context objects.


It removes all 5W1H context objects in the Vectors.
Class ContextIntegrator
java.lang.Object
  |
  +--java.lang.Thread
       |
       +--ucam.ubiucam.ubiservice.contextintegrator.ContextIntegrator
public class ContextIntegrator
Extends:
java.lang.Thread
This class is ready to integrate the inputted context as the form of IntegratedContext.


It registers the instance of IntegratedContext, ContextDM and so on.
It generates IntegratedContext, and transfers IntegratedContext to ContextManager.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
private final static int
   The Instance of Integer Value for maximum array
 
private ContextManager
   The Instance of ContextManager Class
 
private ContextDM
   The Instance of ContextDM Class
 
   The Instance of ContextRepository Class
 
private FinalContext
   The Instance of FinalContext Class
 
private IntegratedContext
   The Instance of IntegratedContext Class
 
   The Instance of InferenceEngine Class
 
private Context5W1H
   The Instance of Context5W1H Class
 
   The Instance of RegistrationUser Class
 
private Timer
   The Instance of Timer
 
private Vector
   The Instance of the Vector for Final Context
 
private Vector
   The Instance of the Vector for Preliminary Context according to each user
 
Constructor Summary
public
   It initializes a newly ContextIntegrator Object.
 
Method Summary
public void
addContext(Context5W1H context)
   This method receives Context5W1H object from Self Configuration Manger.
 
private void
   This method analyzes the classified context as each element of 5W1H
and tranfers each component to ContextDM.
 
private void
   This method just passes FinalContext to ContextManager.
 
private void
   This method determines the interval of integration, and gets IntegratedContext.
 
public void
run()
   This method runs ContextIntegrator Class as a Thread.
 
public void
setReference(ContextManager CM)
   This method registers the ContextManager object.
 
Field Detail
MAX_VALUE
private final static int MAX_VALUE = 256
The Instance of Integer Value for maximum array

m_CManager
private ContextManager m_CManager
The Instance of ContextManager Class

m_ContextDM
private ContextDM m_ContextDM
The Instance of ContextDM Class

m_CRepository
private ContextRepository m_CRepository
The Instance of ContextRepository Class

m_FContext
private FinalContext m_FContext
The Instance of FinalContext Class

m_IContext
private IntegratedContext m_IContext
The Instance of IntegratedContext Class

m_IEngine
private InferenceEngine m_IEngine
The Instance of InferenceEngine Class

m_PContextOther
private Context5W1H m_PContextOther
The Instance of Context5W1H Class

m_Registration
private RegistrationUser m_Registration
The Instance of RegistrationUser Class

m_Timer
private Timer m_Timer
The Instance of Timer

m_VFContext
private Vector m_VFContext
The Instance of the Vector for Final Context

m_VPContexts
private Vector m_VPContexts
The Instance of the Vector for Preliminary Context according to each user
Constructor Detail
ContextIntegrator
public ContextIntegrator()
It initializes a newly ContextIntegrator Object.


It generates some instances.
Method Detail
addContext
public void addContext(Context5W1H context)
This method receives Context5W1H object from Self Configuration Manger.


It classifies whether ContextType is PRIMINARYCONTEXT or FINALCONTEXT.
And, it adds the classifed context to the Vector.
Parameters:
context Context5W1H object received from Self Configuration Manger

analyzeContext
private void analyzeContext()
This method analyzes the classified context as each element of 5W1H
and tranfers each component to ContextDM.


It generates the instance of PreliminaryContext and SensorWhatContext.
It transfers each element of PreliminaryContext to ContextDM Class.
And then, it calls fusePreliminaryContext().

fuseFinalContext
private void fuseFinalContext()
This method just passes FinalContext to ContextManager.


Will be updated!

fusePreliminaryContext
private void fusePreliminaryContext()
This method determines the interval of integration, and gets IntegratedContext.


It performs decision making for a given interval.
It saves IntegratedContext to Context Repository and transfers it to Inference Engine.

run
public void run()
This method runs ContextIntegrator Class as a Thread.


It calls the method analyzeContext() as a thread.

setReference
public void setReference(ContextManager CM)
This method registers the ContextManager object.
Class ContextRepository
public class ContextRepository
This class is ready to save the result of IntegratedContext.


It registers the instance of the vector for IntegratedContext.
It saves and retreives IntegratedContexts.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
private static String
   The Instance of String for File Name
 
private boolean
   The Instance of boolean for checking the same identity
 
private ArrayList
   The Instance of ArrayList for Integrated Context
 
private IntegratedContext
   The Instance of IntegratedContext Class
 
Constructor Summary
public
   It initializes a newly ContextRepository Object.
 
Method Summary
public void
addContext(IntegratedContext icontext)
   This method adds IntegratedContext object from ContextIntegrator.
 
public void
   This method deletes all the saved data in a file (Initialization).
 
public Context5W1H
CompareConverter(Context5W1H inputcontext)
   This method compenstates the inputted context by using the recorded context in Context Repository.
 
public IntegratedContext
   This method returns the obtained IntegratedContext object.
 
private void
RecoverObjectFromFile(IntegratedContext currentIC)
   This method reads the saved objects from a file.
 
public void
   This method removes all elements of IntegratedContext objects.
 
public String
SearchObjectFromFile(String identity)
   This method searches the stored IntegratedContext object from a file.
 
private void
   This method writes ArrayList object in a file.
 
Field Detail
FILE_NAME
private static String FILE_NAME = "Resources/repository/CI_Repository.ci"
The Instance of String for File Name

isSameID
private boolean isSameID
The Instance of boolean for checking the same identity

m_AIContext
private ArrayList m_AIContext
The Instance of ArrayList for Integrated Context

m_IContext
private IntegratedContext m_IContext
The Instance of IntegratedContext Class
Constructor Detail
ContextRepository
public ContextRepository()
It initializes a newly ContextRepository Object.


It generates the instances of the vector for IntegratedContext.
Method Detail
addContext
public void addContext(IntegratedContext icontext)
This method adds IntegratedContext object from ContextIntegrator.


It saves Integrated Contexts to a file.
Parameters:
icontext IntegratedContext object

CleanFile
public void CleanFile()
This method deletes all the saved data in a file (Initialization).


CompareConverter
public Context5W1H CompareConverter(Context5W1H inputcontext)
This method compenstates the inputted context by using the recorded context in Context Repository.

Parameters:
inputcontext Context5W1H object from ContextIntegrator class

getICHistory
public IntegratedContext getICHistory()
This method returns the obtained IntegratedContext object.


RecoverObjectFromFile
private void RecoverObjectFromFile(IntegratedContext currentIC)
This method reads the saved objects from a file.


It adds the recorded Integrated Contexts to m_AIContext ArryList.
Parameters:
currentIC the recorded IntegratedContext object

removeAllElements
public void removeAllElements()
This method removes all elements of IntegratedContext objects.


It removes all integrated context objects in the Vectors.

SearchObjectFromFile
public String SearchObjectFromFile(String identity)
This method searches the stored IntegratedContext object from a file.

Parameters:
identity String: the user's identity

WriteObjectToFile
private void WriteObjectToFile()
This method writes ArrayList object in a file.


It saves Integrated Contexts to a file.
Class HowFusion
public class HowFusion
This class is ready to make a decision for IntegratedHowContext.


It registers the instance of the Vector for HowContext
and the instance of VotingMethod.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
private Vector
   The Instance of the Vector for HowContext
 
private VotingMethod
   The Instance of VotingMethod
 
private Vector
   The Instance of the Vector for SensorWhatContext
 
Constructor Summary
public
   It initializes a newly HowFusion Object.
 
Method Summary
public synchronized void
addHowContext(HowContext how)
public synchronized void
addWhatContext(SensorWhatContext what)
public HowContext
public synchronized void
Field Detail
m_VHow
private Vector m_VHow
The Instance of the Vector for HowContext

m_Vote
private VotingMethod m_Vote
The Instance of VotingMethod

m_VWhat
private Vector m_VWhat
The Instance of the Vector for SensorWhatContext
Constructor Detail
HowFusion
public HowFusion()
It initializes a newly HowFusion Object.

Method Detail
addHowContext
public synchronized void addHowContext(HowContext how)

addWhatContext
public synchronized void addWhatContext(SensorWhatContext what)

IntegrateHowContext
public HowContext IntegrateHowContext()

removeAllElements
public synchronized void removeAllElements()
Class IdentityFusion
java.lang.Object
  |
  +--java.lang.Thread
       |
       +--ucam.ubiucam.ubiservice.contextintegrator.IdentityFusion
public class IdentityFusion
Extends:
java.lang.Thread
This class is ready to make a decision for Identity.


It registers the instance of of the Vector for WhoContext
and the instance of VotingMethod.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
public static String
   The Instance of String for File Name
 
public String
   The Instance of String for User Identity
 
public Context5W1H
   The Instance of Context5W1H
 
Constructor Summary
public
   It initializes a newly IdentityFusion Object.
 
Method Summary
public void
addContext(Context5W1H context)
public void
public void
public String
public void
SaveIdentity(String ID, int xcenter, int ycenter, float orientation)
Field Detail
FILE_NAME
public static String FILE_NAME = "Resources/repository/CI_Location_ID.cr"
The Instance of String for File Name

FusedIdentity
public String FusedIdentity
The Instance of String for User Identity

m_PContext
public Context5W1H m_PContext
The Instance of Context5W1H
Constructor Detail
IdentityFusion
public IdentityFusion()
It initializes a newly IdentityFusion Object.


It generates the instances of FinalContext,ContextDM and ContextManager.
It also generates the instances of the Vectors for Preliminary Context and Final Context.
Method Detail
addContext
public void addContext(Context5W1H context)

CheckSensorID
public void CheckSensorID()

CleanFile
public void CleanFile()

ReadIdentity
public String ReadIdentity()

SaveIdentity
public void SaveIdentity(String ID, int xcenter, int ycenter, float orientation)
Class InferenceEngine
public class InferenceEngine
This class is ready to infer users' intention.

Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
private String
   The Instance of String for a user's current status
 
private boolean
   The Instance of boolean for selecting explicit/implicit control of heater
 
private String
   The Instance of String for identity
 
private boolean
   The Instance of boolean for selecting explicit/implicit control of light
 
private String
   The Instance of String for a user's location
 
private FlashService
   The Instance of FlashService Class
 
private String
   The Instance of String array for parsing intention data as String piece
 
private String
   The Instance of String for a user's previous status
 
private Rete
   The Instance of Rete Algorithm in Jess
 
private double
   The Instance of String for a user's scheduled duration
 
private String
   The Instance of String for a user's scheduled event
 
private String
   The Instance of String for a user's scheduled place
 
Constructor Summary
public
   It initializes a newly InferenceEngine Object.
 
Method Summary
public void
addContext(IntegratedContext icontext)
   This method receives IntegratedContext object from ContextIntegrator.
 
private void
JessExecution(String rule_file, String fact_command)
   This method is ready for executing Jess Inference Engine.
 
private void
parseString(String line)
   This method is ready for parsing intention data as String piece.
 
private void
   This method is ready for reading each user's schedule data.
 
private void
ThirdInference(IntegratedContext icontext)
   This method receives IntegratedContext object from addContext method.
 
Field Detail
cur_status
private String cur_status
The Instance of String for a user's current status

heating_flag
private boolean heating_flag
The Instance of boolean for selecting explicit/implicit control of heater

identity
private String identity
The Instance of String for identity

lighting_flag
private boolean lighting_flag
The Instance of boolean for selecting explicit/implicit control of light

location
private String location
The Instance of String for a user's location

m_flashservice
private FlashService m_flashservice
The Instance of FlashService Class

parseResult
private String parseResult
The Instance of String array for parsing intention data as String piece

pre_status
private String pre_status
The Instance of String for a user's previous status

rete
private Rete rete
The Instance of Rete Algorithm in Jess

schedule_duration
private double schedule_duration
The Instance of String for a user's scheduled duration

schedule_event
private String schedule_event
The Instance of String for a user's scheduled event

schedule_place
private String schedule_place
The Instance of String for a user's scheduled place
Constructor Detail
InferenceEngine
public InferenceEngine()
It initializes a newly InferenceEngine Object.

Method Detail
addContext
public void addContext(IntegratedContext icontext)
This method receives IntegratedContext object from ContextIntegrator.


It parses the integrated context and applies it to Jess Inference Engine according to each characteristic.
Also, it saves the user's schedule data to a file.
Parameters:
icontext IntegratedContext object received from ContextIntegrator

JessExecution
private void JessExecution(String rule_file, String fact_command)
This method is ready for executing Jess Inference Engine.
Parameters:
rule_file String object: the name of the rule file
fact_command String object: the input of facts

parseString
private void parseString(String line)
This method is ready for parsing intention data as String piece.
Parameters:
line String object: the input of intention data

ReadSchedule
private void ReadSchedule()
This method is ready for reading each user's schedule data.

ThirdInference
private void ThirdInference(IntegratedContext icontext)
This method receives IntegratedContext object from addContext method.


It is ready for higher(3rd) level inference (Behavior, intention).
Also, it uses Jess Inference Engine.
Parameters:
icontext IntegratedContext object received from addContext method
Class RegistrationUser
java.lang.Object
  |
  +--java.lang.Thread
       |
       +--ucam.ubiucam.ubiservice.contextintegrator.RegistrationUser
public class RegistrationUser
Extends:
java.lang.Thread
This class is ready to register a user.

Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
private static String
   The Instance of String for File Name
 
private Context5W1H
   The Instance of Context5W1H Class
 
public Vector
   The Instance of the Vector for Registered Users
 
private String
   The Instance of String for User Identity
 
Constructor Summary
public
   It initializes a newly IdentityFusion Object.
 
Method Summary
public void
addContext(Context5W1H context)
   This method receives Context5W1H object from ContextIntegrator.
 
public void
   This method deletes all the saved data in a file (Initialization).
 
public void
   This method reads the saved identity data in a file.
 
private void
SaveIdentity(String user)
   This method saves the user's identity into a file.
 
Field Detail
FILE_NAME
private static String FILE_NAME = "Resources/repository/CI_RegistrationUser_ID.ci"
The Instance of String for File Name

m_PContext
private Context5W1H m_PContext
The Instance of Context5W1H Class

m_VUser
public Vector m_VUser
The Instance of the Vector for Registered Users

user
private String user
The Instance of String for User Identity
Constructor Detail
RegistrationUser
public RegistrationUser()
It initializes a newly IdentityFusion Object.

Method Detail
addContext
public void addContext(Context5W1H context)
This method receives Context5W1H object from ContextIntegrator.


It adds the user's identity as Context5W1H type.
Parameters:
context Context5W1H object received from ContextIntegrator

CleanFile
public void CleanFile()
This method deletes all the saved data in a file (Initialization).


ReadIdentity
public void ReadIdentity()
This method reads the saved identity data in a file.


SaveIdentity
private void SaveIdentity(String user)
This method saves the user's identity into a file.

Parameters:
user String object: context.mWho.Identity
Class FlashService
java.lang.Object
  |
  +--java.lang.Thread
       |
       +--ucam.ubiucam.ubiservice.contextintegrator.service.FlashService
public class FlashService
Extends:
java.lang.Thread
This class is ready to connect between Flash Object and Inference Result.


It registers the instance of InferenceEngine.
It executes Flash with Inference.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
   The Instance of InterpretIntention Class
 
private Runtime
   The Instance of Runtime Object
 
private String
   The Instance of String for the rest user's activity
 
private ServerSocket
   The Instance of ServerSocket Object
 
private Socket
   The Instance of Socket Object
 
Constructor Summary
public
   It initializes a newly FlashService Object.
 
Method Summary
public void
addIntention(String intention)
   This method receives Intention of WhyContext object from InferenceEngine.
 
private void
   This method opens Server socket and connects clients.
 
public static String
getMessage(BufferedReader br)
   This method gets messages from Flash (ubiBuilding Simulator) through socket.
 
public void
run()
   Runs the Class FlashService as a Thread.
 
private void
send(String intention_input)
   This method sends the user's intention to Flash (ubiBuilding Simulator) through socket.
 
Field Detail
m_InterpretIntention
private InterpretIntention m_InterpretIntention
The Instance of InterpretIntention Class

m_runtime
private Runtime m_runtime
The Instance of Runtime Object

RestUserActivity
private String RestUserActivity
The Instance of String for the rest user's activity

serverSocket
private ServerSocket serverSocket
The Instance of ServerSocket Object

TCPSocket
private Socket TCPSocket
The Instance of Socket Object
Constructor Detail
FlashService
public FlashService()
It initializes a newly FlashService Object.

Method Detail
addIntention
public void addIntention(String intention)
This method receives Intention of WhyContext object from InferenceEngine.

Parameters:
intention WhyContext.Intention object

connect
private void connect()
This method opens Server socket and connects clients.


getMessage
public static String getMessage(BufferedReader br)
This method gets messages from Flash (ubiBuilding Simulator) through socket.

Parameters:
br BufferedReader object obtained from Flash client

run
public void run()
Runs the Class FlashService as a Thread.


send
private void send(String intention_input)
This method sends the user's intention to Flash (ubiBuilding Simulator) through socket.

Parameters:
intention_input String: Intention from addIntention method
Class InterpretIntention
public class InterpretIntention
This class is ready to manage Intention data.


It registers the instance of of FlashService
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
private static String
   The Instance of String for File Name
 
private int
   The Instance of Integer for the number of person in a room
 
public String
   The Instance of String for previous intention data
 
private boolean
   The Instance of boolean for checking the same user
 
Constructor Summary
public
   It initializes a newly InterpretIntention Object.
 
Method Summary
public void
addIntention(String intention)
   This method receives the user's intention from FlashService Class.
 
public void
   This method deletes all the saved data in a file (Initialization).
 
public int
getNoOfPerson(String intention)
   This method gets the number of persons in a room from a file.
 
public String
getPreActivity1(String location)
   This method gets one user's previous activity from a file (if previous No_Of_Person = 1).
 
public String
getPreActivity2(String id, String location)
   This method gets second user's previous activity from a file (if previous No_Of_Person = 2).
 
private void
WriteIntention(String intention)
   This method receives the user's intention from addIntention method.
 
Field Detail
FILE_NAME
private static String FILE_NAME = "Resources/repository/CI_Intention.ci"
The Instance of String for File Name

No_Of_Person
private int No_Of_Person
The Instance of Integer for the number of person in a room

preIntention
public String preIntention
The Instance of String for previous intention data

SameUser
private boolean SameUser = false
The Instance of boolean for checking the same user
Constructor Detail
InterpretIntention
public InterpretIntention()
It initializes a newly InterpretIntention Object.

Method Detail
addIntention
public void addIntention(String intention)
This method receives the user's intention from FlashService Class.

Parameters:
intention String: WhyContext.Intention from FlashService Class

CleanFile
public void CleanFile()
This method deletes all the saved data in a file (Initialization).


getNoOfPerson
public int getNoOfPerson(String intention)
This method gets the number of persons in a room from a file.

Parameters:
intention String: the input of intention from FlashService Class

getPreActivity1
public String getPreActivity1(String location)
This method gets one user's previous activity from a file (if previous No_Of_Person = 1).

Parameters:
location String: the input of the previous location from FlashService Class

getPreActivity2
public String getPreActivity2(String id, String location)
This method gets second user's previous activity from a file (if previous No_Of_Person = 2).

Parameters:
id String: the input of the previous identity from FlashService Class
location String: the input of the previous location from FlashService Class

WriteIntention
private void WriteIntention(String intention)
This method receives the user's intention from addIntention method.

Parameters:
intention String: Intention from addIntention method
Class VotingMethod
public class VotingMethod
This class is ready to elect a leader among the inputted contexts.


It elects the context leader by using the spedified context key.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
private String
   The Value indicating a context key
 
private Vector
   The Instance of the Vector for a context buffer
 
Constructor Summary
public
VotingMethod(Vector temp, String contextkey)
   It initializes a newly VotingMethod Object.
 
Method Summary
public Object
   It elects the context leader in a given context buffer.
 
Field Detail
m_ContextKey
private String m_ContextKey
The Value indicating a context key

m_VContextBuffer
private Vector m_VContextBuffer
The Instance of the Vector for a context buffer
Constructor Detail
VotingMethod
public VotingMethod(Vector temp, String contextkey)
It initializes a newly VotingMethod Object.

Parameters:
temp the Vector to be used as a context buffer
context the String to be used as a context key
Method Detail
election
public Object election()
It elects the context leader in a given context buffer.


It uses a context key for an election.
It expresses the result as the form of Object.
Returns:
the result of an election
Class WhatFusion
public class WhatFusion
This class is ready to make a decision for IntegratedWhatContext.


It registers the instance of the Vector for SensorWhatContext
and the instance of VotingMethod.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
private VotingMethod
   The Instance of VotingMethod
 
private Vector
   The Instance of the Vector for SensorWhatContext
 
Constructor Summary
public
   It initializes a newly WhatFusion Object.
 
Method Summary
public synchronized void
addWhatContext(SensorWhatContext what)
public SensorWhatContext
public synchronized void
Field Detail
m_Vote
private VotingMethod m_Vote
The Instance of VotingMethod

m_VWhat
private Vector m_VWhat
The Instance of the Vector for SensorWhatContext
Constructor Detail
WhatFusion
public WhatFusion()
It initializes a newly WhatFusion Object.

Method Detail
addWhatContext
public synchronized void addWhatContext(SensorWhatContext what)

IntegrateWhatContext
public SensorWhatContext IntegrateWhatContext()

removeAllElements
public synchronized void removeAllElements()
Class WhenFusion
public class WhenFusion
This class is ready to make a decision for IntegratedWhenContext.


It registers the instance of the Vector for WhenContext
and the instance of VotingMethod.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
private VotingMethod
   The Instance of VotingMethod
 
private Vector
   The Instance of the Vector for WhenContext
 
Constructor Summary
public
   It initializes a newly WhenFusion Object.
 
Method Summary
public synchronized void
addWhenContext(WhenContext when)
public WhenContext
public synchronized void
Field Detail
m_Vote
private VotingMethod m_Vote
The Instance of VotingMethod

m_VWhen
private Vector m_VWhen
The Instance of the Vector for WhenContext
Constructor Detail
WhenFusion
public WhenFusion()
It initializes a newly WhenFusion Object.

Method Detail
addWhenContext
public synchronized void addWhenContext(WhenContext when)

IntegrateWhenContext
public WhenContext IntegrateWhenContext()

removeAllElements
public synchronized void removeAllElements()
Class WhereFusion
public class WhereFusion
This class is ready to make a decision for IntegratedWhereContext.


It registers the instance of the Vector for WhereContext
and the instance of VotingMethod.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
private VotingMethod
   The Instance of VotingMethod
 
private Vector
   The Instance of the Vector for SensorWhatContext
 
private Vector
   The Instance of the Vector for WhereContext
 
Constructor Summary
public
   It initializes a newly WhereFusion Object.
 
Method Summary
public synchronized void
addWhatContext(SensorWhatContext what)
public synchronized void
addWhereContext(WhereContext where)
public WhereContext
public synchronized void
Field Detail
m_Vote
private VotingMethod m_Vote
The Instance of VotingMethod

m_VWhat
private Vector m_VWhat
The Instance of the Vector for SensorWhatContext

m_VWhere
private Vector m_VWhere
The Instance of the Vector for WhereContext
Constructor Detail
WhereFusion
public WhereFusion()
It initializes a newly WhereFusion Object.

Method Detail
addWhatContext
public synchronized void addWhatContext(SensorWhatContext what)

addWhereContext
public synchronized void addWhereContext(WhereContext where)

IntegrateWhereContext
public WhereContext IntegrateWhereContext()

removeAllElements
public synchronized void removeAllElements()
Class WhoFusion
public class WhoFusion
This class is ready to make a decision for IntegratedWhoContext.


It registers the instance of of the Vector for WhoContext
and the instance of VotingMethod.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
private VotingMethod
   The Instance of VotingMethod
 
private Vector
   The Instance of the Vector for WhoContext
 
Constructor Summary
public
   It initializes a newly WhoFusion Object.
 
Method Summary
public synchronized void
addWhereContext(WhereContext where)
public synchronized void
addWhoContext(WhoContext who)
public WhoContext
public synchronized void
Field Detail
m_Vote
private VotingMethod m_Vote
The Instance of VotingMethod

m_VWho
private Vector m_VWho
The Instance of the Vector for WhoContext
Constructor Detail
WhoFusion
public WhoFusion()
It initializes a newly WhoFusion Object.

Method Detail
addWhereContext
public synchronized void addWhereContext(WhereContext where)

addWhoContext
public synchronized void addWhoContext(WhoContext who)

IntegrateWhoContext
public WhoContext IntegrateWhoContext()

removeAllElements
public synchronized void removeAllElements()
Class WhyFusion
public class WhyFusion
This class is ready to make a decision for IntegratedWhyContext.


It registers the instance of the Vector for WhyContext
and the instance of VotingMethod.
Since:
J2SDK1.5
Version:
ubi-UCAM 2.0
Author:
Yoosoo Oh
Field Summary
private VotingMethod
   The Instance of VotingMethod
 
private Vector
   The Instance of the Vector for HowContext
 
private Vector
   The Instance of the Vector for SensorWhatContext
 
private Vector
   The Instance of the Vector for WhyContext
 
Constructor Summary
public
   It initializes a newly WhyFusion Object.
 
Method Summary
public synchronized void
addHowContext(HowContext how)
public synchronized void
addWhatContext(SensorWhatContext what)
public synchronized void
addWhyContext(WhyContext why)
private int
ExtractStressLevel(String PPG_HRV_HF_Power, String PPG_HRV_LF_Power, String PPG_norm_HR_Mean, String PPG_norm_HR_Variance)
public WhyContext
public synchronized void
private String
StressThreshold(int LowThreshold, double valueHow, int HighThreshold)
private String
StressThreshold(int LowThreshold, int valueHow, int HighThreshold)
Field Detail
m_Vote
private VotingMethod m_Vote
The Instance of VotingMethod

m_VStressHow
private Vector m_VStressHow
The Instance of the Vector for HowContext

m_VStressWhat
private Vector m_VStressWhat
The Instance of the Vector for SensorWhatContext

m_VWhy
private Vector m_VWhy
The Instance of the Vector for WhyContext
Constructor Detail
WhyFusion
public WhyFusion()
It initializes a newly WhyFusion Object.

Method Detail
addHowContext
public synchronized void addHowContext(HowContext how)

addWhatContext
public synchronized void addWhatContext(SensorWhatContext what)

addWhyContext
public synchronized void addWhyContext(WhyContext why)

ExtractStressLevel
private int ExtractStressLevel(String PPG_HRV_HF_Power, String PPG_HRV_LF_Power, String PPG_norm_HR_Mean, String PPG_norm_HR_Variance)

IntegrateWhyContext
public WhyContext IntegrateWhyContext()

removeAllElements
public synchronized void removeAllElements()

StressThreshold
private String StressThreshold(int LowThreshold, double valueHow, int HighThreshold)

StressThreshold
private String StressThreshold(int LowThreshold, int valueHow, int HighThreshold)
Package Resources
Class Diagrams
diagram Resources
Subpackages
package Resources.knowledgebase
package Resources.repository
Class Diagrams
Class Diagram Resources
package: Resources
Package Nodes
knowledgebase
repository
Package Node Detail
Package Resources.knowledgebase
Package Resources.repository
Package Resources.knowledgebase
Class Diagrams
diagram knowledgebase
Subpackages
package Resources.knowledgebase.facts
package Resources.knowledgebase.rules
Class Diagrams
Class Diagram knowledgebase
package: Resources.knowledgebase
Package Nodes
facts
rules
Package Node Detail
Package Resources.knowledgebase.facts
Package Resources.knowledgebase.rules
Package Resources.knowledgebase.facts
Class Diagrams
diagram facts
Class Diagrams
Class Diagram facts
package: Resources.knowledgebase.facts
Package Resources.knowledgebase.rules
Class Diagrams
diagram rules
Class Diagrams
Class Diagram rules
package: Resources.knowledgebase.rules
Package Resources.repository
Class Diagrams
diagram repository
Subpackages
package Resources.repository.users
Class Diagrams
Class Diagram repository
package: Resources.repository
Package Nodes
users
Package Node Detail
Package Resources.repository.users
Package Resources.repository.users
Class Diagrams
diagram users
Class Diagrams
Class Diagram users
package: Resources.repository.users