goat package¶
Subpackages¶
- goat.authorities package
- goat.migrations package
- Submodules
- goat.migrations.0001_initial module
- goat.migrations.0002_searchresultset module
- goat.migrations.0003_searchresultset_state module
- goat.migrations.0004_authority_builtin_identity_system module
- goat.migrations.0005_authority_namespace module
- goat.migrations.0006_auto_20161110_1741 module
- Module contents
- goat.tests package
Submodules¶
goat.admin module¶
-
class
goat.admin.
AuthorityAdmin
(model, admin_site)[source]¶ Bases:
guardian.admin.GuardedModelAdmin
-
media
¶
-
-
class
goat.admin.
ConceptAdmin
(model, admin_site)[source]¶ Bases:
guardian.admin.GuardedModelAdmin
-
media
¶
-
goat.apps module¶
goat.celery module¶
goat.filters module¶
-
class
goat.filters.
ConceptFilter
(data=None, queryset=None, prefix=None, strict=None)[source]¶ Bases:
django_filters.filterset.FilterSet
-
class
Meta
[source]¶ -
fields
= ['name', 'identifier', 'concept_type', 'added_by', 'authority']¶
-
model
¶ alias of
Concept
-
order_by
= (('name', 'Name (ascending)'), ('-name', 'Name (descending)'), ('concept_type', 'Type (ascending)'), ('-concept_type', 'Type (descending)'))¶
-
-
ConceptFilter.
base_filters
= OrderedDict([('name', <django_filters.filters.MethodFilter object>), ('identifier', <django_filters.filters.CharFilter object>), ('concept_type', <django_filters.filters.ModelChoiceFilter object>), ('added_by', <django_filters.filters.ModelChoiceFilter object>), ('authority', <django_filters.filters.ModelChoiceFilter object>), ('search', <django_filters.filters.CharFilter object>), (u'o', <django_filters.filters.OrderingFilter object>)])¶
-
ConceptFilter.
declared_filters
= OrderedDict([('name', <django_filters.filters.MethodFilter object>), ('search', <django_filters.filters.CharFilter object>), ('concept_type', <django_filters.filters.ModelChoiceFilter object>)])¶
-
class
goat.models module¶
-
class
goat.models.
Authority
(*args, **kwargs)[source]¶ Bases:
goat.models.BasicAccessionMixin
An Authority service, system, file, or other source of concepts.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Authority.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Authority.
added_by
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Authority.
builtin_identity_system
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Authority.
builtin_identity_system_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Authority.
concepts
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Authority.
configuration
¶ JSON-serialized configuration (if available) for this authority.
-
Authority.
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Authority.
get_next_by_added
(*moreargs, **morekwargs)¶
-
Authority.
get_next_by_updated
(*moreargs, **morekwargs)¶
-
Authority.
get_previous_by_added
(*moreargs, **morekwargs)¶
-
Authority.
get_previous_by_updated
(*moreargs, **morekwargs)¶
-
Authority.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Authority.
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Authority.
namespace
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Authority.
objects
= <django.db.models.manager.Manager object>¶
-
Authority.
search
¶
-
exception
-
class
goat.models.
BasicAccessionMixin
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Basic data tracking information.
-
BasicAccessionMixin.
added
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
BasicAccessionMixin.
added_by
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
BasicAccessionMixin.
added_by_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
BasicAccessionMixin.
get_next_by_added
(*moreargs, **morekwargs)¶
-
BasicAccessionMixin.
get_next_by_updated
(*moreargs, **morekwargs)¶
-
BasicAccessionMixin.
get_previous_by_added
(*moreargs, **morekwargs)¶
-
BasicAccessionMixin.
get_previous_by_updated
(*moreargs, **morekwargs)¶
-
BasicAccessionMixin.
updated
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
goat.models.
Concept
(*args, **kwargs)[source]¶ Bases:
goat.models.BasicAccessionMixin
Represents a single entry in an authority service or system.
For example, this might be an entry for a particular person in the Library of Congress or VIAF.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Concept.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Concept.
added_by
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
The authority system to which this concept belongs.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Concept.
concept_type
¶ Some authority systems may have type ontologies. Types should be treated as concepts.
-
Concept.
concept_type_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Concept.
data
¶ JSON-pickled data about this concept from the authority service.
-
Concept.
description
¶ If available, a freeform description provided by the authority.
-
Concept.
get_next_by_added
(*moreargs, **morekwargs)¶
-
Concept.
get_next_by_updated
(*moreargs, **morekwargs)¶
-
Concept.
get_previous_by_added
(*moreargs, **morekwargs)¶
-
Concept.
get_previous_by_updated
(*moreargs, **morekwargs)¶
-
Concept.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Concept.
identifier
¶ The URI for this concept.
-
Concept.
identities
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Concept.
instances
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
Concept.
local_identifier
¶ The symbol used by
authority
internally to identify this concept.
-
Concept.
name
¶ Primary name or label, used for search and display.
-
Concept.
objects
= <django.db.models.manager.Manager object>¶
-
Concept.
search_sets
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
goat.models.
Identity
(*args, **kwargs)[source]¶ Bases:
goat.models.BasicAccessionMixin
An identity proposition about a set of concepts.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Identity.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
Identity.
added_by
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Identity.
concepts
¶ The concepts asserted to be identical.
-
Identity.
confidence
¶ This can (optionally) be used to express relative confidence levels.
-
Identity.
get_next_by_added
(*moreargs, **morekwargs)¶
-
Identity.
get_next_by_updated
(*moreargs, **morekwargs)¶
-
Identity.
get_previous_by_added
(*moreargs, **morekwargs)¶
-
Identity.
get_previous_by_updated
(*moreargs, **morekwargs)¶
-
Identity.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Identity.
name
¶ Can be used to provide an appellation for the cluster of concepts.
-
Identity.
objects
= <django.db.models.manager.Manager object>¶
-
Identity.
part_of
¶ The system to which this identity belongs.
-
Identity.
part_of_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
goat.models.
IdentitySystem
(*args, **kwargs)[source]¶ Bases:
goat.models.BasicAccessionMixin
An identity system organizes a set of identity propositions about concepts.
This allows many different identity models to coexist for different purposes, without having to commit to a particular view of the world.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
IdentitySystem.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
IdentitySystem.
added_by
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
IdentitySystem.
get_next_by_added
(*moreargs, **morekwargs)¶
-
IdentitySystem.
get_next_by_updated
(*moreargs, **morekwargs)¶
-
IdentitySystem.
get_previous_by_added
(*moreargs, **morekwargs)¶
-
IdentitySystem.
get_previous_by_updated
(*moreargs, **morekwargs)¶
-
IdentitySystem.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
IdentitySystem.
identities
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
IdentitySystem.
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
IdentitySystem.
objects
= <django.db.models.manager.Manager object>¶
-
exception
-
class
goat.models.
SearchResultSet
(id, added_by, added, updated, created, task_id, state)[source]¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
SearchResultSet.
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
SearchResultSet.
PENDING
= 'PENDING'¶
-
SearchResultSet.
SUCCESS
= 'SUCCESS'¶
-
SearchResultSet.
added
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
SearchResultSet.
added_by
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
SearchResultSet.
added_by_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
SearchResultSet.
created
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
SearchResultSet.
get_next_by_added
(*moreargs, **morekwargs)¶
-
SearchResultSet.
get_next_by_created
(*moreargs, **morekwargs)¶
-
SearchResultSet.
get_next_by_updated
(*moreargs, **morekwargs)¶
-
SearchResultSet.
get_previous_by_added
(*moreargs, **morekwargs)¶
-
SearchResultSet.
get_previous_by_created
(*moreargs, **morekwargs)¶
-
SearchResultSet.
get_previous_by_updated
(*moreargs, **morekwargs)¶
-
SearchResultSet.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
SearchResultSet.
objects
= <django.db.models.manager.Manager object>¶
-
SearchResultSet.
state
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
SearchResultSet.
task_id
¶ The identifier of the asynchronous search task.
-
SearchResultSet.
updated
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
goat.serializers module¶
-
class
goat.serializers.
AuthorityDetailSerializer
(instance=None, data=<class rest_framework.fields.empty>, **kwargs)[source]¶ Bases:
rest_framework.serializers.ModelSerializer
-
class
goat.serializers.
AuthorityLightSerializer
(instance=None, data=<class rest_framework.fields.empty>, **kwargs)[source]¶ Bases:
rest_framework.serializers.ModelSerializer
-
class
goat.serializers.
AuthoritySerializer
(instance=None, data=<class rest_framework.fields.empty>, **kwargs)[source]¶ Bases:
rest_framework.serializers.ModelSerializer
Identical to
AuthorityDetailSerializer
except that the configuration is hidden.
-
class
goat.serializers.
ConceptLightSerializer
(instance=None, data=<class rest_framework.fields.empty>, **kwargs)[source]¶ Bases:
rest_framework.serializers.ModelSerializer
-
class
goat.serializers.
ConceptRepresentationMixin
(instance=None, data=<class rest_framework.fields.empty>, **kwargs)[source]¶ Bases:
rest_framework.serializers.ModelSerializer
-
class
goat.serializers.
ConceptSerializer
(instance=None, data=<class rest_framework.fields.empty>, **kwargs)[source]¶ Bases:
rest_framework.serializers.ModelSerializer
-
class
goat.serializers.
IdentityLightSerializer
(instance=None, data=<class rest_framework.fields.empty>, **kwargs)[source]¶ Bases:
goat.serializers.ConceptRepresentationMixin
,rest_framework.serializers.ModelSerializer
-
class
goat.serializers.
IdentitySerializer
(instance=None, data=<class rest_framework.fields.empty>, **kwargs)[source]¶ Bases:
goat.serializers.ConceptRepresentationMixin
,rest_framework.serializers.ModelSerializer
-
class
goat.serializers.
IdentitySystemLightSerializer
(instance=None, data=<class rest_framework.fields.empty>, **kwargs)[source]¶ Bases:
rest_framework.serializers.ModelSerializer
goat.settings module¶
Django settings for goat project.
Generated by ‘django-admin startproject’ using Django 1.8.3.
For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/
goat.signals module¶
goat.tasks module¶
goat.urls module¶
goat URL Configuration
goat.views module¶
-
class
goat.views.
AuthorityViewSet
(**kwargs)[source]¶ Bases:
goat.views.CreateWithUserInfoMixin
,rest_framework.viewsets.ModelViewSet
-
filter_backends
= (<class 'django_filters.rest_framework.backends.DjangoFilterBackend'>,)¶
-
permission_classes
= [<class 'goat.views.GoatPermission'>]¶
-
queryset
= <QuerySet [<Authority: VIAF>, <Authority: Conceptpower>, <Authority: GoatTest>]>¶
-
serializer_class
¶ alias of
AuthoritySerializer
-
suffix
= None¶
-
-
class
goat.views.
ConceptViewSet
(**kwargs)[source]¶ Bases:
goat.views.CreateWithUserInfoMixin
,rest_framework.viewsets.ModelViewSet
-
filter_backends
= (<class 'django_filters.rest_framework.backends.DjangoFilterBackend'>,)¶
-
filter_class
¶ alias of
ConceptFilter
-
permission_classes
= [<class 'goat.views.GoatPermission'>]¶
-
queryset
= <QuerySet [<Concept: >, <Concept: Bradshaw Isherwood, Christopher William, 1904-1986>, <Concept: Bradshaw, John, 1933->, <Concept: Bradshaw, Paul F>, <Concept: Bradshaw, Henry, 1831-1886>, <Concept: Bradshaw, David, 1955->, <Concept: Bradshaw, Gillian, 1956->, <Concept: Bradshaw, Michael J. , 1935->, <Concept: Bradshaw, Tiny, 1905-1958>, <Concept: Bradshaw, Rita, 1950->, <Concept: Bradshaw, John, 1950->, <Concept: >, <Concept: Margaret Elizabeth Bradshaw>, <Concept: christopher william bradshaw isherwood>, <Concept: Anthony D. Bradshaw>, <Concept: Anthony David Bradshaw (1926-2008)>, <Concept: >, <Concept: >, <Concept: Bradshaw 1965>, <Concept: evolutionary biologist and author Richard Dawkins English ethologist>, '...(remaining elements truncated)...']>¶
-
serializer_class
¶ alias of
ConceptSerializer
-
suffix
= None¶
-
-
class
goat.views.
CreateWithUserInfoMixin
[source]¶ Bases:
object
Extends the default
ModelViewSet.create()
to populate theadded_by
field.
-
class
goat.views.
IdentitySystemViewSet
(**kwargs)[source]¶ Bases:
goat.views.CreateWithUserInfoMixin
,rest_framework.viewsets.ModelViewSet
-
filter_backends
= (<class 'django_filters.rest_framework.backends.DjangoFilterBackend'>,)¶
-
permission_classes
= [<class 'goat.views.GoatPermission'>]¶
-
queryset
= <QuerySet [<IdentitySystem: builtin:VIAF>, <IdentitySystem: builtin:Conceptpower>, <IdentitySystem: TestSystem>, <IdentitySystem: GoatTest>, <IdentitySystem: builtin:GoatTest>]>¶
-
serializer_class
¶ alias of
IdentitySystemSerializer
-
suffix
= None¶
-
-
class
goat.views.
IdentityViewSet
(**kwargs)[source]¶ Bases:
rest_framework.viewsets.ModelViewSet
-
create
(request, *args, **kwargs)[source]¶ Populates the
added_by
field with the current user, and checks that the user haschange
authorization on theIdentitySystem
.
-
filter_backends
= (<class 'django_filters.rest_framework.backends.DjangoFilterBackend'>,)¶
-
permission_classes
= [<class 'goat.views.GoatPermission'>]¶
-
queryset
= <QuerySet [<Identity: Anthony David Bradshaw (1926-2008)>, <Identity: asdf>, <Identity: fdsa>, <Identity: Anthony David Bradshaw (1926-2008)>, <Identity: Anthony David Bradshaw (1926-2008)>, <Identity: Anthony David Bradshaw (1926-2008)>, <Identity: Anthony David Bradshaw (1926-2008)>, <Identity: GoatTest>, <Identity: Anthony David Bradshaw (1926-2008)>, <Identity: Charles Darwin>, <Identity: Erasmus Darwin>, <Identity: Francis Darwin>, <Identity: Emma Darwin>, <Identity: Charles Darwin>, <Identity: Erasmus Darwin>, <Identity: Francis Darwin>, <Identity: Emma Darwin>, <Identity: Loeb>, <Identity: Jacques Loeb>, <Identity: Charles Darwin>, '...(remaining elements truncated)...']>¶
-
serializer_class
¶ alias of
IdentitySerializer
-
suffix
= None¶
-
-
goat.views.
identical
(request)[source]¶ This provides a simpler view onto
Identity
instances than theIdentityViewSet
. Here the client can pass an identifier and (optionally) an ID for aIdentitySystem
instance, and get an array of identicalConcept
s.
goat.wsgi module¶
WSGI config for goat project.
It exposes the WSGI callable as a module-level variable named application
.
For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/