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

REST API: Get all chapters of a media resource #27

Open
jthomsen opened this issue Jul 18, 2014 · 8 comments
Open

REST API: Get all chapters of a media resource #27

jthomsen opened this issue Jul 18, 2014 · 8 comments
Assignees
Labels

Comments

@jthomsen
Copy link
Member

GET /mediaresource/{uuid}/chapter

@jthomsen jthomsen self-assigned this Jul 18, 2014
@jthomsen jthomsen changed the title REST API: Get all chapters of a video REST API: Get all chapters of a mediaresource Jul 19, 2014
@jthomsen jthomsen changed the title REST API: Get all chapters of a mediaresource REST API: Get all chapters of a media resource Jul 19, 2014
@jthomsen
Copy link
Member Author

jthomsen commented Aug 4, 2014

SPARQL Query:

PREFIX linkedtv: <http://data.linkedtv.eu/ontologies/core#>
PREFIX ma: <http://www.w3.org/ns/ma-ont#>
PREFIX nsa: <http://multimedialab.elis.ugent.be/organon/ontologies/ninsuna#>
PREFIX oa: <http://www.w3.org/ns/oa#>
SELECT DISTINCT ?item
WHERE {
 ?mediafragment ma:isFragmentOf ?mediaresource . 
 ?mediafragment a ma:MediaFragment . 
 ?annotation a oa:Annotation .  
 ?annotation oa:hasBody ?item . 
 ?annotation oa:hasTarget ?mediafragment . 
 ?item a linkedtv:Chapter .  
}

@jthomsen
Copy link
Member Author

jthomsen commented Aug 4, 2014

has been realized with the above SPARQL query; retrieves chapters from uncurated annotations; sample call:

http://data.linkedtv.eu/mediaresource/adb65e0a-642b-432f-aa86-c296dab0375a/chapter

@rtroncy
Copy link
Member

rtroncy commented Aug 4, 2014

What is the purpose of the last triple pattern (?mediafragment nsa:temporalStart ?start ) ?

What is the relationship between ?chapter and ?item ? It seems to me you just need one variable

@jthomsen
Copy link
Member Author

jthomsen commented Aug 4, 2014

yes, you're right - thanks for checking! this was indeed a copy / paste error; changed it

@jblom
Copy link

jblom commented Aug 5, 2014

Hi Jan,

thanks for this. I will check later myself but: do the results also include the provenance information? It's important for the ET and the player to check whether these are automated or curated chapters.

(this basically applies for all the other API calls)

Best,

Jaap

@jthomsen
Copy link
Member Author

jthomsen commented Aug 5, 2014

Hi Jaap,
well at the moment they just return a list of chapter ids from the standard graph, i.e. the non-curated ones; think I could add something like /mediaresource/{uuid}/chapter/curated for the curated ones
would that be ok?

Best
Jan

@rtroncy
Copy link
Member

rtroncy commented Aug 5, 2014

There should not be a "standard graph" whatever it means, since all annotations have PROV statements. Creating a different URI pattern for all possible PROV values does not seem a good idea. Why does /mediaresource/{uuid}/chapter/ simply not return ALL chapters with PROV statements telling how the chapter has been created?

@jblom
Copy link

jblom commented Aug 5, 2014

Hi Raphael,

this is due to the fact that the ET still saves in a different graph. I will need to update the saving code of the ET to integrate the data in the 'main' LinkedTV graph (still other things were more important up till now). Hmm I guess it makes sense, if I will do this first. In any case, it's necessary to return the prov data for all of the API calls (if applicable).

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

3 participants