Package gavo :: Package svcs :: Module computedcore :: Class ComputedCore
[frames] | no frames]

Class ComputedCore

source code

                   object --+                
                            |                
 base.structure.StructureBase --+            
                                |            
                   object --+   |            
                            |   |            
           base.common.Parser --+            
                                |            
base.structure.ParseableStructure --+        
                                    |        
             base.structure.Structure --+    
                                        |    
                                core.Core --+
                                            |
                                           ComputedCore

A core wrapping external applications.

ComputedCores wrap command line tools taking command line arguments, reading from stdin, and outputting to stdout.

The command line arguments are taken from the inputTable's parameters, stdin is created by serializing the inputTable's rows like they are serialized for with the TSV output, except only whitespace is entered between the values.

The output is the primary table of parsing the program's output with the data child.

While in principle more declarative than PythonCores, these days I'd say rather use one of those.

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__

Instance Methods
 
start_(self, ctx, name, value) source code
 
completeElement(self, ctx) source code
 
clearProperty(self, name) source code
 
getFullId(self) source code
 
getProperty(self, name, default=<Undefined>) source code
 
hasProperty(self, name) source code
 
setProperty(self, name, value) source code

Inherited from core.Core: __init__, __repr__, __str__, adaptForRenderer, initialize, makeUserDoc, run

Inherited from base.structure.Structure: __provides__, callCompletedCallbacks, finishElement, onElementComplete, validate

Inherited from base.structure.ParseableStructure: end_, feed, feedFrom, feedObject, getAttribute, iterEvents, value_

Inherited from base.structure.StructureBase: __providedBy__, adopt, breakCircles, change, copy, getAttributes, getCopyableAttributes, getSourcePosition, iterChildren, setPosition

Inherited from base.common.Parser: feedEvent

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods

Inherited from base.structure.StructureBase: fromStructure

Class Variables
  name_ = 'computedCore'
a sentinel for all kinds of undefined values.
  attrSeq = [<gavo.rscdef.common.ResdirRelativeAttribute object>...
  managedAttrs = {'computer': <gavo.rscdef.common.ResdirRelative...

Inherited from core.Core: inputTableXML, outputTableXML

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties
  computer
  rd

Inherited from object: __class__

Method Details

start_(self, ctx, name, value)

source code 
Overrides: base.structure.ParseableStructure.start_

completeElement(self, ctx)

source code 
Overrides: base.structure.Structure.completeElement

clearProperty(self, name)

source code 
Overrides: core.Core.clearProperty

getFullId(self)

source code 
Overrides: core.Core.getFullId

getProperty(self, name, default=<Undefined>)

source code 
Overrides: core.Core.getProperty

hasProperty(self, name)

source code 
Overrides: core.Core.hasProperty

setProperty(self, name, value)

source code 
Overrides: core.Core.setProperty

Class Variable Details

attrSeq

Value:
[<gavo.rscdef.common.ResdirRelativeAttribute object>,
 <gavo.base.parsecontext.IdAttribute object>,
 <gavo.base.complexattrs.StructAttribute object>,
 <gavo.base.parsecontext.OriginalAttribute object>,
 <gavo.base.complexattrs.StructAttribute object>,
 <gavo.base.complexattrs.PropertyAttribute object>,
 <gavo.rscdef.common.RDAttribute object>,
 <gavo.base.complexattrs.StructAttribute object>]

managedAttrs

Value:
{'computer': <gavo.rscdef.common.ResdirRelativeAttribute object>,
 'data': <gavo.base.complexattrs.StructAttribute object>,
 'id': <gavo.base.parsecontext.IdAttribute object>,
 'inputTable': <gavo.base.complexattrs.StructAttribute object>,
 'original': <gavo.base.parsecontext.OriginalAttribute object>,
 'outputTable': <gavo.base.complexattrs.StructAttribute object>,
 'properties': <gavo.base.complexattrs.PropertyAttribute object>,
 'property': <gavo.base.complexattrs.PropertyAttribute object>,
...

Property Details

computer

Get Method:
unreachable.computePath(instance)
Set Method:
unreachable.setRelative(instance, value)

rd

Get Method:
unreachable._getRD(self)