本文整理了Java中org.semanticweb.owlapi.util.Version
类的一些代码示例,展示了Version
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version
类的具体详情如下:
包路径:org.semanticweb.owlapi.util.Version
类名称:Version
[英]A simple utility class that describes the version of a piece of software e.g. reasoner version.
A version number is assumed to be the following format: major.minor.patch.build.
[中]一个简单的实用程序类,用于描述软件的版本,例如推理机版本。
版本号假定为以下格式:主要。少数的色斑建筑
代码示例来源:origin: org.semanticweb.more/more-reasoner
@Override
public Version getReasonerVersion() {
// TODO Update as ELK
return new Version(0, 1, 5, 0);
// return null;
}
代码示例来源:origin: org.semanticweb.more/more-reasoner
public String getReasonerVersionStr() {
// TODO Update as ELK
return getReasonerVersion().getMajor() + "." + getReasonerVersion().getMinor() + "." + getReasonerVersion().getPatch();
// return null;
}
代码示例来源:origin: net.sourceforge.owlapi/jfact
@Override
public Version getReasonerVersion() {
return new Version(5, 0, 3, 0);
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl
public Version getReasonerVersion() {
return new Version(1, 0, 0, 0);
}
代码示例来源:origin: org.protege/protege-editor-owl
public Version getReasonerVersion() {
return new Version(1, 0, 0, 0);
}
代码示例来源:origin: protegeproject/protege
@Nonnull
public Version getReasonerVersion() {
return new Version(1, 0, 0, 0);
}
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
@Nonnull
public Version getReasonerVersion() {
return new Version(1, 0, 0, 0);
}
代码示例来源:origin: com.hermit-reasoner/org.semanticweb.hermit
public Version getReasonerVersion() {
String versionString=Reasoner.class.getPackage().getImplementationVersion();
String[] splitted;
int filled=0;
int version[]=new int[4];
if (versionString!=null) {
splitted=versionString.split("\\.");
while (filled<splitted.length) {
version[filled]=Integer.parseInt(splitted[filled]);
filled++;
}
}
while (filled<version.length) {
version[filled]=0;
filled++;
}
return new Version(version[0],version[1],version[2],version[3]);
}
public OWLOntology getRootOntology() {
代码示例来源:origin: liveontologies/elk-reasoner
@Override
public Version getReasonerVersion() {
LOGGER_.trace("getReasonerVersion()");
String versionString = ElkReasoner.class.getPackage()
.getImplementationVersion();
String[] splitted;
int filled = 0;
int version[] = new int[4];
if (versionString != null) {
splitted = versionString.replaceAll("[^\\d.]", "").split("\\.");
while (filled < splitted.length && filled < version.length) {
String part = splitted[filled];
if (part.length() > 8) {
part = part.substring(0, 8);
}
version[filled] = Integer.parseInt(part);
filled++;
}
}
while (filled < version.length) {
version[filled] = 0;
filled++;
}
return new Version(version[0], version[1], version[2], version[3]);
}
代码示例来源:origin: liveontologies/elk-reasoner
@Override
public Version getReasonerVersion() {
LOGGER_.trace("getReasonerVersion()");
String versionString = ElkReasoner.class.getPackage()
.getImplementationVersion();
String[] splitted;
int filled = 0;
int version[] = new int[4];
if (versionString != null) {
splitted = versionString.replaceAll("[^\\d.]", "").split("\\.");
while (filled < splitted.length && filled < version.length) {
String part = splitted[filled];
if (part.length() > 8) {
part = part.substring(0, 8);
}
version[filled] = Integer.parseInt(part);
filled++;
}
}
while (filled < version.length) {
version[filled] = 0;
filled++;
}
return new Version(version[0], version[1], version[2], version[3]);
}
代码示例来源:origin: liveontologies/elk-reasoner
@Override
public Version getReasonerVersion() {
LOGGER_.trace("getReasonerVersion()");
String versionString = ElkReasoner.class.getPackage()
.getImplementationVersion();
String[] splitted;
int filled = 0;
int version[] = new int[4];
if (versionString != null) {
splitted = versionString.replaceAll("[^\\d.]", "").split("\\.");
while (filled < splitted.length && filled < version.length) {
String part = splitted[filled];
if (part.length() > 8) {
part = part.substring(0, 8);
}
version[filled] = Integer.parseInt(part);
filled++;
}
}
while (filled < version.length) {
version[filled] = 0;
filled++;
}
return new Version(version[0], version[1], version[2], version[3]);
}
代码示例来源:origin: ontop/ontop
/**
* extract version from {@link it.unibz.inf.ontop.utils.VersionInfo}, which is from the file {@code version.properties}
*/
private static Version extractVersion() {
VersionInfo versionInfo = VersionInfo.getVersionInfo();
String versionString = versionInfo.getVersion();
String[] splits = versionString.split("\\.");
int major = 0;
int minor = 0;
int patch = 0;
int build = 0;
try {
major = Integer.parseInt(splits[0]);
minor = Integer.parseInt(splits[1]);
patch = Integer.parseInt(splits[2]);
build = Integer.parseInt(splits[3]);
} catch (Exception ignored) {
}
return new Version(major, minor, patch, build);
}
代码示例来源:origin: it.unibz.inf.ontop/ontop-quest-owlapi3
/**
* extract version from {@link it.unibz.krdb.obda.utils.VersionInfo}, which is from the file {@code version.properties}
*/
private void extractVersion() {
VersionInfo versionInfo = VersionInfo.getVersionInfo();
String versionString = versionInfo.getVersion();
String[] splits = versionString.split("\\.");
int major = 0;
int minor = 0;
int patch = 0;
int build = 0;
try {
major = Integer.parseInt(splits[0]);
minor = Integer.parseInt(splits[1]);
patch = Integer.parseInt(splits[2]);
build = Integer.parseInt(splits[3]);
} catch (Exception ignored) {
}
version = new Version(major, minor, patch, build);
}
代码示例来源:origin: it.unibz.inf.ontop/ontop-quest-owlapi
/**
* extract version from {@link it.unibz.inf.ontop.utils.VersionInfo}, which is from the file {@code version.properties}
*/
private void extractVersion() {
VersionInfo versionInfo = VersionInfo.getVersionInfo();
String versionString = versionInfo.getVersion();
String[] splits = versionString.split("\\.");
int major = 0;
int minor = 0;
int patch = 0;
int build = 0;
try {
major = Integer.parseInt(splits[0]);
minor = Integer.parseInt(splits[1]);
patch = Integer.parseInt(splits[2]);
build = Integer.parseInt(splits[3]);
} catch (Exception ignored) {
}
version = new Version(major, minor, patch, build);
}
代码示例来源:origin: net.sourceforge.owlapi/pellet-owlapi-ignazio1977
private static Version createVersion() {
String versionString = VersionInfo.getInstance().getVersionString();
String[] versionNumbers = versionString.split( "\\." );
int major = parseNumberIfExists( versionNumbers, 0 );
int minor = parseNumberIfExists( versionNumbers, 1 );
int patch = parseNumberIfExists( versionNumbers, 2 );
int build = parseNumberIfExists( versionNumbers, 3 );
return new Version( major, minor, patch, build );
}
代码示例来源:origin: com.github.ansell.pellet/pellet-owlapiv3
private static Version createVersion() {
String versionString = VersionInfo.getInstance().getVersionString();
String[] versionNumbers = versionString.split( "\\." );
int major = parseNumberIfExists( versionNumbers, 0 );
int minor = parseNumberIfExists( versionNumbers, 1 );
int patch = parseNumberIfExists( versionNumbers, 2 );
int build = parseNumberIfExists( versionNumbers, 3 );
return new Version( major, minor, patch, build );
}
代码示例来源:origin: com.github.galigator.openllet/openllet-owlapi
private static Version createVersion()
{
final String versionString = VersionInfo.getInstance().getVersionString();
final String[] versionNumbers = versionString.split("\\.");
final int major = parseNumberIfExists(versionNumbers, 0);
final int minor = parseNumberIfExists(versionNumbers, 1);
final int patch = parseNumberIfExists(versionNumbers, 2);
final int build = parseNumberIfExists(versionNumbers, 3);
return new Version(major, minor, patch, build);
}
代码示例来源:origin: Galigator/openllet
private static Version createVersion()
{
final String versionString = VersionInfo.getInstance().getVersionString();
final String[] versionNumbers = versionString.split("\\.");
final int major = parseNumberIfExists(versionNumbers, 0);
final int minor = parseNumberIfExists(versionNumbers, 1);
final int patch = parseNumberIfExists(versionNumbers, 2);
final int build = parseNumberIfExists(versionNumbers, 3);
return new Version(major, minor, patch, build);
}
代码示例来源:origin: Galigator/openllet
private static Version createVersion()
{
final String versionString = VersionInfo.getInstance().getVersionString();
final String[] versionNumbers = versionString.split("\\.");
final int major = parseNumberIfExists(versionNumbers, 0);
final int minor = parseNumberIfExists(versionNumbers, 1);
final int patch = parseNumberIfExists(versionNumbers, 2);
final int build = parseNumberIfExists(versionNumbers, 3);
return new Version(major, minor, patch, build);
}
内容来源于网络,如有侵权,请联系作者删除!