university.catalog - Cataloging Components

Catalog and searching components for academics stuff.

class waeup.kofa.university.catalog.CertificateCoursesQueryResultItem(context, view)[source]

Bases: object

__dict__ = dict_proxy({'__providedBy__': <_interface_coptimizations.ObjectSpecificationDescriptor object at 0x2ba7d007e2b0>, '__module__': 'waeup.kofa.university.catalog', '__provides__': <zope.interface.declarations.ClassProvides object at 0x2ba7d7c46a50>, '__init__': <function __init__ at 0x2ba7d7c4e848>, '__dict__': <attribute '__dict__' of 'CertificateCoursesQueryResultItem' objects>, '__implemented__': <implementedBy waeup.kofa.university.catalog.CertificateCoursesQueryResultItem>, '__weakref__': <attribute '__weakref__' of 'CertificateCoursesQueryResultItem' objects>, '__doc__': None})
__doc__ = None
__implemented__ = <implementedBy waeup.kofa.university.catalog.CertificateCoursesQueryResultItem>
__init__(context, view)[source]
__module__ = 'waeup.kofa.university.catalog'
__providedBy__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
__weakref__

list of weak references to the object (if defined)

class waeup.kofa.university.catalog.CertificatesQueryResultItem(context, view)[source]

Bases: object

__dict__ = dict_proxy({'__providedBy__': <_interface_coptimizations.ObjectSpecificationDescriptor object at 0x2ba7d007e2b0>, '__module__': 'waeup.kofa.university.catalog', '__provides__': <zope.interface.declarations.ClassProvides object at 0x2ba7d7c46850>, '__init__': <function __init__ at 0x2ba7d7c4e6e0>, '__dict__': <attribute '__dict__' of 'CertificatesQueryResultItem' objects>, '__implemented__': <implementedBy waeup.kofa.university.catalog.CertificatesQueryResultItem>, '__weakref__': <attribute '__weakref__' of 'CertificatesQueryResultItem' objects>, '__doc__': None})
__doc__ = None
__implemented__ = <implementedBy waeup.kofa.university.catalog.CertificatesQueryResultItem>
__init__(context, view)[source]
__module__ = 'waeup.kofa.university.catalog'
__providedBy__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
__weakref__

list of weak references to the object (if defined)

class waeup.kofa.university.catalog.CoursesQueryResultItem(context, view)[source]

Bases: object

__dict__ = dict_proxy({'__providedBy__': <_interface_coptimizations.ObjectSpecificationDescriptor object at 0x2ba7d007e2b0>, '__module__': 'waeup.kofa.university.catalog', '__provides__': <zope.interface.declarations.ClassProvides object at 0x2ba7d7c46650>, '__init__': <function __init__ at 0x2ba7d7c4e578>, '__dict__': <attribute '__dict__' of 'CoursesQueryResultItem' objects>, '__implemented__': <implementedBy waeup.kofa.university.catalog.CoursesQueryResultItem>, '__weakref__': <attribute '__weakref__' of 'CoursesQueryResultItem' objects>, '__doc__': None})
__doc__ = None
__implemented__ = <implementedBy waeup.kofa.university.catalog.CoursesQueryResultItem>
__init__(context, view)[source]
__module__ = 'waeup.kofa.university.catalog'
__providedBy__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
__weakref__

list of weak references to the object (if defined)

waeup.kofa.university.catalog.handle_certificate_added(obj, event)[source]

Index an added certificate with the local catalog.

See handleCourseAdd.

waeup.kofa.university.catalog.handle_course_added(obj, event)[source]

Index an add course with the local catalog.

Courses are not indexed automatically, as they are not a dictionary subitem of the accompanied site object (IUniversity). I.e. one cannot get them by asking for app['FACCODE']['DEPTCODE']['COURSECODE'] but one has to ask for app.faculties['FACCODE']['DEPTCODE'].courses['COURSECODE'].

Once, a course is indexed we can leave the further handling to the default component architechture. At least removals will be handled correctly then (and the course unindexed).

waeup.kofa.university.catalog.handle_department_removed(obj, event)[source]

Clear courses and certificates when a department is killed.

waeup.kofa.university.catalog.handlecertificatecourse_added(obj, event)[source]

Index an added certificatecourse with the local catalog.

See handleCourseAdd.

waeup.kofa.university.catalog.search(query=None, view=None)[source]