Esempio n. 1
0
 def parameters(self):
     parameters = ConceptReferenceParameters(self.theName,
                                             self.theDimension,
                                             self.theObject,
                                             self.theDescription)
     parameters.setId(self.theId)
     return parameters
Esempio n. 2
0
 def update_object(self, cr, name):
     crParams = ConceptReferenceParameters(refName=cr.theName,
                                           dimName=cr.theDimName,
                                           objtName=cr.theObjtName,
                                           cDesc=cr.theDescription)
     try:
         crId = self.db_proxy.getDimensionId(name, 'concept_reference')
         crParams.setId(crId)
         self.db_proxy.updateConceptReference(crParams)
     except ARMException as ex:
         self.close()
         raise ARMHTTPError(ex)
Esempio n. 3
0
 def update_concept_reference(self, cr, name):
     found_cr = self.get_concept_reference(name)
     crParams = ConceptReferenceParameters(refName=cr.theName,
                                           dimName=cr.theDimName,
                                           objtName=cr.theObjtName,
                                           cDesc=cr.theDescription)
     crParams.setId(found_cr.theId)
     try:
         self.db_proxy.updateConceptReference(crParams)
     except ARMException as ex:
         self.close()
         raise ARMHTTPError(ex)
Esempio n. 4
0
 def update_concept_reference(self,cr,name):
   crParams = ConceptReferenceParameters(
     refName=cr.theName,
     dimName=cr.theDimName,
     objtName=cr.theObjtName,
     cDesc=cr.theDescription)
   try:
     crId = self.db_proxy.getDimensionId(name,'concept_reference')
     crParams.setId(crId)
     self.db_proxy.updateConceptReference(crParams)
   except ARMException as ex:
     self.close()
     raise ARMHTTPError(ex)
Esempio n. 5
0
 def add_object(self, cr):
     crParams = ConceptReferenceParameters(refName=cr.theName,
                                           dimName=cr.theDimName,
                                           objtName=cr.theObjtName,
                                           cDesc=cr.theDescription)
     try:
         self.db_proxy.addConceptReference(crParams)
     except ARMException as ex:
         self.close()
         raise ARMHTTPError(ex)
Esempio n. 6
0
 def endElement(self,name):
   if name == 'concept_reference':
     p = ConceptReferenceParameters(self.theName,self.theConcept,self.theObject,self.theDescription)
     self.theConceptReferences.append(p)
     self.resetConceptReferenceAttributes()
   elif name == 'task_characteristic':
     p = TaskCharacteristicParameters(self.theTask,self.theModalQualifier,self.theDefinition,self.theGrounds,self.theWarrants,[],self.theRebuttals)
     self.theTaskCharacteristics.append(p)
     self.resetTaskCharacteristicAttributes()
   elif name == 'definition':
     self.inDefinition = 0
Esempio n. 7
0
 def endElement(self, name):
     if name == 'persona':
         p = PersonaParameters(self.theName, self.theActivities,
                               self.theAttitudes, self.theAptitudes,
                               self.theMotivations, self.theSkills,
                               self.theIntrinsic, self.theContextual,
                               self.theImage, self.isAssumptionPersona,
                               self.theType, self.theTags,
                               self.theEnvironmentProperties, {})
         self.thePersonas.append(p)
         self.resetPersonaAttributes()
     elif name == 'persona_environment':
         p = PersonaEnvironmentProperties(self.theEnvironmentName,
                                          self.isDirect, self.theNarrative,
                                          self.theRoles, {'narrative': {}})
         self.theEnvironmentProperties.append(p)
         self.resetPersonaEnvironmentAttributes()
     elif name == 'external_document':
         p = ExternalDocumentParameters(self.theName, self.theVersion,
                                        self.theDate, self.theAuthors,
                                        self.theDescription)
         self.theExternalDocuments.append(p)
         self.resetExternalDocumentAttributes()
     elif name == 'document_reference':
         p = DocumentReferenceParameters(self.theName, self.theDocument,
                                         self.theContributor,
                                         self.theExcerpt)
         self.theDocumentReferences.append(p)
         self.resetDocumentReferenceAttributes()
     elif name == 'concept_reference':
         p = ConceptReferenceParameters(self.theName, self.theConcept,
                                        self.theObject, self.theDescription)
         self.theConceptReferences.append(p)
         self.resetConceptReferenceAttributes()
     elif name == 'persona_characteristic':
         p = PersonaCharacteristicParameters(
             self.thePersona, self.theModalQualifier, self.theBvName,
             self.theDefinition, self.theGrounds, self.theWarrants, [],
             self.theRebuttals)
         self.thePersonaCharacteristics.append(p)
         self.resetPersonaCharacteristicAttributes()
     elif name == 'task_characteristic':
         p = TaskCharacteristicParameters(self.theTask,
                                          self.theModalQualifier,
                                          self.theDefinition,
                                          self.theGrounds, self.theWarrants,
                                          [], self.theRebuttals)
         self.theTaskCharacteristics.append(p)
         self.resetTaskCharacteristicAttributes()
     elif name == 'task':
         p = TaskParameters(self.theName, self.theCode, self.theObjective,
                            self.isAssumptionTask, self.theAuthor,
                            self.theTags, self.theEnvironmentProperties)
         self.theTasks.append(p)
         self.resetTaskAttributes()
     elif name == 'task_environment':
         p = TaskEnvironmentProperties(
             self.theEnvironmentName, self.theDependencies,
             self.theTaskPersonas, self.theConcerns,
             self.theConcernAssociations, self.theNarrative,
             self.theConsequences, self.theBenefits, {
                 'narrative': {},
                 'consequences': {},
                 'benefits': {}
             })
         self.theEnvironmentProperties.append(p)
         self.resetTaskEnvironmentAttributes()
     elif name == 'exception':
         self.theCurrentStep.addException(
             (self.theExcName, self.theExcType, self.theExcValue,
              self.theExcCat, self.theDefinition))
     elif name == 'step':
         self.theCurrentStep.setTags(self.theTags)
         self.theSteps.append(self.theCurrentStep)
         self.theCurrentStep = None
     elif name == 'usecase_environment':
         p = UseCaseEnvironmentProperties(self.theEnvironmentName,
                                          self.thePreconditions,
                                          self.theSteps,
                                          self.thePostconditions)
         self.theEnvironmentProperties.append(p)
         self.resetUseCaseEnvironmentAttributes()
     elif name == 'usecase':
         p = UseCaseParameters(self.theName, self.theAuthor, self.theCode,
                               self.theActors, self.theDescription,
                               self.theTags, self.theEnvironmentProperties)
         self.theUseCases.append(p)
         self.resetUseCaseAttributes()
     elif name == 'activities':
         self.inActivities = 0
     elif name == 'attitudes':
         self.inAttitudes = 0
     elif name == 'aptitudes':
         self.inAptitudes = 0
     elif name == 'motivations':
         self.inMotivations = 0
     elif name == 'skills':
         self.inSkills = 0
     elif name == 'intrinsic':
         self.inIntrinsic = 0
     elif name == 'contextual':
         self.inContextual = 0
     elif name == 'narrative':
         self.inNarrative = 0
     elif name == 'excerpt':
         self.inExcerpt = 0
     elif name == 'description':
         self.inDescription = 0
     elif name == 'definition':
         self.inDefinition = 0
     elif name == 'dependencies':
         self.inDependencies = 0
     elif name == 'objective':
         self.inObjective = 0
     elif name == 'preconditions':
         self.inPreconditions = 0
     elif name == 'postconditions':
         self.inPostconditions = 0
     elif name == 'benefits':
         self.inBenefits = 0
     elif name == 'consequences':
         self.inConsequences = 0
 def parameters(self):
   parameters = ConceptReferenceParameters(self.theName,self.theDimension,self.theObject,self.theDescription)
   parameters.setId(self.theId)
   return parameters