Platform Explorer / Nuxeo Platform LTS 2015 7.10

Operation Document.AddRelation

Create Relation

Description

Create a relation between 2 documents. The subject of the relation will be the input of the operation and the object of the relation will be retrieved from the context using the 'object' field. The 'predicate' field specifies the relation predicate (When using a known predicate, use the full URL like 'purl.org/dc/terms/IsBasedOn', unknown predicates will be treated as plain strings and be the same on the subject and object). The 'outgoing' flag indicates the direction of the relation - the default is false which means the relation will go from the input object to the object specified as 'object' parameter. Return back the subject document.
Operation id Document.AddRelation
AliasesRelations.CreateRelation
Category Services
Label Create Relation
Requires
Since

Parameters

Name Description Type Required Default value
object document yes  
predicate string yes  
outgoing boolean no false 

Signature

Inputs document, documents
Outputs document, documents

Implementation information

Implementation class org.nuxeo.ecm.automation.core.operations.services.CreateRelation
Contributing component org.nuxeo.ecm.core.automation.featuresContrib

JSON definition

{
  "id" : "Document.AddRelation",
  "aliases" : [ "Relations.CreateRelation" ],
  "label" : "Create Relation",
  "category" : "Services",
  "requires" : null,
  "description" : "Create a relation between 2 documents. The subject of the relation will be the input of the operation and the object of the relation will be retrieved from the context using the 'object' field. The 'predicate' field specifies the relation predicate (When using a known predicate, use the full URL like 'http://purl.org/dc/terms/IsBasedOn', unknown predicates will be treated as plain strings and be the same on the subject and object). The 'outgoing' flag indicates the direction of the relation - the default is false which means the relation will go from the input object to the object specified as 'object' parameter. Return back the subject document.",
  "url" : "Document.AddRelation",
  "signature" : [ "document", "document", "documents", "documents" ],
  "params" : [ {
    "name" : "object",
    "description" : "",
    "type" : "document",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "predicate",
    "description" : "",
    "type" : "string",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "outgoing",
    "description" : "",
    "type" : "boolean",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "false" ]
  } ]
}