com.ge.grc.acuity.editor
Class AcuityEditorParts

java.lang.Object
  extended bycom.ge.grc.acuity.editor.AcuityEditorParts

public class AcuityEditorParts
extends java.lang.Object

The AcuityEditorParts class provides the core functionality of the "plug-in" editor for inclusion as a Vantage in ACUITy applications. It exploits the apvf and other domain-independent ontologies as well as the AcuityEditorParts.owl ontology to provide a constrained environment for application development.

Version:
$Revision: 1.43 $ Last modified on $Date: 2007/04/11 14:52:55 $
Author:
crapo

Field Summary
static java.lang.String ALLVALUESFROMNAME
           
static java.lang.String CARDINALITY
           
static int COLS_IN_LEVEL
           
static java.lang.String DEFAULTVALUECLASSNAME
           
static java.lang.String DEFAULTVALUENAME
           
static java.lang.String HASVALUENAME
           
static java.lang.String MINCARDINALITY
           
static java.lang.String NOT_APPLICABLE
           
static java.lang.String SOMEVALUESFROMNAME
           
 
Constructor Summary
AcuityEditorParts(AcuityController ac)
           
 
Method Summary
static int cardinalityRestrictionOfResource(com.hp.hpl.jena.rdf.model.Resource r, com.hp.hpl.jena.ontology.OntProperty prop)
           
 java.lang.String classTreeSelection(AcuityController ac, java.lang.String selection)
           
 java.lang.String convertTestQueryToCMap(AcuityController ac, java.lang.String outputFile)
           
 java.lang.String domainVRangeSelected(AcuityController ac, java.lang.String selection)
           
 java.lang.String editClass(AcuityController ac, java.lang.Object nvpairs)
          This method adds a new class to the ontology
 boolean editClassActionSelected(AcuityController ac, java.lang.Object nvpairs)
           
 void editClassTreeSelection()
          The user has selected and entry from the class tree for editing.
 java.lang.String editInstance(AcuityController ac, java.lang.Object nvpairs)
          This method adds a new instance to the ontology
 boolean EditorStepSelected(java.lang.String selection)
           
 java.lang.String editProperty(AcuityController ac, java.lang.Object nvpairs)
          This method adds a new instance to the ontology
 java.lang.String editPropertyActionSelected(AcuityController ac, java.lang.Object nvpairs)
           
 java.lang.String exportModelToCSV(AcuityController ac, java.lang.String button)
           
 java.lang.Boolean findClass(AcuityController ac, java.lang.String classPrefix)
          update the tree to find the supplied prefix
static java.util.List getAtomicPropertyTypes()
          get the supported atomic property types
 java.util.List[] getClassDrillDownTableContent(AcuityController ac)
          get the contents for the classes drilldown table return a data structure compatible with the GUI tables
 java.lang.String getClassNamePrefix()
          the getter for the class tree class filter name
 java.lang.String getCMapCombinedLabel()
           
 java.lang.String getCMapDirectory()
           
 java.util.List getCMapDirectoryStructure()
           
 java.lang.String getCMapFile()
           
 java.lang.String getCMapTemplate()
           
 java.lang.String getContainmentOnly()
           
 java.lang.String getCurrentClassTreeSelection()
           
 java.lang.String getCurrentCommentValue()
          the getter for the class tree class filter prefix designation
 java.lang.String getCurrentLabelValue()
          the getter for the class tree class filter prefix designation
 java.lang.String getCurrentNameValue()
          the getter for the class tree class filter prefix designation
 java.lang.String getCurrentParentValue()
          get the defualt selection for the parent class selection list
 java.util.List getCurrentPropertyDomains()
          get the current ranges for a new property
 java.util.List getCurrentPropertyRanges()
          get the current ranges for a new property
 java.lang.String getDomainVRange()
           
 com.hp.hpl.jena.ontology.OntModel getEditableModel()
           
 java.lang.String getEditableModelAltUri()
          Call this method to get the alt URI of the editable submodel
 java.lang.String getEditableModelNamespace()
           
 java.util.List getEditablePropertiesList()
           
 java.util.List getEditClassActionList(AcuityController ac)
          create the list of possible class/instance edit functions: Add instance, add subclass, and or edit.
 com.hp.hpl.jena.ontology.Individual getExistingScript()
           
 java.util.List getFilesInCMapDirectory()
           
 java.util.List getFilesInImportExportDirectory()
           
 java.lang.String getHelpConcept(AcuityController ac)
           
 java.lang.String getImportExportDirectory()
           
 java.util.List getImportExportDirectoryStructure()
           
 java.lang.String getImportFile()
           
 boolean getInNewProperty()
          This method returns true if the current step is the add new property step
 java.lang.String getIsFunctional()
           
 boolean getMatchCase()
          the getter for the class tree class filter case sensitive desgination
 java.util.List getModelConceptsList()
          build a list of the concepts/elements in the ontology.
 java.lang.String getNewScriptName()
           
 java.lang.String getParameterDefaultsFileName(AcuityController ac)
           
 java.util.List[] getPathToRootTableContent(AcuityController ac, java.lang.Object tableRoot)
           
 java.util.List[] getPOPropertiesTableContent(AcuityController ac, java.lang.Object root)
           
 java.util.List getPossibleCMapTemplates(AcuityController ac)
           
 java.util.List getPossibleEditingActions(AcuityController ac)
          Call this method to get a list of all of the Steps (Events) that are part of the ActiveProcess of the current Frame.
 int getPrefixOnly()
          the getter for the class tree class filter prefix designation
 java.util.List[] getPreviewImportTable(AcuityController ac)
           
 com.hp.hpl.jena.rdf.model.Resource getScriptType()
           
 java.lang.String getStatusOfLastCall()
           
 int getTableDepth()
          Call this method to get the depth of display levels in the editor DataTables.
 java.lang.String getTestSparqlScript()
           
 java.util.List[] getTestSparqlScriptOutputTable(AcuityController ac)
           
 java.lang.String helpConceptSelected(AcuityController ac, java.lang.String URI)
           
 java.lang.String importModelFromCSV(AcuityController ac, java.lang.String button)
          This method will import model creation/modification statements from a comma-separated-values file.
 java.lang.Object insertTableRow(AcuityController ac, java.lang.Object answer)
           
 boolean isBEditDefaultValuesInPlace()
           
protected  boolean isBShowEditorContent()
           
 java.lang.Object newCMapFile(java.lang.String newFileName)
           
 void onDemandActionTestStub(AcuityController ac, java.lang.Object nvpairs)
           
 void removePropertyDomainEntry(AcuityController ac, java.lang.String URI)
          remove the entry from the property's domains
 void removePropertyRangeEntry(AcuityController ac, java.lang.String URI)
          remove the entries from the property's range
 java.lang.String saveDefaults(AcuityController ac, java.lang.Object nvpairs)
          get the ranges applicable to this property
 java.lang.String saveEditableSubModel(AcuityController ac, java.lang.Object nvpairs)
           
 java.lang.Object saveExistingScript(AcuityController ac)
           
 java.lang.Object saveScriptAs(AcuityController ac)
           
 void setBEditDefaultValuesInPlace(boolean bEditDefaultValuesInPlace)
           
protected  void setBShowEditorContent(boolean bShowEditorContent)
           
 java.lang.Object setCMapCombinedLabel(java.lang.String value)
           
 java.lang.Object setCMapDirectory(java.lang.String newDirectory)
           
 java.lang.Object setCMapFile(java.lang.String newFileName)
           
 java.lang.Object setCMapTemplate(java.lang.String cmapTemp)
           
 java.lang.String setContainmentOnly(java.lang.String newVal)
           
 java.lang.Object setExistingScript(com.hp.hpl.jena.ontology.Individual es)
           
 java.lang.Object setExistingScript(java.lang.String es)
           
 java.lang.Object setImportExportDirectory(java.lang.String newDirectory)
           
 java.lang.Object setImportFile(java.lang.String newFileName)
           
 java.lang.String setIsFunctional(java.lang.String val)
           
 java.lang.Object setNewScriptName(java.lang.String n)
           
 java.lang.Object setPropertyToDatatype(AcuityController ac, java.lang.String URI)
          add the entries from the property's range
 java.lang.Object setScriptType(java.lang.String st)
           
 java.lang.String setSelectedProperty(java.lang.String val)
           
 java.lang.Integer setTableDepth(java.lang.String tableDepth)
          Call this method to set the depth of display levels in the editor DataTables.
 java.lang.Boolean setTestSparqlScript(java.lang.String script)
           
 java.lang.Object updatePOPropertiesTableContent(AcuityController ac, java.lang.Object nvpairs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_APPLICABLE

public static final java.lang.String NOT_APPLICABLE
See Also:
Constant Field Values

COLS_IN_LEVEL

public static final int COLS_IN_LEVEL
See Also:
Constant Field Values

ALLVALUESFROMNAME

public static final java.lang.String ALLVALUESFROMNAME
See Also:
Constant Field Values

SOMEVALUESFROMNAME

public static final java.lang.String SOMEVALUESFROMNAME
See Also:
Constant Field Values

HASVALUENAME

public static final java.lang.String HASVALUENAME
See Also:
Constant Field Values

CARDINALITY

public static final java.lang.String CARDINALITY
See Also:
Constant Field Values

MINCARDINALITY

public static final java.lang.String MINCARDINALITY
See Also:
Constant Field Values

DEFAULTVALUENAME

public static final java.lang.String DEFAULTVALUENAME
See Also:
Constant Field Values

DEFAULTVALUECLASSNAME

public static final java.lang.String DEFAULTVALUECLASSNAME
See Also:
Constant Field Values
Constructor Detail

AcuityEditorParts

public AcuityEditorParts(AcuityController ac)
                  throws AcuityException
Method Detail

insertTableRow

public java.lang.Object insertTableRow(AcuityController ac,
                                       java.lang.Object answer)
                                throws AcuityException
Throws:
AcuityException

getPathToRootTableContent

public java.util.List[] getPathToRootTableContent(AcuityController ac,
                                                  java.lang.Object tableRoot)
                                           throws AcuityException
Parameters:
ac - - the acuity controller object
Throws:
AcuityException - Get the path from the frame to the current root object. Return it as a single row table where the columns in the table (0-n) describe the path from the frame to root object.

cardinalityRestrictionOfResource

public static int cardinalityRestrictionOfResource(com.hp.hpl.jena.rdf.model.Resource r,
                                                   com.hp.hpl.jena.ontology.OntProperty prop)

updatePOPropertiesTableContent

public java.lang.Object updatePOPropertiesTableContent(AcuityController ac,
                                                       java.lang.Object nvpairs)
                                                throws AcuityException
Throws:
AcuityException

getPossibleEditingActions

public java.util.List getPossibleEditingActions(AcuityController ac)
                                         throws AcuityException
Call this method to get a list of all of the Steps (Events) that are part of the ActiveProcess of the current Frame.

Parameters:
ac -
Returns:
Throws:
AcuityException

getPOPropertiesTableContent

public java.util.List[] getPOPropertiesTableContent(AcuityController ac,
                                                    java.lang.Object root)
                                             throws AcuityException
Throws:
AcuityException

editClass

public java.lang.String editClass(AcuityController ac,
                                  java.lang.Object nvpairs)
                           throws AcuityException
This method adds a new class to the ontology

Parameters:
ac - - the AcuityController
Throws:
AcuityException

editInstance

public java.lang.String editInstance(AcuityController ac,
                                     java.lang.Object nvpairs)
                              throws AcuityException
This method adds a new instance to the ontology

Parameters:
ac - - the AcuityController
Throws:
AcuityException

editProperty

public java.lang.String editProperty(AcuityController ac,
                                     java.lang.Object nvpairs)
                              throws AcuityException
This method adds a new instance to the ontology

Parameters:
ac - - the AcuityController
Throws:
AcuityException

onDemandActionTestStub

public void onDemandActionTestStub(AcuityController ac,
                                   java.lang.Object nvpairs)
                            throws AcuityException
Parameters:
ac - - the AcuityController
Throws:
AcuityException

getParameterDefaultsFileName

public java.lang.String getParameterDefaultsFileName(AcuityController ac)

getCurrentParentValue

public java.lang.String getCurrentParentValue()
get the defualt selection for the parent class selection list

Returns:
the string value from the selection list

saveDefaults

public java.lang.String saveDefaults(AcuityController ac,
                                     java.lang.Object nvpairs)
                              throws AcuityException
get the ranges applicable to this property

Parameters:
ac - - the acuity controller
Throws:
AcuityException

saveEditableSubModel

public java.lang.String saveEditableSubModel(AcuityController ac,
                                             java.lang.Object nvpairs)
                                      throws AcuityException
Throws:
AcuityException

getClassNamePrefix

public java.lang.String getClassNamePrefix()
the getter for the class tree class filter name

Returns:
the class name the tree was filtered on

getMatchCase

public boolean getMatchCase()
the getter for the class tree class filter case sensitive desgination

Returns:
true if the filter was a case sensitive match

getPrefixOnly

public int getPrefixOnly()
the getter for the class tree class filter prefix designation

Returns:
prefix match designation

getCurrentNameValue

public java.lang.String getCurrentNameValue()
the getter for the class tree class filter prefix designation

Returns:
prefix match designation

getCurrentLabelValue

public java.lang.String getCurrentLabelValue()
the getter for the class tree class filter prefix designation

Returns:
prefix match designation

getCurrentCommentValue

public java.lang.String getCurrentCommentValue()
the getter for the class tree class filter prefix designation

Returns:
prefix match designation

getClassDrillDownTableContent

public java.util.List[] getClassDrillDownTableContent(AcuityController ac)
                                               throws AcuityException
get the contents for the classes drilldown table return a data structure compatible with the GUI tables

Parameters:
ac - - the acuity controller expansion/compression
Throws:
AcuityException

findClass

public java.lang.Boolean findClass(AcuityController ac,
                                   java.lang.String classPrefix)
                            throws AcuityException
update the tree to find the supplied prefix

Parameters:
ac - - the acuity controller expansion/compression
Throws:
AcuityException

classTreeSelection

public java.lang.String classTreeSelection(AcuityController ac,
                                           java.lang.String selection)
                                    throws AcuityException
Throws:
AcuityException

removePropertyRangeEntry

public void removePropertyRangeEntry(AcuityController ac,
                                     java.lang.String URI)
                              throws AcuityException
remove the entries from the property's range

Parameters:
ac - - the acuity controller
URI - - the name value pairs from the GUI
Throws:
AcuityException

removePropertyDomainEntry

public void removePropertyDomainEntry(AcuityController ac,
                                      java.lang.String URI)
                               throws AcuityException
remove the entry from the property's domains

Parameters:
ac - - the acuity controller
Throws:
AcuityException

setPropertyToDatatype

public java.lang.Object setPropertyToDatatype(AcuityController ac,
                                              java.lang.String URI)
                                       throws AcuityException
add the entries from the property's range

Parameters:
ac - - the acuity controller
Throws:
AcuityException

getCurrentPropertyRanges

public java.util.List getCurrentPropertyRanges()
                                        throws AcuityException
get the current ranges for a new property

Throws:
AcuityException

getCurrentPropertyDomains

public java.util.List getCurrentPropertyDomains()
                                         throws AcuityException
get the current ranges for a new property

Throws:
AcuityException

getAtomicPropertyTypes

public static java.util.List getAtomicPropertyTypes()
                                             throws AcuityException
get the supported atomic property types

Throws:
AcuityException

setTableDepth

public java.lang.Integer setTableDepth(java.lang.String tableDepth)
                                throws AcuityException
Call this method to set the depth of display levels in the editor DataTables.

Parameters:
tableDepth - The tableDepth to set.
Throws:
AcuityException

getTableDepth

public int getTableDepth()
Call this method to get the depth of display levels in the editor DataTables.

Returns:
Returns the tableDepth.

getScriptType

public com.hp.hpl.jena.rdf.model.Resource getScriptType()

setScriptType

public java.lang.Object setScriptType(java.lang.String st)

getExistingScript

public com.hp.hpl.jena.ontology.Individual getExistingScript()

setExistingScript

public java.lang.Object setExistingScript(com.hp.hpl.jena.ontology.Individual es)

setExistingScript

public java.lang.Object setExistingScript(java.lang.String es)
                                   throws AcuityException
Throws:
AcuityException

saveScriptAs

public java.lang.Object saveScriptAs(AcuityController ac)
                              throws AcuityException
Throws:
AcuityException

saveExistingScript

public java.lang.Object saveExistingScript(AcuityController ac)
                                    throws AcuityException
Throws:
AcuityException

getInNewProperty

public boolean getInNewProperty()
This method returns true if the current step is the add new property step

Returns:
boolean indicating if the active step is the new property step.

editClassTreeSelection

public void editClassTreeSelection()
The user has selected and entry from the class tree for editing. Determine if it is an individual or class and go to the appropriate editing action.


getEditableModelAltUri

public java.lang.String getEditableModelAltUri()
Call this method to get the alt URI of the editable submodel

Returns:

getEditableModelNamespace

public java.lang.String getEditableModelNamespace()

getStatusOfLastCall

public java.lang.String getStatusOfLastCall()
Returns:
Returns the statusOfLastCall.

getEditableModel

public com.hp.hpl.jena.ontology.OntModel getEditableModel()
                                                   throws AcuityException
Returns:
Returns the editableModel.
Throws:
AcuityException - - if the model is null

getCurrentClassTreeSelection

public java.lang.String getCurrentClassTreeSelection()

getEditClassActionList

public java.util.List getEditClassActionList(AcuityController ac)
                                      throws AcuityException
create the list of possible class/instance edit functions: Add instance, add subclass, and or edit.

Returns:
an Array list for a selection list
Throws:
AcuityException

editClassActionSelected

public boolean editClassActionSelected(AcuityController ac,
                                       java.lang.Object nvpairs)
                                throws AcuityException
Throws:
AcuityException

EditorStepSelected

public boolean EditorStepSelected(java.lang.String selection)

setBEditDefaultValuesInPlace

public void setBEditDefaultValuesInPlace(boolean bEditDefaultValuesInPlace)
Parameters:
bEditDefaultValuesInPlace - The bEditDefaultValuesInPlace to set.

isBEditDefaultValuesInPlace

public boolean isBEditDefaultValuesInPlace()
Returns:
Returns the bEditDefaultValuesInPlace.

setContainmentOnly

public java.lang.String setContainmentOnly(java.lang.String newVal)

getContainmentOnly

public java.lang.String getContainmentOnly()

setSelectedProperty

public java.lang.String setSelectedProperty(java.lang.String val)

getEditablePropertiesList

public java.util.List getEditablePropertiesList()
                                         throws AcuityException
Throws:
AcuityException

editPropertyActionSelected

public java.lang.String editPropertyActionSelected(AcuityController ac,
                                                   java.lang.Object nvpairs)
                                            throws AcuityException
Throws:
AcuityException

getIsFunctional

public java.lang.String getIsFunctional()

setIsFunctional

public java.lang.String setIsFunctional(java.lang.String val)

getDomainVRange

public java.lang.String getDomainVRange()

domainVRangeSelected

public java.lang.String domainVRangeSelected(AcuityController ac,
                                             java.lang.String selection)
                                      throws AcuityException
Throws:
AcuityException

getModelConceptsList

public java.util.List getModelConceptsList()
                                    throws AcuityException
build a list of the concepts/elements in the ontology. This list will be used to select the concept/element the user wants help on.

Returns:
a selection list of [URI, display] elements
Throws:
AcuityException

helpConceptSelected

public java.lang.String helpConceptSelected(AcuityController ac,
                                            java.lang.String URI)

setTestSparqlScript

public java.lang.Boolean setTestSparqlScript(java.lang.String script)

getTestSparqlScript

public java.lang.String getTestSparqlScript()

setNewScriptName

public java.lang.Object setNewScriptName(java.lang.String n)

getNewScriptName

public java.lang.String getNewScriptName()

getTestSparqlScriptOutputTable

public java.util.List[] getTestSparqlScriptOutputTable(AcuityController ac)
                                                throws AcuityException,
                                                       java.sql.SQLException
Throws:
AcuityException
java.sql.SQLException

getHelpConcept

public java.lang.String getHelpConcept(AcuityController ac)
                                throws AcuityException
Throws:
AcuityException

setCMapDirectory

public java.lang.Object setCMapDirectory(java.lang.String newDirectory)

getCMapDirectory

public java.lang.String getCMapDirectory()

getCMapDirectoryStructure

public java.util.List getCMapDirectoryStructure()
                                         throws AcuityException
Throws:
AcuityException

setCMapFile

public java.lang.Object setCMapFile(java.lang.String newFileName)

getCMapFile

public java.lang.String getCMapFile()

newCMapFile

public java.lang.Object newCMapFile(java.lang.String newFileName)

getFilesInCMapDirectory

public java.util.List getFilesInCMapDirectory()
                                       throws AcuityException
Throws:
AcuityException

setCMapTemplate

public java.lang.Object setCMapTemplate(java.lang.String cmapTemp)

getCMapTemplate

public java.lang.String getCMapTemplate()

getPossibleCMapTemplates

public java.util.List getPossibleCMapTemplates(AcuityController ac)
                                        throws AcuityException
Throws:
AcuityException

setCMapCombinedLabel

public java.lang.Object setCMapCombinedLabel(java.lang.String value)

getCMapCombinedLabel

public java.lang.String getCMapCombinedLabel()

convertTestQueryToCMap

public java.lang.String convertTestQueryToCMap(AcuityController ac,
                                               java.lang.String outputFile)

setImportExportDirectory

public java.lang.Object setImportExportDirectory(java.lang.String newDirectory)

getImportExportDirectory

public java.lang.String getImportExportDirectory()

getImportExportDirectoryStructure

public java.util.List getImportExportDirectoryStructure()
                                                 throws AcuityException
Throws:
AcuityException

setImportFile

public java.lang.Object setImportFile(java.lang.String newFileName)

getImportFile

public java.lang.String getImportFile()

getFilesInImportExportDirectory

public java.util.List getFilesInImportExportDirectory()
                                               throws AcuityException
Throws:
AcuityException

getPreviewImportTable

public java.util.List[] getPreviewImportTable(AcuityController ac)
                                       throws AcuityException
Throws:
AcuityException

exportModelToCSV

public java.lang.String exportModelToCSV(AcuityController ac,
                                         java.lang.String button)
                                  throws AcuityException
Throws:
AcuityException

importModelFromCSV

public java.lang.String importModelFromCSV(AcuityController ac,
                                           java.lang.String button)
                                    throws AcuityException
This method will import model creation/modification statements from a comma-separated-values file. The file content is basically that of the editor's editable table. The content and syntax is as follows: , , , where may be the URI of an OntClass or an Individual, either full or or if unique, and must, if the Resource does not already exist, include the superclass or class to which the Resource belongs as : may be the URI of an OntProperty, either full or or if unique can be one of the menu defined above: // owl-centric retriction-type menu choices private static final String ALLVALUESFROMNAME = "allValuesFrom"; private static final String SOMEVALUESFROMNAME = "someValuesFrom"; private static final String HASVALUENAME = "hasValue"; private static final String CARDINALITY = "Cardinality"; private static final String MINCARDINALITY = "MinCardinality"; private static final String DEFAULTVALUENAME = "seeAlso defValue"; private static final String DEFAULTVALUECLASSNAME = "seeAlso defClass"; may be an OntClass or an Individual, same syntax as , or it may be an xsd property value, e.g., a string. The range of the property will be used to try to convert to the proper Literal type Example: :, , , : :, , , : , , , : , , , [{a,b,c},{{1,2,3},{4,5,6},{7,8,9}}]

Parameters:
ac -
button -
Returns:
Throws:
AcuityException

setBShowEditorContent

protected void setBShowEditorContent(boolean bShowEditorContent)

isBShowEditorContent

protected boolean isBShowEditorContent()