com.ge.grc.acuity
Class InteractionContent

java.lang.Object
  extended bycom.ge.grc.acuity.InteractionContent

public class InteractionContent
extends java.lang.Object

Class to encapsulate the important information associated with an InteractionObject, either created to populate a declared IaO or because of an askable missing Propery on an Individual. This class is used by the AcuityController class to return information used for interactions.

Version:
$Revision: 1.2 $ Last modified on $Date: 2006/09/08 22:38:46 $
Author:
crapo

Constructor Summary
InteractionContent(AcuityController _ac)
          Constructor for class, no arguments.
InteractionContent(AcuityController _ac, MissingProperty mp)
           
 
Method Summary
 void addAllValuesFromRestriction(com.hp.hpl.jena.ontology.OntClass allValuesFromRestriction)
          Call this method to add an allValuesFromRestriction to the list of all allValuesFrom Restrictions
 void addClientSideScripts()
          Call this method to add information about any client-side scripts to this InteractionContent.
 void addCurrentAnswer(java.lang.Object currentAnswer)
          Call this method to add a current answer to the list.
 void addEffectsList(java.util.List effects)
           
 void addEffectsStatement(java.lang.Object stmt)
           
 void addIndirectNetworkPath(com.hp.hpl.jena.rdf.model.Statement newLink)
           
 void addIndirectNetworkPathHead(com.hp.hpl.jena.rdf.model.Statement newLink)
           
 void addPossibleAnswer(com.hp.hpl.jena.ontology.Individual ans)
           
 void addPossibleAnswer(int idx, com.hp.hpl.jena.ontology.Individual ans)
           
 void addPossibleAnswer(int idx, java.lang.Object[] ansPair)
           
 void addPossibleAnswer(java.lang.Object ansVal)
           
 void addPossibleAnswer(java.lang.Object[] ansPair)
           
 void addSomeValuesFromRestriction(com.hp.hpl.jena.ontology.OntClass valuesFromRestriction)
          Method to add an OntClass to the set of those Classes from which values of the missing property must come.
 void addSubjectClassRestrictions(java.util.List classRestrictions)
           
 boolean askUser()
           
 void clearCurrentAnswers()
          Call this method to clear the set of current answers.
protected  void clearEffectsStmts()
           
 boolean convertToRangeClasses(AcuityController ac)
          Call this method to convert all of the restrictions on this InteractionContent to a List of range classes.
 java.util.List getAllValuesFromRestrictions()
           
 int getCardinalityRestriction()
          Call this method to get the cardinality restiction on the missing property.
 java.util.Hashtable getClientSideScripts()
          Call this method to obtain the properties of all ClientSideScripts associated with this IaO.
 java.util.List getCurrentAnswers()
          Call this method to get the list of URIs of currently existing objects with this subject and predicate.
 java.util.Hashtable getDependencies()
           
 java.util.List getEffects()
           
 java.util.List getIndirectNetworkPath()
           
 com.hp.hpl.jena.ontology.Individual getInteractionObject()
           
protected  void getInteractionObjectEffects()
           
 int getMaxCardinalityRestriction()
          Call this method to get the maximum cardinality restriction of the missing property.
 int getMinCardinalityRestriction()
          Call this method to get the minimum cardinality restriction of the missing property.
protected  java.lang.Object getPossibleAnswerGenerator()
           
 java.util.List getPossibleAnswers()
           
 com.hp.hpl.jena.ontology.OntProperty getPredicate()
          Call this method to get the OntProperty which is the missing property.
 java.util.List getPropertyRangeRestrictions()
          Call this method to obtain the range restrictions of this missing property.
 java.lang.String[] getRangeClassURIs()
           
 com.hp.hpl.jena.rdf.model.Resource[] getRangeResources()
          Call this method to get an array of the URIs of the Classes which are the range.
 java.util.List getSomeValuesFromRestrictions()
          Call this method to get a list of the OntClasses from which values of the missing property must come.
 com.hp.hpl.jena.ontology.Individual getSubject()
          Call this method to get the subject Individual for the missing property.
 java.lang.String getXsdDatatypeRange()
           
 boolean isDatatypePredicate()
           
protected  int isEffectsPrepared()
           
 boolean okToAddCurrentToPossible()
           
 int possibleAnswerValueIndex(java.lang.Object val)
           
 void removePossibleAnswer(com.hp.hpl.jena.ontology.Individual ansURI)
          Call this method to remove an answer from the list.
 void removePossibleAnswer(java.lang.Object ansVal)
          Call this method to remove an answer from the list.
 boolean setAddCurrentToPossible(boolean newVal)
           
 void setAskUser(boolean bAskUser)
           
 void setCardinalityRestriction(int cardinalityRestriction)
          Method to set the cardinality restriction of a missing property.
 void setDependencies(java.util.Hashtable deps)
           
 void setEffectsPrepared(int effectsPrepared)
           
 void setInteractionObject(com.hp.hpl.jena.ontology.Individual interactionObject)
           
 void setMaxCardinalityRestriction(int maxCardinalityRestriction)
          Method to set the maximum cardinality restriction of a missing property.
 void setMinCardinalityRestriction(int minCardinalityRestriction)
          Method to set the minimum cardinality restriction of a missing property.
protected  void setPossibleAnswerGenerator(java.lang.Object pog)
           
 void setPossibleAnswers(java.util.List possibleAnswers)
           
 void setPredicate(com.hp.hpl.jena.ontology.OntProperty predicate)
          Method to set the predicate (OntProperty) slot.
protected  void setRangeResources(com.hp.hpl.jena.rdf.model.Resource[] r)
           
 void setSomeValuesFromRestrictions(java.util.List svfrs)
           
 void setSubject(com.hp.hpl.jena.ontology.Individual subject)
          Method to set the subject Resource (an Individual) of the missing property.
 void setValidateContent(boolean _validateContent)
           
 void updatePossibleAnswer(int idx, java.lang.Object newVal, java.lang.Object newLabel)
           
 boolean validateContent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InteractionContent

public InteractionContent(AcuityController _ac)
Constructor for class, no arguments.


InteractionContent

public InteractionContent(AcuityController _ac,
                          MissingProperty mp)
                   throws AcuityException
Throws:
AcuityException
Method Detail

setPredicate

public void setPredicate(com.hp.hpl.jena.ontology.OntProperty predicate)
Method to set the predicate (OntProperty) slot.

Parameters:
predicate - - the predicate to set

addPossibleAnswer

public void addPossibleAnswer(com.hp.hpl.jena.ontology.Individual ans)
                       throws AcuityException
Throws:
AcuityException

addPossibleAnswer

public void addPossibleAnswer(int idx,
                              com.hp.hpl.jena.ontology.Individual ans)
                       throws AcuityException
Throws:
AcuityException

addPossibleAnswer

public void addPossibleAnswer(java.lang.Object[] ansPair)
                       throws AcuityException
Throws:
AcuityException

addPossibleAnswer

public void addPossibleAnswer(int idx,
                              java.lang.Object[] ansPair)
                       throws AcuityException
Throws:
AcuityException

addPossibleAnswer

public void addPossibleAnswer(java.lang.Object ansVal)
                       throws AcuityException
Throws:
AcuityException

updatePossibleAnswer

public void updatePossibleAnswer(int idx,
                                 java.lang.Object newVal,
                                 java.lang.Object newLabel)
                          throws AcuityException
Parameters:
idx -
Throws:
AcuityException

removePossibleAnswer

public void removePossibleAnswer(com.hp.hpl.jena.ontology.Individual ansURI)
Call this method to remove an answer from the list.

Parameters:
ansURI - - Individual to remove

removePossibleAnswer

public void removePossibleAnswer(java.lang.Object ansVal)
Call this method to remove an answer from the list.

Parameters:
ansVal - - URI of answer to remove

possibleAnswerValueIndex

public int possibleAnswerValueIndex(java.lang.Object val)

okToAddCurrentToPossible

public boolean okToAddCurrentToPossible()

setAddCurrentToPossible

public boolean setAddCurrentToPossible(boolean newVal)

getPredicate

public com.hp.hpl.jena.ontology.OntProperty getPredicate()
                                                  throws AcuityException
Call this method to get the OntProperty which is the missing property.

Returns:
- the predicate.
Throws:
AcuityException

getPropertyRangeRestrictions

public java.util.List getPropertyRangeRestrictions()
Call this method to obtain the range restrictions of this missing property.

Returns:
- a List containing the property Range Restriction Classes as URIs

addSomeValuesFromRestriction

public void addSomeValuesFromRestriction(com.hp.hpl.jena.ontology.OntClass valuesFromRestriction)
Method to add an OntClass to the set of those Classes from which values of the missing property must come.

Parameters:
valuesFromRestriction - - the OntClass from which values are restricted to come

addAllValuesFromRestriction

public void addAllValuesFromRestriction(com.hp.hpl.jena.ontology.OntClass allValuesFromRestriction)
Call this method to add an allValuesFromRestriction to the list of all allValuesFrom Restrictions

Parameters:
allValuesFromRestriction - - the allValueFromRestrictions to add

getAllValuesFromRestrictions

public java.util.List getAllValuesFromRestrictions()
Returns:
Returns the allValueFromRestrictions.

getSomeValuesFromRestrictions

public java.util.List getSomeValuesFromRestrictions()
Call this method to get a list of the OntClasses from which values of the missing property must come.

Returns:
- the List of OntClasse URIs from which values may come

setSomeValuesFromRestrictions

public void setSomeValuesFromRestrictions(java.util.List svfrs)

setCardinalityRestriction

public void setCardinalityRestriction(int cardinalityRestriction)
Method to set the cardinality restriction of a missing property.

Parameters:
cardinalityRestriction - - the cardinality required of the missing property

getCardinalityRestriction

public int getCardinalityRestriction()
Call this method to get the cardinality restiction on the missing property.

Returns:
- the cardinality required of the missing property

setMinCardinalityRestriction

public void setMinCardinalityRestriction(int minCardinalityRestriction)
Method to set the minimum cardinality restriction of a missing property.

Parameters:
minCardinalityRestriction - - the minimum cardinality of the missing property

getMinCardinalityRestriction

public int getMinCardinalityRestriction()
Call this method to get the minimum cardinality restriction of the missing property.

Returns:
- the minimum cardinality required of the missing property

setMaxCardinalityRestriction

public void setMaxCardinalityRestriction(int maxCardinalityRestriction)
Method to set the maximum cardinality restriction of a missing property.

Parameters:
maxCardinalityRestriction - - the maximum cardinality of the missing property

getMaxCardinalityRestriction

public int getMaxCardinalityRestriction()
Call this method to get the maximum cardinality restriction of the missing property.

Returns:
- the maximum cardinality required of the missing property

setSubject

public void setSubject(com.hp.hpl.jena.ontology.Individual subject)
Method to set the subject Resource (an Individual) of the missing property.

Parameters:
subject - - the subject to set

getSubject

public com.hp.hpl.jena.ontology.Individual getSubject()
                                               throws AcuityException
Call this method to get the subject Individual for the missing property.

Returns:
- the subject of the missing property
Throws:
AcuityException

setAskUser

public void setAskUser(boolean bAskUser)
Parameters:
bAskUser - The bAskUser to set.

askUser

public boolean askUser()
Returns:
Returns the bAskUser.

addIndirectNetworkPath

public void addIndirectNetworkPath(com.hp.hpl.jena.rdf.model.Statement newLink)

addIndirectNetworkPathHead

public void addIndirectNetworkPathHead(com.hp.hpl.jena.rdf.model.Statement newLink)

getIndirectNetworkPath

public java.util.List getIndirectNetworkPath()
Returns:
Returns the indirectNetworkPath.

setPossibleAnswers

public void setPossibleAnswers(java.util.List possibleAnswers)
Parameters:
possibleAnswers - The possibleAnswers to set.

getPossibleAnswers

public java.util.List getPossibleAnswers()
Returns:
Returns the possibleAnswers.

getRangeResources

public com.hp.hpl.jena.rdf.model.Resource[] getRangeResources()
                                                       throws AcuityException
Call this method to get an array of the URIs of the Classes which are the range.

Returns:
- array of range OntClass URIs
Throws:
AcuityException

setRangeResources

protected void setRangeResources(com.hp.hpl.jena.rdf.model.Resource[] r)

getRangeClassURIs

public java.lang.String[] getRangeClassURIs()

setInteractionObject

public void setInteractionObject(com.hp.hpl.jena.ontology.Individual interactionObject)
                          throws AcuityException
Parameters:
interactionObject - The interactionObject to set.
Throws:
AcuityException

getInteractionObject

public com.hp.hpl.jena.ontology.Individual getInteractionObject()
Returns:
Returns the interactionObject.

addEffectsStatement

public void addEffectsStatement(java.lang.Object stmt)
Parameters:
stmt -

addEffectsList

public void addEffectsList(java.util.List effects)

clearEffectsStmts

protected void clearEffectsStmts()

getEffects

public java.util.List getEffects()
                          throws AcuityException
Returns:
Returns the effects.
Throws:
AcuityException

getInteractionObjectEffects

protected void getInteractionObjectEffects()
                                    throws AcuityException
Throws:
AcuityException

convertToRangeClasses

public boolean convertToRangeClasses(AcuityController ac)
                              throws AcuityException
Call this method to convert all of the restrictions on this InteractionContent to a List of range classes.

Returns:
- true if a set of range classes was successfully generated else false
Throws:
AcuityException

addCurrentAnswer

public void addCurrentAnswer(java.lang.Object currentAnswer)
Call this method to add a current answer to the list.

Parameters:
currentAnswer - - a currentAnswer (URI) to be added.

clearCurrentAnswers

public void clearCurrentAnswers()
Call this method to clear the set of current answers.


getCurrentAnswers

public java.util.List getCurrentAnswers()
Call this method to get the list of URIs of currently existing objects with this subject and predicate.

Returns:
Returns the currentAnswers.

setValidateContent

public void setValidateContent(boolean _validateContent)

validateContent

public boolean validateContent()

setDependencies

public void setDependencies(java.util.Hashtable deps)
Parameters:
deps -

getDependencies

public java.util.Hashtable getDependencies()

setPossibleAnswerGenerator

protected void setPossibleAnswerGenerator(java.lang.Object pog)

getPossibleAnswerGenerator

protected java.lang.Object getPossibleAnswerGenerator()

addSubjectClassRestrictions

public void addSubjectClassRestrictions(java.util.List classRestrictions)
Parameters:
classRestrictions -

isDatatypePredicate

public boolean isDatatypePredicate()
                            throws AcuityException
Throws:
AcuityException

getXsdDatatypeRange

public java.lang.String getXsdDatatypeRange()
                                     throws AcuityException
Returns:
Throws:
AcuityException

setEffectsPrepared

public void setEffectsPrepared(int effectsPrepared)
Parameters:
effectsPrepared - The effectsPrepared to set.

isEffectsPrepared

protected int isEffectsPrepared()
Returns:
Returns the effectsPrepared.

addClientSideScripts

public void addClientSideScripts()
                          throws AcuityException
Call this method to add information about any client-side scripts to this InteractionContent.

Throws:
AcuityException

getClientSideScripts

public java.util.Hashtable getClientSideScripts()
Call this method to obtain the properties of all ClientSideScripts associated with this IaO. This method returns a Hashtable whose keys are the URIs of the ClientSideScript Individuals and whose values are Hashtables whose keys are the local names of the ClientSideScript properties and whose values are the values of those properties.

Returns:
Returns a Hashtable of Hashtables containing the properties of the ClientSideScripts