annotations.views.rest_views module

Provides all of the class-based views for the REST API.

class annotations.views.rest_views.AnnotationFilterMixin[source]

Bases: object

Mixin for viewsets.ModelViewSet that provides filtering by Text and User.

get_queryset(*args, **kwargs)[source]
class annotations.views.rest_views.AppellationViewSet(**kwargs)[source]

Bases: annotations.views.rest_views.AnnotationFilterMixin, rest_framework.viewsets.ModelViewSet

create(request, *args, **kwargs)[source]
get_queryset(*args, **kwargs)[source]
permission_classes = (<class 'rest_framework.permissions.IsAuthenticatedOrReadOnly'>,)
queryset = [<Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, '...(remaining elements truncated)...']
serializer_class

alias of AppellationSerializer

suffix = None
class annotations.views.rest_views.ConceptViewSet(**kwargs)[source]

Bases: rest_framework.viewsets.ModelViewSet

create(request, *args, **kwargs)[source]
get_queryset(*args, **kwargs)[source]

Filter by part of speach (pos).

permission_classes = (<class 'rest_framework.permissions.IsAuthenticatedOrReadOnly'>,)
queryset = [<Concept: What>, <Concept: Henry Cowles>, <Concept: asdf>, <Concept: ASDFASDF>, <Concept: kjjlkjlkjkljlkjlkjasdf>, <Concept: fdsafdsa>, <Concept: Andrew Zachary Fire>, <Concept: verify>, <Concept: None>, <Concept: britt>, <Concept: britt>, <Concept: Britten>, <Concept: James Cullen>, <Concept: migration>, <Concept: migration>, <Concept: migration>, <Concept: migration>, <Concept: Yulian Zhao>, <Concept: Howard Zacur>, <Concept: Lisa Kolp>, '...(remaining elements truncated)...']
serializer_class

alias of ConceptSerializer

suffix = None
class annotations.views.rest_views.PredicateViewSet(**kwargs)[source]

Bases: annotations.views.rest_views.AnnotationFilterMixin, rest_framework.viewsets.ModelViewSet

permission_classes = (<class 'rest_framework.permissions.IsAuthenticatedOrReadOnly'>,)
queryset = [<Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, <Appellation: Appellation object>, '...(remaining elements truncated)...']
serializer_class

alias of AppellationSerializer

suffix = None
class annotations.views.rest_views.RelationSetViewSet(**kwargs)[source]

Bases: rest_framework.viewsets.ModelViewSet

get_queryset(*args, **kwargs)[source]
permission_classes = (<class 'rest_framework.permissions.IsAuthenticatedOrReadOnly'>,)
queryset = [<RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, <RelationSet: RelationSet object>, '...(remaining elements truncated)...']
serializer_class

alias of RelationSetSerializer

suffix = None
class annotations.views.rest_views.RelationViewSet(**kwargs)[source]

Bases: rest_framework.viewsets.ModelViewSet

get_queryset(*args, **kwargs)[source]

Supports filtering by Text, User, node concept type, and predicate concept type.

permission_classes = (<class 'rest_framework.permissions.IsAuthenticatedOrReadOnly'>,)
queryset = [<Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, <Relation: Relation object>, '...(remaining elements truncated)...']
serializer_class

alias of RelationSerializer

suffix = None
class annotations.views.rest_views.RemoteCollectionViewSet(**kwargs)[source]

Bases: rest_framework.viewsets.ViewSet

list(request, repository_pk=None)[source]
retrieve(request, pk=None, repository_pk=None)[source]
suffix = None
class annotations.views.rest_views.RemoteResourceViewSet(**kwargs)[source]

Bases: rest_framework.viewsets.ViewSet

list(request, collection_pk=None, repository_pk=None)[source]
retrieve(request, pk=None, collection_pk=None, repository_pk=None)[source]
suffix = None
class annotations.views.rest_views.RepositoryViewSet(**kwargs)[source]

Bases: rest_framework.viewsets.ModelViewSet

permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
queryset = [<Repository: JHB Dataset>]
serializer_class

alias of RepositorySerializer

suffix = None
class annotations.views.rest_views.StandardResultsSetPagination[source]

Bases: rest_framework.pagination.PageNumberPagination

max_page_size = 1000
page_size = 100
page_size_query_param = 'page_size'
class annotations.views.rest_views.TemporalBoundsViewSet(**kwargs)[source]

Bases: rest_framework.viewsets.ModelViewSet, annotations.views.rest_views.AnnotationFilterMixin

permission_classes = (<class 'rest_framework.permissions.IsAuthenticatedOrReadOnly'>,)
queryset = [<TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, <TemporalBounds: TemporalBounds object>, '...(remaining elements truncated)...']
serializer_class

alias of TemporalBoundsSerializer

suffix = None
class annotations.views.rest_views.TextCollectionViewSet(**kwargs)[source]

Bases: rest_framework.viewsets.ModelViewSet

create(request, *args, **kwargs)[source]
get_queryset(*args, **kwargs)[source]
permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)
queryset = [<TextCollection: My_Sample>, <TextCollection: Embryo Project>, <TextCollection: Journal of the History of Biology>, <TextCollection: My Test Project>, <TextCollection: My Test Project>, <TextCollection: Another Project>]
serializer_class

alias of TextCollectionSerializer

suffix = None
class annotations.views.rest_views.TextViewSet(**kwargs)[source]

Bases: rest_framework.viewsets.ModelViewSet

get_queryset(*args, **kwargs)[source]

A user can see only their own TextCollections.

permission_classes = (<class 'rest_framework.permissions.IsAuthenticatedOrReadOnly'>,)
queryset = [<Text: Felix Anton Dohrn>, <Text: John Philip Trinkaus (1918-2003)>, <Text: Andrew Zachary Fire (1959- )>, <Text: Ectopic Pregnancy>, <Text: Umbilical Cord Blood Stem Cells (UCBSC)>, <Text: Robert Geoffrey Edwards (1925-2013)>, <Text: Images of Embryos in Life Magazine in the 1950s>, <Text: Pregnancy Tests>, <Text: Meiosis in Humans>, <Text: Intracytoplasmic Sperm Injection>, <Text: Ziegler Wax Embryo Models>, <Text: Enovid: The First Hormonal Birth Control Pill>, <Text: "Mechanistic Science and Metaphysical Romance" (1915), by Jacques Loeb>, <Text: The Eugenics Record Office at Cold Spring Harbor Laboratory (1910-1939)>, <Text: Zhang Lizhu (1921- )>, <Text: The Effects of Bisphenol A on Embryonic Development>, <Text: Johns Hopkins Fertility Center>, <Text: Hysterectomy>, <Text: Endoscopy>, <Text: Intrauterine Insemination>, '...(remaining elements truncated)...']
serializer_class

alias of TextSerializer

suffix = None
class annotations.views.rest_views.TypeViewSet(**kwargs)[source]

Bases: rest_framework.viewsets.ModelViewSet

permission_classes = (<class 'rest_framework.permissions.IsAuthenticatedOrReadOnly'>,)
queryset = [<Type: E21 Person>, <Type: E28 Conceptual Object>, <Type: E40 Legal Body>, <Type: E20 Biological Object>, <Type: E31 Document>, <Type: E71 Man-Made Thing>, <Type: E74 Group>, <Type: E89 Propositional Object>, <Type: E55 Type>, <Type: E73 Information Object>, <Type: E72 Legal Object>, <Type: E22 Man-Made Object>, <Type: E10 Transfer of Custody>, <Type: E29 Design or Procedure>, <Type: E5 Event>, <Type: Predicate>, <Type: E19 Physical Object>, <Type: E75 Conceptual Object Appellation>, <Type: E18 Physical Thing>, <Type: E53 Place>, '...(remaining elements truncated)...']
serializer_class

alias of TypeSerializer

suffix = None
class annotations.views.rest_views.UserViewSet(**kwargs)[source]

Bases: rest_framework.viewsets.ModelViewSet

permission_classes = (<class 'rest_framework.permissions.IsAuthenticatedOrReadOnly'>,)
queryset = [<VogonUser: jdamerow>, <VogonUser: rmidura>, <VogonUser: cwarren>, <VogonUser: shivam7891>, <VogonUser: pramodh>, <VogonUser: ebottino>, <VogonUser: Yogananda>, <VogonUser: gpirotte>, <VogonUser: nvelezcruz>, <VogonUser: kardanitin>, <VogonUser: AnonymousUser>, <VogonUser: erickpeirson>]
serializer_class

alias of UserSerializer

suffix = None