|
SimpleGraph
Represents an RDF graph and provides some simple functions for traversing and manipulating it.
Autogenerated note: this page is automatically generated from embedded documentation in the PHP source. OverviewConstructorsMethods
FieldsConstructor DetailSimpleGraphpublic SimpleGraph(mixed graph) Method Detailadd_graphpublic void add_graph(mixed g) Add the triples in the supplied graph to the current graph
add_jsonpublic void add_json(mixed json) Add the triples parsed from the supplied JSON to the graph
add_labelling_propertypublic void add_labelling_property(mixed p) add_literal_triplepublic void add_literal_triple(mixed s, mixed p, mixed o, mixed lang, mixed dt) Adds a triple with a literal object to the graph
add_rdfpublic void add_rdf(mixed rdf, mixed base) Add the triples parsed from the supplied RDF to the graph - let ARC guess the input
add_rdfxmlpublic void add_rdfxml(mixed rdfxml, mixed base) Add the triples parsed from the supplied RDF/XML to the graph
add_resource_triplepublic void add_resource_triple(mixed s, mixed p, mixed o) Adds a triple with a resource object to the graph
add_turtlepublic void add_turtle(mixed turtle, mixed base) Add the triples parsed from the supplied Turtle to the graph
diffpublic void diff() diff returns a simpleIndex consisting of all the statements in array1 that weren't found in any of the subsequent arrays
from_jsonpublic void from_json(mixed json) Replace the triples in the graph with those parsed from the supplied JSON
from_rdfxmlpublic void from_rdfxml(mixed rdfxml, mixed base) Replace the triples in the graph with those parsed from the supplied RDF/XML
from_turtlepublic void from_turtle(mixed turtle, mixed base) Replace the triples in the graph with those parsed from the supplied Turtle
get_descriptionpublic void get_description(mixed resource_uri) get_first_literalpublic void get_first_literal(mixed s, mixed p, mixed default, mixed preferred_language) Fetch the first literal value for a given subject and predicate. If there are multiple possible values then one is selected at random.
get_first_resourcepublic void get_first_resource(mixed s, mixed p, mixed default) Fetch the first resource value for a given subject and predicate. If there are multiple possible values then one is selected at random.
get_indexpublic void get_index() Get a copy of the graph's triple index get_labelpublic void get_label(mixed resource_uri, mixed capitalize, mixed use_qnames) get_literal_triple_valuespublic void get_literal_triple_values(mixed s, mixed p) Fetch the literal values for a given subject and predicate.
get_prefixpublic void get_prefix(mixed ns) get_resource_triple_valuespublic void get_resource_triple_values(mixed s, mixed p) Fetch the resource values for a given subject and predicate.
get_subject_propertiespublic void get_subject_properties(mixed s, mixed distinct) Fetch the properties of a given subject and predicate.
get_subject_property_valuespublic void get_subject_property_values(mixed s, mixed p) Fetch the values for a given subject and predicate.
get_subject_subgraphpublic void get_subject_subgraph(mixed s) Fetch a subgraph where all triples have given subject
get_subjectspublic void get_subjects() Fetch an array of all the subjects
get_subjects_of_typepublic void get_subjects_of_type(mixed t) Fetch an array of all the subject that have and rdf type that matches that given
get_subjects_where_literalpublic void get_subjects_where_literal(mixed p, mixed o) Fetch an array of all the subjects where the predicate and object match a ?s $p $o triple in the graph and the object is a literal value
get_subjects_where_resourcepublic void get_subjects_where_resource(mixed p, mixed o) Fetch an array of all the subjects where the predicate and object match a ?s $p $o triple in the graph and the object is a resource
get_triplespublic void get_triples()
has_literal_triplepublic void has_literal_triple(mixed s, mixed p, mixed o, mixed lang, mixed dt) Tests whether the graph contains the given triple
has_resource_triplepublic void has_resource_triple(mixed s, mixed p, mixed o) Tests whether the graph contains the given triple
has_triples_aboutpublic void has_triples_about(mixed s) Tests whether the graph contains a triple with the given subject
is_emptypublic void is_empty() Tests whether the graph contains any triples
make_resource_arraypublic void make_resource_array(mixed resource) Constructs an array containing the type of the resource and its value
mergepublic void merge() merge merges all rdf/json-style arrays passed as parameters
qname_to_uripublic void qname_to_uri(mixed qname) Convert a QName to a URI using registered namespace prefixes
reifypublic void reify(mixed resources, mixed nodeID_prefix) remove_all_triplespublic void remove_all_triples() Clears all triples out of the graph remove_literal_triplepublic void remove_literal_triple(mixed s, mixed p, mixed o) remove_property_valuespublic void remove_property_values(mixed s, mixed p) Removes all triples with the given subject and predicate
remove_resource_triplepublic void remove_resource_triple(mixed s, mixed p, mixed o) Remove a triple with a resource object from the graph
remove_triples_aboutpublic void remove_triples_about(mixed s) Remove all triples having the supplied subject
replace_resourcepublic void replace_resource(mixed look_for, mixed replace_with) set_namespace_mappingpublic void set_namespace_mapping(mixed prefix, mixed uri) Map a portion of a URI to a short prefix for use when serialising the graph
subject_has_propertypublic void subject_has_property(mixed s, mixed p) Tests whether the graph contains a triple with the given subject and predicate
to_htmlpublic void to_html(mixed s) Serialise the graph to HTML
to_jsonpublic void to_json() Serialise the graph to JSON
to_ntriplespublic void to_ntriples() Serialise the graph to N-Triples
to_rdfxmlpublic void to_rdfxml() Serialise the graph to RDF/XML
to_turtlepublic void to_turtle() Serialise the graph to Turtle
update_prefix_mappingspublic void update_prefix_mappings() uri_to_qnamepublic void uri_to_qname(mixed uri) Convert a URI to a QName using registered namespace prefixes
Field DetailGenerated by PHPDoctor 2RC2 | |