Class PlatformFactory
- java.lang.Object
-
- org.eclipse.rdf4j.common.platform.PlatformFactory
-
public class PlatformFactory extends java.lang.ObjectPlatformFactory creates a Platform instance corresponding with the current platform.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerloggerPlatformplatformprivate static PlatformFactorysharedInstance
-
Constructor Summary
Constructors Modifier Constructor Description privatePlatformFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private PlatformcreatePlatform()Tries to determine the platform we're running on based on Java system properties and/or environment variables.static PlatformFactorygetInstance()Returns the Platform instance corresponding with the current platform.static PlatformgetPlatform()Returns the Platform instance corresponding with the current platform.private java.lang.StringgetSystemEnv(java.lang.String propertyName)Get system environment variableprivate booleanisGnome()Detect gnome environments.private booleanisKDE()Detect KDE environments.static voidmain(java.lang.String[] args)Main
-
-
-
Field Detail
-
sharedInstance
private static PlatformFactory sharedInstance
-
platform
public final Platform platform
-
logger
private final org.slf4j.Logger logger
-
-
Method Detail
-
getInstance
public static PlatformFactory getInstance()
Returns the Platform instance corresponding with the current platform.- Returns:
- factory
-
getPlatform
public static Platform getPlatform()
Returns the Platform instance corresponding with the current platform.
-
createPlatform
private Platform createPlatform()
Tries to determine the platform we're running on based on Java system properties and/or environment variables. See http://lopica.sourceforge.net/os.html for an overview.
-
isGnome
private boolean isGnome()
Detect gnome environments.- Returns:
- true when Gnome session
-
isKDE
private boolean isKDE()
Detect KDE environments.- Returns:
- true when KDE
-
getSystemEnv
private java.lang.String getSystemEnv(java.lang.String propertyName)
Get system environment variable- Parameters:
propertyName-- Returns:
- system environment variable
-
main
public static void main(java.lang.String[] args)
Main- Parameters:
args- arguments
-
-