-
Notifications
You must be signed in to change notification settings - Fork 0
/
Smartphones.java
95 lines (70 loc) · 2.37 KB
/
Smartphones.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
package eu.kidf.diversicon.data;
import javax.annotation.Nullable;
import eu.kidf.diversicon.core.BuildInfo;
import eu.kidf.diversicon.core.LexResPackage;
/**
* Singleton holding references to sample {@code handheld-devices} files packaged for Diversicon
*
* @since 0.1.0
*
*/
public class Smartphones extends LexResPackage {
/**
* @since 0.1.0
*/
public static final String SHORT_NAME = "smartphones";
/**
* @since 0.1.0
*/
public static final String NAME = "div-" + SHORT_NAME;
/**
* @since 0.1.0
*/
public static final String LABEL = "Smartphones";
/**
* @since 0.1.0
*/
public static final String PREFIX = "sm";
/**
* @since 0.1.0
*/
private static final String CLASSPATH = "classpath:/" + SHORT_NAME;
/**
* @since 0.1.0
*/
public static final String XML_URI = CLASSPATH + ".xml";
/**
* @since 0.1.0
*/
@Nullable
private static BuildInfo buildInfo;
/**
* @since 0.1.0
*/
private static final Smartphones INSTANCE = new Smartphones();
static {
INSTANCE.setName(NAME);
INSTANCE.setLabel(LABEL);
INSTANCE.setPrefix(PREFIX);
//INSTANCE.setH2DbUri(CLASSPATH + ".h2.db");
//INSTANCE.setSqlUri(CLASSPATH + ".sql");
INSTANCE.setXmlUri(CLASSPATH + ".xml");
INSTANCE.setSampleXmlUri(CLASSPATH + ".xml"); // sample of itself
if (BuildInfo.hasProperties(Smartphones.class)){
BuildInfo buildInfo = BuildInfo.of(Smartphones.class);
INSTANCE.setVersion(buildInfo.getVersion());
INSTANCE.putNamespace(PREFIX, buildInfo.sourceAtTag("master", "src/main/resources/" + SHORT_NAME + ".xml") );
// can't because of dep cycle!
// INSTANCE.putNamespace(DivWn31.PREFIX, DivWn31.of().namespace());
INSTANCE.putNamespace("wn31", "https://github.com/diversicon-kb/diversicon-wordnet-3.1");
} else {
throw new IllegalStateException("Couldn't find properties file " + BuildInfo.BUILD_PROPERTIES_PATH + " for class " + Smartphones.class.getCanonicalName());
}
}
/**
* @since 0.1.0
*/
public static Smartphones of(){
return INSTANCE;
}
}