From 01406c155baddd4fd546330f06104ab67b39c2e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Thu, 29 Sep 2005 06:37:33 +0000 Subject: [PATCH] * TODO'da ilerlemeler * eksik xml datalariyla baslayalim * yaptiklarimiz yapacaklarimizin garantisidir --- pisi/data.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pisi/data.py diff --git a/pisi/data.py b/pisi/data.py new file mode 100644 index 00000000..94b6d0c0 --- /dev/null +++ b/pisi/data.py @@ -0,0 +1,37 @@ +# Copyright (C) 2005, TUBITAK/UEKAE +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# Please read the COPYING file. +# +# Authors: Eray Ozkural + +"""a placeholder for data types, might factor elsewhere later""" + +import pisi.xmlfile + +__metaclass__ = xmlfile.autoxml + +class Distribution: + t_Name = [xmlfile.Text, xmlfile.mandatory] + t_Version = [xmlfile.Text, xmlfile.mandatory] + t_Type = [xmlfile.Text, xmlfile.mandatory] + t_Dependencies = [ [xmlfile.Text], xmlfile.optional, "Distribution"] + +class Component: + "part-of representation for component declarations" + t_Name = [xmlfile.Text, xmlfile.mandatory] + t_PartOf = [xmlfile.Text, xmlfile.mandatory] + #t_Icon = [xmlfile.Binary, xmlfile.mandatory] + t_Dependencies = [ [xmlfile.String], xmlfile.optional, "Component"] + +class ComponentTree: + "index representation for the component structure" + tag = "Component" + t_Name = [xmlfile.Text, xmlfile.mandatory] + #t_Icon = [xmlfile.Binary, xmlfile.mandatory] + t_Dependencies = [ [xmlfile.Text], xmlfile.optional, "Component"] + t_Parts = [ [ComponentTree], xmlfile.optional, "Component"]