cancel
Showing results for 
Search instead for 
Did you mean: 

A little confussed with Node, node and Reference

jtorres
Champ in-the-making
Champ in-the-making
Hi people:

I've recently started to develop with Alfresco using Web Services, and I'm a little confused with the datatypes.

Node -> Contains a Reference
Reference -> Has en UUID
ResultSet -> ResultSetRows -> Contains nodes (without uppercase)
node -> Constains a UUID

What is the relationship betwen Node and node?

Supose I've a folder with an UUID = cb3918cb-7951-11db-b498-95a3b8925574. I execute a query to obtain that Node:

——————————————————————————
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();

Node myNode = null;
Reference reference = new Reference(STORE, uuid, null);
Predicate predicate = new Predicate(new Reference[]{reference}, null, null);
Node[] nodes = repositoryService.get(predicate);

// Get the node
myNode = nodes[0];
——————————————————————————
Obviously myNode.getReference().getId() = cb3918cb-7951-11db-b498-95a3b8925574


If I execute a general query I obtain a ResulSet, with ResultSetRows, and that with nodes. Is supossed to exist a node with UUID = cb3918cb-7951-11db-b498-95a3b8925574?

That is, what is the relationship betwen first Node and second node?

Thanks a lot people.
3 REPLIES 3

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

There is only one node type defined in the web service API.


<xsd:complexType name="Node">
       <xsd:sequence>
          <xsd:element name="reference" type="cms:Reference"></xsd:element>
          <xsd:group ref="cms:AnonymousType"/>
          <xsd:element name="properties" type="cms:NamedValue" minOccurs="0" maxOccurs="unbounded"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>

A node is essentially a reference with property and type information.  It could be considered to be a resolved reference.

Hope this helps,
Roy

ribz33
Champ on-the-rise
Champ on-the-rise
This is a very helpful link when you do Web Services…

http://wiki.alfresco.com/wiki/Web_Service_Data_Types

jtorres
Champ in-the-making
Champ in-the-making
This is a very helpful link when you do Web Services…

http://wiki.alfresco.com/wiki/Web_Service_Data_Types

Yes, but if you see the ResulSet schema it contains:

- ResulSetRows-> this node doesn't have the same atributes that the usual Node.
- Size
- Metadata

Perhaps I'm a little confused.

P.D.: I've revised the types and I understand it. Thanks for your help guys  :wink: