Beispiel #1
0
class Item(Part):
    title = localized(T)
    relations = each(T.relation) >> THIS_QUERY
    unaryRelation = one(T) >> Part
    partlist = collection(T) >> Part
    multiple_partlist = collection(multiple=True) >> Part
    xmlData = localized_xml(T)
    titleLang = i18n_dict(T['title'])
    labels = each_localized(T.label)
Beispiel #2
0
class FilteredItem(RdfQuery):
    sortedKeywords = each(T.keyword) | Sorter()
    sortedKeywordsReversed = each(T.keyword) | Sorter(reverse=True)

    sortedRelations_attr = each(T.relation) >> Item | \
            Sorter('name', reverse=True)
    sortedRelations_func = each(T.relation) >> Item |\
            Sorter(lambda r: getattr(r, 'name'), reverse=True)

    someKeywords = each(T.keyword) | Filter(lambda v: v in ('q', 'r', 'y'))

    name_upper = one(T.name) | (lambda v: unicode(v).upper())
Beispiel #3
0
class Typed(RdfQuery):
    rdfType = one(RDF.type)
Beispiel #4
0
class Lang(RdfQuery):
    value = one(RDF)
    label = i18n_dict(RDFS)
Beispiel #5
0
class Part(RdfQuery):
    name = one(T)
Beispiel #6
0
class MarkedPart(RdfQuery):
    name = one(T)
    related = one_where_self_is(T.unaryRelation) >> 'MarkedItem'
Beispiel #7
0
class MarkedItem(RdfQuery):
    title = localized(T)
    relations = each(T.relation) >> 'MarkedItem'
    unaryRelation = one(T) >> 'MarkedPart'
    annotated = one(T.unaryRelation) >> 'oort.util.queries:Annotated'
Beispiel #8
0
class TypedImplicitItem(RdfQuery):
    _rdfbase_ = T
    RDF_TYPE = T.OtherType
    name = one()
    partlist = collection() >> Part
Beispiel #9
0
class ImplicitItem(RdfQuery):
    _rdfbase_ = T
    name = one()