Пример #1
0
class AResourceType4(Component):
    """
    A non versioned test resource type.
    """
    implements(IResourceType, IPackage)

    package_id = 'property-test'
    resourcetype_id = 'notvc4'
    version_control = False
    registerIndex('label4', '/testml/node/subnode1#v', 'integer')
    registerIndex('label5', '/testml/node/subnode1#u', 'integer')
Пример #2
0
class AVersionControlledResourceType(Component):
    """
    A version controlled test resource type.
    """
    implements(IResourceType, IPackage)

    package_id = 'property-test'
    resourcetype_id = 'vc'
    version_control = True
    registerIndex('label4', '/testml/node/subnode2', 'text')
Пример #3
0
class AResourceType(Component):
    """
    A non versioned test resource type.
    """
    implements(IResourceType, IPackage)

    package_id = 'property-test'
    resourcetype_id = 'notvc'
    version_control = False
    registerIndex('label1', '/testml/node/subnode1', 'text')
Пример #4
0
class AResourceType2(Component):
    """
    A non versioned test resource type for datetime index tests.
    """
    implements(IResourceType, IPackage)

    package_id = 'property-test'
    resourcetype_id = 'notvc2'
    version_control = False
    registerIndex('label2', '/testml/node/subnode1', 'datetime')
Пример #5
0
class StylesheetResource(Component):
    """
    A stylesheet resource type for SeisHub.
    """
    implements(IResourceType)

    package_id = 'seishub'
    resourcetype_id = 'stylesheet'

    registerStylesheet('xslt' + os.sep + 'index_xhtml.xslt', 'index.xhtml')
    registerStylesheet('xslt' + os.sep + 'index_json.xslt', 'index.json')
    registerStylesheet('xslt' + os.sep + 'meta_xhtml.xslt', 'meta.xhtml')
    registerStylesheet('xslt' + os.sep + 'meta_json.xslt', 'meta.json')
    registerStylesheet(
        'xslt' + os.sep + 'resourcelist_xhtml.xslt',
        'resourcelist.xhtml',
    )
    registerStylesheet('xslt' + os.sep + 'resourcelist_json.xslt',
                       'resourcelist.json')
    registerStylesheet('xslt' + os.sep + 'resourcelist_admin.xslt',
                       'resourcelist.admin')
    registerIndex('media-type', '/xsl:stylesheet/xsl:output/@media-type',
                  'text')