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

dclib reads magic from current directory #51

Open
andrew-pickin-epi opened this issue Sep 10, 2024 · 1 comment
Open

dclib reads magic from current directory #51

andrew-pickin-epi opened this issue Sep 10, 2024 · 1 comment
Labels

Comments

@andrew-pickin-epi
Copy link

dclib read a file (defaultPrefixes.ttl) from the current directory.

This leads to some counter-intuitive behaviour. eg:
(from fsa data model repo) this works happily:

dclib common/lib.yaml fcm/fcm.yaml fcm/fcm.csv

but this fails.

cd fcm; dclib ../common/lib.yaml fcm.yaml fcm.csv
../common/lib.yaml
12:08:39.423 Problem with one-off preprocessing of template: com.epimorphics.dclib.framework.EvalFailed: Looks like unexpanded prefix in URI: regime:food-contact-materials
07-26 12:08:39 ERROR ConverterProcess     :: Problem with one-off preprocessing of template
com.epimorphics.dclib.framework.EvalFailed: Looks like unexpanded prefix in URI: regime:food-contact-materials
        at com.epimorphics.dclib.templates.TemplateBase.validateNode(TemplateBase.java:325)
        at com.epimorphics.dclib.templates.TemplateBase.asTriple(TemplateBase.java:254)
        at com.epimorphics.dclib.templates.ResourceMapTemplate.convertRow(ResourceMapTemplate.java:105)
        at com.epimorphics.dclib.templates.CompositeTemplate.preamble(CompositeTemplate.java:188)
        at com.epimorphics.dclib.templates.TemplateRef.preamble(TemplateRef.java:83)
        at com.epimorphics.dclib.templates.CompositeTemplate.preamble(CompositeTemplate.java:192)
        at com.epimorphics.dclib.framework.ConverterProcess.preprocess(ConverterProcess.java:310)
        at com.epimorphics.dclib.framework.ConverterProcess.process(ConverterProcess.java:166)
        at com.epimorphics.dclib.framework.ConverterService.simpleConvert(ConverterService.java:157)
        at com.epimorphics.dclib.Main$Command.call(Main.java:220)
        at com.epimorphics.dclib.Main.main(Main.java:116)
12:08:39.445 Warning: template fcm.regime.modified applied but failed: com.epimorphics.dclib.framework.EvalFailed: Looks like unexpanded prefix in URI: core:lastModified [1]
12:08:39.446 Warning: template fcm.auth applied but failed: com.epimorphics.dclib.framework.EvalFailed: Looks like unexpanded prefix in URI: fcm:useAsMonomerEtc [1]
12:08:39.449 Warning: template fcm.substance applied but failed: com.epimorphics.dclib.framework.EvalFailed: Looks like unexpanded prefix in URI: fcm-material:1 [1]
12:08:39.452 Warning: template fcm.legislation applied but failed: com.epimorphics.dclib.framework.EvalFailed: Looks like unexpanded prefix in URI: core:Document [1]

because defaultPrefixes.ttl isn't read. There shoudl be a way of specifying where this file is.

der added a commit that referenced this issue Sep 13, 2024
Default prefixes are built into the jar and overrides are normally
done by the templates but it seems that in some cases people override
by creating a defaultPrefixes.ttl file. To allow that pattern while
allowing config of location added a  command line option.

Addresses #51
@der
Copy link
Member

der commented Sep 16, 2024

Default prefixes are built into the jar and overrides are normally done by the templates but it seems that in some cases people override by creating a defaultPrefixes.ttl file. To allow that pattern while allowing config of location added a command line option --prefixes.

Released as 2.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants