示例#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)
示例#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())
示例#3
0
class Typed(RdfQuery):
    rdfType = one(RDF.type)
示例#4
0
class Lang(RdfQuery):
    value = one(RDF)
    label = i18n_dict(RDFS)
示例#5
0
class Part(RdfQuery):
    name = one(T)
示例#6
0
class MarkedPart(RdfQuery):
    name = one(T)
    related = one_where_self_is(T.unaryRelation) >> 'MarkedItem'
示例#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'
示例#8
0
class TypedImplicitItem(RdfQuery):
    _rdfbase_ = T
    RDF_TYPE = T.OtherType
    name = one()
    partlist = collection() >> Part
示例#9
0
class ImplicitItem(RdfQuery):
    _rdfbase_ = T
    name = one()