com.hp.hpl.deli
Class Workspace

java.lang.Object
  extended bycom.hp.hpl.deli.Workspace
All Implemented Interfaces:
java.io.Serializable

public class Workspace
extends java.lang.Object
implements java.io.Serializable

This class provides a workspace for a specific CC/PP implementation. The constructor configures the workspace using a properties file. This allows it to support a specific protocol and vocabulary such as UAProf.

Author:
Mark H. Butler (mark-h_butler@hp.com)
See Also:
Serialized Form

Field Summary
private static Workspace _instance
           
protected  boolean cacheReferenceProfiles
           
protected  java.lang.String componentProperty
           
protected  java.lang.String datatypeConfigFile
           
protected  java.util.HashMap datatypeExpressions
           
protected  boolean datatypeValidationOn
           
protected  boolean debug
           
protected  boolean debugRequestHeaders
           
static java.lang.String deliVersionNumber
           
protected  boolean enforceUAProfTwoDatatypes
           
private static long HOURINMILLISECONDS
           
protected  LocalProfiles localProfiles
           
protected  java.lang.String localProfilesPath
           
private static org.apache.log4j.Logger logger
           
protected  long maxCachedProfileLifetime
           
protected  int maxCacheSize
           
protected  boolean normaliseWhitespaceInProfileDiff
           
protected static java.lang.String path
           
protected  boolean preferLocalOverRemoteProfiles
           
protected  boolean printDefaults
           
protected  boolean printProfileBeforeMerge
           
protected  boolean processUnconfiguredNamespaces
           
protected  boolean processUndefinedAttributes
           
protected  ProfileCache profileCache
           
protected  boolean profileDiffDigestVerification
           
protected  java.util.Vector rdfsUri
           
protected  java.lang.String rdfUri
           
protected  boolean refreshStaleProfiles
           
private static long serialVersionUID
          Comment for serialVersionUID
private  javax.servlet.ServletContext servletContext
           
protected  boolean useLocalProfilesIfNoCCPP
           
protected static boolean useLog4j
           
protected  Vocabulary vocabulary
           
 
Constructor Summary
Workspace()
           
 
Method Summary
 void configure(javax.servlet.ServletContext sc, java.lang.String filename)
          This method processes the configuration file and constructs the vocabulary, profile cache and local profiles objects.
protected  org.xml.sax.InputSource getInputSource(java.lang.String name)
           
static Workspace getInstance()
           
static java.lang.String getPath()
           
protected  java.io.InputStream getResource(java.lang.String name)
          This method returns a local or global resource.
protected static void printDebug(java.lang.String output)
          This method provides conditional output for debugging purposes.
protected static void printInfo(java.lang.String output)
          This method provides conditional output for debugging purposes.
protected static void printWarning(java.lang.String output)
          This method provides conditional output for debugging purposes.
static void setInstance(Workspace w)
           
private  java.lang.String setUriProperty(org.w3c.dom.Node n)
          This method retrieves a URI value from the configuration file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Comment for serialVersionUID

See Also:
Constant Field Values

deliVersionNumber

public static java.lang.String deliVersionNumber

logger

private static org.apache.log4j.Logger logger

_instance

private static transient Workspace _instance

HOURINMILLISECONDS

private static final long HOURINMILLISECONDS
See Also:
Constant Field Values

useLog4j

protected static boolean useLog4j

path

protected static java.lang.String path

datatypeExpressions

protected java.util.HashMap datatypeExpressions

servletContext

private transient javax.servlet.ServletContext servletContext

vocabulary

protected Vocabulary vocabulary

profileCache

protected transient ProfileCache profileCache

localProfiles

protected transient LocalProfiles localProfiles

maxCachedProfileLifetime

protected long maxCachedProfileLifetime

maxCacheSize

protected int maxCacheSize

datatypeValidationOn

protected boolean datatypeValidationOn

refreshStaleProfiles

protected boolean refreshStaleProfiles

processUndefinedAttributes

protected boolean processUndefinedAttributes

normaliseWhitespaceInProfileDiff

protected boolean normaliseWhitespaceInProfileDiff

profileDiffDigestVerification

protected boolean profileDiffDigestVerification

useLocalProfilesIfNoCCPP

protected boolean useLocalProfilesIfNoCCPP

localProfilesPath

protected java.lang.String localProfilesPath

datatypeConfigFile

protected java.lang.String datatypeConfigFile

processUnconfiguredNamespaces

protected boolean processUnconfiguredNamespaces

printDefaults

protected boolean printDefaults

debug

protected boolean debug

debugRequestHeaders

protected boolean debugRequestHeaders

printProfileBeforeMerge

protected boolean printProfileBeforeMerge

cacheReferenceProfiles

protected boolean cacheReferenceProfiles

rdfUri

protected java.lang.String rdfUri

rdfsUri

protected java.util.Vector rdfsUri

componentProperty

protected java.lang.String componentProperty

preferLocalOverRemoteProfiles

protected boolean preferLocalOverRemoteProfiles

enforceUAProfTwoDatatypes

protected boolean enforceUAProfTwoDatatypes
Constructor Detail

Workspace

public Workspace()
Method Detail

getInstance

public static Workspace getInstance()

setInstance

public static void setInstance(Workspace w)

configure

public void configure(javax.servlet.ServletContext sc,
                      java.lang.String filename)
               throws javax.xml.parsers.ParserConfigurationException
This method processes the configuration file and constructs the vocabulary, profile cache and local profiles objects.

Parameters:
sc - The servlet context.
filename - The filename of the configuration file.
Throws:
javax.xml.parsers.ParserConfigurationException

printDebug

protected static void printDebug(java.lang.String output)
This method provides conditional output for debugging purposes.

Parameters:
output - The string to output.

printWarning

protected static void printWarning(java.lang.String output)
This method provides conditional output for debugging purposes.

Parameters:
output - The string to output.

printInfo

protected static void printInfo(java.lang.String output)
This method provides conditional output for debugging purposes.

Parameters:
output - The string to output.

setUriProperty

private java.lang.String setUriProperty(org.w3c.dom.Node n)
This method retrieves a URI value from the configuration file.

Parameters:
n - The current node.

getInputSource

protected org.xml.sax.InputSource getInputSource(java.lang.String name)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

getPath

public static java.lang.String getPath()

getResource

protected java.io.InputStream getResource(java.lang.String name)
                                   throws java.lang.Exception
This method returns a local or global resource. If it is a local resource, DELI uses the appropriate method depending on whether DELI is running within a servlet or not.

Parameters:
name - The name of the resource. If it is a URL then it is a global resource.
Returns:
A InputStream for the resource.
Throws:
java.lang.Exception