Unit

Palantir Defense OSDK

[Palantir Defense Ontology] A Unit is a specific subset of Organization representing a force-structure element (carrying military service, echelon, SIDC, affiliation, and allegiance). A Unit extends Organization and can therefore participate in organization hierarchies and other organization behaviors.

Properties

Unit Identifierstringoptional

[Palantir Defense Ontology] A semantically meaningful identifier for the unit, such as a Unit Identification Code (UIC).

Military Serviceoptional

[Palantir Defense Ontology] Identifies the military branch of a friendly or enemy unit.

Echelonoptional

[Palantir Defense Ontology] Identifies the echelon of a unit, such as Brigade or Corps.

SIDCstringoptional

[Palantir Defense Ontology] A Symbol Identification Code is an alphanumeric identifier that uniquely identifies and displays a military symbol. Its format depends on the standard used, such as MIL-STD 2525C or MIL-STD 2525D.

Affiliationoptional

[Palantir Defense Ontology] Describes the affiliation of the unit, such as Friend or Hostile.

Allegiancestringoptional

[Palantir Defense Ontology] Captures the country of allegiance for the unit.

Extended interfaces

Unit Hierarchy Node Relationships (to Parents)·
One To Manyoptional

[Palantir Defense Ontology] A unit can link to many parent units via unit hierarchy node relationships.

Unit Hierarchy Node Relationships (to Children)·
One To Manyoptional

[Palantir Defense Ontology] A unit can link to many child units via unit hierarchy node relationships.

Unit Type·
One To Oneoptional

[Palantir Defense Ontology] A unit can have one unit type.

Operation·
One To Oneoptional

[Palantir Defense Ontology] The operations owned by this unit.

linkedOwnedFscm·
One To Manyoptional

[Palantir Defense Ontology] A unit can create/own many FSCMs

linkedCoordinatedFscm·
One To Manyoptional

[Palantir Defense Ontology] A unit may be responsible for the deconfliction of many FSCMs.

linkedExemptedFromFscm·
One To Manyoptional

[Palantir Defense Ontology] A unit may be exempt from many FSCM restrictions.

Target Engagement Authorities·
One To Manyoptional

[Palantir Defense Ontology] The target engagement authorities owned by this unit.

Units·
One To Manyoptional

[Palantir Defense Ontology] A unit type can link to many units.

Owning Unit·
One To Oneoptional

[Palantir Defense Ontology] The unit owning this operation.

Child Unit·
One To Oneoptional

[Palantir Defense Ontology] A unit hierarchy node relationship links to one child unit.

Parent Unit·
One To Oneoptional

[Palantir Defense Ontology] A unit hierarchy node relationship links to one parent unit.

linkedOwningUnit·
One To Oneoptional

[Palantir Defense Ontology] An FSCM must contain a link to the unit that created/owns this FSCM

linkedCoordinatingUnit·
One To Oneoptional

[Palantir Defense Ontology] An FSCM must contain a link to the unit responsible for the deconfliction of this FSCM

linkedExemptUnits·
One To Manyoptional

[Palantir Defense Ontology] An FSCM may contain many links to units exempt from their restrictions.

Owning Unit·
One To One

[Palantir Defense Ontology] The unit that owns and has authority over this target engagement authority.

OSDK Examples

TypeScript

Load Unit metadata

Copied!
1 2 3 4 5 6 7 8 import { com.palantir.ontology.defense-types.unit } from "@defense-ontology/sdk"; // Edit this import if your client location differs import { client } from "./client"; const interfaceTypeMetadata = await client.fetchMetadata(com.palantir.ontology.defense-types.unit); const implementingObjectTypes = interfaceTypeMetadata.implementedBy; const interfaceRid = interfaceTypeMetadata.rid;

Load all Unit

Copied!
1 2 3 4 5 6 7 8 9 10 11 import { com.palantir.ontology.defense-types.unit } from "@defense-ontology/sdk"; // Edit this import if your client location differs import { client } from "./client"; import type { Osdk } from "@osdk/client"; const interfaces: Osdk<com.palantir.ontology.defense-types.unit>[] = []; for await(const int of client(com.palantir.ontology.defense-types.unit).asyncIter()) { interfaces.push(int); } const interface1 = interfaces[0];

Filtering

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 import { com.palantir.ontology.defense-types.unit } from "@defense-ontology/sdk"; // Edit this import if your client location differs import { client } from "./client"; import { isOk, type Osdk, type PageResult, type Result } from "@osdk/client"; const page: Result<PageResult<Osdk<com.palantir.ontology.defense-types.unit>>> = await client(com.palantir.ontology.defense-types.unit) .where({ $and:[ { $not: { someProperty: { $isNull: true }}}, { someProperty: { $eq: "foo" }} ] }) .fetchPageWithErrors({ $pageSize: 30 }); if (isOk(page)) { const interfaces = page.value.data; const interface1 = interfaces[0]; }

Subscribe to object sets

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 import { com.palantir.ontology.defense-types.unit } from "@defense-ontology/sdk"; // Edit this import if your client location differs import { client } from "./client"; // A map of primary keys to objects loaded through the SDK const objects: { [key: string]: com.palantir.ontology.defense-types.unit.OsdkInstance } = ... const subscription = client(com.palantir.ontology.defense-types.unit).subscribe( { onChange(update) { if (update.state === "ADDED_OR_UPDATED") { // An object has received an update or an object was added to the object set const currentObject = objects[update.object.$primaryKey]; if (currentObject !== undefined) { currentObject["<propertyName>"] = update.object["<propertyName>"] ?? currentObject["<propertyName>"]; } } else if (update.state === "REMOVED") { // The object was removed from the object set, which could mean it was deleted or no longer meets the filter criteria delete objects[update.object.$primaryKey]; } }, onSuccessfulSubscription() { // The subscription was successful and you can expect to receive updates }, onError(err) { // There was an error with the subscription and you will not receive any more updates console.error(err); }, onOutOfDate() { // We could not keep track of all changes. Please reload the objects in your set. }, }, { properties: [ "unitIdentifier", "militaryService", "echelon", "sidc", "affiliation", "allegiance", ]} ); subscription.unsubscribe();

Load ordered Unit

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 import { com.palantir.ontology.defense-types.unit } from "@defense-ontology/sdk"; // Edit this import if your client location differs import { client } from "./client"; import { isOk, type Osdk, type PageResult, type Result } from "@osdk/client"; const page: Result<PageResult<Osdk<com.palantir.ontology.defense-types.unit>>> = await client(com.palantir.ontology.defense-types.unit) .fetchPageWithErrors({ $orderBy: {"someProperty": "asc"}, $pageSize: 30 }); if (isOk(page)) { const interfaces = page.value.data; const interface1 = interfaces[0]; }

Load pages of Unit

Copied!
1 2 3 4 5 6 7 8 9 10 11 import { com.palantir.ontology.defense-types.unit } from "@defense-ontology/sdk"; // Edit this import if your client location differs import { client } from "./client"; import { type Osdk, type PageResult, type Result } from "@osdk/client"; const response: Result<PageResult<Osdk<com.palantir.ontology.defense-types.unit>>> = await client(com.palantir.ontology.defense-types.unit).fetchPageWithErrors({ $pageSize: 30 }); // To fetch a page without a result wrapper, use fetchPage instead const responseNoErrorWrapper: PageResult<Osdk<com.palantir.ontology.defense-types.unit>> = await client(com.palantir.ontology.defense-types.unit).fetchPage({ $pageSize: 30 });