[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/reports doc/report-notes.txt src/adapters/...
From: |
Jason Cater |
Subject: |
gnue/reports doc/report-notes.txt src/adapters/... |
Date: |
Tue, 07 Jan 2003 01:51:30 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jason Cater <address@hidden> 03/01/07 01:51:30
Modified files:
reports/doc : report-notes.txt
reports/src/adapters/filters/Standard/_base: Parser.py
Added files:
reports/src/adapters/filters/Standard/_base/Objects: BaseObj.py
ContainerObj.py
PositionableObj.py
Report.py
__init__.py
Log message:
synching machines (you expected anything less?)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/doc/report-notes.txt.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/adapters/filters/Standard/_base/Parser.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/adapters/filters/Standard/_base/Objects/BaseObj.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/adapters/filters/Standard/_base/Objects/ContainerObj.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/adapters/filters/Standard/_base/Objects/PositionableObj.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/adapters/filters/Standard/_base/Objects/Report.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/src/adapters/filters/Standard/_base/Objects/__init__.py?rev=1.1
Patches:
Index: gnue/reports/doc/report-notes.txt
diff -c gnue/reports/doc/report-notes.txt:1.9
gnue/reports/doc/report-notes.txt:1.10
*** gnue/reports/doc/report-notes.txt:1.9 Mon Jan 6 01:22:19 2003
--- gnue/reports/doc/report-notes.txt Tue Jan 7 01:51:30 2003
***************
*** 1,7 ****
GNUe:Reports:Standard goals:
* Templating/Styles
! * Relational positioning
* Charting
* Cross-tabulation
--- 1,7 ----
GNUe:Reports:Standard goals:
* Templating/Styles
! * Relational positioning/sizing
* Charting
* Cross-tabulation
Index: gnue/reports/src/adapters/filters/Standard/_base/Parser.py
diff -c gnue/reports/src/adapters/filters/Standard/_base/Parser.py:1.1
gnue/reports/src/adapters/filters/Standard/_base/Parser.py:1.2
*** gnue/reports/src/adapters/filters/Standard/_base/Parser.py:1.1 Mon Dec
30 19:57:41 2002
--- gnue/reports/src/adapters/filters/Standard/_base/Parser.py Tue Jan 7
01:51:30 2003
***************
*** 0 ****
--- 1,305 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise 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, or (at your option) any later version.
+ #
+ # GNU Enterprise is distributed in the hope that it will be
+ # useful, but WITHOUT ANY WARRANTY; without even the implied
+ # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ # PURPOSE. See the GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+ # FILE:
+ # Parser.py
+ #
+ # DESCRIPTION:
+ # Class that contains a SAX-based xml processor for GNUe Reports'
+ # "Standard" markup.
+ #
+ # NOTES:
+ #
+
+
+ from gnue.common import GDataSource, GTypecast, GParser, GTrigger
+ import copy, types
+
+
+
+
+
+
+ ########
+ ######## Please keep this file neat !!!
+ ########
+
+
+
+
+
+
+
+ #######################################################
+ # This method loads a report from an XML file and returns
+ # a GRReport object. If initialize is 1 (default), then
+ # the report is initialized and ready to go.
+ #######################################################
+
+ def loadFile(buffer, connections=None, initialize=0):
+ return GParser.loadXMLObject (buffer, xmlReportHandler,
'STGNUe-Report-Output', 'gnue-report-output',
+ initialize, attributes={})
+
+
+
+ xmlElements = None
+
+
+ def getXMLelements():
+
+ global xmlElements
+
+ # Here due to some nasty recursive imports
+ from Objects import *
+
+ if xmlElements == None:
+
+ #
+ #
+ xmlElements = {
+ 'report': {
+ 'BaseClass': Report,
+ 'Required': 1,
+ 'SingleInstance': 1,
+ 'Attributes': {
+ 'title': {
+ 'Typecast': GTypecast.text },
+ 'author': {
+ 'Typecast': GTypecast.text },
+ 'version': {
+ 'Typecast': GTypecast.name },
+ 'description': {
+ 'Typecast': GTypecast.text } } ,
+ 'ParentTags': None },
+
+ 'parameters': {
+ 'BaseClass': GRParameters.GRParameters ,
+ 'SingleInstance': 1,
+ 'ParentTags': ('report',)},
+
+ 'parameter': {
+ 'BaseClass': GRParameters.GRParameter,
+ 'Attributes': {
+ 'name': {
+ 'Required': 1,
+ 'Unique': 1,
+ 'Typecast': GTypecast.name },
+ 'required': {
+ 'Typecast': GTypecast.boolean,
+ 'Default': 0 },
+ 'limited': {
+ 'Typecast': GTypecast.boolean,
+ 'Default': 0 },
+ 'default': {
+ 'Typecast': GTypecast.text },
+ 'description': {
+ 'Required': 1,
+ 'Typecast': GTypecast.text },
+ 'source': {
+ 'Typecast': GTypecast.name },
+ 'type': {
+ 'Typecast': GTypecast.name,
+ 'Default': "char" } },
+ 'ParentTags': ('parameters',) },
+
+ 'sortoptions': {
+ 'BaseClass': GRSortOptions.GRSortOptions,
+ 'SingleInstance': 1,
+ 'ParentTags': ('report',) },
+
+ 'sortoption': {
+ 'BaseClass': GRSortOptions.GRSortOption,
+ 'Attributes': {
+ 'id': {
+ 'Required': 1,
+ 'Unique': 1,
+ 'Typecast': GTypecast.name },
+ 'description': {
+ 'Required': 1,
+ 'Typecast': GTypecast.name },
+ 'default': {
+ 'Typecast': GTypecast.boolean,
+ 'Default': 0 } },
+ 'ParentTags': ('sortoptions',) },
+
+ 'sortcolumn': {
+ 'BaseClass': GRSortOptions.GRSortColumn,
+ 'Attributes': {
+ 'name': {
+ 'Required': 1,
+ 'Typecast': GTypecast.name } },
+ 'ParentTags': ('sortoption',) },
+
+ 'layout': {
+ 'BaseClass': GRLayout.GRLayout,
+ 'Required': 1,
+ 'SingleInstance': 1,
+ 'MixedContent': 1,
+ 'Attributes': {
+ 'format': {
+ 'Typecast': GTypecast.text },
+ 'suppressGNUeTags': {
+ 'Typecast': GTypecast.boolean } },
+ 'ParentTags': ('report',) },
+
+ 'section': {
+ 'BaseClass': GRLayout.GRSection,
+ 'Required': 1,
+ 'MixedContent': 1,
+ 'KeepWhitespace': 1,
+ 'Attributes': {
+ 'name': {
+ 'Typecast': GTypecast.name },
+ 'source': {
+ 'Typecast': GTypecast.name } },
+ 'ParentTags': ('layout',) },
+
+ 'default': {
+ 'BaseClass': GRLayout.GRDefault,
+ 'MixedContent': 1,
+ 'KeepWhitespace': 1,
+ 'ParentTags': ('section',) },
+
+ 'firstrow': {
+ 'BaseClass': GRLayout.GRFirstRow,
+ 'MixedContent': 1,
+ 'KeepWhitespace': 1,
+ 'ParentTags': ('section',) },
+
+ 'notfirstrow': {
+ 'BaseClass': GRLayout.GRNotFirstRow,
+ 'MixedContent': 1,
+ 'KeepWhitespace': 1,
+ 'ParentTags': ('section',) },
+
+ 'lastrow': {
+ 'BaseClass': GRLayout.GRLastRow,
+ 'MixedContent': 1,
+ 'KeepWhitespace': 1,
+ 'ParentTags': ('section',) },
+
+ 'notlastrow': {
+ 'BaseClass': GRLayout.GRNotLastRow,
+ 'MixedContent': 1,
+ 'KeepWhitespace': 1,
+ 'ParentTags': ('section',) },
+
+ 'field': {
+ 'BaseClass': GRLayout.GRField,
+ 'Attributes': {
+ 'name': {
+ 'Required': 1,
+ 'Typecast': GTypecast.name },
+ 'source': {
+ 'Typecast': GTypecast.name },
+ 'section': {
+ 'Typecast': GTypecast.name },
+ 'format': {
+ 'Typecast': GTypecast.name } },
+ 'ParentTags': ('section',) },
+
+ 'summ': {
+ 'BaseClass': GRLayout.GRSumm,
+ 'Attributes': {
+ 'name': {
+ 'Typecast': GTypecast.name },
+ 'function': {
+ 'Typecast': GTypecast.name,
+ 'Default': "count"},
+ 'field': {
+ 'Typecast': GTypecast.name,
+ 'Default': None},
+ 'section': {
+ 'Typecast': GTypecast.name },
+ 'format': {
+ 'Typecast': GTypecast.name } },
+ 'ParentTags': ('layout',) },
+
+ 'param': {
+ 'BaseClass': GRLayout.GRParam,
+ 'Attributes': {
+ 'name': {
+ 'Required': 1,
+ 'Typecast': GTypecast.name },
+ 'format': {
+ 'Typecast': GTypecast.name } },
+ 'ParentTags': ('layout',) },
+
+ 'sources': {
+ 'BaseClass': GRSources.GRSources,
+ 'SingleInstance': 1,
+ 'ParentTags': ('report',) },
+ }
+
+ #
+ # Add DataSource elements
+ #
+ xmlElements.update(
+ GDataSource.getXMLelements(
+ {'datasource': {
+ 'BaseClass': GRSources.GRDataSource,
+ 'ParentTags': ('sources',) },
+ 'cparam': {
+ 'BaseClass': GRParameters.GRConditionParam }
+ }))
+
+ #
+ # Add trigger elements
+ #
+ xmlElements.update(
+ GTrigger.getXMLelements(
+ updates={'trigger':{
+ 'ParentTags': ('report',)},
+ }))
+
+
+
+ return GParser.buildImportableTags('report',xmlElements)
+
+
+ #######################################################
+ #
+ # xmlReportHandler
+ #
+ # This class is called by the XML parser to
+ # process the xml file.
+ #
+ #######################################################
+
+ class xmlReportHandler (GParser.xmlHandler):
+ def __init__(self):
+ GParser.xmlHandler.__init__(self)
+
+ self.xmlElements = getXMLelements()
+
+ #
+ # Any namespace-qualified tags will be Pass-Thru tags..
+ # The reporting engine actually doesn't care about these.
+ #
+ # TODO: This is a hack and won't work if we proxy
+ # TODO: layout events.
+ #
+ from gnue.reports.base.layout import GRPassThru
+ self.xmlMasqueradeNamespaceElements = GRPassThru
+
+ #
+ self.xmlNamespaceAttributesAsPrefixes = 1
+
+
- gnue/reports doc/report-notes.txt src/adapters/...,
Jason Cater <=