diff --git a/examples/games/config.yaml b/examples/games/config.yaml new file mode 100644 index 0000000..8d27356 --- /dev/null +++ b/examples/games/config.yaml @@ -0,0 +1,23 @@ +ontologies: + - examples\games\vgo.owl +name: Videogame +output_dir: outputs + +openapi: + openapi: 3.0.1 + info: + description: This is the API of the videogame ontology + title: Videogame + version: v0.0.1 + externalDocs: + description: Videogame ontology + url: http://purl.org/net/VideoGameOntology# + servers: + - url: http://localhost:8080/v0.0.1 + + +endpoint: + url: http://localhost:3030/ + prefix: http://example.org/game + graph_base: http://localhost:3030/game/data/ + diff --git a/examples/games/vgo.owl b/examples/games/vgo.owl new file mode 100644 index 0000000..9934dea --- /dev/null +++ b/examples/games/vgo.owl @@ -0,0 +1,912 @@ + + + + + + + + + + + + + + + + + + +]> + + + + + 2013-10-22 + 2014-12-19 + http://delicias.dia.fi.upm.es/members/DGarijo/#me + http://filip.milstan.net/ + http://purl.org/net/mpoveda + http://www.mendeley.com/profiles/janne-parkkila/ + vgo + http://purl.org/net/VideoGameOntology# + http://creativecommons.org/licenses/by-nc-sa/2.0/ + 1.0 + An ontology for describing video games and game plays. Created by Janne Parkkila, Filip Radulovic, Daniel Garijo and María Poveda. + The Video Game Ontology + The Video Game Ontology is an ontology designed for describing video games and all the resources related to their game plays. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + has achievement + The vgo:hasAchievement property specifies that a game has a specific achievement. A game often contains more than one achievement that can be awarded to the players. + optional + + + + + + + + + + has character + The vgo:hasCharacter property specifies that a game has a specific character. A game can have more than one characters involved. + optional + + + + + + + + + + has feature + The vgo:hasFeature property indicates what is a vgo:Feature (or ability) of a particular vgo:Item. For example, a fire sword, a healing staff or boots of flight connects item to a feature it can have. An item with connection to potable feature would make the item potable. + + + + + + + + + + has game genre + The vgo:hasGameGenre property specifies that a game belongs to a certain game genre. For example, Pong would be an arcade game and Mario a platformer. + + + + + + + + + + has item + The vgo:hasItem property specifies that a game has a specific item. A game often contains more than one items. + optional + + + + + + + + + + has leaderboard + The vgo:hasLeaderboard specifies that a leaderboard belongs to a particular game. A game can have one or more leaderboards that keep track of ranking of the players. For example a leaderboard could be ranking of who has the most soccer game victories or who has the fastest lap in a Formula 1 game. + + + + + + + + + + + has playing area + The vgo:hasPlayingArea property asserts a gaming area to a specific game. In every game, the gameplay takes place in some playing area. + + + + + + + + + + involves achievement + The vgo:involvesPlayer property specifies that a session involves a specific player. A session may involve more than one player. + optional + + + + + + + + + + involves character + The vgo:involvesCharacter property specifies that a session involves a specific character. + optional + + + + + + + + + + involves player + The vgo:involvesPlayer property specifies that a session involves a specific player. A session may involve more than one player. + optional + + + + + + + + + + is achieved in session + The property vgo:isAchievedInSession asserts the receiving of an achievement to a certain gameplay session. This enables to keep track of what achievements a player has gained during one gameplay session. + + + + + + + + + + + is achievement in game + The property vgo:isAchievementInGame asserts that a specific vgo:Achievement can be earned in a particular vgo:Game. An achievement must belong to a certain game. + + + + + + + + + + + is character in game + vgo:isCharacterInGame property describes the relation between a vgo:Character and a vgo:Game. a vgo:Character always belongs to a certain game. + + + + + + + + + + + is character in session + The vgo:isCharacterInSession property connects the vgo:Character to a vgo:Session. A character participates in a game session (e.g., a football match or a counter strike round) during a period of time. As players can have multiple characters, a character needs to be connected to the session, in order to know which of those characters participated in the certain session. + + + + + + + + + + + is event associated to player + The vgo:isEventAssociatedToPlayer property asserts an event to a specific vgo:Player. A player may have caused an event to happen through the actions of his/her character and this property is used to connect the real person to the event. + + + + + + + + + + is event in game + The vgo:isEventInGame property asserts an event to a specific game. An event always happens inside a specific a game. + + + + + + + + + + is event in session + The vgo:isEventInSession property links an event to a specific gameplay session. An event always happens during a certain session and this property enables to link the events to that session. For example, an event of moving the queen in game of chess should be connected to a session of chess. + + + + + + + + + + is event related to item + The vgo:isEventRelatedToItem property asserts an event to a specific item. This property is used to describe an event that includes an item in one way or another. For example, an event where character gains a new sword can be described with this relation. + + + + + + + + + + is event triggered by character + The vgo:isEventTriggeredByCharacter connects the vgo:InstantaneousEvent to specific vgo:Character. This describes that an event is often caused by a character. The character in question can be either a character controlled by a player or a computer. For example, both player and non-player characters can trigger a character death event. + + + + + + + + + + + is friend with player + The vgo:isFriendWithPlayer describes a connection between players. The property is used to model the friends a player has and with whom he might be playing games with. The friends of a player are not bound necessarily to particular game, but can be describe the friendly playing relationship in overall. + + + + + + + + + + + is item in game + The vgo:isItemInGame is used to specify which item belongs to a particular game. An item cannot exist alone and thus should always be associated to a certain game. + + + + + + + + + + + is leaderboard in game + The vgo:isLeaderboardInGame property specifies that a leaderboard is from a specific game. + optional + + + + + + + + + + is player in session + The vgo:isPlayerInSession property connects vgo:Player to a specific vgo:Session. This property is used to keep track of the gameplay sessions the player has played and what has happened in those sessions. For example vgo:Player may have participated in a this can be a one round of Counter-Strike or played one hour session of mario. + + + + + + + + + + + is session in game + The vgo:isSessionInGame property links a vgo:Session to a certain vgo:Game. Each gameplay session must belong to a certain game. + + + + + + + + + + lives in + The vgo:livesIn describes the connection between a player and his place of existence in the real-world. A vgo:Player is connected to wgs84:SpatialThing as that has descriptions for places where people live and contains more detailed information of them, such as continents and regions. + + + + + + + + + + owns achievement + The vgo:ownsAchievement links the vgo:Player to the particular vgo:Achievement earned in a game. + + + + + + + + + + owns character + The vgo:ownsCharacter property asserts which characters are owned by a specific player. A player can have multiple characters in one game and this connection is used to define all the different characters a player could be playing. Even though a player deletes, trades or loses his/her character in any way, the connection can be kept to contain the player’s history of owned characters. + + + + + + + + + + owns item + The vgo:ownsItem describes ownership of an item. A vgo:Item is always owned by a certain vgo:Character. A vgo:Character can own multiple vgo:Items and this relationship is used to keep track of the character’s owned items. Even though players may lose items, the vgo:ownsItem connection is still held with the item. This approach allows to keep track of character’s history of owned items. + + + + + + + + + + plays game + the vgo:playsGame property asserts which games has the vgo:Player played at any point of time. + + + + + + + + + + purchases game offering + The vgo:purchasesGameOffering property aseerts a vgo:InAppPurchaseEvent to a specific vgo:GameProduct. This property describes what is purchased by the in-app purchase event that the player has done. + + + + + + + + + + unlocks achievement + The vgo:unlocksAchievement property asserts an event to a certain achievement. An achievement is always unlocked as a consequence of some event. For example, eating the 100th piece of cake unlocks the “Cake Eater” achievement. + + + + + + + + + + + + + + + + + + + + + end time + endTime describes the ending moment in time of a single Session. endTime connects the session to a DateTime value which holds the moment when the session ended. + + + + + + + + + + event name + name connects InstantaneousEvent a text string. This allows the event to have a name to recognize it for. + + + + + + + + + + event time + time describes the connection of InstantaneousEvent happening at a certain moment of time. time Conncets the event to a DateTime value that describes the moment when the event happened. + + + + + + + + + + release date + releaseDate connects a game to a time which describes the release date of the game. + + + + + + + + + + start time + startTime describes the starting moment in time of a single Session. startTime connects the session to a DateTime value which holds the moment when the session started. + + + + + + + + + + username + The username connects player to a text string which describes the username a player has. + + + + + + + + + + + + + + + + + + + + + + + + + + + Achievement + The vgo:Achievement is a reward gained in a game due to some event accomplished in the game. Achievements are commonly used in game industry to reward players for having accomplished tasks in the game. +This ontology defines various subclasses of vgo:Achievement, which are all based on the classification presented by Markus Montola et al. [Markus Montola, Timo Nummenmaa, Andrés Lucero, Marion Boberg, and Hannu Korhonen, 2009, “Applying game achievement systems to enhance user experience in a photo sharing service”, In Proceedings of the 13th International MindTrek Conference: Everyday Life in the Ubiquitous Era (MindTrek '09)] http://dl.acm.org/citation.cfm?id=1621859 + + + + + + + + Character + A vgo:Character is any actor that can exists in a game. A character can be a human-like creature as seen traditionally in video games. However, a character could also be a car, a paddle in game of Pong or spaceship of a space shooter game. This is often contextually related to the gameplay of a certain game. A character can be either controller by a player or by a computer. + + + + + + + + Collection + + The vgo:Collection type of achievement is typically rewarded from collecting an amount of certain items in a game. An example of vgo:Collection would be obtaining a full set of christmas clothes for a character to wear or collecting every possible flower in the game. + + + + + + + + Completion + + The vgo:Completion type of achievement is usually rewarded from successfully completing a certain goal or subgoal in a game. An example of vgo:Completion would be to save a princess from a burning tower or completing all side-quests in a game. + + + + + + + + Curiosity + + The vgo:Curiosity describes funny random things that can happen or be found in the game. An example could be jumping from the Eiffel tower without dying or following a comupter controlled character’s activities for one hour. + + + + + + + + Fandom + + The vgo:Fandom achievement is related to doing some true fan activities. An example of vgo:Fandom could be purchasing a collectors edition of the game or attending a fan gathering. + + + + + + + + Feature + vgo:Feature describes an ability or characteristic. For example, a sword could have “damage dealing” ability and a bottle of water could be “potable”. + + + + + + + + gain event + + The vgo:GainEvent describes an event that is related to character/player gaining something in a game. This is a subclass of vgo:GameEvent as gaining something is related to a specific game. For example, a player can gain a new character, achievement or item. + + + + + + + + Game + The vgo:Game class describes a game product that can be played by a player. +Examples of games are Pong, Grand Theft Auto, Pokemon and Need for Speed. + + + + + + + + game event + + The vgo:GameEvent describes an event that takes place in a game without straight player interaction. GameEvents are often very specific for each game. Examples of vgo:GameEvent could be an enemy dying, connecting to a multiplayer server, loading a new level or playing an animation. + + + + + + + + game product + + + + + + + + + + + + + + A vgo:GameProduct is anything that is for sale inside a game. These can be either normal game items purchased with in-game currency or with real world money. An example of vgo:GameProduct could be a consumable health potion bought with real money, a better weapon or some visual improvement (e.g. Hats in Steam). Basically a game product can be anything, a character, an item or an achievement. +GameProduct is a subclass of Good Relations: ProductOrService & schema:Product. Since vgo:GameProduct is a type of buyable product, it reuses the properties available in the schema and Good Relations, such as currency price, validity of the offer and so on. + + + + + + + + Genre + The vgo:Genre class describes the genre a game belongs to. All of the games have at least one genre. Examples of this are RPG, Simulator and Adventure + + + + + + + + hard mode + + The vgo:HardMode achievement describes succeeding in a game on a high difficulty level. An example could be completing the “Doom” game on Nightmare difficulty level. + + + + + + + + in-app purchase event + + The vgo:InAppPurchaseEvent describes an event that is related to making a purchase with real money inside a game. This is a subclass of InstantaneousEvent because it happens at certain moment in time. An example of vgo:InAppPurchaseEvent would be unlocking secret levels with real money or purchasing better equipment with real money. + + + + + + + + instantaneous event + The vgo:InstantaneousEvent class describes an event that happens during the gameplay at a certain moment in time. This can be a player gaining an achievement, killing an enemy or making an in-app purchase. + + + + + + + + Item + A vgo:Item portrays any item that exists in a game. The item can either be just visual part of the game or a concrete usable item. As an example an item could be a drinkable potion, a magical sword or just a flower pot. + + + + + + + + Leaderboard + + The vgo:Leaderboard class describes a ranking system of the players. There can be multiple rankings in a game, for example, the kill-count ranking of Modern Warfare or the best time listing of Formula 1 game. + + + + + + + + lose event + + vgo:LoseEvent describes an event that is related to character/player losing something in a game. This is a subclass of GameEvent as gaining something is related to a specific game. For example, a player can lose a character due to trade with another player. Another example would be a character losing item due to consuming it. + + + + + + + + Loyalty + + The vgo:Loyalty achievement is used to give recognition to loyal players. For example, this could be an achievement received after subscribing to the game for a year. + + + + + + + + Luck + + The vgo:Lucky describes an achievement that is awarded to the player in a lucky situation. An example of vgo:Lucky achievement would be winning in a lottery or throwing “Yahtzee” without re-rolling the dice. + + + + + + + + menu event + + The vgo:MenuEvent describes an event that is related to interacting with the ingame menu. An example of menu event is muting sounds, changing graphic settings, changing gameplay difficulty or remapping game controls. + + + + + + + + Minigame + + The vgo:Minigame achievement describes success in mini-games that have been included in a certain game but are not vital for completing the game. An example could be to complete all the Pizza deliveries in GTA minigame or gaining over 100 dollars while playing poker in Red Dead Redemption. + + + + + + + + Multiplayer + + The vgo:Multiplayer achievement describes anything that can be awarded to one or multiple players due to their gameplay in multiplayer. For example, this could be winning 10 Team Fortress matches in a row with the same team or getting killed ten times in a row in Counter-Strike. + + + + + + + + Paragon + + The vgo:Paragon is a rare achievement that is given only to limited number of players. An example of vgo:Paragon achievement could be the first player to finish a game under 10 hours or the first ten players to complete the game 100% through. + + + + + + + + Player + + The vgo:Player describes the entity playing the game. This can be either a human or a computer. vgo:Player class is used to keep a profile of a certain playing entity and to connect all the games, achievements and characters he/she has. The vgo:Player is a subclass of foaf:Person as it contains all relative information of a certain person. + + + + + + + + player event + + The vgo:PlayerEvent describes a vgo:InstantaneousEvent that is caused by the player. For example jumping in the game, throwing an item or pressing a joystick button. + + + + + + + + playing area + The vgo:PlayingArea is the description of a place where the gameplay takes place. All of the games have some kind of area where they are played in. An example of playing areas could be football field in soccer game, a race track from a racing game or a star system of EVE Online. + + + + + + + + Session + + The vgo:Session class describes a session of gameplay. A session can be a single round of chess, a round of Counter-Strike, one half-time of soccer or one race of Formula 1. vgo:Session class can be used to store gameplay information, especially for analytical reasons. + + + + + + + + special play style + + The vgo:SpecialPlayStyle achievement is awarded to players after playing a game in special fashion. Often this is something harder than the regular play and requires more player experience to excel in it. An example of vgo:SpecialPlayStyle could be to complete a game without any violence or against a timer. + + + + + + + + Tutorial + + The vgo:Tutorial achievement is awarded to a player for trying out various features of the game. This is often related to learning how to play the game, how the controls work and how the game logic works. An example of vgo:Tutorial could be testing out newly gained special equipment or just playing through the in-game tutorial in the beginning. + + + + + + + + Veteran + + The vgo:Veteran achievement is an award that is given for accumulating a lot of play hours or game actions. For example, vgo:Veteran could be playing thousand hours of World of Tanks or making 100 goals in ice hockey game. + + + + + + + + Virtuosity + + The vgo:Virtuosity describes an achievement that is awarded for playing masterfully in the game. Examples of virtuous play could be finishing the game without saving at all, dying zero times or preventing an opposing team from scoring any goals in a soccer game. + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/le/config.yaml b/examples/le/config.yaml new file mode 100644 index 0000000..cdfc724 --- /dev/null +++ b/examples/le/config.yaml @@ -0,0 +1,24 @@ +ontologies: + - http://linked.earth/ontology# + # Example with an ontology that aggregates several ontologies (big) +name: LinkedEarth +output_dir: outputs + +openapi: + openapi: 3.0.1 + info: + description: This is the API of the Linked Earth Ontology + title: LinkedEarth + version: v0.0.1 + externalDocs: + description: Linked Earth Ontology + url: http://linked.earth/ontology# + servers: + - url: http://localhost:8080/v0.0.1 + + +endpoint: + url: http://localhost:3030/ + prefix: http://linked.earth/data + graph_base: http://localhost:3030/wings/data/ + diff --git a/examples/opmw/config.yaml b/examples/opmw/config.yaml new file mode 100644 index 0000000..30645e5 --- /dev/null +++ b/examples/opmw/config.yaml @@ -0,0 +1,33 @@ +ontologies: + - examples\opmw\opmw.owl + #- http://www.opmw.org/ontology/ + #Example with a slash ontology +name: opmw +output_dir: outputs + +openapi: + openapi: 3.0.1 + info: + description: Example of the opmw ontology + title: opmw + version: v1.0.0 + externalDocs: + description: open provenance ontology for workflows + url: http://datos.opmw.es/def/ + +firebase: + key: + +#endpoint not used for this example. +endpoint: + url: http://endpoint.mint.isi.edu/example + prefix: https://w3id.org/okn/i/example + graph_base: http://endpoint.mint.isi.edu/example + +enable_get_paths: true +enable_post_paths: false +enable_delete_paths: false +enable_put_paths: false + +follow_references: true + diff --git a/examples/opmw/opmw.owl b/examples/opmw/opmw.owl new file mode 100644 index 0000000..eabf7b7 --- /dev/null +++ b/examples/opmw/opmw.owl @@ -0,0 +1,836 @@ + + + + The OPMW ontology + 2011-09-27 + http://delicias.dia.fi.upm.es/members/DGarijo/#me + http://www.isi.edu/~gil/ + OPMW is an OPMV, PROV and P-plan extension to model the executions and definitions of scientific workflows. + 2014-12-22 + opmw + http://www.opmw.org/ontology/ + OPMW is an OPMV, PROV and P-plan extension to model the executions and definitions of scientific workflows. + 3.1 + http://www.opmw.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Property that binds an execution account to the template of the whole workflow. The template contains the plan for the workflow. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmo: <http://openprovenance.org/model/opmo#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionProcess/acc1> + a opmo:Account, opmw:workflowExecutionAccount; + opmw:correspondsToTemplate <http://www.opmw.org/export/resource/WorkflowTemplate/AQUAFLOW_EDM>. + corresponds to Template + + + + + + + + + + + + Property that binds a workflow execution artifact to its correspondant workflow template artifact. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmv: <http://purl.org/net/opmv/ns#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionArtifact/DEPTH1.2150836> + a opmv:Artifact, opmw:WorkflowExecutionArtifact; + opmw:correspondsToTemplateArtifact <http://www.opmw.org/export/resource/ParameterVariable/AQUAFLOW_EDM_DEPTH>. + corresponds to Template Artifact + + + + + + + + + + + + Property that binds a workflow execution process to its correspondant process template. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmv: <http://purl.org/net/opmv/ns#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionProcess/REAERATIONEDM133549210450086> + a opmv:Process, opmw:WorkflowExecutionProcess; + opmw:correspondsToTemplateProcess <http://www.opmw.org/export/resource/WorkflowTemplateProcess/AQUAFLOW_EDM_REAERATIONEDM>. + corresponds to Template Process + + + + + + + + + + + Property to bind an execution account to the system where it was executed (which could be different from the one used for designing its workflow template). + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmo: <http://openprovenance.org/model/opmo#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionAccount/acc1> + a opmo:Account, opmw:executionAccount; + opmw:executedInWorkflowSystem <http://www.opmw.org/export/resource/Agent/SHELL>. + +<http://www.opmw.org/export/resource/Agent/SHELL> + a opmw:Agent. + executed in Workflow System + + + + + + + + + + + + + Property that binds a workflow execution process to the specific component (code, scripts, etc.) used in the execution. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmv: <http://purl.org/net/opmv/ns#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionProcess/REAERATIONEDM133549210450086> + a opmv:Process, opmw:WorkflowExecutionProcess; + opmw:hasExecutableComponent <http://www.opmw.org/export/resource/ReaerationEDM/COMPONENTREAERATIONEDM>. + has Executable Component + + + + + + + + + + + Property that binds a workflow template artifact to the workflow template process that generates it. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . + +<http://www.opmw.org/export/resource/DataVariable/AQUAFLOW_EDM_REAERATIONPARAMS> + a opmw:DataVariable, opmw:WorkflowTemplateArtifact; + opmw:isGeneratedBy <http://www.opmw.org/export/resource/WorkflowTemplateProcess/AQUAFLOW_EDM_REAERATIONEDM>. + + + is Generated By + + + + + + + + + + + Property used to dessignate which workflow Parameter Variables belong to a workflow template. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . + +<http://www.opmw.org/export/resource/ParameterVariable/AQUAFLOW_EDM_DATE> + a opmw:ParameterVariable; + opmw:isParameterOfTemplate <http://www.opmw.org/export/resource/WorkflowTemplate/AQUAFLOW_EDM>. + is Parameter of Template + + + + + + + + + + + Property used to dessignate which workflow Steps (or Workflow Template Processes) belong to a workflow template. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . + +<http://www.opmw.org/export/resource/WorkflowTemplateProcess/AQUAFLOW_EDM_CALCULATEHOURLYAVERAGES> + a opmw:WorkflowTemplateProcess; + opmw:isStepOfTemplate <http://www.opmw.org/export/resource/WorkflowTemplate/AQUAFLOW_EDM>. + is Step of Template + + + + + + + + + + + Property used to dessignate which workflow Data Variables belong to a workflow template. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . + +<http://www.opmw.org/export/page/resource/DataVariable/AQUAFLOW_EDM_HOURLYDATA> + a opmw:DataVariable; + opmw:isVariableOfTemplate <http://www.opmw.org/export/resource/WorkflowTemplate/AQUAFLOW_EDM>. + is Variable of Template + + + + + + + + + + + Property that binds a workflow template process to the workflow template artifact that generates it. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . + +<http://www.opmw.org/export/resource/WorkflowTemplateProcess/AQUAFLOW_EDM_REAERATIONEDM> + a opmw:WorkflowTemplateProcess; + opmw:uses <http://www.opmw.org/export/resource/DataVariable/PARAMETERSFILE>. + uses + + + + + + + + + + + + + + + + This data property binds a workflow template to the tool used for its design and creation. The tool is represented by its URL. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . + +<http://www.opmw.org/export/resource/WorkflowTemplate/AQUAFLOW_EDM> + a opmw:WorkflowTemplate; + opmw:createdInWorkflowSystem "http://wings.isi.edu"^^xsd:anyURI. + created in Workflow System + + + + + + + + + + + Property that represents the dimensionality of the artifact: 0 is a single file, 1 for a collection, etc. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . + +<http://www.opmw.org/export/resource/DataVariable/AQUAFLOW_NTM_DAILYDATA> + a opmw:DataVariable, opmw:WorkflowTemplateArtifact; + opmw:hasDimensionality "1"^^xsd:int. + + has Dimensionality + + + + + + + + + + + + + + + + + Property that binds a workflow template to its documentation. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +<http://www.opmw.org/export/resource/WorkflowTemplate/AQUAFLOW_NTM> + a opmw:WorkflowTemplate; + opmw:hasDocumentation "A copy of the documentation related to this template "^^xsd:string. + has Documentation + + + + + + + + + + + Property that links an execution account to its diagram. The diagram shows how the template has been instantiated with different components. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmo: <http://openprovenance.org/model/opmo#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionAccount/ACCOUNT1335506667949> + a opmw:WorkflowExecutionAccount,opmo:Account; + opmw:hasExecutionDiagram "http://wind.isi.edu/marbles/assets/components/workflow_portal/users/1/Water/runs/run_148.png"^^sxd:anyURI. + has Execution Diagram + + + + + + + + + + + Property used to link an execution artifact to its file name (independently of its URI). + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmv: <http://purl.org/net/opmv/ns#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionArtifact/DCF49186981194248009E24BAD6A6412> + a opmv:Artifact, opmw:WorkflowExecutionArtifact. + opmw:hasFileName "NTMParams_SMN_2010_03_14Z"^^xsd:string. + has File Name + + + + + + + + + + Property used to link an execution artifact to the physical location of its file in the server. + +Example +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmv: <http://purl.org/net/opmv/ns#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionArtifact/DCF49186981194248009E24BAD6A6412> + a opmv:Artifact, opmw:WorkflowExecutionArtifact. + opmw:hasLocation "http://www.opmw.org/datasets/resource/1/148/NTMParams_SMN_2010_03_14Z"^^xsd:anyURI. + has Location + + + + + + + + + + + Property used to link a workflow template to its native template (encoded in the syntax of the workflow system where it was designed: scufl, owl, etc.). + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . + +<http://www.opmw.org/export/resource/WorkflowTemplate/AQUAFLOW_NTM> + a opmw:WorkflowTemplate; + opmw:hasNativeSystemTemplate "http://wind.isi.edu/marbles/assets/components/workflow_portal/users/1/Water/ontology/Water/AquaFlow_NTM.owl"xsd:anyURI. + has Native System Template + + + + + + + + + + + + + + + + + + Property used to link an execution account or a workflow execution process to the correspondent log file produced by the enacting workflow engine. + + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmo: <http://openprovenance.org/model/opmo#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionAccount/ACCOUNT1335506667949> + a opmw:WorkflowExecutionAccount,opmo:Account; + opmw:hasOriginalLogFile "http://wind.isi.edu/marbles/assets/components/workflow_portal/users/1/Water/runs/run_148.ttl"^^sxd:anyURI. + has Original Log File + + + + + + + + + + + Property used to annotate a workflow execution artifact with the size in bytes of its file. + +Example +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmv: <http://purl.org/net/opmv/ns#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionArtifact/DCF49186981194248009E24BAD6A6412> + a opmv:Artifact, opmw:WorkflowExecutionArtifact. + opmw:hasLocation "68"^^xsd:int. + has Size + + + + + + + + + + + Property used to state whether an ececution account was successful or not. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmo: <http://openprovenance.org/model/opmo#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionAccount/ACCOUNT1335506667949> + a opmo:Account, opmw:ExecutionAccount; + opmw:hasStatus "SUCCESS"^^xsd.string. + has Status + + + + + + + + + + Property used to link a workflow template to its graphical representation. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . + +<http://www.opmw.org/export/resource/WorkflowTemplate/AQUAFLOW_NTM> + a opmw:WorkflowTemplate; + opmw:hasTemplateDiagram "http://wind.isi.edu/marbles/assets/components/workflow_portal/users/1/Water/runs/run_148.png"xsd:anyURI. + has Template Diagram + + + + + + + + + + + Property used to state the value of the artifact (in case of being a parameter). + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmv: <http://purl.org/net/opmv/ns#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionArtifact/DEPTH0.61959237> + a opmv:Artifact, opmw:WorkflowExecutionArtifact; + opmw:hasValue "0.61959237"^^xsd:string. + has Value + + + + + + + + + + Property that specifies whether a component is abstract or not. + is Concrete + + + + + + + + + + + Property which states that none of the activities contained in the account finished executing after the End Time. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmo: <http://openprovenance.org/model/opmo#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionAccount/ACCOUNT1335506667949> + a opmw:WorkflowExecutionAccount,opmo:Account; + opmw:overallEndTime "2012-04-25T10:28:55-07:00"^^xsd:dateTime. + overall End Time + + + + + + + + + + + Property which states that none of the activities in the current account started executing before the start time. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmo: <http://openprovenance.org/model/opmo#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionAccount/ACCOUNT1335506667949> + a opmw:WorkflowExecutionAccount,opmo:Account; + opmw:overallStartTime "2012-04-25T10:28:07-07:00"^^xsd:dateTime. + overall Start Time + + + + + + + + + + Property used to annotate a resource with it version number. + +Example: +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmv: <http://purl.org/net/opmv/ns#> . +@prefix opmo: <http://openprovenance.org/model/opmo#> . + +<http://www.opmw.org/export/resource/WorkflowTemplate/AQUAFLOW_NTM> + a opmw:WorkflowTemplate; + opmw:versionNumber "2"^^xsd:int. + version Number + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A Data variable is a workflow template artifact that represents a variable in the workflow specification. + +Example: +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix opmw: <http://www.opmw.org/ontology/> . + +<http://www.opmw.org/export/resource/DataVariable/AQUAFLOW_NTM_SUM_CORRDO> + a opmw:WorkflowTemplateArtifact , opmw:DataVariable ; + rdfs:label "Data variable Sum_CorrDO" ; + opmw:hasDimensionality "0"^^xsd:int ; + opmw:isGeneratedBy <http://www.opmw.org/export/resource/WorkflowTemplateProcess/AQUAFLOW_NTM_CREATEPLOTS> ; + opmw:template <http://www.opmw.org/export/resource/WorkflowTemplate/AQUAFLOW_NTM> . + Data Variable + + + + + + + + + An parameter variable represents a description of an input parameter of a process. Parameter variables can only be used by process. + +Example: +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix opmw: <http://www.opmw.org/ontology/> . + +<http://www.opmw.org/export/resource/ParameterVariable/AQUAFLOW_NTM_LATITUDE> + a opmw:/WorkflowTemplateArtifact , opmw:ParameterVariable ; + rdfs:label "Parameter variable Latitude" ; + opmw:template <http://www.opmw.org/export/resource/WorkflowTemplate/AQUAFLOW_NTM> . + Parameter Variable + + + + + + + + + + A workflow execution account represents the execution from the perspective of the system. + +Example: +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmo: <http://openprovenance.org/model/opmo#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionAccount/ACCOUNT1335533097598> + a opmo:Account , opmw:WorkflowExecutionAccount> ; + rdfs:label "Execution account created on 1335533097598" ; + opmw:executedInWorkflowSystem + <http://www.opmw.org/export/resource/Agent/SHELL> ; + opmw:hasEndTime + "2012-04-25T07:17:48-07:00"^^xsd:dateTime ; + opmw:hasExecutionDiagram "http://wind.isi.edu/marbles/assets/components/workflow_portal/users/1/Water/runs/run_144.png"^^xsd:anyURI ; + opmw:hasStartTime "2012-04-25T07:17:05-07:00"^^xsd:dateTime ; + opmw:hasStatus "SUCCESS" ; + Workflow Execution Account + + + + + + + + + + A workflow execution artifact represents a resource used or generated in the execution of a workflow. + +Example: +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmv: <http://purl.org/net/opmv/ns#> . +@prefix opmo: <http://openprovenance.org/model/opmo#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionArtifact/25F1016C12EBE301EE7AADBC0B085C45> + a opmw:WorkflowExecutionArtifact , opmv:Artifact; + rdfs:label "Execution artifact with id: 25f1016c12ebe301ee7aadbc0b085c45" ; + opmo:account <http://www.opmw.org/export/resource/WorkflowExecutionAccount/ACCOUNT1335533097598> ; + opmv:wasGeneratedBy <http://www.opmw.org/export/resource/WorkflowExecutionProcess/p1> ; + opmw:hasLocation "http://wings.isi.edu/opmexport/resource/1/144/Formatted_SMN_2010_03_10Z"^^xsd:anyURI ; + opmw:hasSize "8618"^^xsd:int ; + opmw:hasWorkflowTemplateArtifact <http://www.opmw.org/export/resource/DataVariable/AQUAFLOW_EDM_FORMATTEDDATA>. + Workflow Execution Artifact + + + + + + + + + + A workflow execution process represents the execution of a step in workflow template. The execution process also describes the specific method used to acomplish the task described in the proces template. + +Example: +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix opmv: <http://purl.org/net/opmv/ns#> . +@prefix opmo: <http://openprovenance.org/model/opmo#> . + +<http://www.opmw.org/export/resource/WorkflowExecutionProcess/CONVERTTOSTANDARDFORMAT133553> + a opmw:/WorkflowExecutionProcess , opmv:Process ; + rdfs:label "Execution process ConvertToStandardFormat" ; + opmo:account <http://www.opmw.org/export/resource/WorkflowExecutionAccount/ACCOUNT1335533097598> ; + opmv:used <http://www.opmw.org/export/resource/WorkflowExecutionArtifact/6C7CF277338D9590EE18534D4D78924F> ; + opmv:wasControlledBy <http://www.opmw.org/export/resource/Agent/ADMIN> ; + opmw:hasWorkflowTemplateProcess <http://www.opmw.org/export/resource/WorkflowTemplateProcess/AQUAFLOW_EDM_CONVERTTOSTANDARDFORMAT> . + Workflow Execution Process + + + + + + + + + + + A workflow template represents the design of the workflow. In such design, the different steps and inputs don't have to be bound to a specific tool or dataset. It is a generic view of the workflow, which is instantiated in each execution. + +Example: +@prefix dc: <http://purl.org/dc/terms/> . +@prefix opmw: <http://www.opmw.org/ontology/> . +<http://www.opmw.org/export/resource/WorkflowTemplate/AQUAFLOW_NTM> + a opmw:WorkflowTemplate; + rdfs:label "AquaFlow_NTM" ; + dc.contributor + <http://www.opmw.org/export/resource/Agent/WATER> ; + dc:modified + "2011-06-08T09:57:12-07:00"^^xsd:dateTime ; + opmw:hasVersion "2"^^xsd:int . + Workflow Template + + + + + + + + + + A workflow template artifact is part of a workflow template. It explains what kind of artifact is used or generated by the process template, along with possible restrictions that it may have. + +There are two different types of workflow template artifacts: data variables and parameter variables. + Workflow Template Artifact + + + + + + + + + + A workflow process template is an abstraction of the workflow execution process step that aims to describe the method followed by the scientist instead of its specific instantiation. + +Example: +@prefix opmw: <http://www.opmw.org/ontology/> . +@prefix water: <http://www.isi.edu/ac/Water/library.owl#> . + +<http://www.opmw.org/export/resource/WorkflowTemplateProcess/AQUAFLOW_NTM_CALCULATEHOURLYAVERAGES> + a opmw:ProcessTemplate, water:CalculateHourlyAverages; + opmw:template <http://www.opmw.org/export/resource/WorkflowTemplate/AQUAFLOW_NTM>; + opmw:uses <http://www.opmw.org/export/resource/DataVariable/AQUAFLOW_NTM_FILTEREDDATA>. + + Workflow Template Process + + + + + + + diff --git a/examples/pplan/config.yaml b/examples/pplan/config.yaml index ab03066..44eae6c 100644 --- a/examples/pplan/config.yaml +++ b/examples/pplan/config.yaml @@ -14,7 +14,7 @@ openapi: url: http://purl.org/net/p-plan firebase: - key: "test" + key: #endpoint not used for this example. endpoint: @@ -27,7 +27,5 @@ enable_post_paths: false enable_delete_paths: false enable_put_paths: false -auth: - provider: firebase follow_references: true diff --git a/examples/saref4agri/config.yaml b/examples/saref4agri/config.yaml new file mode 100644 index 0000000..a49ddde --- /dev/null +++ b/examples/saref4agri/config.yaml @@ -0,0 +1,32 @@ +ontologies: + - https://w3id.org/def/saref4agri + #test using w3id +name: saref4agri +output_dir: outputs + +openapi: + openapi: 3.0.1 + info: + description: Example with the Saref4agri ontology (generating a specifciation draft) + title: Saref4agri + version: v1.0.0 + externalDocs: + description: Saref4agri ontology + url: https://w3id.org/def/saref4city + +firebase: + key: + +endpoint: + url: http://endpoint.mint.isi.edu/example + prefix: https://w3id.org/okn/i/example + graph_base: http://endpoint.mint.isi.edu/example + + +enable_get_paths: true +enable_post_paths: false +enable_delete_paths: false +enable_put_paths: false + +follow_references: true + diff --git a/examples/saref4city/config.yaml b/examples/saref4city/config.yaml new file mode 100644 index 0000000..eb4024a --- /dev/null +++ b/examples/saref4city/config.yaml @@ -0,0 +1,31 @@ +ontologies: + - https://raw.githubusercontent.com/mariapoveda/saref-ext/master/SAREF4CITY/ontology/saref4city.ttl + #Test using directly a raw file URL +name: saref4city +output_dir: outputs + +openapi: + openapi: 3.0.1 + info: + description: Example with the Saref4city ontology + title: Saref4city + version: v1.0.0 + externalDocs: + description: Saref4city + url: https://w3id.org/def/saref4city + +firebase: + key: + +endpoint: + url: http://endpoint.mint.isi.edu/example + prefix: https://w3id.org/okn/i/example + graph_base: http://endpoint.mint.isi.edu/example + +enable_get_paths: true +enable_post_paths: false +enable_delete_paths: false +enable_put_paths: false + +follow_references: true + diff --git a/examples/wings/config.yaml b/examples/wings/config.yaml index 043ff08..1958cf2 100644 --- a/examples/wings/config.yaml +++ b/examples/wings/config.yaml @@ -17,8 +17,6 @@ openapi: servers: - url: http://localhost:8080/v0.0.1 -firebase: - key: endpoint: url: http://localhost:3030/wings diff --git a/src/main/java/edu/isi/oba/Mapper.java b/src/main/java/edu/isi/oba/Mapper.java index fbae930..95feab6 100644 --- a/src/main/java/edu/isi/oba/Mapper.java +++ b/src/main/java/edu/isi/oba/Mapper.java @@ -157,28 +157,32 @@ private List add_owlclass_to_openapi(Query query, Path pathGenerator, List ref = new ArrayList<>(); String classPrefixIRI = cls.getIRI().getNamespace(); if (defaultOntologyPrefixIRI.equals(classPrefixIRI)) { - MapperSchema mapperSchema = getMapperSchema(query, ontology, cls, this.schemaDescriptions.get(cls.getIRI())); - - for (OWLClass ref_class : mapperSchema.getProperties_range()) { - if (this.mapped_classes.contains(ref_class)){ - logger.info("The class " + ref_class + " exists "); - } else { - for (OWLOntology temp_ontology : this.ontologies) { - if ( follow_references ) { - this.mapped_classes.add(ref_class); - getMapperSchema(query, temp_ontology, ref_class,this.schemaDescriptions.get(ref_class.getIRI())); - OWLDocumentFormat format = ontology.getFormat(); - //String temp_defaultOntologyPrefixIRI = ((RDFXMLDocumentFormat) format).getDefaultPrefix(); - String temp_defaultOntologyPrefixIRI = format.asPrefixOWLDocumentFormat().getDefaultPrefix(); - add_owlclass_to_openapi(query, pathGenerator, temp_ontology, temp_defaultOntologyPrefixIRI, ref_class, false); + try{ + MapperSchema mapperSchema = getMapperSchema(query, ontology, cls, this.schemaDescriptions.get(cls.getIRI())); + + for (OWLClass ref_class : mapperSchema.getProperties_range()) { + if (this.mapped_classes.contains(ref_class)){ + logger.info("The class " + ref_class + " exists "); + } else { + for (OWLOntology temp_ontology : this.ontologies) { + if ( follow_references ) { + this.mapped_classes.add(ref_class); + getMapperSchema(query, temp_ontology, ref_class,this.schemaDescriptions.get(ref_class.getIRI())); + OWLDocumentFormat format = ontology.getFormat(); + //String temp_defaultOntologyPrefixIRI = ((RDFXMLDocumentFormat) format).getDefaultPrefix(); + String temp_defaultOntologyPrefixIRI = format.asPrefixOWLDocumentFormat().getDefaultPrefix(); + add_owlclass_to_openapi(query, pathGenerator, temp_ontology, temp_defaultOntologyPrefixIRI, ref_class, false); + } } } } - } - //Add the OpenAPI paths - if (topLevel) - addOpenAPIPaths(pathGenerator, mapperSchema, cls); + //Add the OpenAPI paths + if (topLevel) + addOpenAPIPaths(pathGenerator, mapperSchema, cls); + }catch(Exception e){ + logger.log(Level.SEVERE,"Could not parse class "+cls.getIRI().toString()); + } } return ref; }