lubm

package module
v0.0.0-...-85a0a6d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2023 License: MIT Imports: 7 Imported by: 0

README

lubm

Lehigh University Benchmark (http://swat.cse.lehigh.edu/projects/lubm/)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query1

func Query1(course ...string) string

# Query1 # This query bears large input and high selectivity. It queries about just one class and # one property and does not assume any hierarchy information or inference.

{
 ?X rdf:type ub:GraduateStudent .
 ?X ub:takesCourse http://www.Department0.University0.edu/GraduateCourse0
}

func Query2

func Query2() string

# Query2 # This query increases in complexity: 3 classes and 3 properties are involved. Additionally, # there is a triangular pattern of relationships between the objects involved.

{
  ?X rdf:type ub:GraduateStudent .
  ?Y rdf:type ub:University .
  ?Z rdf:type ub:Department .
  ?X ub:memberOf ?Z .
  ?Z ub:subOrganizationOf ?Y .
  ?X ub:undergraduateDegreeFrom ?Y
}

func Query3

func Query3(author ...string) string

# Query3 # This query is similar to Query 1 but class Publication has a wide hierarchy.

{
	?X rdf:type ub:Publication .
  ?X ub:publicationAuthor http://www.Department0.University0.edu/AssistantProfessor0
}

func Query4

func Query4(dept ...string) string

# Query4 # This query has small input and high selectivity. It assumes subClassOf relationship # between Professor and its subclasses. Class Professor has a wide hierarchy. Another # feature is that it queries about multiple properties of a single class.

{
	?X rdf:type ub:Professor .
  ?X ub:worksFor <http://www.Department0.University0.edu> .
  ?X ub:name ?Y1 .
  ?X ub:emailAddress ?Y2 .
  ?X ub:telephone ?Y3
}

func Query5

func Query5(dept ...string) string

# Query5 # This query assumes subClassOf relationship between Person and its subclasses # and subPropertyOf relationship between memberOf and its subproperties. # Moreover, class Person features a deep and wide hierarchy.

{
	?X rdf:type ub:Person .
  ?X ub:memberOf <http://www.Department0.University0.edu>
}

func Query6

func Query6() string

# Query6 # This query queries about only one class. But it assumes both the explicit # subClassOf relationship between UndergraduateStudent and Student and the # implicit one between GraduateStudent and Student. In addition, it has large # input and low selectivity.

{?X rdf:type ub:Student}

func Query7

func Query7(teacher ...string) string

# Query7 # This query is similar to Query 6 in terms of class Student but it increases in the # number of classes and properties and its selectivity is high.

{
	?X rdf:type ub:Student .
	?Y rdf:type ub:Course .
	?X ub:takesCourse ?Y .
	<http://www.Department0.University0.edu/AssociateProfessor0> ub:teacherOf, ?Y
}

func Query8

func Query8(university ...string) string

# Query8 # This query is further more complex than Query 7 by including one more property.

{
	?X rdf:type ub:Student .
  ?Y rdf:type ub:Department .
  ?X ub:memberOf ?Y .
  ?Y ub:subOrganizationOf <http://www.University0.edu> .
  ?X ub:emailAddress ?Z
}

func Query9

func Query9() string

# Query9 # Besides the aforementioned features of class Student and the wide hierarchy of # class Faculty, like Query 2, this query is characterized by the most classes and # properties in the query set and there is a triangular pattern of relationships.

{
	?X rdf:type ub:Student .
  ?Y rdf:type ub:Faculty .
  ?Z rdf:type ub:Course .
  ?X ub:advisor ?Y .
  ?Y ub:teacherOf ?Z .
  ?X ub:takesCourse ?Z
}

Types

type Course

type Course struct {
	ID   UID    `json:"@id"`
	Type UID    `json:"@type"`
	Name string `json:"ub:name"`
}

type DataSet

type DataSet struct {
	// contains filtered or unexported fields
}

func NewDataSet

func NewDataSet(
	seed int64,
	maxUniversityID int,
	writer chan<- spock.Bag,
) *DataSet

func (*DataSet) Generate

func (dataset *DataSet) Generate(universityID int) error

func (DataSet) Write

func (ds DataSet) Write(obj any) error

type Department

type Department struct {
	ID                UID    `json:"@id"`
	Type              UID    `json:"@type"`
	Name              string `json:"ub:name"`
	SubOrganizationOf IRI    `json:"ub:subOrganizationOf"`
}

type Faculty

type Faculty struct {
	ID                      UID    `json:"@id"`
	Type                    UID    `json:"@type"`
	Name                    string `json:"ub:name"`
	HeadOf                  *IRI   `json:"ub:headOf,omitempty"`
	TeacherOf               []IRI  `json:"ub:teacherOf"`
	UndergraduateDegreeFrom *IRI   `json:"ub:undergraduateDegreeFrom,omitempty"`
	MastersDegreeFrom       *IRI   `json:"ub:mastersDegreeFrom,omitempty"`
	DoctoralDegreeFrom      *IRI   `json:"ub:doctoralDegreeFrom,omitempty"`
	WorksFor                IRI    `json:"ub:worksFor"`
	EmailAddress            string `json:"ub:emailAddress"`
	Telephone               string `json:"ub:telephone"`
	ResearchInterest        string `json:"ub:researchInterest"`
}

type IRI

type IRI curie.IRI

Cross-references

func (IRI) MarshalJSON

func (iri IRI) MarshalJSON() ([]byte, error)

type Publication

type Publication struct {
	ID                UID    `json:"@id"`
	Type              UID    `json:"@type"`
	Name              string `json:"ub:name"`
	PublicationAuthor []IRI  `json:"ub:publicationAuthor"`
}

type ResearchGroup

type ResearchGroup struct {
	ID                UID `json:"@id"`
	Type              UID `json:"@type"`
	SubOrganizationOf IRI `json:"ub:subOrganizationOf"`
}

type Student

type Student struct {
	ID                      UID    `json:"@id"`
	Type                    UID    `json:"@type"`
	Name                    string `json:"ub:name"`
	MemberOf                IRI    `json:"ub:memberOf"`
	EmailAddress            string `json:"ub:emailAddress"`
	Telephone               string `json:"ub:telephone"`
	TakesCourse             []IRI  `json:"ub:takesCourse"`
	UndergraduateDegreeFrom *IRI   `json:"ub:undergraduateDegreeFrom,omitempty"`
	Advisor                 *IRI   `json:"ub:advisor,omitempty"`
	TeachingAssistantOf     *IRI   `json:"ub:teachingAssistantOf,omitempty"`
}

type UID

type UID curie.IRI

Unique Identity

func (UID) MarshalJSON

func (iri UID) MarshalJSON() ([]byte, error)

type University

type University struct {
	ID   UID    `json:"@id"`
	Type UID    `json:"@type"`
	Name string `json:"ub:name"`
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL