tgclients package
Subpackages
- tgclients.databinding package
- Subpackages
- Submodules
- tgclients.databinding.rdf module
- tgclients.databinding.textgrid_metadata_2010 module
AuthorityType
BibliographicCitationType
BibliographicCitationType.Meta
BibliographicCitationType.author
BibliographicCitationType.bib_identifier
BibliographicCitationType.date_of_publication
BibliographicCitationType.edition_no
BibliographicCitationType.edition_title
BibliographicCitationType.editor
BibliographicCitationType.epage
BibliographicCitationType.issue
BibliographicCitationType.place_of_publication
BibliographicCitationType.publisher
BibliographicCitationType.series
BibliographicCitationType.spage
BibliographicCitationType.volume
CollectionType
DateType
EditionType
GeneratedType
GeneratedType.Fixity
GeneratedType.Meta
GeneratedType.Pid
GeneratedType.Project
GeneratedType.TextgridUri
GeneratedType.Warning
GeneratedType.any_element
GeneratedType.availability
GeneratedType.created
GeneratedType.data_contributor
GeneratedType.extent
GeneratedType.fixity
GeneratedType.issued
GeneratedType.last_modified
GeneratedType.permissions
GeneratedType.pid
GeneratedType.project
GeneratedType.revision
GeneratedType.textgrid_uri
GeneratedType.warning
GeneratedTypeAvailability
GenericType
IdentifierType
ItemType
MetadataContainerType
Object
ObjectCitationType
PidPidType
ProvidedType
RelationType
SourceType
TgObjectMetadata
WorkType
WorkTypeGenre
- tgclients.databinding.textgrid_metadata_agent_2010 module
AgentRoleType
AgentRoleType.ACTOR
AgentRoleType.ADAPTER
AgentRoleType.ANALYST
AgentRoleType.ANIMATOR
AgentRoleType.ANNOTATOR
AgentRoleType.APPLICANT
AgentRoleType.ARCHITECT
AgentRoleType.ARRANGER
AgentRoleType.ARTIST
AgentRoleType.ARTISTIC_DIRECTOR
AgentRoleType.ART_COPYIST
AgentRoleType.ASSIGNEE
AgentRoleType.ASSOCIATED_NAME
AgentRoleType.ATTRIBUTED_NAME
AgentRoleType.AUCTIONEER
AgentRoleType.AUTHOR
AgentRoleType.AUTHOR_IN_QUOTATIONS
AgentRoleType.AUTHOR_OF_AFTERWORD
AgentRoleType.AUTHOR_OF_DIALOG
AgentRoleType.AUTHOR_OF_INTRODUCTION
AgentRoleType.AUTHOR_OF_SCREENPLAY
AgentRoleType.BIBLIOGRAPHIC_ANTECEDENT
AgentRoleType.BINDER
AgentRoleType.BINDING_DESIGNER
AgentRoleType.BLURB_WRITER
AgentRoleType.BOOKPLATE_DESIGNER
AgentRoleType.BOOKSELLER
AgentRoleType.BOOK_DESIGNER
AgentRoleType.BOOK_JACKET_DESIGNER
AgentRoleType.BOOK_PRODUCER
AgentRoleType.CALLIGRAPHER
AgentRoleType.CARTOGRAPHER
AgentRoleType.CENSOR
AgentRoleType.CINEMATOGRAPHER
AgentRoleType.CLIENT
AgentRoleType.COLLABORATOR
AgentRoleType.COLLECTOR
AgentRoleType.COLLOTYPER
AgentRoleType.COLORIST
AgentRoleType.COMMENTATOR
AgentRoleType.COMMENTATOR_FOR_WRITTEN_TEXT
AgentRoleType.COMPILER
AgentRoleType.COMPLAINANT
AgentRoleType.COMPLAINANT_APPELLANT
AgentRoleType.COMPLAINANT_APPELLEE
AgentRoleType.COMPOSER
AgentRoleType.COMPOSITOR
AgentRoleType.CONCEPTOR
AgentRoleType.CONDUCTOR
AgentRoleType.CONSERVATOR
AgentRoleType.CONSULTANT
AgentRoleType.CONSULTANT_TO_PROJECT
AgentRoleType.CONTESTANT
AgentRoleType.CONTESTANT_APPELLANT
AgentRoleType.CONTESTANT_APPELLEE
AgentRoleType.CONTESTEE
AgentRoleType.CONTESTEE_APPELLANT
AgentRoleType.CONTESTEE_APPELLEE
AgentRoleType.CONTRACTOR
AgentRoleType.CONTRIBUTOR
AgentRoleType.COPYRIGHT_CLAIMANT
AgentRoleType.COPYRIGHT_HOLDER
AgentRoleType.CORRECTOR
AgentRoleType.CORRESPONDENT
AgentRoleType.COSTUME_DESIGNER
AgentRoleType.COVER_DESIGNER
AgentRoleType.CREATOR
AgentRoleType.CURATOR_OF_AN_EXHIBITION
AgentRoleType.DANCER
AgentRoleType.DATA_CONTRIBUTOR
AgentRoleType.DATA_MANAGER
AgentRoleType.DEDICATEE
AgentRoleType.DEDICATOR
AgentRoleType.DEFENDANT
AgentRoleType.DEFENDANT_APPELLANT
AgentRoleType.DEFENDANT_APPELLEE
AgentRoleType.DEGREE_GRANTOR
AgentRoleType.DELINEATOR
AgentRoleType.DEPICTED
AgentRoleType.DEPOSITOR
AgentRoleType.DESIGNER
AgentRoleType.DIRECTOR
AgentRoleType.DISSERTANT
AgentRoleType.DISTRIBUTION_PLACE
AgentRoleType.DISTRIBUTOR
AgentRoleType.DONOR
AgentRoleType.DRAFTSMAN
AgentRoleType.DUBIOUS_AUTHOR
AgentRoleType.EDITOR
AgentRoleType.ELECTRICIAN
AgentRoleType.ELECTROTYPER
AgentRoleType.ENGINEER
AgentRoleType.ENGRAVER
AgentRoleType.ETCHER
AgentRoleType.EVENT_PLACE
AgentRoleType.EXPERT
AgentRoleType.FACSIMILIST
AgentRoleType.FIELD_DIRECTOR
AgentRoleType.FILM_EDITOR
AgentRoleType.FIRST_PARTY
AgentRoleType.FORGER
AgentRoleType.FORMER_OWNER
AgentRoleType.FUNDER
AgentRoleType.GEOGRAPHIC_INFORMATION_SPECIALIST
AgentRoleType.HONOREE
AgentRoleType.HOST
AgentRoleType.ILLUMINATOR
AgentRoleType.ILLUSTRATOR
AgentRoleType.INSCRIBER
AgentRoleType.INSTRUMENTALIST
AgentRoleType.INTERVIEWEE
AgentRoleType.INTERVIEWER
AgentRoleType.INVENTOR
AgentRoleType.LABORATORY
AgentRoleType.LABORATORY_DIRECTOR
AgentRoleType.LANDSCAPE_ARCHITECT
AgentRoleType.LEAD
AgentRoleType.LENDER
AgentRoleType.LIBELANT
AgentRoleType.LIBELANT_APPELLANT
AgentRoleType.LIBELANT_APPELLEE
AgentRoleType.LIBELEE
AgentRoleType.LIBELEE_APPELLANT
AgentRoleType.LIBELEE_APPELLEE
AgentRoleType.LIBRETTIST
AgentRoleType.LICENSEE
AgentRoleType.LICENSOR
AgentRoleType.LIGHTING_DESIGNER
AgentRoleType.LITHOGRAPHER
AgentRoleType.LYRICIST
AgentRoleType.MANUFACTURER
AgentRoleType.MARBLER
AgentRoleType.MARKUP_EDITOR
AgentRoleType.METADATA_CONTACT
AgentRoleType.METALENGRAVER
AgentRoleType.MODERATOR
AgentRoleType.MONITOR
AgentRoleType.MUSICAL_DIRECTOR
AgentRoleType.MUSICIAN
AgentRoleType.MUSIC_COPYIST
AgentRoleType.NARRATOR
AgentRoleType.OPPONENT
AgentRoleType.ORGANIZER_OF_MEETING
AgentRoleType.ORIGINATOR
AgentRoleType.OTHER
AgentRoleType.OWNER
AgentRoleType.PAPERMAKER
AgentRoleType.PATENT_APPLICANT
AgentRoleType.PATENT_HOLDER
AgentRoleType.PATRON
AgentRoleType.PERFORMER
AgentRoleType.PERMITTING_AGENCY
AgentRoleType.PHOTOGRAPHER
AgentRoleType.PLAINTIFF
AgentRoleType.PLAINTIFF_APPELLANT
AgentRoleType.PLAINTIFF_APPELLEE
AgentRoleType.PLATEMAKER
AgentRoleType.PRINTER
AgentRoleType.PRINTER_OF_PLATES
AgentRoleType.PRINTMAKER
AgentRoleType.PROCESS_CONTACT
AgentRoleType.PRODUCER
AgentRoleType.PRODUCTION_MANAGER
AgentRoleType.PRODUCTION_PERSONNEL
AgentRoleType.PROGRAMMER
AgentRoleType.PROJECT_DIRECTOR
AgentRoleType.PROOFREADER
AgentRoleType.PUBLICATION_PLACE
AgentRoleType.PUBLISHER
AgentRoleType.PUBLISHING_DIRECTOR
AgentRoleType.PUPPETEER
AgentRoleType.RECIPIENT
AgentRoleType.RECORDING_ENGINEER
AgentRoleType.REDACTOR
AgentRoleType.RENDERER
AgentRoleType.REPORTER
AgentRoleType.REPOSITORY
AgentRoleType.RESEARCHER
AgentRoleType.RESEARCH_TEAM_HEAD
AgentRoleType.RESEARCH_TEAM_MEMBER
AgentRoleType.RESPONDENT
AgentRoleType.RESPONDENT_APPELLANT
AgentRoleType.RESPONDENT_APPELLEE
AgentRoleType.RESPONSIBLE_PARTY
AgentRoleType.RESTAGER
AgentRoleType.REVIEWER
AgentRoleType.RUBRICATOR
AgentRoleType.SCENARIST
AgentRoleType.SCIENTIFIC_ADVISOR
AgentRoleType.SCRIBE
AgentRoleType.SCULPTOR
AgentRoleType.SECOND_PARTY
AgentRoleType.SECRETARY
AgentRoleType.SETDESIGNER
AgentRoleType.SIGNER
AgentRoleType.SINGER
AgentRoleType.SOUND_DESIGNER
AgentRoleType.SPEAKER
AgentRoleType.SPONSOR
AgentRoleType.STAGE_MANAGER
AgentRoleType.STANDARDS_BODY
AgentRoleType.STEREOTYPER
AgentRoleType.STORYTELLER
AgentRoleType.SUPPORTING_HOST
AgentRoleType.SURVEYOR
AgentRoleType.TEACHER
AgentRoleType.TECHNICAL_DIRECTOR
AgentRoleType.THESIS_ADVISOR
AgentRoleType.TRANSCRIBER
AgentRoleType.TRANSLATOR
AgentRoleType.TYPE_DESIGNER
AgentRoleType.TYPOGRAPHER
AgentRoleType.UNIVERSITY_PLACE
AgentRoleType.VIDEOGRAPHER
AgentRoleType.VOCALIST
AgentRoleType.WITNESS
AgentRoleType.WOODCUTTER
AgentRoleType.WOOD_ENGRAVER
AgentRoleType.WRITER_OF_ACCOMPANYING_MATERIAL
AgentType
PersonType
- tgclients.databinding.textgrid_metadata_script_2010 module
FormOfNotationType
FormOfNotationType.ARAB
FormOfNotationType.ARMI
FormOfNotationType.ARMN
FormOfNotationType.AVST
FormOfNotationType.BALI
FormOfNotationType.BAMU
FormOfNotationType.BASS
FormOfNotationType.BATK
FormOfNotationType.BENG
FormOfNotationType.BLIS
FormOfNotationType.BOPO
FormOfNotationType.BRAH
FormOfNotationType.BRAI
FormOfNotationType.BUGI
FormOfNotationType.BUHD
FormOfNotationType.CAKM
FormOfNotationType.CANS
FormOfNotationType.CARI
FormOfNotationType.CHAM
FormOfNotationType.CHER
FormOfNotationType.CIRT
FormOfNotationType.COPT
FormOfNotationType.CPRT
FormOfNotationType.CYRL
FormOfNotationType.CYRS
FormOfNotationType.DEVA
FormOfNotationType.DSRT
FormOfNotationType.EGYD
FormOfNotationType.EGYH
FormOfNotationType.EGYP
FormOfNotationType.ETHI
FormOfNotationType.GEOK
FormOfNotationType.GEOR
FormOfNotationType.GLAG
FormOfNotationType.GOTH
FormOfNotationType.GRAN
FormOfNotationType.GREK
FormOfNotationType.GUJR
FormOfNotationType.GURU
FormOfNotationType.HANG
FormOfNotationType.HANI
FormOfNotationType.HANO
FormOfNotationType.HANS
FormOfNotationType.HANT
FormOfNotationType.HEBR
FormOfNotationType.HIRA
FormOfNotationType.HMNG
FormOfNotationType.HRKT
FormOfNotationType.HUNG
FormOfNotationType.INDS
FormOfNotationType.ITAL
FormOfNotationType.JAVA
FormOfNotationType.JPAN
FormOfNotationType.KALI
FormOfNotationType.KANA
FormOfNotationType.KHAR
FormOfNotationType.KHMR
FormOfNotationType.KNDA
FormOfNotationType.KORE
FormOfNotationType.KPEL
FormOfNotationType.KTHI
FormOfNotationType.LANA
FormOfNotationType.LAOO
FormOfNotationType.LATF
FormOfNotationType.LATG
FormOfNotationType.LATN
FormOfNotationType.LEPC
FormOfNotationType.LIMB
FormOfNotationType.LINA
FormOfNotationType.LINB
FormOfNotationType.LISU
FormOfNotationType.LOMA
FormOfNotationType.LYCI
FormOfNotationType.LYDI
FormOfNotationType.MAND
FormOfNotationType.MANI
FormOfNotationType.MAYA
FormOfNotationType.MEND
FormOfNotationType.MERC
FormOfNotationType.MERO
FormOfNotationType.MLYM
FormOfNotationType.MONG
FormOfNotationType.MOON
FormOfNotationType.MTEI
FormOfNotationType.MYMR
FormOfNotationType.NARB
FormOfNotationType.NBAT
FormOfNotationType.NKGB
FormOfNotationType.NKOO
FormOfNotationType.OGAM
FormOfNotationType.OLCK
FormOfNotationType.ORKH
FormOfNotationType.ORYA
FormOfNotationType.OSMA
FormOfNotationType.PALM
FormOfNotationType.PERM
FormOfNotationType.PHAG
FormOfNotationType.PHLI
FormOfNotationType.PHLP
FormOfNotationType.PHLV
FormOfNotationType.PHNX
FormOfNotationType.PLRD
FormOfNotationType.PRTI
FormOfNotationType.QAAA
FormOfNotationType.QABX
FormOfNotationType.RJNG
FormOfNotationType.RORO
FormOfNotationType.RUNR
FormOfNotationType.SAMR
FormOfNotationType.SARA
FormOfNotationType.SARB
FormOfNotationType.SAUR
FormOfNotationType.SGNW
FormOfNotationType.SHAW
FormOfNotationType.SINH
FormOfNotationType.SUND
FormOfNotationType.SYLO
FormOfNotationType.SYRC
FormOfNotationType.SYRE
FormOfNotationType.SYRJ
FormOfNotationType.SYRN
FormOfNotationType.TAGB
FormOfNotationType.TALE
FormOfNotationType.TALU
FormOfNotationType.TAML
FormOfNotationType.TAVT
FormOfNotationType.TELU
FormOfNotationType.TENG
FormOfNotationType.TFNG
FormOfNotationType.TGLG
FormOfNotationType.THAA
FormOfNotationType.THAI
FormOfNotationType.TIBT
FormOfNotationType.UGAR
FormOfNotationType.VAII
FormOfNotationType.VISP
FormOfNotationType.WARA
FormOfNotationType.XPEO
FormOfNotationType.XSUX
FormOfNotationType.YIII
FormOfNotationType.ZINH
FormOfNotationType.ZMTH
FormOfNotationType.ZSYM
FormOfNotationType.ZXXX
FormOfNotationType.ZYYY
FormOfNotationType.ZZZZ
- tgclients.databinding.tgsearch module
- Module contents
AgentRoleType
AgentRoleType.ACTOR
AgentRoleType.ADAPTER
AgentRoleType.ANALYST
AgentRoleType.ANIMATOR
AgentRoleType.ANNOTATOR
AgentRoleType.APPLICANT
AgentRoleType.ARCHITECT
AgentRoleType.ARRANGER
AgentRoleType.ARTIST
AgentRoleType.ARTISTIC_DIRECTOR
AgentRoleType.ART_COPYIST
AgentRoleType.ASSIGNEE
AgentRoleType.ASSOCIATED_NAME
AgentRoleType.ATTRIBUTED_NAME
AgentRoleType.AUCTIONEER
AgentRoleType.AUTHOR
AgentRoleType.AUTHOR_IN_QUOTATIONS
AgentRoleType.AUTHOR_OF_AFTERWORD
AgentRoleType.AUTHOR_OF_DIALOG
AgentRoleType.AUTHOR_OF_INTRODUCTION
AgentRoleType.AUTHOR_OF_SCREENPLAY
AgentRoleType.BIBLIOGRAPHIC_ANTECEDENT
AgentRoleType.BINDER
AgentRoleType.BINDING_DESIGNER
AgentRoleType.BLURB_WRITER
AgentRoleType.BOOKPLATE_DESIGNER
AgentRoleType.BOOKSELLER
AgentRoleType.BOOK_DESIGNER
AgentRoleType.BOOK_JACKET_DESIGNER
AgentRoleType.BOOK_PRODUCER
AgentRoleType.CALLIGRAPHER
AgentRoleType.CARTOGRAPHER
AgentRoleType.CENSOR
AgentRoleType.CINEMATOGRAPHER
AgentRoleType.CLIENT
AgentRoleType.COLLABORATOR
AgentRoleType.COLLECTOR
AgentRoleType.COLLOTYPER
AgentRoleType.COLORIST
AgentRoleType.COMMENTATOR
AgentRoleType.COMMENTATOR_FOR_WRITTEN_TEXT
AgentRoleType.COMPILER
AgentRoleType.COMPLAINANT
AgentRoleType.COMPLAINANT_APPELLANT
AgentRoleType.COMPLAINANT_APPELLEE
AgentRoleType.COMPOSER
AgentRoleType.COMPOSITOR
AgentRoleType.CONCEPTOR
AgentRoleType.CONDUCTOR
AgentRoleType.CONSERVATOR
AgentRoleType.CONSULTANT
AgentRoleType.CONSULTANT_TO_PROJECT
AgentRoleType.CONTESTANT
AgentRoleType.CONTESTANT_APPELLANT
AgentRoleType.CONTESTANT_APPELLEE
AgentRoleType.CONTESTEE
AgentRoleType.CONTESTEE_APPELLANT
AgentRoleType.CONTESTEE_APPELLEE
AgentRoleType.CONTRACTOR
AgentRoleType.CONTRIBUTOR
AgentRoleType.COPYRIGHT_CLAIMANT
AgentRoleType.COPYRIGHT_HOLDER
AgentRoleType.CORRECTOR
AgentRoleType.CORRESPONDENT
AgentRoleType.COSTUME_DESIGNER
AgentRoleType.COVER_DESIGNER
AgentRoleType.CREATOR
AgentRoleType.CURATOR_OF_AN_EXHIBITION
AgentRoleType.DANCER
AgentRoleType.DATA_CONTRIBUTOR
AgentRoleType.DATA_MANAGER
AgentRoleType.DEDICATEE
AgentRoleType.DEDICATOR
AgentRoleType.DEFENDANT
AgentRoleType.DEFENDANT_APPELLANT
AgentRoleType.DEFENDANT_APPELLEE
AgentRoleType.DEGREE_GRANTOR
AgentRoleType.DELINEATOR
AgentRoleType.DEPICTED
AgentRoleType.DEPOSITOR
AgentRoleType.DESIGNER
AgentRoleType.DIRECTOR
AgentRoleType.DISSERTANT
AgentRoleType.DISTRIBUTION_PLACE
AgentRoleType.DISTRIBUTOR
AgentRoleType.DONOR
AgentRoleType.DRAFTSMAN
AgentRoleType.DUBIOUS_AUTHOR
AgentRoleType.EDITOR
AgentRoleType.ELECTRICIAN
AgentRoleType.ELECTROTYPER
AgentRoleType.ENGINEER
AgentRoleType.ENGRAVER
AgentRoleType.ETCHER
AgentRoleType.EVENT_PLACE
AgentRoleType.EXPERT
AgentRoleType.FACSIMILIST
AgentRoleType.FIELD_DIRECTOR
AgentRoleType.FILM_EDITOR
AgentRoleType.FIRST_PARTY
AgentRoleType.FORGER
AgentRoleType.FORMER_OWNER
AgentRoleType.FUNDER
AgentRoleType.GEOGRAPHIC_INFORMATION_SPECIALIST
AgentRoleType.HONOREE
AgentRoleType.HOST
AgentRoleType.ILLUMINATOR
AgentRoleType.ILLUSTRATOR
AgentRoleType.INSCRIBER
AgentRoleType.INSTRUMENTALIST
AgentRoleType.INTERVIEWEE
AgentRoleType.INTERVIEWER
AgentRoleType.INVENTOR
AgentRoleType.LABORATORY
AgentRoleType.LABORATORY_DIRECTOR
AgentRoleType.LANDSCAPE_ARCHITECT
AgentRoleType.LEAD
AgentRoleType.LENDER
AgentRoleType.LIBELANT
AgentRoleType.LIBELANT_APPELLANT
AgentRoleType.LIBELANT_APPELLEE
AgentRoleType.LIBELEE
AgentRoleType.LIBELEE_APPELLANT
AgentRoleType.LIBELEE_APPELLEE
AgentRoleType.LIBRETTIST
AgentRoleType.LICENSEE
AgentRoleType.LICENSOR
AgentRoleType.LIGHTING_DESIGNER
AgentRoleType.LITHOGRAPHER
AgentRoleType.LYRICIST
AgentRoleType.MANUFACTURER
AgentRoleType.MARBLER
AgentRoleType.MARKUP_EDITOR
AgentRoleType.METADATA_CONTACT
AgentRoleType.METALENGRAVER
AgentRoleType.MODERATOR
AgentRoleType.MONITOR
AgentRoleType.MUSICAL_DIRECTOR
AgentRoleType.MUSICIAN
AgentRoleType.MUSIC_COPYIST
AgentRoleType.NARRATOR
AgentRoleType.OPPONENT
AgentRoleType.ORGANIZER_OF_MEETING
AgentRoleType.ORIGINATOR
AgentRoleType.OTHER
AgentRoleType.OWNER
AgentRoleType.PAPERMAKER
AgentRoleType.PATENT_APPLICANT
AgentRoleType.PATENT_HOLDER
AgentRoleType.PATRON
AgentRoleType.PERFORMER
AgentRoleType.PERMITTING_AGENCY
AgentRoleType.PHOTOGRAPHER
AgentRoleType.PLAINTIFF
AgentRoleType.PLAINTIFF_APPELLANT
AgentRoleType.PLAINTIFF_APPELLEE
AgentRoleType.PLATEMAKER
AgentRoleType.PRINTER
AgentRoleType.PRINTER_OF_PLATES
AgentRoleType.PRINTMAKER
AgentRoleType.PROCESS_CONTACT
AgentRoleType.PRODUCER
AgentRoleType.PRODUCTION_MANAGER
AgentRoleType.PRODUCTION_PERSONNEL
AgentRoleType.PROGRAMMER
AgentRoleType.PROJECT_DIRECTOR
AgentRoleType.PROOFREADER
AgentRoleType.PUBLICATION_PLACE
AgentRoleType.PUBLISHER
AgentRoleType.PUBLISHING_DIRECTOR
AgentRoleType.PUPPETEER
AgentRoleType.RECIPIENT
AgentRoleType.RECORDING_ENGINEER
AgentRoleType.REDACTOR
AgentRoleType.RENDERER
AgentRoleType.REPORTER
AgentRoleType.REPOSITORY
AgentRoleType.RESEARCHER
AgentRoleType.RESEARCH_TEAM_HEAD
AgentRoleType.RESEARCH_TEAM_MEMBER
AgentRoleType.RESPONDENT
AgentRoleType.RESPONDENT_APPELLANT
AgentRoleType.RESPONDENT_APPELLEE
AgentRoleType.RESPONSIBLE_PARTY
AgentRoleType.RESTAGER
AgentRoleType.REVIEWER
AgentRoleType.RUBRICATOR
AgentRoleType.SCENARIST
AgentRoleType.SCIENTIFIC_ADVISOR
AgentRoleType.SCRIBE
AgentRoleType.SCULPTOR
AgentRoleType.SECOND_PARTY
AgentRoleType.SECRETARY
AgentRoleType.SETDESIGNER
AgentRoleType.SIGNER
AgentRoleType.SINGER
AgentRoleType.SOUND_DESIGNER
AgentRoleType.SPEAKER
AgentRoleType.SPONSOR
AgentRoleType.STAGE_MANAGER
AgentRoleType.STANDARDS_BODY
AgentRoleType.STEREOTYPER
AgentRoleType.STORYTELLER
AgentRoleType.SUPPORTING_HOST
AgentRoleType.SURVEYOR
AgentRoleType.TEACHER
AgentRoleType.TECHNICAL_DIRECTOR
AgentRoleType.THESIS_ADVISOR
AgentRoleType.TRANSCRIBER
AgentRoleType.TRANSLATOR
AgentRoleType.TYPE_DESIGNER
AgentRoleType.TYPOGRAPHER
AgentRoleType.UNIVERSITY_PLACE
AgentRoleType.VIDEOGRAPHER
AgentRoleType.VOCALIST
AgentRoleType.WITNESS
AgentRoleType.WOODCUTTER
AgentRoleType.WOOD_ENGRAVER
AgentRoleType.WRITER_OF_ACCOMPANYING_MATERIAL
AgentType
AuthorityType
BibliographicCitationType
BibliographicCitationType.Meta
BibliographicCitationType.author
BibliographicCitationType.bib_identifier
BibliographicCitationType.date_of_publication
BibliographicCitationType.edition_no
BibliographicCitationType.edition_title
BibliographicCitationType.editor
BibliographicCitationType.epage
BibliographicCitationType.issue
BibliographicCitationType.place_of_publication
BibliographicCitationType.publisher
BibliographicCitationType.series
BibliographicCitationType.spage
BibliographicCitationType.volume
CollectionType
DateType
EditionType
EntryType
FacetGroupType
FacetResponse
FacetResponseType
FacetType
FormOfNotationType
FormOfNotationType.ARAB
FormOfNotationType.ARMI
FormOfNotationType.ARMN
FormOfNotationType.AVST
FormOfNotationType.BALI
FormOfNotationType.BAMU
FormOfNotationType.BASS
FormOfNotationType.BATK
FormOfNotationType.BENG
FormOfNotationType.BLIS
FormOfNotationType.BOPO
FormOfNotationType.BRAH
FormOfNotationType.BRAI
FormOfNotationType.BUGI
FormOfNotationType.BUHD
FormOfNotationType.CAKM
FormOfNotationType.CANS
FormOfNotationType.CARI
FormOfNotationType.CHAM
FormOfNotationType.CHER
FormOfNotationType.CIRT
FormOfNotationType.COPT
FormOfNotationType.CPRT
FormOfNotationType.CYRL
FormOfNotationType.CYRS
FormOfNotationType.DEVA
FormOfNotationType.DSRT
FormOfNotationType.EGYD
FormOfNotationType.EGYH
FormOfNotationType.EGYP
FormOfNotationType.ETHI
FormOfNotationType.GEOK
FormOfNotationType.GEOR
FormOfNotationType.GLAG
FormOfNotationType.GOTH
FormOfNotationType.GRAN
FormOfNotationType.GREK
FormOfNotationType.GUJR
FormOfNotationType.GURU
FormOfNotationType.HANG
FormOfNotationType.HANI
FormOfNotationType.HANO
FormOfNotationType.HANS
FormOfNotationType.HANT
FormOfNotationType.HEBR
FormOfNotationType.HIRA
FormOfNotationType.HMNG
FormOfNotationType.HRKT
FormOfNotationType.HUNG
FormOfNotationType.INDS
FormOfNotationType.ITAL
FormOfNotationType.JAVA
FormOfNotationType.JPAN
FormOfNotationType.KALI
FormOfNotationType.KANA
FormOfNotationType.KHAR
FormOfNotationType.KHMR
FormOfNotationType.KNDA
FormOfNotationType.KORE
FormOfNotationType.KPEL
FormOfNotationType.KTHI
FormOfNotationType.LANA
FormOfNotationType.LAOO
FormOfNotationType.LATF
FormOfNotationType.LATG
FormOfNotationType.LATN
FormOfNotationType.LEPC
FormOfNotationType.LIMB
FormOfNotationType.LINA
FormOfNotationType.LINB
FormOfNotationType.LISU
FormOfNotationType.LOMA
FormOfNotationType.LYCI
FormOfNotationType.LYDI
FormOfNotationType.MAND
FormOfNotationType.MANI
FormOfNotationType.MAYA
FormOfNotationType.MEND
FormOfNotationType.MERC
FormOfNotationType.MERO
FormOfNotationType.MLYM
FormOfNotationType.MONG
FormOfNotationType.MOON
FormOfNotationType.MTEI
FormOfNotationType.MYMR
FormOfNotationType.NARB
FormOfNotationType.NBAT
FormOfNotationType.NKGB
FormOfNotationType.NKOO
FormOfNotationType.OGAM
FormOfNotationType.OLCK
FormOfNotationType.ORKH
FormOfNotationType.ORYA
FormOfNotationType.OSMA
FormOfNotationType.PALM
FormOfNotationType.PERM
FormOfNotationType.PHAG
FormOfNotationType.PHLI
FormOfNotationType.PHLP
FormOfNotationType.PHLV
FormOfNotationType.PHNX
FormOfNotationType.PLRD
FormOfNotationType.PRTI
FormOfNotationType.QAAA
FormOfNotationType.QABX
FormOfNotationType.RJNG
FormOfNotationType.RORO
FormOfNotationType.RUNR
FormOfNotationType.SAMR
FormOfNotationType.SARA
FormOfNotationType.SARB
FormOfNotationType.SAUR
FormOfNotationType.SGNW
FormOfNotationType.SHAW
FormOfNotationType.SINH
FormOfNotationType.SUND
FormOfNotationType.SYLO
FormOfNotationType.SYRC
FormOfNotationType.SYRE
FormOfNotationType.SYRJ
FormOfNotationType.SYRN
FormOfNotationType.TAGB
FormOfNotationType.TALE
FormOfNotationType.TALU
FormOfNotationType.TAML
FormOfNotationType.TAVT
FormOfNotationType.TELU
FormOfNotationType.TENG
FormOfNotationType.TFNG
FormOfNotationType.TGLG
FormOfNotationType.THAA
FormOfNotationType.THAI
FormOfNotationType.TIBT
FormOfNotationType.UGAR
FormOfNotationType.VAII
FormOfNotationType.VISP
FormOfNotationType.WARA
FormOfNotationType.XPEO
FormOfNotationType.XSUX
FormOfNotationType.YIII
FormOfNotationType.ZINH
FormOfNotationType.ZMTH
FormOfNotationType.ZSYM
FormOfNotationType.ZXXX
FormOfNotationType.ZYYY
FormOfNotationType.ZZZZ
FulltextType
GeneratedType
GeneratedType.Fixity
GeneratedType.Meta
GeneratedType.Pid
GeneratedType.Project
GeneratedType.TextgridUri
GeneratedType.Warning
GeneratedType.any_element
GeneratedType.availability
GeneratedType.created
GeneratedType.data_contributor
GeneratedType.extent
GeneratedType.fixity
GeneratedType.issued
GeneratedType.last_modified
GeneratedType.permissions
GeneratedType.pid
GeneratedType.project
GeneratedType.revision
GeneratedType.textgrid_uri
GeneratedType.warning
GeneratedTypeAvailability
GenericType
IdentifierType
ItemType
MetadataContainerType
Object
ObjectCitationType
PathGroupType
PathResponse
PathType
PersonType
PidPidType
ProvidedType
Rdf
RdfType
RelationResponseType
Response
ResultType
Revisions
SourceType
TextgridMetadata2010RelationType
TextgridUris
TgObjectMetadata
TgsearchRelationType
WorkType
WorkTypeGenre
Submodules
tgclients.aggregator module
API for the TextGrid aggregator service.
- class tgclients.aggregator.Aggregator(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>)
Bases:
object
Provide access to the Textgrid Aggregator Service.
API docs: https://textgridlab.org/doc/services/submodules/aggregator/docs/api.html
- render(textgrid_uris: str, sid: str | None = None, stylesheet_uri: str | None = None, mediatype: str | None = None, link_pattern: str | None = None, sandbox: bool | None = None) Response
- render(textgrid_uris: List[str], sid: str | None = None, stylesheet_uri: str | None = None, mediatype: str | None = None, link_pattern: str | None = None, sandbox: bool | None = None) Response
Apply an XSLT stylesheet to one or more TextGrid URIs.
Will render (X)HTML by default with XSLT stylesheets from tei-c.org see https://textgridlab.org/doc/services/submodules/aggregator/docs/html.html
- Parameters:
textgrid_uris (Union[str, List[str]]) – a single or a list of TextGrid URIs
sid (Optional[str], optional) – Session ID. Defaults to None.
stylesheet_uri (Optional[str], optional) – alternative XSLT stylesheet to use. Must be a TextGrid URI.
mediatype (Optional[str], optional) – The requested content type. E.g., text/html or text/xml. Default is text/html
link_pattern (Optional[str], optional) – URL pattern for links. @URI@ will be replaced with the textgrid: URI.
sandbox (Optional[bool], optional) – access sandboxed data. Defaults to false
- Returns:
the respone with the TEI corpus in the body
- Return type:
- teicorpus(textgrid_uris: str, sid: str | None = None) Response
- teicorpus(textgrid_uris: List[str], sid: str | None = None) Response
Download aggregated TextGrid objects as TEI corpus.
- text(textgrid_uris: str, sid: str | None = None) Response
- text(textgrid_uris: List[str], sid: str | None = None) Response
Download aggregated TextGrid objects as plain text file.
tgclients.auth module
Provide access to the TextGrid Authorization Service.
- class tgclients.auth.TextgridAuth(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>)
Bases:
object
Provide access to the TextGrid Authorization Service.
- add_admin_to_project(sid: str, project_id: str, eppn: str) bool
Give an user the admin role in a project.
- Parameters:
- Raises:
TextgridAuthException – in case of tgauth faults
- Returns:
true in case of success
- Return type:
- add_editor_to_project(sid: str, project_id: str, eppn: str) bool
Give an user the editor role in a project.
- Parameters:
- Raises:
TextgridAuthException – in case of tgauth faults
- Returns:
true in case of success
- Return type:
- add_manager_to_project(sid: str, project_id: str, eppn: str) bool
Give an user the manager role in a project.
- Parameters:
- Raises:
TextgridAuthException – in case of tgauth faults
- Returns:
true in case of success
- Return type:
- add_observer_to_project(sid: str, project_id: str, eppn: str) bool
Give an user the observer role in a project.
- Parameters:
- Raises:
TextgridAuthException – in case of tgauth faults
- Returns:
true in case of success
- Return type:
- create_project(sid: str, name: str, description: str, default_owner_roles: bool | None = True) str
Create a new project.
- Parameters:
- Raises:
TextgridAuthException – in case of tgauth faults
- Returns:
the project ID of the created project
- Return type:
- delete_project(sid: str, project_id: str) bool
Delete a project.
- Parameters:
- Raises:
TextgridAuthException – in case of tgauth faults
- Returns:
true in case of success
- Return type:
- get_eppn_for_sid(sid: str) str
Get the EPPN belonging to a sessionID.
- Parameters:
sid (str) – TextGrid Session ID
- Raises:
TextgridAuthException – in case of transport exceptions
- Returns:
the EPPN
- Return type:
- get_project_description(project_id: str)
Returns name and description of project identified by ID. See also getAllProjects().
- Parameters:
project_id (str) – the project ID
- Returns:
project info with id, name and description
- Return type:
zeep.objects.projectInfo
- list_all_projects() List[str]
List all projects.
Returns all projects stored in this RBAC instance with ID, name, and description. See also getProjectDescription(). SID is not needed as this information can be reviewed publicly.
- Returns:
list of each project with ID, name and description
- Return type:
List[str]
tgclients.config module
Variable config options with defaults to be used with the TextGrid clients library.
- class tgclients.config.TextgridConfig(host: str | None = 'https://textgridlab.org')
Bases:
object
Provide standard configuration / URLs for TextGrid services.
Default is to connect to the TextGrid production server (https://textgridlab.org). Pass the constants tgclients.config.DEV_SERVER or tgclients.config.TEST_SERVER to the constructor to change to develop or test server or provide an URL for your own instance.
- property aggregator: str
The aggregator service location.
- Returns:
the aggregator service location
- Return type:
- property auth_address: str
The tgauth service location.
- Returns:
the tgauth service location
- Return type:
- property crud: str
The nonpublic tgcrud REST service location.
- Returns:
the nonpublic tgcrud REST service location
- Return type:
- property crud_public: str
The public tgcrud REST service location.
- Returns:
the public tgcrud REST service location
- Return type:
- property extra_crud_address: str
The tgextra service location.
- Returns:
the tgextra service location
- Return type:
- property extra_crud_wsdl: str
The tgextra WSDL location.
- Returns:
the tgextra WSDL location
- Return type:
- property http_timeout: float
HTTP timeout to be used when accessing TextGrid services.
- Returns:
http timeout in seconds
- Return type:
- property publish: str
The publish service location.
- Returns:
the publish service location
- Return type:
tgclients.crud module
TextGrid CRUD API.
- class tgclients.crud.TextgridCrud(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>, for_publication: bool = False)
Bases:
TextgridCrudRequest
Provide access to the Textgrid CRUD Service using a XML data binding.
- create_resource(sid: str, project_id: str, data: str | IO[Any], metadata: MetadataContainerType, uri: str | None = None) MetadataContainerType
Create a TextGrid object.
- Parameters:
sid (str) – Session ID
project_id (str) – Project ID
data (Union[str, IO[Any]]) – the data
metadata (MetadataContainerType) – the metadata
uri (Optional[str]) – optionally set a TextGrid URI to use for new object (see get_uri method)
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
metadata for newly created object
- Return type:
- create_revision(sid: str, project_id: str, textgrid_uri: str, data: str | IO[Any], metadata: MetadataContainerType) MetadataContainerType
Create a TextGrid object revision.
- Parameters:
sid (str) – Session ID
project_id (str) – Project ID
textgrid_uri (str) – Textgrid URI
data (Union[str, IO[Any]]) – the data
metadata (MetadataContainerType) – the metadata
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
metadata from newly created object revision
- Return type:
- get_uri(sid: str, how_many: int) list
Get TextGrid URIs.
Get an specified amount of TextGrid URIs for assigning to new TextGrid objects. Useful e.g. for bulk imports.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
List with TextGrid URIs
- Return type:
- read_metadata(textgrid_uri: str, sid: str | None = None) MetadataContainerType
Read Metadata.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
metadata for object
- Return type:
- update_metadata(sid: str, textgrid_uri: str, metadata: MetadataContainerType) MetadataContainerType
Update metadata for TextGrid object.
- Parameters:
sid (str) – Session ID
textgrid_uri (str) – Textgrid URI
metadata (MetadataContainerType) – the metadata
- Returns:
updated metadata
- Return type:
- update_resource(sid: str, textgrid_uri: str, data: str | IO[Any], metadata: MetadataContainerType, create_revision: bool = False) MetadataContainerType
Update a TextGrid object.
- Parameters:
sid (str) – Session ID
textgrid_uri (str) – Textgrid URI
data (Union[str, IO[Any]]) – the data
metadata (MetadataContainerType) – the metadata
create_revision (bool) – If True, create a new textgrid object revision. Default: False
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
updated metadata
- Return type:
- exception tgclients.crud.TextgridCrudException
Bases:
Exception
Exception communicating with tgcrud!
- class tgclients.crud.TextgridCrudRequest(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>, for_publication: bool = False)
Bases:
object
Provide low level access to the TextGrid CRUD Service.
- create_resource(sid: str, project_id: str, data: str | IO[Any], metadata: str | IO[Any], uri: str | None = None) Response
Create a TextGrid object.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service with metadata from newly created object
- Return type:
- create_revision(sid: str, project_id: str, textgrid_uri: str, data: str | IO[Any], metadata: str | IO[Any]) Response
Create a TextGrid object revision.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service with metadata from newly created object revision
- Return type:
- delete_resource(sid: str, textgrid_uri: str) Response
Delete a TextGrid object.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service
- Return type:
- get_uri(sid: str, how_many: int) Response
Get TextGrid URIs.
Get an specified amount of TextGrid URIs for assigning to new TextGrid objects. Useful e.g. for bulk imports.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service with TextGrid URIs in body
- Return type:
- read_data(textgrid_uri: str, sid: str | None = None) Response
Read Data.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service
- Return type:
- read_metadata(textgrid_uri: str, sid: str | None = None) Response
Read Metadata.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service
- Return type:
- update_metadata(sid: str, textgrid_uri: str, metadata: str | IO[Any]) Response
Update metadata for TextGrid object.
- update_resource(sid: str, textgrid_uri: str, data: str | IO[Any], metadata: str | IO[Any], create_revision: bool = False) Response
Update a TextGrid object.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service with updated metadata
- Return type:
tgclients.metadata module
Helper functions to work with TextGrid metadata XML.
- class tgclients.metadata.TextgridMetadata
Bases:
object
Helper functions to work with TextGrid metadata XML.
- build(title: str, mimetype: str) MetadataContainerType
Build metadata for an TextGrid Object.
- Parameters:
- Returns:
metadata
- Return type:
- extension_for_format(mimetype: str) str | None
Find a matching extension for a textgrid mime type.
The first matching extension for a mime type is returned, so extensions defined first in mime.types will be used.
- filename(title: str, tguri: str, mimetype: str) str
Generate a filename for the triple of title, textfgrid-uri and extension.
- filename_from_metadata(metadata: ResultType) str
Generate a filename for a textgrid search metadata result.
This is made of title, textgrid-URI and extension.
- Parameters:
metadata (ResultType) – tgsearch metadata result
- Returns:
the filename
- Return type:
- static id_from_filename(filename: str) str
Extract the id from a filename.
This is named according to link rewriters textgrid metadata to filename mapping.
tgclients.publish module
API for the TextGrid publish service.
- class tgclients.publish.TextgridPublish(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>)
Bases:
TextgridPublishRequest
Provide access to the Textgrid Publish Service using XML data binding.
API docs: https://textgridlab.org/doc/services/submodules/kolibri/kolibri-tgpublish-service/docs/index.html
- copy(sid: str, textgrid_uris: List[str], project_id: str) str
Copies the objects belonging to the given URIs to the given project ID.
Also copies all aggregated objects (from aggregations/editions/collections).
- Parameters:
- Raises:
TextgridPublishException – if HTTP status code >= 400 (# noqa: DAR402)
- Returns:
UUID of copy job queued
- Return type:
- copy_to_new_revision(sid: str, textgrid_uris: List[str]) str
Copies the objects belonging to the given URIs to new revisions of themselves.
Also copies all aggregated objects (from aggregations/editions/collections).
- Parameters:
- Raises:
TextgridPublishException – if HTTP status code >= 400 (# noqa: DAR402)
- Returns:
UUID of copy job queued
- Return type:
- get_status(job_id) PublishResponse
Get status for job specified by job_id.
- Parameters:
job_id (str) – ID of job to get the status for
- Raises:
TextgridPublishException – if HTTP status code >= 400 (# noqa: DAR402)
- Returns:
publish response object
- Return type:
- publish(sid: str, textgrid_uri: str, ignore_warnings: bool = False, dry_run: bool = True)
Publish the edition or collection belonging to the given URIs.
Also publish all aggregated objects (from aggregations/editions/collections)
- Parameters:
- Raises:
TextgridPublishException – if HTTP status code >= 400 (# noqa: DAR402)
- Returns:
just an OK if the job started
- Return type:
- exception tgclients.publish.TextgridPublishException
Bases:
Exception
Exception communicating with tgpublish!
- class tgclients.publish.TextgridPublishRequest(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>)
Bases:
object
Provide low level access to the Textgrid Publish Service returning HTTP response objects.
API docs: https://textgridlab.org/doc/services/submodules/kolibri/kolibri-tgpublish-service/docs/index.html
- copy(sid: str, textgrid_uris: List[str], project_id: str) Response
Copies the objects belonging to the given URIs to the given project ID.
Also copies all aggregated objects (from aggregations/editions/collections).
- Parameters:
- Raises:
TextgridPublishException – if HTTP status code >= 400 (# noqa: DAR402)
- Returns:
HTTP response from service - UUID of copy job queued
- Return type:
- copy_to_new_revision(sid: str, textgrid_uris: List[str]) Response
Copies the objects belonging to the given URIs to new revisions of themselves.
Also copies all aggregated objects (from aggregations/editions/collections).
- Parameters:
- Raises:
TextgridPublishException – if HTTP status code >= 400 (# noqa: DAR402)
- Returns:
HTTP response from service - UUID of copy job queued
- Return type:
- get_status(job_id) Response
Get status for job specified by job_id.
- Parameters:
job_id (str) – ID of job to get the status for
- Raises:
TextgridPublishException – if HTTP status code >= 400 (# noqa: DAR402)
- Returns:
HTTP response from service - with XML containing the publish status
- Return type:
- publish(sid: str, textgrid_uri: str, ignore_warnings: bool = False, dry_run: bool = True)
Publish the edition or collection belonging to the given URIs.
Also publish all aggregated objects (from aggregations/editions/collections)
- Parameters:
- Raises:
TextgridPublishException – if HTTP status code >= 400 (# noqa: DAR402)
- Returns:
HTTP response from service
- Return type:
tgclients.search module
TextGrid Search API.
- class tgclients.search.TextgridSearch(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>, nonpublic: bool = False)
Bases:
TextgridSearchRequest
Provide access to the TextGrid search service using a XML data binding.
- children(textgrid_uri: str, sid: str | None = None) TextgridUris
List URIs for all children of this aggregation and its child aggregations.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
URIs for children of this aggregation and its child aggregations
- Return type:
- edition_work_metadata_for(textgrid_uri: str, sid: str | None = None) Response
Find parent edition for an object and the edition and work metadata.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
- Edition and work metadata for given object
from first matching parent edition
- Return type:
SearchResponse
- info(textgrid_uri: str, sid: str | None = None) Response
Retrieve metadata for a textgrid object specified by its textgrid-uri.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
metadata for uri
- Return type:
SearchResponse
- list_aggregation(textgrid_uri: str, sid: str | None = None) Response
Get child resources of an aggregation.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
A list of textgrid metadata entries
- Return type:
SearchResponse
- list_project_root(project_id: str, sid: str | None = None) Response
Get objects belonging to a project.
These are filtered by objects that are in an aggregation in the same project.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
A list of textgrid metadata entries
- Return type:
SearchResponse
- search(query: str | None = '*', sid: str | None = None, target: str | None = None, order: str | None = None, start: int | None = None, limit: int | None = None, kwic_width: int | None = None, word_distance: int | None = None, path: bool | None = None, all_projects: bool | None = None, sandbox: bool | None = None, filters: List[str] | None = None, facet: List[str] | None = None, facet_limit: int | None = None) Response
Run fulltext queries or filters on TextGrid metadata and fulltext objects.
- Please note: as the defaults of this function are mostly set to None, the defaults from
the service are used, and also noted in this docstring. see: http://textgridlab.org/doc/services/submodules/tg-search/docs/api/search.html
- Parameters:
query (Optional[str]) – Lucene search string. Defaults to ‘*’.
sid (Optional[str]) – TextGrid SessionID from tgauth. Defaults to None.
target (Optional[str]) – where to do fulltext-searches: one of ‘structure’, ‘metadata’ and ‘both’. Defaults to ‘both’.
order (Optional[str]) – key-value ascending (asc) or descending (desc) and metadata-field like asc:title or desc:author. Defaults to ‘relevance’.
start (Optional[int]) – result number to start with.. Defaults to 0.
limit (Optional[int]) – number of entries to return.. Defaults to 20.
kwic_width (Optional[int]) – number of chars before and after a kwic match. Defaults to 40.
word_distance (Optional[int]) – max distance beetween two words in fulltext query. ignored if set to a number < 0, then for a hit all words must be contained in one document. Defaults to -1.
path (Optional[bool]) – path of found result(work->edition->aggregations) should be applied to hit. Defaults to false.
all_projects (Optional[bool]) – all Projects should be searched for public data, warning: this query may be slow, if many results found. Defaults to false.
sandbox (Optional[bool]) – show sandboxed (not yet finally published) data. Defaults to false.
filters (Optional[List[str]]) – add filter on query results, e.g. for faceting. Defaults to None.
facet (Optional[List[str]]) – get facets for query results. Defaults to None.
facet_limit (Optional[int]) – number of results to return for each facet. Defaults to 10.
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
- a list of textgrid metadata entries,
KWIC hits, paths and facets if requested
- Return type:
SearchResponse
- exception tgclients.search.TextgridSearchException
Bases:
Exception
Exception communicating with tgsearch!
- class tgclients.search.TextgridSearchRequest(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>, nonpublic: bool = False)
Bases:
object
Provide low level access to the TextGrid search service, returning the response objects.
- children(textgrid_uri: str, sid: str | None = None) Response
List URIs for all children of this aggregation and its child aggregations.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
- HTTP response from service - URIs for children of this
aggregation and its child aggregations
- Return type:
- edition_work_metadata_for(textgrid_uri: str, sid: str | None = None) Response
Find parent edition for an object and the edition and work metadata.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
- HTTP response from service - edition and work metadata for given object
from first matching parent edition
- Return type:
- info(textgrid_uri: str, sid: str | None = None) Response
Retrieve metadata for a textgrid object specified by its textgrid-uri.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
metadata for uri
- Return type:
- list_aggregation(textgrid_uri: str, sid: str | None = None) Response
Get child resources of an aggregation.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
HTTP response from service, containing a list of textgrid metadata entries
- Return type:
- list_project_root(project_id: str, sid: str | None = None) Response
Get objects belonging to a project.
These are filtered by objects that are in an aggregation in the same project.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
HTTP response from service, containing a list of textgrid metadata entries
- Return type:
- search(query: str | None = '*', sid: str | None = None, target: str | None = None, order: str | None = None, start: int | None = None, limit: int | None = None, kwic_width: int | None = None, word_distance: int | None = None, path: bool | None = None, all_projects: bool | None = None, sandbox: bool | None = None, filters: List[str] | None = None, facet: List[str] | None = None, facet_limit: int | None = None) Response
Run fulltext queries or filters on TextGrid metadata and fulltext objects.
- Please note: as the defaults of this function are mostly set to None, the defaults from
the service are used, and also noted in this docstring. see: http://textgridlab.org/doc/services/submodules/tg-search/docs/api/search.html
- Parameters:
query (Optional[str]) – Lucene search string. Defaults to ‘*’.
sid (Optional[str]) – TextGrid SessionID from tgauth. Defaults to None.
target (Optional[str]) – where to do fulltext-searches: one of ‘structure’, ‘metadata’ and ‘both’. Defaults to ‘both’.
order (Optional[str]) – key-value ascending (asc) or descending (desc) and metadata-field like asc:title or desc:author. Defaults to ‘relevance’.
start (Optional[int]) – result number to start with.. Defaults to 0.
limit (Optional[int]) – number of entries to return.. Defaults to 20.
kwic_width (Optional[int]) – number of chars before and after a kwic match. Defaults to 40.
word_distance (Optional[int]) – max distance beetween two words in fulltext query. ignored if set to a number < 0, then for a hit all words must be contained in one document. Defaults to -1.
path (Optional[bool]) – path of found result(work->edition->aggregations) should be applied to hit. Defaults to false.
all_projects (Optional[bool]) – all Projects should be searched for public data, warning: this query may be slow, if many results found. Defaults to false.
sandbox (Optional[bool]) – show sandboxed (not yet finally published) data. Defaults to false.
filters (Optional[List[str]]) – add filter on query results, e.g. for faceting. Defaults to None.
facet (Optional[List[str]]) – get facets for query results. Defaults to None.
facet_limit (Optional[int]) – number of results to return for each facet. Defaults to 10.
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
- HTTP response from service - a list of textgrid metadata entries,
KWIC hits, paths and facets if requested
- Return type:
tgclients.utils module
Utility functions for working with the TextGrid repository.
- class tgclients.utils.Utils
Bases:
object
Utility functions for working with the TextGrid repository.
- static aggregation_to_list(xml: str) List[str]
Extract URIs from TextGrid aggregation into a list.
Module contents
tgclients provide access to TextGrid services.
- class tgclients.Aggregator(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>)
Bases:
object
Provide access to the Textgrid Aggregator Service.
API docs: https://textgridlab.org/doc/services/submodules/aggregator/docs/api.html
- render(textgrid_uris: str, sid: str | None = None, stylesheet_uri: str | None = None, mediatype: str | None = None, link_pattern: str | None = None, sandbox: bool | None = None) Response
- render(textgrid_uris: List[str], sid: str | None = None, stylesheet_uri: str | None = None, mediatype: str | None = None, link_pattern: str | None = None, sandbox: bool | None = None) Response
Apply an XSLT stylesheet to one or more TextGrid URIs.
Will render (X)HTML by default with XSLT stylesheets from tei-c.org see https://textgridlab.org/doc/services/submodules/aggregator/docs/html.html
- Parameters:
textgrid_uris (Union[str, List[str]]) – a single or a list of TextGrid URIs
sid (Optional[str], optional) – Session ID. Defaults to None.
stylesheet_uri (Optional[str], optional) – alternative XSLT stylesheet to use. Must be a TextGrid URI.
mediatype (Optional[str], optional) – The requested content type. E.g., text/html or text/xml. Default is text/html
link_pattern (Optional[str], optional) – URL pattern for links. @URI@ will be replaced with the textgrid: URI.
sandbox (Optional[bool], optional) – access sandboxed data. Defaults to false
- Returns:
the respone with the TEI corpus in the body
- Return type:
- teicorpus(textgrid_uris: str, sid: str | None = None) Response
- teicorpus(textgrid_uris: List[str], sid: str | None = None) Response
Download aggregated TextGrid objects as TEI corpus.
- text(textgrid_uris: str, sid: str | None = None) Response
- text(textgrid_uris: List[str], sid: str | None = None) Response
Download aggregated TextGrid objects as plain text file.
- class tgclients.TextgridAuth(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>)
Bases:
object
Provide access to the TextGrid Authorization Service.
- add_admin_to_project(sid: str, project_id: str, eppn: str) bool
Give an user the admin role in a project.
- Parameters:
- Raises:
TextgridAuthException – in case of tgauth faults
- Returns:
true in case of success
- Return type:
- add_editor_to_project(sid: str, project_id: str, eppn: str) bool
Give an user the editor role in a project.
- Parameters:
- Raises:
TextgridAuthException – in case of tgauth faults
- Returns:
true in case of success
- Return type:
- add_manager_to_project(sid: str, project_id: str, eppn: str) bool
Give an user the manager role in a project.
- Parameters:
- Raises:
TextgridAuthException – in case of tgauth faults
- Returns:
true in case of success
- Return type:
- add_observer_to_project(sid: str, project_id: str, eppn: str) bool
Give an user the observer role in a project.
- Parameters:
- Raises:
TextgridAuthException – in case of tgauth faults
- Returns:
true in case of success
- Return type:
- create_project(sid: str, name: str, description: str, default_owner_roles: bool | None = True) str
Create a new project.
- Parameters:
- Raises:
TextgridAuthException – in case of tgauth faults
- Returns:
the project ID of the created project
- Return type:
- delete_project(sid: str, project_id: str) bool
Delete a project.
- Parameters:
- Raises:
TextgridAuthException – in case of tgauth faults
- Returns:
true in case of success
- Return type:
- get_eppn_for_sid(sid: str) str
Get the EPPN belonging to a sessionID.
- Parameters:
sid (str) – TextGrid Session ID
- Raises:
TextgridAuthException – in case of transport exceptions
- Returns:
the EPPN
- Return type:
- get_project_description(project_id: str)
Returns name and description of project identified by ID. See also getAllProjects().
- Parameters:
project_id (str) – the project ID
- Returns:
project info with id, name and description
- Return type:
zeep.objects.projectInfo
- list_all_projects() List[str]
List all projects.
Returns all projects stored in this RBAC instance with ID, name, and description. See also getProjectDescription(). SID is not needed as this information can be reviewed publicly.
- Returns:
list of each project with ID, name and description
- Return type:
List[str]
- class tgclients.TextgridConfig(host: str | None = 'https://textgridlab.org')
Bases:
object
Provide standard configuration / URLs for TextGrid services.
Default is to connect to the TextGrid production server (https://textgridlab.org). Pass the constants tgclients.config.DEV_SERVER or tgclients.config.TEST_SERVER to the constructor to change to develop or test server or provide an URL for your own instance.
- property aggregator: str
The aggregator service location.
- Returns:
the aggregator service location
- Return type:
- property auth_address: str
The tgauth service location.
- Returns:
the tgauth service location
- Return type:
- property crud: str
The nonpublic tgcrud REST service location.
- Returns:
the nonpublic tgcrud REST service location
- Return type:
- property crud_public: str
The public tgcrud REST service location.
- Returns:
the public tgcrud REST service location
- Return type:
- property extra_crud_address: str
The tgextra service location.
- Returns:
the tgextra service location
- Return type:
- property extra_crud_wsdl: str
The tgextra WSDL location.
- Returns:
the tgextra WSDL location
- Return type:
- property http_timeout: float
HTTP timeout to be used when accessing TextGrid services.
- Returns:
http timeout in seconds
- Return type:
- property publish: str
The publish service location.
- Returns:
the publish service location
- Return type:
- class tgclients.TextgridCrud(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>, for_publication: bool = False)
Bases:
TextgridCrudRequest
Provide access to the Textgrid CRUD Service using a XML data binding.
- create_resource(sid: str, project_id: str, data: str | IO[Any], metadata: MetadataContainerType, uri: str | None = None) MetadataContainerType
Create a TextGrid object.
- Parameters:
sid (str) – Session ID
project_id (str) – Project ID
data (Union[str, IO[Any]]) – the data
metadata (MetadataContainerType) – the metadata
uri (Optional[str]) – optionally set a TextGrid URI to use for new object (see get_uri method)
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
metadata for newly created object
- Return type:
- create_revision(sid: str, project_id: str, textgrid_uri: str, data: str | IO[Any], metadata: MetadataContainerType) MetadataContainerType
Create a TextGrid object revision.
- Parameters:
sid (str) – Session ID
project_id (str) – Project ID
textgrid_uri (str) – Textgrid URI
data (Union[str, IO[Any]]) – the data
metadata (MetadataContainerType) – the metadata
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
metadata from newly created object revision
- Return type:
- get_uri(sid: str, how_many: int) list
Get TextGrid URIs.
Get an specified amount of TextGrid URIs for assigning to new TextGrid objects. Useful e.g. for bulk imports.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
List with TextGrid URIs
- Return type:
- read_metadata(textgrid_uri: str, sid: str | None = None) MetadataContainerType
Read Metadata.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
metadata for object
- Return type:
- update_metadata(sid: str, textgrid_uri: str, metadata: MetadataContainerType) MetadataContainerType
Update metadata for TextGrid object.
- Parameters:
sid (str) – Session ID
textgrid_uri (str) – Textgrid URI
metadata (MetadataContainerType) – the metadata
- Returns:
updated metadata
- Return type:
- update_resource(sid: str, textgrid_uri: str, data: str | IO[Any], metadata: MetadataContainerType, create_revision: bool = False) MetadataContainerType
Update a TextGrid object.
- Parameters:
sid (str) – Session ID
textgrid_uri (str) – Textgrid URI
data (Union[str, IO[Any]]) – the data
metadata (MetadataContainerType) – the metadata
create_revision (bool) – If True, create a new textgrid object revision. Default: False
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
updated metadata
- Return type:
- class tgclients.TextgridCrudRequest(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>, for_publication: bool = False)
Bases:
object
Provide low level access to the TextGrid CRUD Service.
- create_resource(sid: str, project_id: str, data: str | IO[Any], metadata: str | IO[Any], uri: str | None = None) Response
Create a TextGrid object.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service with metadata from newly created object
- Return type:
- create_revision(sid: str, project_id: str, textgrid_uri: str, data: str | IO[Any], metadata: str | IO[Any]) Response
Create a TextGrid object revision.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service with metadata from newly created object revision
- Return type:
- delete_resource(sid: str, textgrid_uri: str) Response
Delete a TextGrid object.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service
- Return type:
- get_uri(sid: str, how_many: int) Response
Get TextGrid URIs.
Get an specified amount of TextGrid URIs for assigning to new TextGrid objects. Useful e.g. for bulk imports.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service with TextGrid URIs in body
- Return type:
- read_data(textgrid_uri: str, sid: str | None = None) Response
Read Data.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service
- Return type:
- read_metadata(textgrid_uri: str, sid: str | None = None) Response
Read Metadata.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service
- Return type:
- update_metadata(sid: str, textgrid_uri: str, metadata: str | IO[Any]) Response
Update metadata for TextGrid object.
- update_resource(sid: str, textgrid_uri: str, data: str | IO[Any], metadata: str | IO[Any], create_revision: bool = False) Response
Update a TextGrid object.
- Parameters:
- Raises:
TextgridCrudException – if HTTP status code >= 400
- Returns:
HTTP response from service with updated metadata
- Return type:
- class tgclients.TextgridMetadata
Bases:
object
Helper functions to work with TextGrid metadata XML.
- build(title: str, mimetype: str) MetadataContainerType
Build metadata for an TextGrid Object.
- Parameters:
- Returns:
metadata
- Return type:
- extension_for_format(mimetype: str) str | None
Find a matching extension for a textgrid mime type.
The first matching extension for a mime type is returned, so extensions defined first in mime.types will be used.
- filename(title: str, tguri: str, mimetype: str) str
Generate a filename for the triple of title, textfgrid-uri and extension.
- filename_from_metadata(metadata: ResultType) str
Generate a filename for a textgrid search metadata result.
This is made of title, textgrid-URI and extension.
- Parameters:
metadata (ResultType) – tgsearch metadata result
- Returns:
the filename
- Return type:
- static id_from_filename(filename: str) str
Extract the id from a filename.
This is named according to link rewriters textgrid metadata to filename mapping.
- class tgclients.TextgridPublish(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>)
Bases:
TextgridPublishRequest
Provide access to the Textgrid Publish Service using XML data binding.
API docs: https://textgridlab.org/doc/services/submodules/kolibri/kolibri-tgpublish-service/docs/index.html
- copy(sid: str, textgrid_uris: List[str], project_id: str) str
Copies the objects belonging to the given URIs to the given project ID.
Also copies all aggregated objects (from aggregations/editions/collections).
- Parameters:
- Raises:
TextgridPublishException – if HTTP status code >= 400 (# noqa: DAR402)
- Returns:
UUID of copy job queued
- Return type:
- copy_to_new_revision(sid: str, textgrid_uris: List[str]) str
Copies the objects belonging to the given URIs to new revisions of themselves.
Also copies all aggregated objects (from aggregations/editions/collections).
- Parameters:
- Raises:
TextgridPublishException – if HTTP status code >= 400 (# noqa: DAR402)
- Returns:
UUID of copy job queued
- Return type:
- get_status(job_id) PublishResponse
Get status for job specified by job_id.
- Parameters:
job_id (str) – ID of job to get the status for
- Raises:
TextgridPublishException – if HTTP status code >= 400 (# noqa: DAR402)
- Returns:
publish response object
- Return type:
- publish(sid: str, textgrid_uri: str, ignore_warnings: bool = False, dry_run: bool = True)
Publish the edition or collection belonging to the given URIs.
Also publish all aggregated objects (from aggregations/editions/collections)
- Parameters:
- Raises:
TextgridPublishException – if HTTP status code >= 400 (# noqa: DAR402)
- Returns:
just an OK if the job started
- Return type:
- class tgclients.TextgridSearch(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>, nonpublic: bool = False)
Bases:
TextgridSearchRequest
Provide access to the TextGrid search service using a XML data binding.
- children(textgrid_uri: str, sid: str | None = None) TextgridUris
List URIs for all children of this aggregation and its child aggregations.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
URIs for children of this aggregation and its child aggregations
- Return type:
- edition_work_metadata_for(textgrid_uri: str, sid: str | None = None) Response
Find parent edition for an object and the edition and work metadata.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
- Edition and work metadata for given object
from first matching parent edition
- Return type:
SearchResponse
- info(textgrid_uri: str, sid: str | None = None) Response
Retrieve metadata for a textgrid object specified by its textgrid-uri.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
metadata for uri
- Return type:
SearchResponse
- list_aggregation(textgrid_uri: str, sid: str | None = None) Response
Get child resources of an aggregation.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
A list of textgrid metadata entries
- Return type:
SearchResponse
- list_project_root(project_id: str, sid: str | None = None) Response
Get objects belonging to a project.
These are filtered by objects that are in an aggregation in the same project.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
A list of textgrid metadata entries
- Return type:
SearchResponse
- search(query: str | None = '*', sid: str | None = None, target: str | None = None, order: str | None = None, start: int | None = None, limit: int | None = None, kwic_width: int | None = None, word_distance: int | None = None, path: bool | None = None, all_projects: bool | None = None, sandbox: bool | None = None, filters: List[str] | None = None, facet: List[str] | None = None, facet_limit: int | None = None) Response
Run fulltext queries or filters on TextGrid metadata and fulltext objects.
- Please note: as the defaults of this function are mostly set to None, the defaults from
the service are used, and also noted in this docstring. see: http://textgridlab.org/doc/services/submodules/tg-search/docs/api/search.html
- Parameters:
query (Optional[str]) – Lucene search string. Defaults to ‘*’.
sid (Optional[str]) – TextGrid SessionID from tgauth. Defaults to None.
target (Optional[str]) – where to do fulltext-searches: one of ‘structure’, ‘metadata’ and ‘both’. Defaults to ‘both’.
order (Optional[str]) – key-value ascending (asc) or descending (desc) and metadata-field like asc:title or desc:author. Defaults to ‘relevance’.
start (Optional[int]) – result number to start with.. Defaults to 0.
limit (Optional[int]) – number of entries to return.. Defaults to 20.
kwic_width (Optional[int]) – number of chars before and after a kwic match. Defaults to 40.
word_distance (Optional[int]) – max distance beetween two words in fulltext query. ignored if set to a number < 0, then for a hit all words must be contained in one document. Defaults to -1.
path (Optional[bool]) – path of found result(work->edition->aggregations) should be applied to hit. Defaults to false.
all_projects (Optional[bool]) – all Projects should be searched for public data, warning: this query may be slow, if many results found. Defaults to false.
sandbox (Optional[bool]) – show sandboxed (not yet finally published) data. Defaults to false.
filters (Optional[List[str]]) – add filter on query results, e.g. for faceting. Defaults to None.
facet (Optional[List[str]]) – get facets for query results. Defaults to None.
facet_limit (Optional[int]) – number of results to return for each facet. Defaults to 10.
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
- a list of textgrid metadata entries,
KWIC hits, paths and facets if requested
- Return type:
SearchResponse
- exception tgclients.TextgridSearchException
Bases:
Exception
Exception communicating with tgsearch!
- class tgclients.TextgridSearchRequest(config: ~tgclients.config.TextgridConfig = <tgclients.config.TextgridConfig object>, nonpublic: bool = False)
Bases:
object
Provide low level access to the TextGrid search service, returning the response objects.
- children(textgrid_uri: str, sid: str | None = None) Response
List URIs for all children of this aggregation and its child aggregations.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
- HTTP response from service - URIs for children of this
aggregation and its child aggregations
- Return type:
- edition_work_metadata_for(textgrid_uri: str, sid: str | None = None) Response
Find parent edition for an object and the edition and work metadata.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
- HTTP response from service - edition and work metadata for given object
from first matching parent edition
- Return type:
- info(textgrid_uri: str, sid: str | None = None) Response
Retrieve metadata for a textgrid object specified by its textgrid-uri.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
metadata for uri
- Return type:
- list_aggregation(textgrid_uri: str, sid: str | None = None) Response
Get child resources of an aggregation.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
HTTP response from service, containing a list of textgrid metadata entries
- Return type:
- list_project_root(project_id: str, sid: str | None = None) Response
Get objects belonging to a project.
These are filtered by objects that are in an aggregation in the same project.
- Parameters:
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
HTTP response from service, containing a list of textgrid metadata entries
- Return type:
- search(query: str | None = '*', sid: str | None = None, target: str | None = None, order: str | None = None, start: int | None = None, limit: int | None = None, kwic_width: int | None = None, word_distance: int | None = None, path: bool | None = None, all_projects: bool | None = None, sandbox: bool | None = None, filters: List[str] | None = None, facet: List[str] | None = None, facet_limit: int | None = None) Response
Run fulltext queries or filters on TextGrid metadata and fulltext objects.
- Please note: as the defaults of this function are mostly set to None, the defaults from
the service are used, and also noted in this docstring. see: http://textgridlab.org/doc/services/submodules/tg-search/docs/api/search.html
- Parameters:
query (Optional[str]) – Lucene search string. Defaults to ‘*’.
sid (Optional[str]) – TextGrid SessionID from tgauth. Defaults to None.
target (Optional[str]) – where to do fulltext-searches: one of ‘structure’, ‘metadata’ and ‘both’. Defaults to ‘both’.
order (Optional[str]) – key-value ascending (asc) or descending (desc) and metadata-field like asc:title or desc:author. Defaults to ‘relevance’.
start (Optional[int]) – result number to start with.. Defaults to 0.
limit (Optional[int]) – number of entries to return.. Defaults to 20.
kwic_width (Optional[int]) – number of chars before and after a kwic match. Defaults to 40.
word_distance (Optional[int]) – max distance beetween two words in fulltext query. ignored if set to a number < 0, then for a hit all words must be contained in one document. Defaults to -1.
path (Optional[bool]) – path of found result(work->edition->aggregations) should be applied to hit. Defaults to false.
all_projects (Optional[bool]) – all Projects should be searched for public data, warning: this query may be slow, if many results found. Defaults to false.
sandbox (Optional[bool]) – show sandboxed (not yet finally published) data. Defaults to false.
filters (Optional[List[str]]) – add filter on query results, e.g. for faceting. Defaults to None.
facet (Optional[List[str]]) – get facets for query results. Defaults to None.
facet_limit (Optional[int]) – number of results to return for each facet. Defaults to 10.
- Raises:
TextgridSearchException – if HTTP status code >= 400
- Returns:
- HTTP response from service - a list of textgrid metadata entries,
KWIC hits, paths and facets if requested
- Return type:
- class tgclients.Utils
Bases:
object
Utility functions for working with the TextGrid repository.
- static aggregation_to_list(xml: str) List[str]
Extract URIs from TextGrid aggregation into a list.