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"]