Skip to content

9.1 Internal Prefixes #20

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

Conversation

simonoakesepimorphics
Copy link
Collaborator

#9 - Implements internal prefix mappings.
External prefix mappings will be added in a separate branch.
Prefix mappings obtained from the NetCDF file are included in the prefix mappings for the resulting graph but not yet used anywhere (they will be used to parse attribute names and values in a future branch).

# Conflicts:
#	binary-array-ld-cli/src/test/kotlin/net/bald/BinaryArrayConvertCliTest.kt
#	binary-array-ld-lib/src/main/kotlin/net/bald/model/ModelBinaryArrayBuilder.kt
#	binary-array-ld-lib/src/test/kotlin/net/bald/model/ModelBinaryArrayBuilderTest.kt
#	binary-array-ld-lib/src/test/kotlin/net/bald/model/ModelBinaryArrayConverterTest.kt
# Conflicts:
#	binary-array-ld-cli/src/test/kotlin/net/bald/BinaryArrayConvertCliTest.kt
#	binary-array-ld-netcdf/src/test/kotlin/net/bald/netcdf/NetCdfBinaryArrayTest.kt
# Conflicts:
#	binary-array-ld-netcdf/src/test/kotlin/net/bald/netcdf/NetCdfBinaryArrayTest.kt
# Conflicts:
#	binary-array-ld-cli/src/test/kotlin/net/bald/BinaryArrayConvertCliTest.kt
#	binary-array-ld-lib/src/main/kotlin/net/bald/model/ModelBinaryArrayBuilder.kt
#	binary-array-ld-lib/src/main/kotlin/net/bald/vocab/BALD.kt
#	binary-array-ld-lib/src/test/kotlin/net/bald/model/ModelBinaryArrayBuilderTest.kt
#	binary-array-ld-lib/src/test/kotlin/net/bald/model/ModelBinaryArrayConverterTest.kt
#	binary-array-ld-netcdf/src/main/kotlin/net/bald/netcdf/NetCdfBinaryArray.kt
#	binary-array-ld-netcdf/src/test/kotlin/net/bald/netcdf/NetCdfBinaryArrayTest.kt
#	binary-array-ld-test/src/main/kotlin/bald/model/ModelVerifier.kt
#	binary-array-ld-test/src/main/kotlin/bald/netcdf/CdlConverter.kt
#	binary-array-ld-test/src/main/kotlin/bald/netcdf/NcmlConverter.kt
val outputFile = createTempFile()
run("--uri", "http://test.binary-array-ld.net/example", inputFile.absolutePath, outputFile.absolutePath)

val model = createDefaultModel().read(outputFile.toURI().toString(), "ttl")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be nice here to share the model verification of run_withPrefixMappingGroup_outputsPrefixMapping() and run_withPrefixMappingVar_outputsPrefixMapping() in a separate function (if possible) to make it clearer that both group and var prefix mapping are expecting the same output?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, done.

@CMayNorris
Copy link
Collaborator

Thanks Simon, this looks like it contains the main requirements from the spec for internal prefixes.
The only parts that may not be covered (but perhaps are planned for a future PR) are B-2 - must use limited character set for a prefix attribute name and B-3 - prefix value must be HTTP URI or a HTTPS URI, and end in / or #. I don't see any checks for these limitations - apologies if they are there, or are known to be unneeded!

@simonoakesepimorphics
Copy link
Collaborator Author

I've added the validation for requirement B-2 and B-3.

@CMayNorris
Copy link
Collaborator

Thank you very much! Happy with this PR - will merge now

@CMayNorris CMayNorris merged commit ffce5f0 into binary-array-ld:master Nov 10, 2020
@simonoakesepimorphics simonoakesepimorphics deleted the feature/9.1-prefix-internal branch April 28, 2021 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants