Facility

Palantir Defense Ontology

[Palantir Defense Ontology] Defines the shape of static military structures inclusive of all affiliations.

Properties

BE Number
string
optional

[Palantir Defense Ontology] Basic Encyclopedia Numbers are used to track individual military installations. They are alphanumeric, unique, unclassified, and can be shared over open telephone and computer networks when not associated with specific information about a given installation.

O-Suffix
string
optional

[Palantir Defense Ontology] A machine-generated alphanumeric identifier used to distinguish facilities within the same military installation.

Facility Name
string

[Palantir Defense Ontology] The name of the Facility.

Facility Location
geohash

[Palantir Defense Ontology] The simple location of the facility.

Facility HAE Elevation in Meters
double
optional

[Palantir Defense Ontology] The facility Height Above Ellipsoid (HAE) elevation in meters.

Facility HAE Linear Error in Meters
double
optional

[Palantir Defense Ontology] The facility Height Above Ellipsoid (HAE) error in meters.

Facility MSL Elevation in Meters
double
optional

[Palantir Defense Ontology] The facility Mean Sea Level (MSL) elevation in meters.

Facility MSL Linear Error in Meters
double
optional

[Palantir Defense Ontology] The facility Mean Seal Level (MSL) error in meters.

Facility Affiliation
string

[Palantir Defense Ontology] Defines the affiliation of a facility, such as HOSTILE or FRIENDLY.

Facility Allegiance
string

[Palantir Defense Ontology] Defines the country of allegiance of a facility.

Facility Operational Status
string

[Palantir Defense Ontology] Defines the operating status of an enemy or friendly facility.

Facility Function
string
optional

[Palantir Defense Ontology] Describes the function of the facility.

SIDC
string
optional

[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.

Code snippets

TypeScript

Load Facility metadata

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

Load ordered Facility

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 import { com.palantir.defense.ontology.FacilityV2 } from "@osdk/defense-ontology"; // 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.defense.ontology.FacilityV2>>> = await client(com.palantir.defense.ontology.FacilityV2) .fetchPageWithErrors({ $orderBy: {"someProperty": "asc"}, $pageSize: 30 }); if (isOk(page)) { const interfaces = page.value.data; const interface1 = interfaces[0]; }

Load pages of Facility

Copied!
1 2 3 4 5 6 7 8 9 10 11 import { com.palantir.defense.ontology.FacilityV2 } from "@osdk/defense-ontology"; // 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.defense.ontology.FacilityV2>>> = await client(com.palantir.defense.ontology.FacilityV2).fetchPageWithErrors({ $pageSize: 30 }); // To fetch a page without a result wrapper, use fetchPage instead const responseNoErrorWrapper: PageResult<Osdk<com.palantir.defense.ontology.FacilityV2>> = await client(com.palantir.defense.ontology.FacilityV2).fetchPage({ $pageSize: 30 });

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.defense.ontology.FacilityV2 } from "@osdk/defense-ontology"; // 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.defense.ontology.FacilityV2>>> = await client(com.palantir.defense.ontology.FacilityV2) .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.defense.ontology.FacilityV2 } from "@osdk/defense-ontology"; // 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.defense.ontology.FacilityV2.OsdkInstance } = ... const subscription = client(com.palantir.defense.ontology.FacilityV2).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: [ "com.palantir.defense.ontology.beNumber", "com.palantir.defense.ontology.oSuffix", "com.palantir.defense.ontology.facilityName", "com.palantir.defense.ontology.facilityLocation", "com.palantir.defense.ontology.facilityHaeElevation", "com.palantir.defense.ontology.facilityHaeLinearError", "com.palantir.defense.ontology.facilityMslElevation", "com.palantir.defense.ontology.facilityMslLinearError", "com.palantir.defense.ontology.facilityAffiliation", "com.palantir.defense.ontology.facilityAllegiance", "com.palantir.defense.ontology.facilityOperationalStatus", "com.palantir.defense.ontology.facilityFunction", "com.palantir.defense.ontology.sidc", ]} ); subscription.unsubscribe();

Load all Facility

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