de.interactive_instruments.ShapeChange.Target.AppConfiguration
Class AppConfiguration

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Target.AppConfiguration.AppConfiguration
All Implemented Interfaces:
MessageSource, Target

public class AppConfiguration
extends Object
implements Target, MessageSource

Creates an application configuration file.

Author:
Johannes Echterhoff (echterhoff interactive-instruments de)

Field Summary
static String DEFAULT_ID_COLUMN_NAME
           
static int DEFAULT_SIZE
           
static String NS
           
static String PARAM_ID_COLUMN_NAME
           
static String PARAM_SIZE
           
static String PLATFORM
           
static String REFERENCE_NAME
           
static int TARGET_APPCFG
           
 
Constructor Summary
AppConfiguration()
           
 
Method Summary
protected  void addAttribute(Document document, Element e, String name, String value)
          Add attribute to an element
protected  Document createDocument()
           
 int getTargetID()
           
 void initialise(PackageInfo pi, Model m, Options o, ShapeChangeResult r, boolean diagOnly)
          Allows a target to perform the necessary initialization routines before processing.
 String message(int mnr)
          Return a message for a message number.
 void process(ClassInfo ci)
          The converter will call this method for each class belonging to the package given during initialization (see Target.initialise(de.interactive_instruments.ShapeChange.Model.PackageInfo, de.interactive_instruments.ShapeChange.Model.Model, de.interactive_instruments.ShapeChange.Options, de.interactive_instruments.ShapeChange.ShapeChangeResult, boolean)).
 void write()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TARGET_APPCFG

public static final int TARGET_APPCFG
See Also:
Constant Field Values

PLATFORM

public static final String PLATFORM
See Also:
Constant Field Values

NS

public static final String NS
See Also:
Constant Field Values

PARAM_ID_COLUMN_NAME

public static final String PARAM_ID_COLUMN_NAME
See Also:
Constant Field Values

PARAM_SIZE

public static final String PARAM_SIZE
See Also:
Constant Field Values

DEFAULT_ID_COLUMN_NAME

public static final String DEFAULT_ID_COLUMN_NAME
See Also:
Constant Field Values

DEFAULT_SIZE

public static final int DEFAULT_SIZE
See Also:
Constant Field Values

REFERENCE_NAME

public static final String REFERENCE_NAME
See Also:
Constant Field Values
Constructor Detail

AppConfiguration

public AppConfiguration()
Method Detail

initialise

public void initialise(PackageInfo pi,
                       Model m,
                       Options o,
                       ShapeChangeResult r,
                       boolean diagOnly)
                throws ShapeChangeAbortException
Description copied from interface: Target
Allows a target to perform the necessary initialization routines before processing.

Will be called by the Converter for each selected schema (see Model.selectedSchemas() and PackageInfo.isSchema()).

Specified by:
initialise in interface Target
Parameters:
pi - a schema from the model selected via the configuration (see Model.selectedSchemas()) - not necessarily always an application schema
Throws:
ShapeChangeAbortException
See Also:
Target.initialise(de.interactive_instruments.ShapeChange.Model.PackageInfo, de.interactive_instruments.ShapeChange.Model.Model, de.interactive_instruments.ShapeChange.Options, de.interactive_instruments.ShapeChange.ShapeChangeResult, boolean)

process

public void process(ClassInfo ci)
Description copied from interface: Target
The converter will call this method for each class belonging to the package given during initialization (see Target.initialise(de.interactive_instruments.ShapeChange.Model.PackageInfo, de.interactive_instruments.ShapeChange.Model.Model, de.interactive_instruments.ShapeChange.Options, de.interactive_instruments.ShapeChange.ShapeChangeResult, boolean)).

NOTE: will be called not only for the classes directly contained in the package, but also all sub-packages belonging to the same targetNamespace!

Specified by:
process in interface Target

addAttribute

protected void addAttribute(Document document,
                            Element e,
                            String name,
                            String value)
Add attribute to an element


createDocument

protected Document createDocument()

write

public void write()
Specified by:
write in interface Target
See Also:
Target.write()

getTargetID

public int getTargetID()
Specified by:
getTargetID in interface Target

message

public String message(int mnr)
Description copied from interface: MessageSource
Return a message for a message number.

Specified by:
message in interface MessageSource
See Also:
MessageSource.message(int)


Copyright © 2015. All rights reserved.