Company Data Type

The Company data type is the first of the network components in the network model. In terms of its functionality, it is truly just a data container. It defines ownership over network components at the company level. It has only the properties required by the INetworkDescribable interface and its children Divisions. These properties are outlined in the following table.

Company Property/Attribute Table
Property Name Xml Name Type Description
UniqueId Uid Guid A statistically unique identifier for the instance of the Company data type. Lazily instantiated.
InternalID ID Integer A non-zero, positive, integer, unique identifier for the instance of the Company data type.
Number Number Integer A non-zero, positive integer non-unique descriptor for the instance of the Company data type.
Acronym Acronym String An uppercase, non-unique acronym descriptor for the instance of the Company data type.
Name Name String A non-unique name descriptor for the instance of the Company data type.
Description Description String A non-unique description for the instance of the Company data type.
Divisions Divisions List<Division> The children Divisions of the instance of the Company. See Division Data Type Section.

The following snippet of Xml shows how a Company object is represented in Xml.

<Company Uid="7c5740b2-0299-4035-96f1-6d7ec156b83e" ID="1" Number="5" Acronym="PWR" Name="The Power Company" Description="The Power Company generates, transmits, and distributes  electricity.">
	<Divisions />
</Company>

And this snippet of C# code similar shows how to accomplish the same thing programmatically.

using SynchrophasorAnalytics.Modeling; 

// Create a new company with desired properties
Company company = new Company()
{
     InternalID = 1,
     Number = 5,
     Acronym = "PWR",
     Name = "The Power Company",
     Description = "The Power Company generates, transmits, and distributes electricity.",
     Divisions = GetChildrenDivisionsFromSomewhere()
};

To add a new Company to the Model using the Network Model Editor, right-click on the Model item and click Add.

NME - Add New Company.png

Then, this snapshot shows how to model a Company how it is reflected in the sample Xml and C# code snippets above.

NME - Company Detail.png

Last edited Sep 15, 2014 at 12:16 AM by kevinjones, version 2