def __init__(self, path, setSpec, repoScanner): MetaDataRecord.__init__ (self, path=path) self.repoScanner = repoScanner self.setSpec = setSpec self.handle = self.getTextAtPath ("metaMetadata/metadataHandle") self.partnerId = self.getTextAtPath ("metaMetadata/partnerId") self.resourceMappings = map (ResourceMapping, self.getResourceNodes())
def __init__(self, id, args=None): MetaDataRecord.__init__(self, path=self.shape_template) # make a copy so we don't stomp default_shape_args opts = copy.deepcopy(self.default_shape_args) if args is not None: util.update(opts, args) # define all attributes to match xpath mapping above. # the xpath mappings determine what attributes are written to DOM. self.ID = id self.Name = opts['name'] self.Type = "Shape" self.PinX = opts['x'] self.PinY = opts['y'] self.Width = opts['width'] self.Height = opts['height'] self.ObjType = 1 self.LineWeight = util.pt2in(opts['line']['weight']) #from px to inch self.LineColor = opts['line']['color'] self.CharSize = util.pt2in(opts['label']['size']) self.CharColor = opts['label']['color'] self.Text = opts['label']['text'] self.addCustomAttrs(opts) # inject components self.components = ComponentRecord(path=self.component_xml) try: # assigns components record as side effect self.injectComponents() except KeyError, msg: raise Exception, "ERROR: cannot inject component: %s" % msg
def __init__ (self, path=None, xml=None): """ exposes entryList, an ordered list of statusElement objects """ MetaDataRecord.__init__ (self, path, xml) self.updateEntryList () # initializes self.entryList self.entriesElement = self.selectSingleNode (self.doc, "statusEntries")
def __init__(self, xml=None, path=None): self.xml_format = None self.filename = "" MetaDataRecord.__init__(self, xml=xml, path=path) if self.dom: self.doc = self.dom.documentElement self.xml_format = "dlese_collect"
def __init__(self, xml=None, path=None): self.xml_format = None self.fn_id = None self.md_id = None self.filename = "" MetaDataRecord.__init__(self, xml=xml, path=path) if self.dom: self.doc = self.dom.documentElement self.xml_format = "dlese_collect" self.fn_id = self.getFileNameID() self.md_id = self.getId()
def __init__(self, xml=None, path=None): self.xml_format = None self.fn_id = None self.md_id = None self.filename = "" MetaDataRecord.__init__(self, xml=xml, path=path) if self.dom: self.doc = self.dom.documentElement self.xml_format = "adn" self.fn_id = self.getFileNameID() self.md_id = self.getId() # self.localize() self.setNameSpaceInfo()
def __init__(self, path=None, xml=None): MetaDataRecord.__init__(self, path=path, xml=xml) self.relations = self.get_relations()
def __init__(self, template=None): template = template or self.default_vdx_template MetaDataRecord.__init__(self, path=template) self.shapes = UserDict() self.edges = UserDict() self.nodes = UserDict()
def __init__(self, path=None, xml=None): MetaDataRecord.__init__(self, path=path, xml=xml)
def __init__(self, path=None, xml=None): if path is None and xml is None: path = self.template_path MetaDataRecord.__init__(self, path=path, xml=xml)
def __init__ (self, path=None, xml=None): MetaDataRecord.__init__ (self, path=path, xml=xml) self.setDateCreated ()
def __init__ (self, path=None, xml=None, collection=None): self.collection = collection MetaDataRecord.__init__ (self, xml=xml, path=path)
def __init__(self, path): MetaDataRecord.__init__(self, path=path)