7d40cf95bf
- FastAPI Identify API (port 8081) - Neo4j propertygraf (64 noder, 80 kanter) - Ingest-pipeline (Python) - Byggscript + integrationstester - Docker Compose setup
226 lines
7.8 KiB
JSON
226 lines
7.8 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://landvex.io/schema/lvx-objekt-schema-v1.json",
|
|
"title": "Landvex Infrastructure Object Library — objektpost v1",
|
|
"description": "Utbytesformat för objektklasser och produktmodeller. I grafen bryts posten ner till enskilda fakta med källa, konfidens och bitemporal giltighet.",
|
|
"type": "object",
|
|
"required": ["lvx_id", "posttyp", "namn", "doman", "proveniens"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"lvx_id": {
|
|
"type": "string",
|
|
"pattern": "^LVX-(TRP|ELN|VAT|TEL|BYG|PRK|JVG|HMN|FLG)-[0-9]{4}$|^LVX-P-[0-9]{7}$",
|
|
"description": "Permanent identitet. Objektklass: LVX-{DOMÄN}-NNNN. Produktmodell: LVX-P-NNNNNNN. Ändras aldrig."
|
|
},
|
|
"posttyp": {
|
|
"enum": ["objektklass", "produktmodell"]
|
|
},
|
|
"slug": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9-]+$"
|
|
},
|
|
"namn": {
|
|
"type": "object",
|
|
"required": ["sv", "en"],
|
|
"properties": {
|
|
"sv": { "type": "string" },
|
|
"en": { "type": "string" }
|
|
},
|
|
"additionalProperties": { "type": "string" },
|
|
"description": "Ytterligare språk läggs till som ISO 639-1-nycklar."
|
|
},
|
|
"doman": {
|
|
"enum": ["TRP", "ELN", "VAT", "TEL", "BYG", "PRK", "JVG", "HMN", "FLG"]
|
|
},
|
|
"parent": {
|
|
"type": "string",
|
|
"description": "LVX-ID för överordnad klass. Obligatorisk för produktmodeller."
|
|
},
|
|
"tier": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 3
|
|
},
|
|
"identitet": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"tillverkare": { "type": "string" },
|
|
"exempel_tillverkare": {
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"description": "På klassnivå: ledande tillverkare per marknad."
|
|
},
|
|
"produktfamilj": { "type": "string" },
|
|
"modell": { "type": "string" },
|
|
"revision": { "type": "string" },
|
|
"generation": { "type": "string" },
|
|
"artikelnummer": { "type": "array", "items": { "type": "string" } },
|
|
"produktionsperiod": {
|
|
"type": "object",
|
|
"properties": {
|
|
"fran": { "type": "string" },
|
|
"till": { "type": "string" }
|
|
}
|
|
},
|
|
"status": { "enum": ["aktiv", "utgangen", "ersatt", "aterkallad", "forbjuden", "okand"] },
|
|
"certifieringar": { "type": "array", "items": { "type": "string" } }
|
|
}
|
|
},
|
|
"teknik": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"dimensioner": { "type": "string" },
|
|
"material": { "type": "array", "items": { "type": "string" } },
|
|
"vikt_kg": { "type": "number" },
|
|
"montering": { "type": "string" },
|
|
"livslangd_ar": { "type": "string" },
|
|
"ip_klass": { "type": "string" },
|
|
"belastningsklass": { "type": "string" },
|
|
"temperaturomrade": { "type": "string" },
|
|
"korrosionsklass": { "type": "string" },
|
|
"ovrigt": { "type": "object" }
|
|
}
|
|
},
|
|
"historik": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"introducerad": { "type": "string" },
|
|
"utfasad": { "type": "string" },
|
|
"revisioner": { "type": "array", "items": { "type": "string" } },
|
|
"ersatter": { "type": "array", "items": { "type": "string" } },
|
|
"ersatts_av": { "type": "array", "items": { "type": "string" } }
|
|
}
|
|
},
|
|
"geografi": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"lander": { "type": "array", "items": { "type": "string" } },
|
|
"regioner": { "type": "array", "items": { "type": "string" } },
|
|
"miljotyper": {
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"description": "T.ex. motorväg, stadsgata, landsbygd, park, industri, hamn, flygplats."
|
|
}
|
|
}
|
|
},
|
|
"standarder": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["beteckning"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"organ": { "type": "string" },
|
|
"beteckning": { "type": "string" },
|
|
"titel": { "type": "string" },
|
|
"roll": { "type": "string", "description": "Vad standarden styr för klassen." },
|
|
"marknad": { "type": "string" }
|
|
}
|
|
},
|
|
"description": "Endast referens: beteckning och metadata. Aldrig standardinnehåll."
|
|
},
|
|
"ai": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"kannetecken": { "type": "array", "items": { "type": "string" } },
|
|
"sarskiljande_detaljer": { "type": "array", "items": { "type": "string" } },
|
|
"forvaxlingsrisker": { "type": "array", "items": { "type": "string" } },
|
|
"kameravinklar": { "type": "array", "items": { "type": "string" } },
|
|
"ocr": {
|
|
"type": "object",
|
|
"properties": {
|
|
"typskylt_position": { "type": "string" },
|
|
"falt": { "type": "array", "items": { "type": "string" } }
|
|
}
|
|
},
|
|
"konfidenskrav": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
}
|
|
},
|
|
"problem": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["typ", "beskrivning", "kalla"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"typ": { "type": "string" },
|
|
"beskrivning": { "type": "string" },
|
|
"typisk_alder_ar": { "type": "string" },
|
|
"kalla": {
|
|
"type": "string",
|
|
"description": "Obligatorisk. Återkallelse, servicebulletin eller verifierad fältobservation."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"dokumentation": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["typ", "titel"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"typ": {
|
|
"enum": ["datablad", "manual", "serviceanvisning", "katalog", "standardreferens", "myndighetsdokument", "patent", "sakerhetsblad", "aterkallelse", "ovrigt"]
|
|
},
|
|
"titel": { "type": "string" },
|
|
"utgivare": { "type": "string" },
|
|
"url": { "type": "string" },
|
|
"datum": { "type": "string" },
|
|
"licensstatus": {
|
|
"enum": ["public_domain", "oppen_licens", "tillverkarpublik", "referens_endast", "okand"]
|
|
}
|
|
}
|
|
},
|
|
"description": "Metadata och länkar — aldrig kopierat innehåll."
|
|
},
|
|
"relationer": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["predikat", "mal"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"predikat": {
|
|
"enum": ["monteras_pa", "star_pa", "ansluts_med", "matas_fran", "ingar_i", "del_av", "ersatter", "ersatts_av", "kompatibel_med", "forvaxlas_med", "tillverkas_av", "foljer_standard", "variant_av"]
|
|
},
|
|
"mal": {
|
|
"type": "string",
|
|
"description": "LVX-ID när det finns, annars beskrivande platshållare tills ID tilldelats."
|
|
},
|
|
"beskrivning": { "type": "string" }
|
|
}
|
|
}
|
|
},
|
|
"proveniens": {
|
|
"type": "object",
|
|
"required": ["skapad", "verifieringsniva"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"skapad": { "type": "string" },
|
|
"uppdaterad": { "type": "string" },
|
|
"kallor": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"titel": { "type": "string" },
|
|
"url": { "type": "string" },
|
|
"hamtad": { "type": "string" }
|
|
}
|
|
}
|
|
},
|
|
"konfidens": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
"verifieringsniva": {
|
|
"enum": ["obekraftad", "kallbelagd", "faltverifierad", "tillverkarbekraftad"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|