datacequia / go-dogg3rz

Decentralized Knowledge Orchestration Tool
Apache License 2.0
8 stars 1 forks source link

Implement 'create named-graph' command #20

Closed adpadilla closed 3 years ago

adpadilla commented 3 years ago

Need to be able to create a named graph within a dataset. The name should be a unique name/IRI within the dataset.

The syntax should be as follows:

dogg3rz create named-graph|ng NAME dataset|ds DATASET [parent _NAMEDGRAPH]

where NAME is the name given to the new named graph (this and other names used in dogg3rz should follow some character set restrictions TBD) where DATASET is the name of the dataset container for the new named graph

where parent is an optional subcommand that determines the parent named graph container for the new named graph.

Should error with NotFound if DATASET or _NAMEDGRAPH do not exist as datasets or named graphs respectively. Should error with AlreadyExists if NAME already exists as a named-graph (it may need to be researched whether or not any IRI with the same name is allowed in spec such as a node name ).

bhallamp commented 3 years ago

should this be create named graph or insert named graph?

adpadilla commented 3 years ago

Good question. I am trying to use SQL like terminology when referring to creation of resources. In this case, named graphs are a structural resource (container) and so i put them in the 'create' bucket. nodes are data resources which are not containers ( i.e don't define the structure of json-ld doc) so insert is used. the only nodes which are exception are types ( create type) per for same reason.

adpadilla commented 3 years ago

works on my end. closing