Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle RDF Collections (ordered list; rdf:first and rdf:rest) #759

Open
vorburger opened this issue Jun 28, 2024 · 0 comments
Open

Handle RDF Collections (ordered list; rdf:first and rdf:rest) #759

vorburger opened this issue Jun 28, 2024 · 0 comments
Labels
bug Something isn't working format File Formats for I/O help wanted Extra attention is needed

Comments

@vorburger
Copy link
Member

Fix Enola to handle RDF Collections (i.e. ordered lists; with rdf:first and rdf:rest); as-is, it doesn't, yet:

java.lang.IllegalArgumentException: http://www.w3.org/2002/07/owl#withRestrictions
        at dev.enola.thing.message.ProtoThingIntoJavaThingBuilderConverter.object(ProtoThingIntoJavaThingBuilderConverter.java:107)
        at dev.enola.thing.message.ProtoThingIntoJavaThingBuilderConverter.convertInto(ProtoThingIntoJavaThingBuilderConverter.java:72)
        at dev.enola.thing.message.ProtoThingIntoJavaThingBuilderConverter.convertInto(ProtoThingIntoJavaThingBuilderConverter.java:41)
        at dev.enola.common.convert.ConverterInto.convertIntoOrThrow(ConverterInto.java:60)
        at dev.enola.rdf.RdfResourceIntoThingConverter.convert(RdfResourceIntoThingConverter.java:71)
        at dev.enola.rdf.RdfResourceIntoThingConverter.convert(RdfResourceIntoThingConverter.java:38)
        at dev.enola.thing.io.Loader.load(Loader.java:55)
(...)

for the ( ... ) in in following, from docs/models/linkml/owl/enola.linkml.owl.ttl (which also makes this a pre-req for #731) :

enola:wikipedia a owl:ObjectProperty,
        linkml:SlotDefinition ;
    rdfs:label "wikipedia" ;
    rdfs:range [ a rdfs:Datatype ;
            owl:onDatatype xsd:string ;
            owl:withRestrictions ( [ xsd:pattern "^[a-zA-Z0-9_]+$" ] ) ] ;
    skos:definition "Wikipedia EN page ID (not URL), e.g. 'Wikipedia' (for https://en.wikipedia.org/wiki/Wikipedia)" ;
    skos:inScheme enola:ontology .

Nota bene: https://rdf4j.org/documentation/programming/model/#rdf-collections

@vorburger vorburger added bug Something isn't working help wanted Extra attention is needed format File Formats for I/O labels Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working format File Formats for I/O help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant