components

package
v0.0.0-...-c00ae34 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URITypeUndefined
	URITypePredicate
	URITypeClass
	URITypeTemplate
)
View Source
const (
	BUFSIZE = 16
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Name string
}

func NewCategory

func NewCategory(name string) *Category

type CategoryFilterer

type CategoryFilterer struct {
	In         chan *WikiPage
	Out        chan *WikiPage
	Categories []*Category
}

func NewCategoryFilterer

func NewCategoryFilterer(categories []*Category) *CategoryFilterer

func (*CategoryFilterer) Run

func (p *CategoryFilterer) Run()

type DoneSignal

type DoneSignal struct{}

type Fact

type Fact struct {
	Property string
	Value    string
}

func NewFact

func NewFact(property string, value string) *Fact

type FanOutTripleAggregate

type FanOutTripleAggregate struct {
	In  chan *TripleAggregate
	Out map[string](chan *TripleAggregate)
}

func NewFanOutTripleAggregate

func NewFanOutTripleAggregate() *FanOutTripleAggregate

NewFanOut creates a new FanOut process

func (*FanOutTripleAggregate) Run

func (proc *FanOutTripleAggregate) Run()

Run runs the FanOut process

type FileReader

type FileReader struct {
	InFileName chan string
	OutLine    chan string
	// contains filtered or unexported fields
}

FileReader is a process that reads files, based on file names it receives on the FileReader.InFileName port / channel, and writes out the output line by line as strings on the FileReader.OutLine port / channel.

func NewFileReader

func NewFileReader(fileSystem afero.Fs) *FileReader

NewFileReader returns an initialized FileReader, initialized with the afero file system provided as an argument

func NewOsFileReader

func NewOsFileReader() *FileReader

NewOsFileReader returns an initialized FileReader, initialized with an OS (normal) file system

func (*FileReader) Run

func (p *FileReader) Run()

Run runs the FileReader process. It does not spawn a separate go-routine, so you have to prepend the go keyword when calling it, in order to have it run in a separate go-routine.

type MWXMLCreator

type MWXMLCreator struct {
	InWikiPage    chan *WikiPage
	OutTemplates  chan string
	OutProperties chan string
	OutPages      chan string
	UseTemplates  bool
}

func NewMWXMLCreator

func NewMWXMLCreator(useTemplates bool) *MWXMLCreator

func (*MWXMLCreator) Run

func (p *MWXMLCreator) Run()

type ResourceIndexCreator

type ResourceIndexCreator struct {
	In  chan *TripleAggregate
	Out chan *map[string]*TripleAggregate
}

func NewResourceIndexCreator

func NewResourceIndexCreator() *ResourceIndexCreator

func (*ResourceIndexCreator) Run

func (p *ResourceIndexCreator) Run()

type ResourceIndexFanOut

type ResourceIndexFanOut struct {
	In  chan *map[string]*TripleAggregate
	Out map[string]chan *map[string]*TripleAggregate
}

func NewResourceIndexFanOut

func NewResourceIndexFanOut() *ResourceIndexFanOut

func (*ResourceIndexFanOut) Run

func (p *ResourceIndexFanOut) Run()

type ResourceIndexToTripleAggregates

type ResourceIndexToTripleAggregates struct {
	In  chan *map[string]*TripleAggregate
	Out chan *TripleAggregate
}

func NewResourceIndexToTripleAggregates

func NewResourceIndexToTripleAggregates() *ResourceIndexToTripleAggregates

func (*ResourceIndexToTripleAggregates) Run

type SMWTemplateCallFormatter

type SMWTemplateCallFormatter struct {
	InWikiPage     chan *WikiPage
	OutWikiPageXML chan string
}

func NewSMWTemplateCallFormatter

func NewSMWTemplateCallFormatter() *SMWTemplateCallFormatter

func (*SMWTemplateCallFormatter) Run

func (p *SMWTemplateCallFormatter) Run()

type StringFileWriter

type StringFileWriter struct {
	In      chan string
	OutDone chan interface{}
	// contains filtered or unexported fields
}

func NewStringFileWriter

func NewStringFileWriter(fileName string) *StringFileWriter

func (*StringFileWriter) Run

func (p *StringFileWriter) Run()

type StringPrinter

type StringPrinter struct {
	In chan string
}

func NewStringPrinter

func NewStringPrinter() *StringPrinter

func (*StringPrinter) Run

func (p *StringPrinter) Run()

type TripleAggregate

type TripleAggregate struct {
	Subject    rdf.Subject
	SubjectStr string
	Triples    []rdf.Triple
}

func NewTripleAggregate

func NewTripleAggregate(subj rdf.Subject, triples []rdf.Triple) *TripleAggregate

type TripleAggregatePrinter

type TripleAggregatePrinter struct {
	In chan *TripleAggregate
}

func NewTripleAggregatePrinter

func NewTripleAggregatePrinter() *TripleAggregatePrinter

func (*TripleAggregatePrinter) Run

func (p *TripleAggregatePrinter) Run()

type TripleAggregateToWikiPageConverter

type TripleAggregateToWikiPageConverter struct {
	InAggregate chan *TripleAggregate
	InIndex     chan *map[string]*TripleAggregate
	OutPage     chan *WikiPage
	// contains filtered or unexported fields
}

TripleAggregateToWikiPageConverter takes *TripleAggregate's and converts them into a *WikiPage which can be used to generate wiki text content.

func NewTripleAggregateToWikiPageConverter

func NewTripleAggregateToWikiPageConverter() *TripleAggregateToWikiPageConverter

func (*TripleAggregateToWikiPageConverter) Run

type TripleAggregator

type TripleAggregator struct {
	In  chan rdf.Triple
	Out chan *TripleAggregate
}

TripleAggregator aggregates triples by subject into a TripleAggregate object per subject, containing all the triples for that subject.

func NewTripleAggregator

func NewTripleAggregator() *TripleAggregator

NewTripleAggregator returns an initialized TripleAggregator process.

func (*TripleAggregator) Run

func (p *TripleAggregator) Run()

Run runs the TripleAggregator process.

type TripleParser

type TripleParser struct {
	In  chan string
	Out chan rdf.Triple
}

func NewTripleParser

func NewTripleParser() *TripleParser

func (*TripleParser) Run

func (p *TripleParser) Run()

type TriplePrinter

type TriplePrinter struct {
	In chan rdf.Triple
}

func NewTriplePrinter

func NewTriplePrinter() *TriplePrinter

func (*TriplePrinter) Run

func (p *TriplePrinter) Run()

type TurtleFileReader

type TurtleFileReader struct {
	InFileName chan string
	OutTriple  chan rdf.Triple
	// contains filtered or unexported fields
}

TurtleFileReader is a process that reads turtle files (Files in the turtle RDF format), based on file names it receives on the FileReader.InFileName port / channel, and writes out the output line by line as strings on the FileReader.OutLine port / channel.

func NewOsTurtleFileReader

func NewOsTurtleFileReader() *TurtleFileReader

NewOsTurtleFileReader returns an initialized TurtleFileReader, with an OS (normal) file system

func NewTurtleFileReader

func NewTurtleFileReader(fileSystem afero.Fs) *TurtleFileReader

NewTurtleFileReader returns an initialized TurtleFileReader, initialized with the afero file system provided provided as an argument

func (*TurtleFileReader) Run

func (p *TurtleFileReader) Run()

Run runs the TurtleFileReader process. It does not spawn a separate go-routine, so you have to prepend the go keyword when calling it, in order to have it run in a separate go-routine.

type WikiPage

type WikiPage struct {
	Title            string
	Type             int
	Facts            []*Fact
	Categories       []*Category
	SpecificCategory *Category
}

func NewWikiPage

func NewWikiPage(title string, facts []*Fact, categories []*Category, specificCategory *Category, pageType int) *WikiPage

func (*WikiPage) AddCategory

func (p *WikiPage) AddCategory(category *Category)

func (*WikiPage) AddCategoryUnique

func (p *WikiPage) AddCategoryUnique(category *Category)

func (*WikiPage) AddFact

func (p *WikiPage) AddFact(fact *Fact)

func (*WikiPage) AddFactUnique

func (p *WikiPage) AddFactUnique(fact *Fact)

type WikiPagePrinter

type WikiPagePrinter struct {
	In chan *WikiPage
}

func NewWikiPagePrinter

func NewWikiPagePrinter() *WikiPagePrinter

func (*WikiPagePrinter) Run

func (p *WikiPagePrinter) Run()

Jump to

Keyboard shortcuts

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