Copyright © 2009 Marc Worrell Date: 2009-04-09 Copyright 2009 Marc Worrell Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Behaviours: gen_model.
Authors: Marc Worrell (marc@worrell.nl).
delete/2 | Delete an edge by Id. |
delete/4 | Delete an edge by subject, object and predicate id. |
delete_multiple/4 | Delete multiple edges between the subject and the object. |
duplicate/3 | Duplicate all edges from one id to another id. |
get/2 | Get the complete edge with the id. |
get_edges/2 | Return the full description of all edges from a subject, grouped by predicate. |
get_id/4 | Get the edge id of a subject/pred/object combination. |
get_triple/2 | Get the edge as a triple {subject_id, predicate, object_id}. |
insert/4 | |
m_find_value/3 | Fetch all object/edge ids for a subject/predicate. |
m_to_list/2 | Transform a m_config value to a list, used for template loops. |
m_value/2 | Transform a model value so that it can be formatted or piped through filters. |
object/4 | Return the Nth object with a certaing predicate of a subject. |
object_edge_ids/3 | Return all object ids with the edge id for a predicate/subject_id. |
object_predicate_ids/2 | Return the list of predicate ids in use by edges to objects from the id. |
object_predicates/2 | Return the list of predicates in use by edges to objects from the id. |
objects/2 | Return all object ids of the resource. |
objects/3 | Return all object ids of an id with a certain predicate. |
subject/4 | Return the Nth subject with a certaing predicate of an object. |
subject_edge_ids/3 | Return all subject ids with the edge id for a predicate/object_id. |
subject_predicate_ids/2 | Return the list of predicates is use by edges from subjects to the id. |
subject_predicates/2 | Return the list of predicates is use by edges from subjects to the id. |
subjects/2 | Return all subject ids of the resource. |
subjects/3 | Return all subject ids of an object id with a certain predicate. |
update_nth/5 | Update the nth edge of a subject. |
update_sequence/4 | Reorder the edges so that the mentioned ids are in front, in the listed order. |
update_sequence_edge_ids/4 | Update the sequence for the given edge ids. |
delete(Id, Context) -> any()
Delete an edge by Id
delete(SubjectId, Pred, ObjectId, Context) -> any()
Delete an edge by subject, object and predicate id
delete_multiple(SubjectId, Preds, ObjectId, Context) -> any()
Delete multiple edges between the subject and the object
duplicate(Id, ToId, Context) -> any()
Duplicate all edges from one id to another id. Skip all edges that give ACL errors.
get(Id, Context) -> any()
Get the complete edge with the id
get_edges(SubjectId, Context) -> any()
Return the full description of all edges from a subject, grouped by predicate
get_id(SubjectId, Pred, ObjectId, Context) -> any()
Get the edge id of a subject/pred/object combination
get_triple(Id, Context) -> any()
Get the edge as a triple {subject_id, predicate, object_id}
insert(SubjectId, PredId, ObjectId, Context) -> any()
m_find_value(Key, M::Source, Context) -> term()
Fetch all object/edge ids for a subject/predicate
m_to_list(M::Source, Context) -> List
Transform a m_config value to a list, used for template loops
m_value(M::Source, Context) -> term()
Transform a model value so that it can be formatted or piped through filters
object(Id, Pred, N, Context) -> any()
Return the Nth object with a certaing predicate of a subject.
object_edge_ids(Id, Predicate, Context) -> list()
Return all object ids with the edge id for a predicate/subject_id
object_predicate_ids(Id, Context) -> List
Return the list of predicate ids in use by edges to objects from the id
object_predicates(Id, Context) -> List
Return the list of predicates in use by edges to objects from the id
objects(Id, Context) -> list()
Return all object ids of the resource
objects(Id, Pred, Context) -> List
Return all object ids of an id with a certain predicate. The order of the ids is deterministic.
subject(Id, Pred, N, Context) -> any()
Return the Nth subject with a certaing predicate of an object.
subject_edge_ids(Id, Predicate, Context) -> list()
Return all subject ids with the edge id for a predicate/object_id
subject_predicate_ids(Id, Context) -> List
Return the list of predicates is use by edges from subjects to the id
subject_predicates(Id, Context) -> List
Return the list of predicates is use by edges from subjects to the id
subjects(Id, Context) -> list()
Return all subject ids of the resource
subjects(Id, Pred, Context) -> List
Return all subject ids of an object id with a certain predicate. The order of the ids is deterministic.
update_nth(SubjectId::int(), Predicate, Nth::int(), ObjectId, Context) -> {ok, EdgeId} | {error, Reason}
Update the nth edge of a subject. Set a new object, keep the predicate. When there are not enough edges then an error is returned. The first edge is nr 1.
update_sequence(Id, Pred::Predicate, ObjectIds, Context) -> ok | {error, Reason}
Reorder the edges so that the mentioned ids are in front, in the listed order.
update_sequence_edge_ids(Id, Pred::Predicate, EdgeIds, Context) -> ok | {error, Reason}
Update the sequence for the given edge ids. Optionally rename the predicate on the edge.
Generated by EDoc, Feb 25 2011, 21:14:42.