View Javadoc
1   /*
2    * Copyright 2018-2022 Medical Information Systems Research Group (https://medical.zcu.cz),
3    * Department of Computer Science and Engineering, University of West Bohemia.
4    * Address: Univerzitni 8, 306 14 Plzen, Czech Republic.
5    *
6    * Author Petr Vcelak (vcelak@kiv.zcu.cz).
7    *
8    * This file is part of MRECore project.
9    *
10   * MRECore is free software: you can redistribute it and/or modify
11   * it under the terms of the GNU General Public License as published by
12   * the Free Software Foundation, either version 3 of the License.
13   *
14   * MRECore is distributed in the hope that it will be useful,
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17   * GNU General Public License for more details.
18   *
19   * You should have received a copy of the GNU General Public License
20   * along with MRECore. If not, see <http://www.gnu.org/licenses/>.
21   */
22  package cz.zcu.mre.service.data;
23  
24  import java.lang.reflect.Field;
25  import org.apache.jena.rdf.model.Property;
26  
27  /**
28   *
29   * @author Petr Vcelak (vcelak@kiv.zcu.cz)
30   */
31  public class MREDataBuilderConfig {
32  
33      private Class clazz;
34      private String ontology;
35      private String typeRDF;
36      private Field field;
37      private String dataNamespace;
38      private Property property;
39  
40      public Class getClazz() {
41          return clazz;
42      }
43  
44      public void setClazz(Class clazz) {
45          this.clazz = clazz;
46      }
47  
48      public Field getField() {
49          return field;
50      }
51  
52      public void setField(Field field) {
53  
54          if (field == null) {
55              throw new IllegalArgumentException("Null field is not allowed.");
56          }
57          this.field = field;
58      }
59  
60      public String getName() {
61          return field.getName();
62      }
63  
64      public Class getPropertyType() {
65          return field.getType();
66      }
67  
68      public String getDataNamespace() {
69          return dataNamespace;
70      }
71  
72      public void setDataNamespace(String dataNamespace) {
73          this.dataNamespace = dataNamespace;
74      }
75  
76      public Property getProperty() {
77          return property;
78      }
79  
80      public void setProperty(Property property) {
81          this.property = property;
82      }
83  
84      public String getOntology() {
85          return ontology;
86      }
87  
88      public void setOntology(String ontology) {
89          this.ontology = ontology;
90      }
91  
92      public String getTypeRDF() {
93          return typeRDF;
94      }
95  
96      public void setTypeRDF(String typeRDF) {
97          this.typeRDF = typeRDF;
98      }
99  
100 }