예제 #1
0
	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())
예제 #2
0
    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
예제 #3
0
	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")
예제 #4
0
    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"
예제 #5
0
    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()
예제 #6
0
    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()
예제 #7
0
 def __init__(self, path=None, xml=None):
     MetaDataRecord.__init__(self, path=path, xml=xml)
     self.relations = self.get_relations()
예제 #8
0
 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()
예제 #9
0
 def __init__(self, path=None, xml=None):
     MetaDataRecord.__init__(self, path=path, xml=xml)
예제 #10
0
 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)
예제 #11
0
	def __init__ (self, path=None, xml=None):
		MetaDataRecord.__init__ (self, path=path, xml=xml)
		self.setDateCreated ()
예제 #12
0
	def __init__ (self, path=None, xml=None, collection=None):
		self.collection = collection
		MetaDataRecord.__init__ (self, xml=xml, path=path)
예제 #13
0
 def __init__(self, path):
     MetaDataRecord.__init__(self, path=path)