net.sf.latexdraw.util
Class LPath

java.lang.Object
  extended by net.sf.latexdraw.util.LPath

public final class LPath
extends java.lang.Object

This class defines paths used in LaTeXDraw.

This file is part of LaTeXDraw
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

LaTeXDraw is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

05/11/07

Version:
3.0
Author:
Arnaud BLOUIN

Field Summary
static java.lang.String CACHE_DIR
          The name of the cache directory
static java.lang.String CACHE_SHARED_DIR
          The name of the cache directory for shared templates
static LPath INSTANCE
          The singleton.
static java.lang.String PATH_CACHE_DIR
           
static java.lang.String PATH_CACHE_SHARE_DIR
           
static java.lang.String PATH_LOCAL_USER
           
static java.lang.String PATH_PREFERENCES_XML_FILE
           
static java.lang.String PATH_SHARED
           
static java.lang.String PATH_TEMPLATES_DIR_USER
           
static java.lang.String PATH_TEMPLATES_SHARED
           
static java.lang.String TEMPLATE_DIR
          The name of the templates directory
 
Constructor Summary
private LPath()
           
 
Method Summary
 void checkDirectories()
          Creates the necessary directories for the execution of LaTeXDraw.
 void checkInstallDirectories()
          Creates the necessary directories for the installation of LaTeXDraw.
 java.lang.String getNormaliseNamespaceURI(java.lang.String nsURI)
          Normalises the given namespace URI: if the given namespace is null or empty, an empty string is returned.
 java.lang.String getPathJar()
          Allows to get the path of the project where the class LaTeXDrawPath is located.
private  java.lang.String getPathLocalUser()
           
private  java.lang.String getPathShared()
           
private  java.lang.String getPathTemplatesShared()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final LPath INSTANCE
The singleton.


CACHE_DIR

public static final java.lang.String CACHE_DIR
The name of the cache directory

See Also:
Constant Field Values

CACHE_SHARED_DIR

public static final java.lang.String CACHE_SHARED_DIR
The name of the cache directory for shared templates

See Also:
Constant Field Values

TEMPLATE_DIR

public static final java.lang.String TEMPLATE_DIR
The name of the templates directory

See Also:
Constant Field Values

PATH_LOCAL_USER

public static final java.lang.String PATH_LOCAL_USER

PATH_TEMPLATES_DIR_USER

public static final java.lang.String PATH_TEMPLATES_DIR_USER

PATH_PREFERENCES_XML_FILE

public static final java.lang.String PATH_PREFERENCES_XML_FILE

PATH_CACHE_DIR

public static final java.lang.String PATH_CACHE_DIR

PATH_CACHE_SHARE_DIR

public static final java.lang.String PATH_CACHE_SHARE_DIR

PATH_TEMPLATES_SHARED

public static final java.lang.String PATH_TEMPLATES_SHARED

PATH_SHARED

public static final java.lang.String PATH_SHARED
Constructor Detail

LPath

private LPath()
Method Detail

getNormaliseNamespaceURI

public java.lang.String getNormaliseNamespaceURI(java.lang.String nsURI)
Normalises the given namespace URI: if the given namespace is null or empty, an empty string is returned. Otherwise, the namespace followed by character ':' is returned.

Parameters:
nsURI - The namespace to normalise.
Returns:
The normalised namespace.
Since:
3.0

getPathLocalUser

private java.lang.String getPathLocalUser()
Returns:
The home directory of the user depending of his operating system.
Since:
3.0

getPathTemplatesShared

private java.lang.String getPathTemplatesShared()
Returns:
The path of the directory where the templates shared by the different users are located.
Since:
3.0

getPathShared

private java.lang.String getPathShared()
Returns:
The path where files are shared by users.
Since:
3.0

checkInstallDirectories

public void checkInstallDirectories()
Creates the necessary directories for the installation of LaTeXDraw.

Since:
1.9.2

checkDirectories

public void checkDirectories()
Creates the necessary directories for the execution of LaTeXDraw.

Since:
1.9.2

getPathJar

public java.lang.String getPathJar()
Allows to get the path of the project where the class LaTeXDrawPath is located.

Returns:
The path or null.
Since:
1.9.2