def to_rdf(self, *, graph: Graph) -> Resource:
        resource = _Model.to_rdf(self, graph=graph)
        graph.add((self.submission_uri, MCS.submissionSample, self.uri))
        resource.add(SCHEMA.value, Literal(self.value))
        resource.add(SCHEMA.about, self._quote_rdf_literal(self.about))

        return resource
Example #2
0
    def to_rdf(self, *, graph: Graph) -> None:
        resource = _Model.to_rdf(self, graph=graph)
        graph.add((self.benchmark_sample_uri, MCS.choice, self.uri))
        resource.add(RDF.type, MCS.BenchmarkChoice)
        resource.add(SCHEMA.text, self._quote_rdf_literal(self.text))
        resource.add(SCHEMA.position, Literal(self.position))

        return resource
    def to_rdf(self, *, graph: Graph) -> Resource:
        resource = _Model.to_rdf(self, graph=graph)
        graph.add((self.submission_uri, MCS.testScore, self.uri))
        resource.add(SCHEMA.isBasedOn,
                     self._quote_rdf_literal(self.is_based_on))
        resource.add(SCHEMA.name, self._quote_rdf_literal(self.name))
        resource.add(SCHEMA.value, self._quote_rdf_literal(self.value))

        return resource
    def to_rdf(self, *, graph: Graph) -> Resource:
        resource = _Model.to_rdf(self, graph=graph)

        resource.add(SCHEMA.name, self._quote_rdf_literal(self.name))
        resource.add(SCHEMA.abstract, self._quote_rdf_literal(self.abstract))
        for author in self.authors:
            resource.add(SCHEMA.author, self._quote_rdf_literal(author))

        return resource
    def to_rdf(self, *, graph: Graph) -> Resource:
        resource = _Model.to_rdf(self, graph=graph)

        graph.add((self.dataset_uri, MCS.sample, self.uri))

        resource.add(SCHEMA.includedInDataset, self.dataset_uri)

        if self.correct_choice is not None:
            resource.add(MCS.correctChoice, self.correct_choice)

        return resource
    def to_rdf(self, *, graph: Graph) -> Resource:
        resource = _Model.to_rdf(self, graph=graph)

        resource.add(SCHEMA.name, self._quote_rdf_literal(self.name))
        resource.add(SCHEMA.description, self._quote_rdf_literal(self.description))
        resource.add(SCHEMA.dateCreated, Literal(self.date_created))
        resource.add(SCHEMA.isBasedOn, self._quote_rdf_literal(self.is_based_on))

        for contributor in self.contributors:
            resource.add(MCS.contributor, self._quote_rdf_literal(contributor))

        resource.add(
            SCHEMA.softwareApplication, self._quote_rdf_literal(self.result_of[0])
        )
        resource.add(SCHEMA.endTime, Literal(self.result_of[1]))
        resource.add(SCHEMA.startTime, Literal(self.result_of[2]))
        resource.add(SCHEMA.url, self._quote_rdf_literal(self.result_of[3]))

        return resource
Example #7
0
    def to_rdf(self, *, graph: Graph) -> Resource:
        resource = _Model.to_rdf(self, graph=graph)
        graph.add((self.benchmark_sample_uri, MCS.input, self.uri))
        resource.add(RDF.type, MCS.BenchmarkInput)

        return resource
Example #8
0
    def to_rdf(self, *, graph: Graph) -> Resource:
        resource = _Model.to_rdf(self, graph=graph)
        graph.add((self.antecedent_uri, MCS.prompt, self.uri))
        resource.add(SCHEMA.text, self._quote_rdf_literal(self.text))

        return resource