Beispiel #1
0
 def parameters(self):
     parameters = EnvironmentParameters(
         self.environmentName, self.environmentShortCode,
         self.environmentDescription, self.theEnvironments,
         self.theDuplicateProperty, self.theOverridingEnvironment,
         self.theTensions)
     parameters.setId(self.theEnvironmentId)
     return parameters
  def endElement(self,name):
    if name == 'entry':
      self.theNamingConventions.append((self.theCurrentNameEntry,self.theDefinition))
    elif name == 'revision':
      self.theRevisions.append((self.theCurrentRevNo,self.theCurrentRevDate,self.theRemarks))
    elif name == 'project_settings':
      self.theProjectSettings = (self.theName,self.theBackground,self.theStrategicGoals,self.theScope,self.theNamingConventions,self.theContributors,self.theRevisions,self.theRichPicture)
    elif name == 'asset_values':
      nv = ValueTypeParameters('None',self.theNoneValue,'asset_value',self.theName)
      nv.setId(0)
      self.theAssetValues.append(nv)

      lv = ValueTypeParameters('Low',self.theLowValue,'asset_value',self.theName)
      lv.setId(1)
      self.theAssetValues.append(lv)

      mv = ValueTypeParameters('Medium',self.theMedValue,'asset_value',self.theName)
      mv.setId(2)
      self.theAssetValues.append(mv)

      hv = ValueTypeParameters('High',self.theHighValue,'asset_value',self.theName)
      hv.setId(3)
      self.theAssetValues.append(hv)

      self.resetAssetValues()
    elif name == 'environment':
      p = EnvironmentParameters(self.theName,self.theShortCode,self.theDefinition,self.theCompositeEnvironments,self.theDuplicateProperty,self.theOverridingEnvironment)
      p.setAssetValues(self.theAssetValues)
      self.theEnvironments.append(p)
      self.resetEnvironmentAttributes()
    elif name == 'background':
      self.inBackground = 0
    elif name == 'strategic_goals':
      self.inStrategicGoals = 0
    elif name == 'scope':
      self.inScope = 0
    elif name == 'definition':
      self.inDefinition = 0
    elif name == 'remarks':
      self.inRemarks = 0
    elif name == 'none':
      self.inNone = 0
    elif name == 'low':
      self.inLow = 0
    elif name == 'medium':
      self.inMed = 0
    elif name == 'high':
      self.inHigh = 0
Beispiel #3
0
 def to_environment_parameters(self, environment):
     assert isinstance(environment, Environment)
     env_params = EnvironmentParameters(
         conName=environment.theName,
         conSc=environment.theShortCode,
         conDesc=environment.theDescription,
         environments=environment.theEnvironments,
         duplProperty=environment.theDuplicateProperty,
         overridingEnvironment=environment.theOverridingEnvironment,
         envTensions=environment.theTensions
     )
     return env_params
Beispiel #4
0
 def parameters(self):
     parameters = EnvironmentParameters(self.environmentName,
                                        self.environmentShortCode,
                                        self.environmentDescription)
     parameters.setId(self.theEnvironmentId)
     return parameters
    def endElement(self, name):
        if name == 'entry':
            self.theNamingConventions.append(
                (self.theCurrentNameEntry, self.theDefinition))
        elif name == 'revision':
            self.theRevisions.append((self.theCurrentRevNo,
                                      self.theCurrentRevDate, self.theRemarks))
        elif name == 'project_settings':
            self.theProjectSettings = (self.theName, self.theBackground,
                                       self.theStrategicGoals, self.theScope,
                                       self.theNamingConventions,
                                       self.theContributors, self.theRevisions,
                                       self.theRichPicture)
        elif name == 'asset_values':
            nv = ValueTypeParameters('None', self.theNoneValue, 'asset_value',
                                     self.theName)
            nv.setId(0)
            self.theAssetValues.append(nv)

            lv = ValueTypeParameters('Low', self.theLowValue, 'asset_value',
                                     self.theName)
            lv.setId(1)
            self.theAssetValues.append(lv)

            mv = ValueTypeParameters('Medium', self.theMedValue, 'asset_value',
                                     self.theName)
            mv.setId(2)
            self.theAssetValues.append(mv)

            hv = ValueTypeParameters('High', self.theHighValue, 'asset_value',
                                     self.theName)
            hv.setId(3)
            self.theAssetValues.append(hv)

            self.resetAssetValues()
        elif name == 'environment':
            p = EnvironmentParameters(self.theName, self.theShortCode,
                                      self.theDefinition,
                                      self.theCompositeEnvironments,
                                      self.theDuplicateProperty,
                                      self.theOverridingEnvironment)
            p.setAssetValues(self.theAssetValues)
            self.theEnvironments.append(p)
            self.resetEnvironmentAttributes()
        elif name == 'background':
            self.inBackground = 0
        elif name == 'strategic_goals':
            self.inStrategicGoals = 0
        elif name == 'scope':
            self.inScope = 0
        elif name == 'definition':
            self.inDefinition = 0
        elif name == 'remarks':
            self.inRemarks = 0
        elif name == 'none':
            self.inNone = 0
        elif name == 'low':
            self.inLow = 0
        elif name == 'medium':
            self.inMed = 0
        elif name == 'high':
            self.inHigh = 0
Beispiel #6
0
 def parameters(self):
     parameters = EnvironmentParameters(self.environmentName, self.environmentShortCode, self.environmentDescription)
     parameters.setId(self.theEnvironmentId)
     return parameters
 def parameters(self):
   parameters = EnvironmentParameters(self.environmentName,self.environmentShortCode,self.environmentDescription,self.theEnvironments,self.theDuplicateProperty,self.theOverridingEnvironment,self.theTensions)
   parameters.setId(self.theEnvironmentId)
   return parameters