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.