story.scheherazade.virgil.help
Class SCHStaticModification
java.lang.Object
story.scheherazade.virgil.help.SCHStaticModification
public class SCHStaticModification
- extends java.lang.Object
Contains the constants necessary to replace special words coming in from the
XML parsing. These are in case renaming occurs for a particular object that
is likely to change allowing the whole system to update all instances automatically.
This class contains the methods necessary for making substitutions in the incoming
XML information
- Author:
- Marshall
Method Summary |
static java.lang.String |
replaceBrackets(java.lang.String s)
Replaces all square brackets with pointed brackets |
static java.lang.String |
replaceConstants(java.lang.String s)
Replaces all constants with their defined name |
static void |
setContents(java.io.File aFile,
java.lang.String aContents)
Change the contents of text file in its entirety, overwriting any
existing text. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROGRAM_NAME
public static final java.lang.String PROGRAM_NAME
- See Also:
- Constant Field Values
PROGRAM_NAME_XML
public static final java.lang.String PROGRAM_NAME_XML
- See Also:
- Constant Field Values
STATE
public static final java.lang.String STATE
- See Also:
- Constant Field Values
STATE_XML
public static final java.lang.String STATE_XML
- See Also:
- Constant Field Values
ACTION
public static final java.lang.String ACTION
- See Also:
- Constant Field Values
ACTION_XML
public static final java.lang.String ACTION_XML
- See Also:
- Constant Field Values
CONDITION
public static final java.lang.String CONDITION
- See Also:
- Constant Field Values
CONDITION_XML
public static final java.lang.String CONDITION_XML
- See Also:
- Constant Field Values
CONDITIONS
public static final java.lang.String CONDITIONS
- See Also:
- Constant Field Values
CONDITIONS_XML
public static final java.lang.String CONDITIONS_XML
- See Also:
- Constant Field Values
TIMELINE
public static final java.lang.String TIMELINE
- See Also:
- Constant Field Values
TIMELINE_XML
public static final java.lang.String TIMELINE_XML
- See Also:
- Constant Field Values
SETUP
public static final java.lang.String SETUP
- See Also:
- Constant Field Values
SETUP_XML
public static final java.lang.String SETUP_XML
- See Also:
- Constant Field Values
VERSION
public static java.lang.String VERSION
VERSION_XML
public static java.lang.String VERSION_XML
SCHStaticModification
public SCHStaticModification()
setContents
public static void setContents(java.io.File aFile,
java.lang.String aContents)
throws java.io.FileNotFoundException,
java.io.IOException
- Change the contents of text file in its entirety, overwriting any
existing text.
This style of implementation throws all exceptions to the caller.
Source: http://www.javapractices.com/topic/TopicAction.do?Id=42
- Parameters:
aFile
- is an existing file which can be written to.
- Throws:
java.lang.IllegalArgumentException
- if param does not comply.
java.io.FileNotFoundException
- if the file does not exist.
java.io.IOException
- if problem encountered during write.
replaceConstants
public static java.lang.String replaceConstants(java.lang.String s)
- Replaces all constants with their defined name
- Parameters:
s
- the String to check for constants
- Returns:
- the fixed String
replaceBrackets
public static java.lang.String replaceBrackets(java.lang.String s)
- Replaces all square brackets with pointed brackets
- Parameters:
s
- the String to have the brackets replaced
- Returns:
- the fixed String
Copyright © 2011 David K. Elson. All Rights Reserved.