v12

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperationExplain       Operation     = "explain"
	OperationScan          Operation     = "scan"
	OperationSearchRetrive Operation     = "searchRetrieve"
	RecordPackingXML       RecordPacking = "xml"
	RecordPackingString    RecordPacking = "string" // TODO for now unsupported

	SearchRetrArgVersion       SearchRetrArg = "version"
	SearchRetrStartRecord      SearchRetrArg = "startRecord"
	SearchMaximumRecords       SearchRetrArg = "maximumRecords"
	SearchRetrArgRecordPacking SearchRetrArg = "recordPacking"
	SearchRetrArgOperation     SearchRetrArg = "operation"
	SearchRetrArgQuery         SearchRetrArg = "query"
	SearchRetrArgFCSContext    SearchRetrArg = "x-fcs-context"
	SearchRetrArgFCSDataViews  SearchRetrArg = "x-fcs-dataviews"
	SearchRetrArgRecordSchema  SearchRetrArg = "recordSchema"

	ScanArgVersion          ScanArg = "version"
	ScanArgOperation        ScanArg = "operation"
	ScanArgRecordPacking    ScanArg = "recordPacking"
	ScanArgScanClause       ScanArg = "scanClause"
	ScanArgMaximumTerms     ScanArg = "maximumTerms"
	ScanArgResponsePosition ScanArg = "responsePosition"

	ExplainArgVersion                ExplainArg = "version"
	ExplainArgRecordPacking          ExplainArg = "recordPacking"
	ExplainArgOperation              ExplainArg = "operation"
	ExplainArgFCSEndpointDescription ExplainArg = "x-fcs-endpoint-description"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EchoedSRRequest added in v0.0.9

type EchoedSRRequest struct {
	Version     string
	StartRecord int
	Query       string
}

type ExplainArg

type ExplainArg string

func (ExplainArg) String

func (arg ExplainArg) String() string

func (ExplainArg) Validate

func (arg ExplainArg) Validate() error

type FCSExplain

type FCSExplain struct {
	ServerName          string
	ServerPort          string
	Database            string
	DatabaseTitle       map[string]string
	DatabaseDescription map[string]string
	DatabaseAuthor      map[string]string
	PrimaryLanguage     string
	PosAttrs            []corpus.PosAttr
	Resources           []FCSResourceInfo
	ExtraResponseData   bool
	MaximumRecords      int
	NumberOfRecords     int
}

type FCSResourceInfo

type FCSResourceInfo struct {
	PID         string
	Title       map[string]string
	Description map[string]string
	URI         string
	Languages   []string

	// AvailableLayers is a list of values separated
	// by single space (as required in CLARIN-FCS
	// Interface Specification)
	AvailableLayers string
}

type FCSResponse

type FCSResponse struct {
	General       general.FCSGeneralResponse
	RecordPacking RecordPacking
	Operation     Operation

	Explain        *FCSExplain
	SearchRetrieve FCSSearchRetrieve
}

type FCSSearchRetrieve

type FCSSearchRetrieve struct {
	Results         []FCSSearchRow
	EchoedSRRequest EchoedSRRequest
}

type FCSSearchRow

type FCSSearchRow struct {
	Position int
	PID      string // persistent identifier of original data
	Ref      string // url reference to original data
	Tokens   []Token
}

type FCSSubHandlerV12

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

func NewFCSSubHandlerV12

func NewFCSSubHandlerV12(
	generalConf *cnf.ServerInfo,
	corporaConf *corpus.CorporaSetup,
	radapter *rdb.Adapter,
	projectRootDir string,
) *FCSSubHandlerV12

func (*FCSSubHandlerV12) Handle

func (a *FCSSubHandlerV12) Handle(
	ctx *gin.Context,
	fcsGeneralResponse general.FCSGeneralResponse,
	xslt map[string]string,
)

type Operation

type Operation string

func (Operation) String added in v0.0.9

func (op Operation) String() string

func (Operation) Validate

func (op Operation) Validate() error

type RecordPacking

type RecordPacking string

func (RecordPacking) Validate

func (rp RecordPacking) Validate() error

type ScanArg added in v0.0.9

type ScanArg string

func (ScanArg) String added in v0.0.9

func (sa ScanArg) String() string

func (ScanArg) Validate added in v0.0.9

func (sa ScanArg) Validate() error

type SearchRetrArg

type SearchRetrArg string

func (SearchRetrArg) String

func (sra SearchRetrArg) String() string

func (SearchRetrArg) Validate

func (sra SearchRetrArg) Validate() error

type Token

type Token struct {
	Text string
	Hit  bool
}

Jump to

Keyboard shortcuts

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