CURIE (RDF ID) Predicate
is_curie.Rd
This predicate is designed to validate CURIEs, compact URIs conforming to the W3C CURIE Syntax 1.0 standard (or stricter as allowed by that standard).
Notes
The W3C CURIE Syntax 1.0
standard defines the most general CURIE syntax allowed (def = "w3c"
; not a
perfect implementation, e.g. U+3000 non-breaking space is not accepted). Note
that by definition URIs will be identified as CURIEs. If it is desirable to
distinguish these use def = "w3c_safe"
and wrap CURIEs in brackets (as
defined in the standard. Alternatively, use the stricter OBO Foundry-based
standards (as stated in that standard, more strict definitions for CURIEs can
be defined).
"obo"
corresponds to the official OBO Foundry definition of a CURIE as
stated in the OBO Foundry ID Policy.
This should work for most class CURIEs from OBO Foundry ontologies but will
not recognize obo:IDSPACE_LOCALID
formatted CURIEs or CURIEs with letters
or symbols in their local unique identifier. To allow these in the set while
still restricting to CURIE patterns found in OBO Foundry ontologies, use
"obo_generic"
.
See also
Other ID predicates:
obo_ID_predicates
Other predicates:
char_val_predicates
,
is_invariant()
,
lgl_predicates
,
num_val_predicates
,
obo_ID_predicates
Examples
id <- c(
#### pass all ####
"DOID:0001816", "CL:0000066",
#### pass "obo_generic" & "w3c" ####
"obo:DOID_4", "obo:so#has_origin", # obo prefixed CURIEs
"oboInOwl:hasDbXref", "skos:exactMatch", # obo object properties
"alfred:LO362836C", # not OBO but conforms to `"obo_generic"` pattern
#### pass only "w3c" ####
"4dn.biosource:4DNSR73BT2A2", "aceview.worm:aap-1",
#### always fail ####
"0001816", # bare number without prefix
" obo:HP_0000001", # must have NO `[:space:]` characters
"http://purl.obolibrary.org/obo/DOID_0001816" # URI
)