PIF Query Core

Classification Query

class citrination_client.search.pif.query.core.classification_query.ClassificationQuery(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, name=None, value=None, query=None, **kwargs)

Bases: citrination_client.search.pif.query.core.base_object_query.BaseObjectQuery

Class to query against a PIF Classification object.

__init__(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, name=None, value=None, query=None, **kwargs)

Constructor.

Parameters
  • logic – Logic for this filter. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.

  • weight – Weight of the query.

  • simple – String with the simple query against all fields.

  • simple_weight – Dictionary of relative paths to their weights for simple queries.

  • extract_as – String with the alias to save this field under.

  • extract_all – Boolean setting whether all values in an array should be extracted.

  • extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).

  • tags – One or more FieldQuery operations against the tags field.

  • length – One or more FieldQuery operations against the length field.

  • offset – One or more FieldQuery operations against the offset field.

  • name – One or more FieldQuery operations against the name field.

  • value – One or more FieldQuery operations against the value field.

  • query – One or more ClassificationQuery objects for nested queries.

name
query
value

Display Item Query

class citrination_client.search.pif.query.core.display_item_query.DisplayItemQuery(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, number=None, title=None, caption=None, query=None, **kwargs)

Bases: citrination_client.search.pif.query.core.base_object_query.BaseObjectQuery

Class to query against a Pif DisplayItem object.

__init__(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, number=None, title=None, caption=None, query=None, **kwargs)

Constructor.

Parameters
  • logic – Logic for this filter. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.

  • weight – Weight of the query.

  • simple – String with the simple query to run against all fields.

  • simple_weight – Dictionary of relative paths to their weights for simple queries.

  • extract_as – String with the alias to save this field under.

  • extract_all – Boolean setting whether all values in an array should be extracted.

  • extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).

  • tags – One or more FieldQuery operations against the tags field.

  • length – One or more FieldQuery operations against the length field.

  • offset – One or more FieldQuery operations against the offset field.

  • number – One or more FieldQuery operations against the number field.

  • title – One or more FieldQuery operations against the title field.

  • caption – One or more FieldQuery operations against the caption field.

  • query – One or more DisplayItemQuery objects as nested queries.

caption
number
query
title

Field Query

class citrination_client.search.pif.query.core.field_query.FieldQuery(sort=None, weight=None, logic=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, length=None, offset=None, filter=None, **kwargs)

Bases: citrination_client.search.pif.query.core.base_field_query.BaseFieldQuery

Class for all field queries.

__init__(sort=None, weight=None, logic=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, length=None, offset=None, filter=None, **kwargs)

Constructor.

Parameters
  • sort – ASCENDING or DESCENDING to set the sort order on this field.

  • weight – Weight of the query.

  • logic – Logic for this query. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.

  • simple – String with the simple search to run against all fields.

  • simple_weight – Dictionary of relative paths to their weights for simple queries.

  • extract_as – String with the alias to save this field under.

  • extract_all – Boolean setting whether all values in an array should be extracted.

  • extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).

  • length – One or more FieldQuery objects against the length field.

  • offset – One or more FieldQuery objects against the offset field.

  • filter – One or more Filter objects against this field.

filter

File Reference Query

class citrination_client.search.pif.query.core.file_reference_query.FileReferenceQuery(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, relative_path=None, mime_type=None, sha256=None, md5=None, query=None, **kwargs)

Bases: citrination_client.search.pif.query.core.base_object_query.BaseObjectQuery

Class to query against a Pif FileReference object.

__init__(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, relative_path=None, mime_type=None, sha256=None, md5=None, query=None, **kwargs)

Constructor.

Parameters
  • logic – Logic for this filter. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.

  • weight – Weight of the query.

  • simple – String with the simple query to run against all fields.

  • simple_weight – Dictionary of relative paths to their weights for simple queries.

  • extract_as – String with the alias to save this field under.

  • extract_all – Boolean setting whether all values in an array should be extracted.

  • extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).

  • tags – One or more FieldQuery operations against the tags field.

  • length – One or more FieldQuery operations against the length field.

  • offset – One or more FieldQuery operations against the offset field.

  • relative_path – One or more FieldQuery operations against the relative path field.

  • mime_type – One or more FieldQuery operations against the mime type field.

  • sha256 – One or more FieldQuery operations against the sha256 field.

  • md5 – One or more FieldQuery operations against the md5 field.

  • query – One or more FileReferenceQuery objects as nested queries.

md5
mime_type
query
relative_path
sha256

ID Query

class citrination_client.search.pif.query.core.id_query.IdQuery(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, name=None, value=None, query=None, **kwargs)

Bases: citrination_client.search.pif.query.core.base_object_query.BaseObjectQuery

Class to query against a PIF ID object.

__init__(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, name=None, value=None, query=None, **kwargs)

Constructor.

Parameters
  • logic – Logic for this filter. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.

  • weight – Weight of the query.

  • simple – String with the query to run over all fields.

  • simple_weight – Dictionary of relative paths to their weights for simple queries.

  • extract_as – String with the alias to save this field under.

  • extract_all – Boolean setting whether all values in an array should be extracted.

  • extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).

  • tags – One or more FieldQuery operations against the tags field.

  • length – One or more FieldQuery operations against the length field.

  • offset – One or more FieldQuery operations against the offset field.

  • name – One or more FieldQuery operations against the name field.

  • value – One or more FieldQuery operations against the value field.

  • query – One or more IdQuery objects with nested queries.

name
query
value

Name Query

class citrination_client.search.pif.query.core.name_query.NameQuery(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, given=None, family=None, title=None, suffix=None, query=None, **kwargs)

Bases: citrination_client.search.pif.query.core.base_object_query.BaseObjectQuery

Class to query against a Pif Name object.

__init__(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, given=None, family=None, title=None, suffix=None, query=None, **kwargs)

Constructor.

Parameters
  • logic – Logic for this filter. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.

  • weight – Weight of the query.

  • simple – String with the simple query to run against all fields.

  • simple_weight – Dictionary of relative paths to their weights for simple queries.

  • extract_as – String with the alias to save this field under.

  • extract_all – Boolean setting whether all values in an array should be extracted.

  • extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).

  • tags – One or more FieldQuery operations against the tags field.

  • length – One or more FieldQuery operations against the length field.

  • offset – One or more FieldQuery operations against the offset field.

  • given – One or more FieldQuery operations against the given name field.

  • family – One or more FieldQuery operations against the family name field.

  • title – One or more FieldQuery operations against the title field.

  • suffix – One or more FieldQuery operations against the suffix field.

  • query – One or more NameQuery objects with nested queries.

family
given
query
suffix
title

Pages Query

class citrination_client.search.pif.query.core.pages_query.PagesQuery(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, start=None, end=None, query=None, **kwargs)

Bases: citrination_client.search.pif.query.core.base_object_query.BaseObjectQuery

Class to query against a Pif Pages object.

__init__(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, start=None, end=None, query=None, **kwargs)

Constructor.

Parameters
  • logic – Logic for this filter. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.

  • weight – Weight of the query.

  • simple – String with the simple query to run against all fields.

  • simple_weight – Dictionary of relative paths to their weights for simple queries.

  • extract_as – String with the alias to save this field under.

  • extract_all – Boolean setting whether all values in an array should be extracted.

  • extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).

  • tags – One or more FieldQuery operations against the tags field.

  • length – One or more FieldQuery operations against the length field.

  • offset – One or more FieldQuery operations against the offset field.

  • start – One or more FieldQuery operations against the starting page field.

  • end – One or more FieldQuery operations against the ending page field.

  • query – One or more PagesQuery objects with nested queries.

end
query
start

Process Step Query

class citrination_client.search.pif.query.core.process_step_query.ProcessStepQuery(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, name=None, details=None, query=None, **kwargs)

Bases: citrination_client.search.pif.query.core.base_object_query.BaseObjectQuery

Class to query against a process step.

__init__(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, name=None, details=None, query=None, **kwargs)

Constructor.

Parameters
  • logic – Logic for this filter. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.

  • weight – Weight of the query.

  • simple – String with the query to run against all fields.

  • simple_weight – Dictionary of relative paths to their weights for simple queries.

  • extract_as – String with the alias to save this field under.

  • extract_all – Boolean setting whether all values in an array should be extracted.

  • extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).

  • tags – One or more FieldQuery operations against the tags field.

  • length – One or more FieldQuery operations against the length field.

  • offset – One or more FieldQuery operations against the offset field.

  • name – One or more FieldQuery operations against the name field.

  • details – One or more ValueQuery operations against the details of the step.

  • query – One or more ProcessStepQuery objects with nested queries.

details
name
query

Property Query

class citrination_client.search.pif.query.core.property_query.PropertyQuery(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, conditions=None, data_type=None, name=None, value=None, file=None, units=None, references=None, query=None, **kwargs)

Bases: citrination_client.search.pif.query.core.value_query.ValueQuery

Class to query against a single property.

__init__(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, conditions=None, data_type=None, name=None, value=None, file=None, units=None, references=None, query=None, **kwargs)

Constructor.

Parameters
  • logic – Logic for this filter. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.

  • weight – Weight of the query.

  • simple – String with the simple query to run against all fields.

  • simple_weight – Dictionary of relative paths to their weights for simple queries.

  • extract_as – String with the alias to save this field under.

  • extract_all – Boolean setting whether all values in an array should be extracted.

  • extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).

  • tags – One or more FieldQuery operations against the tags field.

  • length – One or more FieldQuery operations against the length field.

  • offset – One or more FieldQuery operations against the offset field.

  • conditions – One or more ValueQuery operations against the conditions.

  • data_type – One or more FieldQuery operations against the dataType field.

  • name – One or more FieldQuery operations against the name field.

  • value – One or more FieldQuery operations against the value.

  • file – One or more FileReferenceQuery operations against the file.

  • units – One or more FieldQuery operations against the units field.

  • references – One or more ReferenceQuery operations against the references field.

  • query – One or more PropertyQuery objects with nested queries.

conditions
data_type
query
references

Quantity Query

class citrination_client.search.pif.query.core.quantity_query.QuantityQuery(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, actual_mass_percent=None, actual_volume_percent=None, actual_number_percent=None, ideal_mass_percent=None, ideal_volume_percent=None, ideal_number_percent=None, query=None, **kwargs)

Bases: citrination_client.search.pif.query.core.base_object_query.BaseObjectQuery

Class to query against a PIF Quantity object.

__init__(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, actual_mass_percent=None, actual_volume_percent=None, actual_number_percent=None, ideal_mass_percent=None, ideal_volume_percent=None, ideal_number_percent=None, query=None, **kwargs)

Constructor.

Parameters
  • logic – Logic for this filter. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.

  • weight – Weight of the query.

  • simple – String with the simple query to run against all fields.

  • simple_weight – Dictionary of relative paths to their weights for simple queries.

  • extract_as – String with the alias to save this field under.

  • extract_all – Boolean setting whether all values in an array should be extracted.

  • extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).

  • tags – One or more FieldQuery operations against the tags field.

  • length – One or more FieldQuery operations against the length field.

  • offset – One or more FieldQuery operations against the offset field.

  • actual_mass_percent – One or more FieldQuery operations against the actual mass percent field.

  • actual_volume_percent – One or more FieldQuery operations against the actual volume percent field.

  • actual_number_percent – One or more FieldQuery operations against the actual number percent field.

  • ideal_mass_percent – One or more FieldQuery operations against the ideal mass percent field.

  • ideal_volume_percent – One or more FieldQuery operations against the ideal volume percent field.

  • ideal_number_percent – One or more FieldQuery operations against the ideal number percent field.

  • query – One or more QuantityQuery objects with nested queries.

actual_mass_percent
actual_number_percent
actual_volume_percent
ideal_mass_percent
ideal_number_percent
ideal_volume_percent
query

Reference Query

class citrination_client.search.pif.query.core.reference_query.ReferenceQuery(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, doi=None, isbn=None, issn=None, url=None, title=None, publisher=None, journal=None, volume=None, issue=None, year=None, figure=None, table=None, pages=None, authors=None, editors=None, affiliations=None, acknowledgements=None, references=None, query=None, **kwargs)

Bases: citrination_client.search.pif.query.core.base_object_query.BaseObjectQuery

Class used to query against a PIF Reference object.

__init__(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, doi=None, isbn=None, issn=None, url=None, title=None, publisher=None, journal=None, volume=None, issue=None, year=None, figure=None, table=None, pages=None, authors=None, editors=None, affiliations=None, acknowledgements=None, references=None, query=None, **kwargs)

Constructor.

Parameters
  • logic – Logic for this filter. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.

  • weight – Weight of the query.

  • simple – String with the simple query to run against all fields.

  • simple_weight – Dictionary of relative paths to their weights for simple queries.

  • extract_as – String with the alias to save this field under.

  • extract_all – Boolean setting whether all values in an array should be extracted.

  • extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).

  • tags – One or more FieldQuery operations against the tags field.

  • length – One or more FieldQuery operations against the length field.

  • offset – One or more FieldQuery operations against the offset field.

  • doi – One or more FieldQuery operations against the doi field.

  • isbn – One or more FieldQuery operations against the isbn field.

  • issn – One or more FieldQuery operations against the issn field.

  • url – One or more FieldQuery operations against the url field.

  • title – One or more FieldQuery operations against the title field.

  • publisher – One or more FieldQuery operations against the publisher field.

  • journal – One or more FieldQuery operations against the journal field.

  • volume – One or more FieldQuery operations against the volume field.

  • issue – One or more FieldQuery operations against the issue field.

  • year – One or more FieldQuery operations against the year field.

  • figure – One or more DisplayItemQuery operations against the figure field.

  • table – One or more DisplayItemQuery operations against the table field.

  • pages – One or more PagesQuery operations against the pages field.

  • authors – One or more NameQuery operations against the authors field.

  • editors – One or more NameQuery operations against the editors field.

  • affiliations – One or more FieldQuery operations against the affiliations field.

  • acknowledgements – One or more FieldQuery operations against the acknowledgements field.

  • references – One or more ReferenceQuery operations against the references field.

  • query – One or more ReferenceQuery objects with nested queries.

acknowledgements
affiliations
authors
doi
editors
figure
isbn
issn
issue
journal
pages
publisher
query
references
table
title
url
volume
year

Source Query

class citrination_client.search.pif.query.core.source_query.SourceQuery(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, producer=None, url=None, query=None, **kwargs)

Bases: citrination_client.search.pif.query.core.base_object_query.BaseObjectQuery

Class to query against a PIF Source object.

__init__(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, producer=None, url=None, query=None, **kwargs)

Constructor.

Parameters
  • logic – Logic for this filter. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.

  • weight – Weight of the query.

  • simple – String with the simple query to run against all fields.

  • simple_weight – Dictionary of relative paths to their weights for simple queries.

  • extract_as – String with the alias to save this field under.

  • extract_all – Boolean setting whether all values in an array should be extracted.

  • extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).

  • tags – One or more FieldQuery operations against the tags field.

  • length – One or more FieldQuery operations against the length field.

  • offset – One or more FieldQuery operations against the offset field.

  • producer – One or more FieldQuery operations against the producer field.

  • url – One or more FieldQuery operations against the url field.

  • query – One or more SourceQuery objects with nested queries.

producer
query
url

Value Query

class citrination_client.search.pif.query.core.value_query.ValueQuery(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, name=None, value=None, file=None, units=None, query=None, **kwargs)

Bases: citrination_client.search.pif.query.core.base_object_query.BaseObjectQuery

Class to query against a single value.

__init__(logic=None, weight=None, simple=None, simple_weight=None, extract_as=None, extract_all=None, extract_when_missing=None, tags=None, length=None, offset=None, name=None, value=None, file=None, units=None, query=None, **kwargs)

Constructor.

Parameters
  • logic – Logic for this filter. Must be equal to one of “MUST”, “MUST_NOT”, “SHOULD”, or “OPTIONAL”.

  • weight – Weight of the query.

  • simple – String with the simple query to run against all fields.

  • simple_weight – Dictionary of relative paths to their weights for simple queries.

  • extract_as – String with the alias to save this field under.

  • extract_all – Boolean setting whether all values in an array should be extracted.

  • extract_when_missing – Any valid JSON-supported object or PIF object. This value is returned when a value is missing that should be extracted (and the overall query is still satisfied).

  • tags – One or more FieldQuery operations against the tags field.

  • length – One or more FieldQuery operations against the length field.

  • offset – One or more FieldQuery operations against the offset field.

  • name – One or more FieldQuery operations against the name field.

  • value – One or more FieldQuery operations against the value.

  • file – One or more FileReferenceQuery operations against the file.

  • units – One or more FieldQuery operations against the units field.

  • query – One or more ValueQuery objects with nested queries.

file
name
query
units
value