MICO Platform
 All Classes Namespaces Functions Variables Friends
ResourceAnno4cpp.hpp
1 #ifndef RESOURCEANNO4CPP_HPP
2 #define RESOURCEANNO4CPP_HPP 1
3 
4 #include "Resource.hpp"
5 #include "Uri.hpp"
6 #include "PersistenceService.hpp"
7 #include "Logging.hpp"
8 #include <jnipp.h>
9 #include <anno4cpp.h>
10 
11 namespace mico {
12  namespace persistence {
13  namespace model {
14 
15  class ResourceAnno4cpp : public Resource {
16 
17  private:
18  jnipp::WeakRef<jnipp::eu::mico::platform::anno4j::model::ResourceMMM> m_resourceMMM;
19  std::shared_ptr<Asset> createAsset(std::string location = "");
20 
21  protected:
22  PersistenceService& m_persistenceService;
23  std::string m_jnippErrorMessage;
24 
25  ResourceAnno4cpp(jnipp::Ref<jnipp::eu::mico::platform::anno4j::model::ResourceMMM> resourceMMM,
26  PersistenceService& persistenceService);
27 
28  public:
30 
31  virtual jnipp::Ref<jnipp::eu::mico::platform::anno4j::model::ResourceMMM> getRDFObject();
32 
33  virtual std::string getSyntacticalType();
34 
35  virtual void setSyntacticalType(std::string syntacticalType);
36 
37  virtual std::string getSemanticType();
38 
39  virtual void setSemanticType(std::string semanticType);
40 
41 
42  virtual std::shared_ptr<Asset> getAsset();
43 
44  virtual std::shared_ptr<Asset> getAssetWithLocation(mico::persistence::model::URI);
45 
46  virtual bool hasAsset();
47 
48  virtual mico::persistence::PersistenceService& getPersistenceService() {return m_persistenceService; }
49 
50  };
51  }
52  }
53 }
54 
55 #endif
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in c...
Definition: http_client.cpp:23
virtual std::string getSyntacticalType()
the mime type, e.g.
Definition: ResourceAnno4cpp.cpp:62
virtual mico::persistence::model::URI getURI()
Return the identifier (a unique URI) for this item.
Definition: ResourceAnno4cpp.cpp:46
Main service for accessing the MICO persistence API.
Definition: PersistenceService.hpp:51
Definition: ResourceAnno4cpp.hpp:15
Super type of items and parts.
Definition: Resource.hpp:18
A URI.
Definition: Uri.hpp:22