Skip to main content

Module util

Module util 

Source
Expand description

Portable presentation/util helpers (Protégé Wave 3 ports).

Behavioral ports of StringAbbreviator, ISO8601Formatter, LiteralLexicalValueReplacer, MarkdownRenderer, and AnnotationPropertyComparator default ordering.

Keep the annotation-property order in sync with extension/webview-ui/src/utils/annotationOrder.ts.

Structs§

LexicalLiteral
Result of a lexical value replacement (lang XOR datatype preserved).

Constants§

DEFAULT_ANNOTATION_PROPERTY_ORDER
Default annotation-property IRI ordering (Protégé AnnotationPropertyComparator).
ELLIPSIS
Protégé StringAbbreviator.ELLIPSIS (U+2026).

Functions§

abbreviate_string
Abbreviate s to at most max_len characters, appending an ellipsis when truncated.
cmp_annotation_property_iri
Compare annotation-property IRIs using the Protégé default ordering. Unknown IRIs sort after known ones, then lexicographically.
format_iso8601_utc
Format a UTC datetime as yyyy-MM-dd'T'HH:mm:ss'Z' (Protégé ISO8601Formatter).
render_entity_markdown
Markdown entity link: [unescaped display](iri) (Protégé MarkdownRenderer).
replace_lexical_value
Replace the lexical form via regex, preserving language tag or datatype IRI.
replace_lexical_value_whole
Whole-string lexical replacement (Protégé replaceLexicalValue without pattern).