Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(18)  |  Call(15)  |  Derive(0)  |  Import(3)
RDF plain literal

src/s/i/sioclog-HEAD/channellog.py   sioclog(Download)
 
from templating import new_context, get_template, expand_template
from turtle import PlainLiteral, TypedLiteral, TurtleWriter
from vocabulary import namespaces, RDF, RDFS, OWL, DC, DCTERMS, XSD, FOAF, SIOC, SIOCT, DS
from htmlutil import html_escape, html_unescape
                         (self.channelURI, RDF.type, SIOCT.ChatChannel),
                         (self.channelURI, RDFS.label, 
                          PlainLiteral("#" + self.channel)),
                         ]
 
                (event, DCTERMS.created, timestamp),
                (event, SIOC.has_creator, creator),
                (event, SIOC.content, PlainLiteral(rawcontent)),
                (event, RDFS.label, PlainLiteral(label)),
                (event, RDF.type, SIOC.Post),
            self.triples += [None,
                             (creator, OWL.sameAs, oldCreator),
                             (creator, RDFS.label, PlainLiteral(nick)),
                             (creator, RDF.type, SIOC.User),
                             ]

src/s/i/sioclog-HEAD/users.py   sioclog(Download)
from channellog import TaxonomySink, run
 
from turtle import PlainLiteral, TypedLiteral, TurtleWriter
from vocabulary import namespaces, RDF, RDFS, OWL, FOAF, SIOC
 
                yield (subject, property, value.uri)
            elif value.is_literal():
                yield (subject, property, PlainLiteral(value.literal_value['string']))
 
def render_user_index(sink, format, crumbs, datarooturi, datauri):
            triples += [None,
                        (freenodeURI, SIOC.space_of, user),
                        (user, RDFS.label, PlainLiteral(nick)),
                        (user, RDF.type, SIOC.User)]
            if nick in nick2people:
                triples += [(nick2people[nick], FOAF.holdsAccount, user)]
 
        writer = TurtleWriter(None, namespaces)
        title = "User index"
        writer.write([("", RDFS.label, PlainLiteral(title)),
                   (datarooturi + "#freenode", SIOC.space_of, userURI),
                   (userURI, OWL.sameAs, oldUserURI),
                   (userURI, RDFS.label, PlainLiteral(nick)),
                   (userURI, RDF.type, SIOC.User),
                   ]

src/s/i/sioclog-HEAD/sioclogwww.py   sioclog(Download)
from channellog import OffFilter, ChannelFilter, TimeFilter, HtmlSink, TurtleSink, RawSink, ChannelsAndDaysSink, run, AddLinksFilter, BackLogHtmlSink, ChannelMessageTailFilter, UserFilter, EventSink
from templating import new_context, get_template, expand_template
from turtle import PlainLiteral, TypedLiteral, TurtleWriter
from vocabulary import namespaces, RDF, RDFS, OWL, DC, DCTERMS, XSD, FOAF, SIOC, SIOCT, DS
from users import render_user, render_user_index, get_nick2people
    freenodeURI = root + "#freenode"
 
    triples += [(freenodeURI, RDFS.label, PlainLiteral("Freenode"))]
 
    channels = sorted(sink.channels.keys())
                    (channelURI, RDF.type, SIOCT.ChatChannel),
                    (channelURI, RDFS.label, 
                     PlainLiteral("#" + channel)),
                    ]
 
            triples += [None,
                        (channelURI, SIOC.has_subscriber, userURI),
                        (userURI, RDFS.label, PlainLiteral(nick)),
                        ]
 
        writer.write([("", FOAF.topic, channelURI)
                     for channelURI in channelURIs])
    writer.write([("", RDFS.label, PlainLiteral(title))])
 
    writer.setBase(root)