From what I can tell, "NodeType" would be an attribute of a "Node". However it is not clear what the relationship between a "Node" and a "NodeLinkage" is. I suspect this NodeLinkage is really just a way of dealing with the relationship between objects during serialization/deserialization (in case those words haven't been explained to you yet, serialization is the process of taking a set of objects in memory and persisting them to files and/or databases; deserialization is creating a set of objects from files and/or databases).
Objects in memory ("object instances") will have references to other objects; for example, your "Node" might have only a single NodeType, or it might have multiple NodeTypes. Either way, as far as your instance of a Node is concerned, NodeType (or NodeTypes) is simply a reference to another object. It doesn't matter if one or a hundred nodes all share the same node type; they will all point to the same NodeType instance -- you won't have a hundred nodes with a hundred NodeType instances.
However, when the time comes to serialize, to avoid duplicating a bunch of NodeType entries, you will want to be able to abstract a NodeType with an identifier (you will often see this called an Identity property). Before we get to the solution, let's take a look at our class structures and how they would serialize:
public class NodeManager
{
public List<Node> Nodes { get; set; }
}
public class Node
{
public string Name { get; set; }
public List<NodeType> NodeTypes{ get; set; }
public int Length { get; set; }
public int XCoordinate { get; set; }
public int YCoordinate { get; set; }
}
public class NodeType
{
public string Name { get; set; }
public string SomeOtherNodeTypeProperty { get; set; }
public string YetAnotherNodeTypeProperty { get; set; }
}
In this object model, the NodeManager class serves as your in-memory repository for all of the Nodes that have been instantiated. This is the class you will serialize from, or deserialize to. It contains a collection of Nodes, and nothing else. In a more detailed model, it will probably contain methods to create, add, delete and query the Node collection in useful ways, but for the purposes of discussing ser/deser this is enough.
As you can see, a Node object can have multiple types. If we were to create ten thousand Nodes in memory, each with a few types, we would have a massive duplication of the NodeType XML nodes in the written file, because the serializer has no way to abstract a NodeType instance into a reference to a NodeType. Our XML file will look something like this (not precisely like this; I did this by hand):
<?xml version="1.0" encoding="utf-8"?>
<Nodes>
<Node>
<Name>Foo</Name>
<Length>5</Length>
<XCoordinate>24</XCoordinate>
<YCoordinate>36</YCoordinate>
<NodeTypes>
<NodeType>
<Name>Type 1</Name>
<SomeOtherNodeTypeProperty>Blah</SomeOtherNodeTypeProperty>
<YetAnotherNodeTypeProperty>Meh</YetAnotherNodeTypeProperty>
</NodeType>
<NodeType>
<Name>Type 2</Name>
<SomeOtherNodeTypeProperty>Foo</SomeOtherNodeTypeProperty>
<YetAnotherNodeTypeProperty>Bar</YetAnotherNodeTypeProperty>
</NodeType>
<NodeType>
<Name>Type 3</Name>
<SomeOtherNodeTypeProperty>Fizz</SomeOtherNodeTypeProperty>
<YetAnotherNodeTypeProperty>Buzz</YetAnotherNodeTypeProperty>
</NodeType>
</NodeTypes>
</Node>
<Name>Bar</Name>
<Length>15</Length>
<XCoordinate>224</XCoordinate>
<YCoordinate>336</YCoordinate>
<NodeTypes>
<NodeType>
<Name>Type 1</Name>
<SomeOtherNodeTypeProperty>Blah</SomeOtherNodeTypeProperty>
<YetAnotherNodeTypeProperty>Meh</YetAnotherNodeTypeProperty>
</NodeType>
<NodeType>
<Name>Type 2</Name>
<SomeOtherNodeTypeProperty>Foo</SomeOtherNodeTypeProperty>
<YetAnotherNodeTypeProperty>Bar</YetAnotherNodeTypeProperty>
</NodeType>
<NodeType>
<Name>Type 3</Name>
<SomeOtherNodeTypeProperty>Fizz</SomeOtherNodeTypeProperty>
<YetAnotherNodeTypeProperty>Buzz</YetAnotherNodeTypeProperty>
</NodeType>
</NodeTypes>
</Node>
</Nodes>
Notice how the two nodes each support 3 Node types, and they are complete duplicates of each other. To avoid this we can add a NodeTypeID property. This is simply a value that is guarenteed to be unique across all NodeType instances. When we have that, instead of having to write out an entire NodeType, we can just write it's ID, and from the ID we can get to the rest of the information about a NodeType. Let's add a new property to our NodeType :
public class NodeType
{
public int NodeTypeId { get; set; }
public string Name { get; set; }
public string SomeOtherNodeTypeProperty { get; set; }
public string YetAnotherNodeTypeProperty { get; set; }
}
Now that there is a NodeTypeID property when we serialize our nodes, it looks a lot cleaner:
<?xml version="1.0" encoding="utf-8"?>
<NodeRoot>
<Nodes>
<Node>
<Name>Foo</Name>
<Length>5</Length>
<XCoordinate>24</XCoordinate>
<YCoordinate>36</YCoordinate>
<NodeTypes>
<NodeType NodeTypeId="1"/>
<NodeType NodeTypeId="2"/>
<NodeType NodeTypeId="3"/>
</NodeTypes>
</Node>
<Node>
<Name>Bar</Name>
<Length>15</Length>
<XCoordinate>224</XCoordinate>
<YCoordinate>336</YCoordinate>
<NodeTypes>
<NodeType NodeTypeId="1"/>
<NodeType NodeTypeId="2"/>
<NodeType NodeTypeId="3"/>
</NodeTypes>
</Node>
</Nodes>
<NodeTypes>
<NodeType>
<Name>Type 1</Name>
<SomeOtherNodeTypeProperty>Blah</SomeOtherNodeTypeProperty>
<YetAnotherNodeTypeProperty>Meh</YetAnotherNodeTypeProperty>
</NodeType>
<NodeType>
<Name>Type 2</Name>
<SomeOtherNodeTypeProperty>Foo</SomeOtherNodeTypeProperty>
<YetAnotherNodeTypeProperty>Bar</YetAnotherNodeTypeProperty>
</NodeType>
<NodeType>
<Name>Type 3</Name>
<SomeOtherNodeTypeProperty>Fizz</SomeOtherNodeTypeProperty>
<YetAnotherNodeTypeProperty>Buzz</YetAnotherNodeTypeProperty>
</NodeType>
</NodeTypes>
</NodeRoot>
This is getting pretty long so I'll wrap it here; hopefully I've given you the direction you're looking for.