Python OJAI Client API
|
Public Member Functions | |
def | set_id (self, _id) |
def | get_id (self) |
def | size (self) |
def | empty (self) |
def | set (self, field_path, value) |
def | delete (self, field_path) |
def | get_str (self, field_path) |
def | get_boolean (self, field_path) |
def | get_int (self, field_path) |
def | get_long (self, field_path) |
def | get_float (self, field_path) |
def | get_time (self, field_path) |
def | get_date (self, field_path) |
def | get_timestamp (self, field_path) |
def | get_binary (self, field_path) |
def | get_interval (self, field_path) |
def | get_dictionary (self, field_path) |
def | get_list (self, field_path) |
def | as_dictionary (self) |
Abstract class of OJAI Document, which describe all supported functional
def ojai.Document.Document.as_dictionary | ( | self | ) |
Representing the Document into dictionary :return a new dictionary representing the Document
def ojai.Document.Document.delete | ( | self, | |
field_path | |||
) |
Deletes the value at the specified FieldPath if it exists. :param field_path: the FieldPath to delete from the document. Type may be FieldPath, str. :return document itself
def ojai.Document.Document.empty | ( | self | ) |
Removed all of the entries from the document
def ojai.Document.Document.get_binary | ( | self, | |
field_path | |||
) |
Returns the value at the specified fieldPath. :param field_path: the path to get from the document. Type may be FieldPath, str. :return value at the specified field_path as bytearray
def ojai.Document.Document.get_boolean | ( | self, | |
field_path | |||
) |
Returns the value at the specified fieldPath. :param field_path: the path to get from the document. Type may be FieldPath, str. :return value at the specified field_path as bool
def ojai.Document.Document.get_date | ( | self, | |
field_path | |||
) |
Returns the value at the specified fieldPath. :param field_path: the path to get from the document. Type may be FieldPath, str. :return value at the specified field_path as ODate
def ojai.Document.Document.get_dictionary | ( | self, | |
field_path | |||
) |
Returns the value at the specified fieldPath. :param field_path: the path to get from the document. Type may be FieldPath, str. :return value at the specified field_path as dictionary
def ojai.Document.Document.get_float | ( | self, | |
field_path | |||
) |
Returns the value at the specified fieldPath. :param field_path: the path to get from the document. Type may be FieldPath, str. :return value at the specified field_path as float
def ojai.Document.Document.get_id | ( | self | ) |
Method returns _id field of the Document
def ojai.Document.Document.get_int | ( | self, | |
field_path | |||
) |
Returns the value at the specified fieldPath. :param field_path: the path to get from the document. Type may be FieldPath, str. :return value at the specified field_path as int
def ojai.Document.Document.get_interval | ( | self, | |
field_path | |||
) |
Returns the value at the specified fieldPath. :param field_path: the path to get from the document. Type may be FieldPath, str. :return value at the specified field_path as OInterval
def ojai.Document.Document.get_list | ( | self, | |
field_path | |||
) |
Returns the value at the specified fieldPath. :param field_path: the path to get from the document. Type may be FieldPath, str. :return value at the specified field_path as list
def ojai.Document.Document.get_long | ( | self, | |
field_path | |||
) |
Returns the value at the specified fieldPath. :param field_path: the path to get from the document. Type may be FieldPath, str. :return value at the specified field_path as long
def ojai.Document.Document.get_str | ( | self, | |
field_path | |||
) |
Returns the value at the specified fieldPath. :param field_path: the path to get from the document. Type may be FieldPath, str. :return value at the specified field_path as str
def ojai.Document.Document.get_time | ( | self, | |
field_path | |||
) |
Returns the value at the specified fieldPath. :param field_path: the path to get from the document. Type may be FieldPath, str. :return value at the specified field_path as OTime
def ojai.Document.Document.get_timestamp | ( | self, | |
field_path | |||
) |
Returns the value at the specified fieldPath. :param field_path: the path to get from the document. Type may be FieldPath, str. :return value at the specified field_path as OTimestamp
def ojai.Document.Document.set | ( | self, | |
field_path, | |||
value | |||
) |
Sets the value of the specified fieldPath in this Document to the specified String. :param field_path: the FieldPath to set. Type may be str and FieldPath. :param value: the value. Type may be bool, byte, long, float, OTime, ODate, OTimestamp, OInterval, bytearray, dictionary, Document, Value, list, None. :return document itself
def ojai.Document.Document.set_id | ( | self, | |
_id | |||
) |
Sets the the "_id" field of this Document to the specified Value. :param _id: The value of _id field. Type may be str, Value, bytearray
def ojai.Document.Document.size | ( | self | ) |
:return the number of top level entries in the document