API

User/Developer guide to the public methods available in the package.

All non-private functions are available to use as utilities, but the functions listed here as API are explicitly the face of this package, here for other modules to use.

Constants

Namesort iconLocationDescription
STATEMENT_SEPARATORrelationship/relationship_api.incFor hashing shorthand statement indexesSee also_relationship_hash_key()

Functions

Namesort iconLocationDescription
relationship_array2statementsrelationship/relationship_api.incConvert an assoc array to a collection of statements about something.
relationship_flush_termsrelationship/relationship_api.incEmpties the terms cache.
relationship_get_aliasesrelationship/relationship.moduleReturn an array of aliases the current subject is known as.
relationship_get_assoc_columnrelationship/relationship_api.incReturn a named array, pairing the contents of column a as the key for the contents of column b.
relationship_get_columnrelationship/relationship_api.incReturn just the named column out of a collection of statements.
relationship_get_longnamerelationship/relationship_api.incGiven a shortname, retrieve the associated longname or uri.
relationship_get_object_titlerelationship/relationship.moduleLookup title for the object of this statement.
relationship_get_propertiesrelationship/relationship_api.incReturn all given values for a lookup of a relationship on a resource.
relationship_get_propertyrelationship/relationship_api.incReturns the object of a subject,predicate query, the value of a relationship on a resource.
relationship_get_property_maprelationship/relationship_api.incReturn the property map for a Drupal-defined content type.
relationship_get_resources_matching_queryrelationship/relationship_api.incIt's quite common we want to retrieve all data about all objects meeting a cetain condition
relationship_get_resource_by_namerelationship/relationship_api.incRetrieve all statements about a given identfier as a structured array.
relationship_get_shortnamerelationship/relationship_api.incReturn the local shortname of a term associated with a given URI.
relationship_get_statementrelationship/relationship_api.incReturn one statement matching a given RDF Query.
relationship_get_termrelationship/relationship_api.incReturn the term object matching a term identifier (usually its shortname).
relationship_get_termsrelationship/relationship_api.incReturn all available predicate terms, or a selected one of them.
relationship_guess_shortnamerelationship/relationship_api.incGiven a long namespace-qualified term URI, return what looks like the actual term. By way of string-munging, not lookups.
relationship_guess_shortnamerelationship/relationship_api.incGiven a long namespace-qualified term URI, return what looks like the actual term. By way of string-munging, not lookups.
relationship_queryrelationship/relationship_api.incAttempt to make a SPARQL-type query on the datastore.
relationship_resource_delete_statementsrelationship/relationship_api.incRemove associations of a resource (node) to its terms.
relationship_save_statementrelationship/relationship_api.incSave a given statement triple in the datastore.
relationship_setrelationship/relationship_api.incBasically a shorthand way to create and save a statement in one go. See alsorelationship_statement()
relationship_statementrelationship/relationship_api.incJust a helpful struct array constructor
relationship_statements2arrayrelationship/relationship_api.incGiven a load of statements, build a picture about the subject.
relationship_statements2arrayrelationship/relationship_api.incGiven a load of statements, build a picture about the subject.
relationship_update_resource_statementsrelationship/relationship_api.incSave the relationship associations (statements) of a given resource.
relationship_validate_statementrelationship/relationship_api.incCheck the given statement is ready to be stored.
_relationship_datastorerelationship/relationship_api.incReturn a handle on the datastore
_relationship_hash_keyrelationship/relationship_api.incGenerate a hash key to index the statements on.