KItinerary::JsApi::JsonLd
#include <jsonld.h>
Additional Inherited Members | |
Public Types inherited from QObject | |
typedef | QObjectList |
Properties inherited from QObject | |
objectName | |
Static Public Member Functions inherited from QObject | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
Methods to create JSON-LD objects.
Definition at line 19 of file jsapi/jsonld.h.
Member Function Documentation
◆ apply()
- See also
- JsonLdDocument::apply.
Definition at line 364 of file jsapi/jsonld.cpp.
◆ busToTrainReservation()
Convert a bus reservation to a train reservation.
Definition at line 206 of file jsapi/jsonld.cpp.
◆ clone()
Clones the given JS object.
That is, create a deep copy of v
.
Definition at line 332 of file jsapi/jsonld.cpp.
◆ newBoatReservation()
QJSValue JsApi::JsonLd::newBoatReservation | ( | ) | const |
Convenience method that generates a full BoatReservation JS object.
This can be used by extractor scripts to fill in the extracted information.
Definition at line 182 of file jsapi/jsonld.cpp.
◆ newBusReservation()
QJSValue JsApi::JsonLd::newBusReservation | ( | ) | const |
Convenience method that generates a full BusReservation JS object.
This can be used by extractor scripts to fill in the extracted information.
Definition at line 98 of file jsapi/jsonld.cpp.
◆ newEventReservation()
QJSValue JsApi::JsonLd::newEventReservation | ( | ) | const |
Convenience method that generates a full EventReservation JS object.
This can be used by extractor scripts to fill in the extracted information.
Definition at line 133 of file jsapi/jsonld.cpp.
◆ newFlightReservation()
QJSValue JsApi::JsonLd::newFlightReservation | ( | ) | const |
Convenience method that generates a full FlightReservation JS object.
This can be used by extractor scripts to fill in the extracted information.
Definition at line 52 of file jsapi/jsonld.cpp.
◆ newFoodEstablishmentReservation()
QJSValue JsApi::JsonLd::newFoodEstablishmentReservation | ( | ) | const |
Convenience method that generates a full FoodEstablishmentReservation JS object.
This can be used by extractor scripts to fill in the extracted information.
Definition at line 151 of file jsapi/jsonld.cpp.
◆ newLodgingReservation()
QJSValue JsApi::JsonLd::newLodgingReservation | ( | ) | const |
Convenience method that generates a full LodgingReservation JS object.
This can be used by extractor scripts to fill in the extracted information.
Definition at line 121 of file jsapi/jsonld.cpp.
◆ newObject()
Create a new JSON-LD object of type typeName
.
Definition at line 33 of file jsapi/jsonld.cpp.
◆ newRentalCarReservation()
QJSValue JsApi::JsonLd::newRentalCarReservation | ( | ) | const |
Convenience method that generates a full RentalCarReservation JS object.
This can be used by extractor scripts to fill in the extracted information.
Definition at line 163 of file jsapi/jsonld.cpp.
◆ newTrainReservation()
QJSValue JsApi::JsonLd::newTrainReservation | ( | ) | const |
Convenience method that generates a full TrainReservation JS object.
This can be used by extractor scripts to fill in the extracted information.
Definition at line 74 of file jsapi/jsonld.cpp.
◆ readQDateTime()
Read a QDateTime property and return a JSON-LD serialization of it.
This is a workaround for JS destroying timezone information when getting in touch with a QDateTime object. With this method it is safe to read a QDateTime property e.g. from a Qt gadget or QObject without the risk of losing information.
- Parameters
-
obj The object to read from. propName The name of the property to read.
Definition at line 348 of file jsapi/jsonld.cpp.
◆ toDateTime()
QDateTime JsApi::JsonLd::toDateTime | ( | const QString & | dtStr, |
const QJSValue & | format, | ||
const QJSValue & | localeName ) const |
Convert a date/time string to a date/time value.
- Parameters
-
dtStr The input string containing a date/time value. format The format of the input string. Same format specification as used by QLocale and QDateTime. If the year is not part of the date it is attempted to be recovered from the context date set on the ExtractorEngine (that is, the returned date will be after the context date). Can be a string or an array of strings, which are then tried sequentially. localeName The locale in which the string is formatted. This is relevant when the input contains for example localized month names or month abbreviations. Can be a string or an array of strings.
Definition at line 293 of file jsapi/jsonld.cpp.
◆ toGeoCoordinates()
Parses geo coordinates from a given mapping service URLs.
This consumes for example Google Maps links and returns a JSON-LD GeoCoordinates object.
Definition at line 337 of file jsapi/jsonld.cpp.
◆ toJson()
Convert object v
to a JSON-LD object.
This is useful when interacting with API returning regular data types, such as Uic9183Parser.
Definition at line 321 of file jsapi/jsonld.cpp.
◆ trainToBusReservation()
Convert a train reservation to a bus reservation.
Definition at line 201 of file jsapi/jsonld.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 3 2025 11:50:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.