bterlson / cadl-rdfs Goto Github PK
View Code? Open in Web Editor NEWA cadl to rdfs emitter
A cadl to rdfs emitter
This is how CADL supports namespaces.
Check if the current emitter handles namespaces including nested namespaces.
Declare 3 different models for Person in different namespaces.
If a CADL model has a version then that should be handled by the CADL emitter to RDF.
This task should be implemented after the namespaces are supported.
To add versioning to the project you first need to install the package: npm install @cadl-lang/versioning --save
Once you've done that you can import it in your CADL file.
import "@cadl-lang/versioning"
using Cadl.Versioning;
@versioned(Versions)
namespace mynamespace {
model Person {
@added (Versions.v2) name: string;
@added (Versions.v3) age: numeric;
}
}
enum Versions {
"v1",
"v2",
"v3",
}
Test the following possible enum declarations will get translated to RDF.
enum Direction {
North,
East,
South,
West,
}
enum Direction {
North: "north",
East: "east",
South: "south",
West: "west",
}
enum Foo {
One: 1,
Ten: 10,
Hundred: 100,
Thousand: 1000,
}
enum Hour {
Zero = 0,
Quarter = 0.25,
Half = 0.5,
ThreeQuarter = 0.75,
}
Another possibility is composing enums:
enum DirectionExt {
...Direction,
"North East",
"North West",
"South East",
"South West",
}
Try out usage of different decorators:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.