Public Member Functions | Public Attributes | List of all members
bp_plot.Plot Class Reference

Public Member Functions

def __init__ (self, name, capfile, files)
 
def PreferredExtension (self)
 

Public Attributes

 name
 
 capfile
 
 files
 
 caption
 

Detailed Description

A class representing a single DocDB document

All relevant metadata associated with a single DocDB document will be 
stored in a member of this class.

Note:
    The data members "author_id" and "author", may seem redundant, but
    there is no way to query DocDB for the full author name given an ID, so 
    we need to collect both pieces of information here.

Attributes:
    name (str)         : Unique plot basename
    caption (str)      : Plot caption
    files (array)      : Array of plot version filenames

Definition at line 5 of file bp_plot.py.

Constructor & Destructor Documentation

def bp_plot.Plot.__init__ (   self,
  name,
  capfile,
  files 
)

Definition at line 23 of file bp_plot.py.

Referenced by PandAna.core.core.spectrum.fill().

23  def __init__(self, name, capfile, files):
24  self.name = name
25  self.capfile = capfile
26  self.files = files
27 
28  f = open(capfile, 'r')
29  self.caption = f.read().strip().rstrip('\n\r')
30  f.close()
31 
procfile open("FD_BRL_v0.txt")
def __init__(self, name, capfile, files)
Definition: bp_plot.py:23

Member Function Documentation

def bp_plot.Plot.PreferredExtension (   self)

Definition at line 32 of file bp_plot.py.

References bp_plot.Plot.files, and bp_docdb.Document.files.

32  def PreferredExtension(self):
33  for ext in config.PLOT_EXTS:
34  for file in self.files:
35  if os.path.splitext(os.path.basename(file))[1][1:] == ext:
36  return file, ext
37 
def PreferredExtension(self)
Definition: bp_plot.py:32

Member Data Documentation

bp_plot.Plot.capfile

Definition at line 25 of file bp_plot.py.

bp_plot.Plot.caption

Definition at line 29 of file bp_plot.py.

Referenced by galleryMaker.SavedFigure.makeWrapper().


The documentation for this class was generated from the following file: