OBEROn SDK

com.oberon.ooql.sdk
Class Dump

java.lang.Object
  extended by com.oberon.ooql.sdk.OBBase
      extended by com.oberon.ooql.sdk.Dump
All Implemented Interfaces:
java.io.Serializable

public class Dump
extends OBBase
implements java.io.Serializable

Exports/Imports/Compares OBEROn data to/from dump files

Version:
5.0
See Also:
Serialized Form

Field Summary
static java.lang.String[] adminTypes
          List of administrative types
static java.lang.String[] adminUserTypes
          List of User-dependent administrative types
 
Constructor Summary
Dump()
           
 
Method Summary
 void addAdminTarget(java.lang.String adminType)
          Set the admin export / import / compare type
 void addClassPattern(java.lang.String classPattern)
          Add a Class pattern; used to filter ObjectObj instances
 void addNamePattern(java.lang.String namePattern)
          Add a name pattern; used to filter ObjectObj instances
 void addObjectSpacePattern(java.lang.String osPattern)
          Add an ObjectSpace pattern; used to filter ObjectObj instances
 void addPattern(java.lang.String adminNamePattern)
          Add an admin export / import / compare name pattern
 void addRevisionPattern(java.lang.String revisionPattern)
          Add a revision pattern; used to filter ObjectObj instances
 void addUserPattern(java.lang.String userPattern)
          Add a User pattern; used to filter User-dependent administrative objects
static java.lang.String compareAdminObject(OBBase refObj, OBBase dbObj, boolean feature, boolean image, boolean force, Framework framework)
          Compare a reference administrative object with its DB version
 void docompare(java.io.DataInputStream inStream, java.io.DataOutputStream logStream, Framework framework)
          Compare data (administrative or application objects [ObjectObj]) from a file; produce a log report
 void doexpand(java.io.DataOutputStream outStream, Framework framework)
          Expand administrative objects: report all administrative links
 void doexport(java.lang.String outFile, java.io.DataOutputStream outStream, Framework framework)
          Export data (administrative or application objects [ObjectObj]) to a file
 void doimport(java.lang.String inFile, java.io.DataInputStream inStream, Framework framework)
          Import data (administrative or application objects [ObjectObj]) from a file
 java.util.Vector<java.lang.String> getAdminTarget()
          Get the admin type filter
static java.lang.String[] getAdminTypes()
          Returns the list of administrative dump types
static java.lang.String[] getAdminUserTypes()
          Returns the list of user dump types
 java.util.Vector<java.lang.String> getClassPattern()
          Return the list of Class patterns
 int getCommit()
          Get the transaction commit number
 java.lang.String getCompareCommand(java.lang.String fileName, java.lang.String logFileName, boolean append)
          Return the OOQL command to compare administrative objects on the basic of set options
 boolean getDumpFeatures()
          Get the include Feature flag
 boolean getDumpFiles()
          Get the include files flag
 boolean getDumpHistory()
          Get the include history flag
 boolean getDumpImages()
          Get the include images flag
 boolean getDumpLinks()
          Get the include Link flag
 boolean getDumpStages()
          Get the include Stage flag
 java.lang.String getExpandCommand(java.lang.String fileName, boolean append)
          Return the OOQL command to expand administrative objects on the basic of set options
 java.lang.String getExportCommand(java.lang.String fileName, boolean append)
          Return the OOQL command to export objects on the basic of set options.
 boolean getFullDump()
          Get the full dump flag
 java.lang.String getImportCommand(java.lang.String fileName)
          Return the OOQL command to import objects on the basic of set options.
 java.lang.String getName()
          [Inherited but not used]
 java.util.Vector<java.lang.String> getNamePattern()
          Return the list of ObjectObj name patterns
 java.lang.String getObjectGroup()
          Get the settled ObjectGroup name
 java.util.Vector<java.lang.String> getObjectSpacePattern()
          Return the list of ObjectSpace patterns
 java.util.Vector<java.lang.String> getPatterns()
          Return the list of admin name patterns
 ProgressCounter getProgressCounter()
          Return the ProgressCounter
 java.lang.String getProperty(java.lang.String propertyName, java.util.Vector<java.lang.Object> filterArgs, java.lang.String token, Framework framework)
          [inherited but NOT USED]
 java.util.Vector<java.lang.String> getRevisionPattern()
          Return the list of revision patterns
 java.util.Vector<?> getTargetNames(java.lang.String composedName, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
          [inherited but NOT USED]
 java.util.Vector<java.lang.String> getUserPatterns()
          Return the list of User patterns
 boolean isForcedInput()
          Get the force flag for import operations
 boolean isJSON()
          Get the json flag
 boolean isMatrixXML()
          Get the eMatrix xml flag
 boolean isOverwrite()
          Get the overwrite flag
 boolean isResume()
          Get the resume flag
 boolean isShowObjects()
          If true, list all manipulated objects in the result log
 boolean isXML()
          Get the xml flag
 void setClassPatterns(java.util.Vector<java.lang.String> patterns)
          Set the list of Class patterns
 void setCommit(int commit)
          Set the transaction commit number
 void setDumpFeatures(boolean getFeatures)
          Include / exclude the admin object Features in the import/export/compare process
 void setDumpFiles(boolean getFiles)
          Include / exclude the attached files in the import/export/compare process
 void setDumpHistory(boolean getHistory)
          Include / exclude the ObjectObj and Link history in the import/export/compare process
 void setDumpImages(boolean getImages)
          Include / exclude the images/icons in the import/export/compare process
 void setDumpLinks(boolean getLinks)
          Include / exclude the ObjectObj's Links in the import/export/compare process
 void setDumpStages(boolean getStages)
          Include / exclude the ObjectObj's Stage status in the import/export/compare process
 void setForcedImport(boolean force)
          Set the force flag for import operations
 void setFullDump(boolean fullDump)
          Include admin object detailed information in the import/export/compare process
 void setJSON(boolean json)
          Set the import / export file format as OBEROn JSON format
 void setMatrixXML(boolean emxxml)
          Set the import file format as eMatrix xml
 void setNamePatterns(java.util.Vector<java.lang.String> patterns)
          Set the list of ObjectObj name patterns
 void setObjectGroup(java.lang.String objectGroupName)
          Extract / import ObjectObjs from/into a user ObjectGroup
 void setObjectSpacePatterns(java.util.Vector<java.lang.String> patterns)
          Set the list of ObjectSpace patterns
 void setOverwrite(boolean overwrite)
          Set the overwrite flag
 void setPatterns(java.util.Vector<java.lang.String> patterns)
          Set the list of admin name patterns
 void setProgressCounter(ProgressCounter counter)
          Set the ProgressCounter
 void setResume(boolean resume)
          Set the resume flag
 void setRevisionPatterns(java.util.Vector<java.lang.String> patterns)
          Set the list of ObjectObj revision patterns
 void setShowObjects(boolean show)
          If true, list all manipulated objects in the result log
 void setUserPatterns(java.util.Vector<java.lang.String> patterns)
          Set the list of User patterns; used to filter User-dependent administrative objects
 void setXML(boolean xml)
          Set the import / export file format as OBEROn xml
 java.lang.String toString()
          Return the Dump object properties as a single String
 org.jdom.Element toXML(boolean getImage, boolean fullDump, Framework framework)
          [Inherited but not used]
 org.jdom.Element toXML(Framework framework)
          [Inherited but not used]
 
Methods inherited from class com.oberon.ooql.sdk.OBBase
addChange, addUniqueChange, ChangesFromXML, ChangesToXML, getChanges, getChangesAsString, getId, isLinked, removeChange, resetChanges, setId, setLinked
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

adminTypes

public static java.lang.String[] adminTypes
List of administrative types


adminUserTypes

public static java.lang.String[] adminUserTypes
List of User-dependent administrative types

Constructor Detail

Dump

public Dump()
Method Detail

doexport

public void doexport(java.lang.String outFile,
                     java.io.DataOutputStream outStream,
                     Framework framework)
              throws java.io.IOException,
                     OberonException
Export data (administrative or application objects [ObjectObj]) to a file

Parameters:
outFile - the output file name
outStream - the output file stream
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions
java.io.IOException

doimport

public void doimport(java.lang.String inFile,
                     java.io.DataInputStream inStream,
                     Framework framework)
              throws java.io.IOException,
                     OberonException
Import data (administrative or application objects [ObjectObj]) from a file

Parameters:
inStream - the input file stream
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions
java.io.IOException

docompare

public void docompare(java.io.DataInputStream inStream,
                      java.io.DataOutputStream logStream,
                      Framework framework)
               throws java.io.IOException,
                      OberonException
Compare data (administrative or application objects [ObjectObj]) from a file; produce a log report

Parameters:
inStream - the input file stream
logStream - the log file stream
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions
java.io.IOException

doexpand

public void doexpand(java.io.DataOutputStream outStream,
                     Framework framework)
              throws java.io.IOException,
                     OberonException
Expand administrative objects: report all administrative links

Parameters:
outStream - the stream for the results (if null the result is stored into the framework)
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions
java.io.IOException

addAdminTarget

public void addAdminTarget(java.lang.String adminType)
Set the admin export / import / compare type

Parameters:
adminType - the OOQL admin type (example: field, class,...) use "all" to ignore this filter

getAdminTarget

public java.util.Vector<java.lang.String> getAdminTarget()
Get the admin type filter

Returns:
Vector of admin type names; null for "all"

addPattern

public void addPattern(java.lang.String adminNamePattern)
Add an admin export / import / compare name pattern

Parameters:
adminNamePattern - the admin name pattern (use * / ? as wildcards )

setPatterns

public void setPatterns(java.util.Vector<java.lang.String> patterns)
Set the list of admin name patterns

Since:
4.0

getPatterns

public java.util.Vector<java.lang.String> getPatterns()
Return the list of admin name patterns

Returns:
Vector of name patterns
See Also:
addPattern(String), setPatterns(Vector)

addUserPattern

public void addUserPattern(java.lang.String userPattern)
Add a User pattern; used to filter User-dependent administrative objects

Parameters:
userPattern - the User name pattern (use * / ? as wildcards )

setUserPatterns

public void setUserPatterns(java.util.Vector<java.lang.String> patterns)
Set the list of User patterns; used to filter User-dependent administrative objects

Since:
4.0

getUserPatterns

public java.util.Vector<java.lang.String> getUserPatterns()
Return the list of User patterns

Returns:
Vector of User patterns
See Also:
addUserPattern(String), setUserPatterns(Vector)

addClassPattern

public void addClassPattern(java.lang.String classPattern)
Add a Class pattern; used to filter ObjectObj instances

Parameters:
classPattern - the Class name pattern (use * / ? as wildcards )

setClassPatterns

public void setClassPatterns(java.util.Vector<java.lang.String> patterns)
Set the list of Class patterns

Since:
4.0

getClassPattern

public java.util.Vector<java.lang.String> getClassPattern()
Return the list of Class patterns

Returns:
Vector of Class name patterns
See Also:
addClassPattern(String), setClassPatterns(Vector)

addNamePattern

public void addNamePattern(java.lang.String namePattern)
Add a name pattern; used to filter ObjectObj instances

Parameters:
namePattern - the ObjectObj name pattern (use * / ? as wildcards )

setNamePatterns

public void setNamePatterns(java.util.Vector<java.lang.String> patterns)
Set the list of ObjectObj name patterns

Since:
4.0

getNamePattern

public java.util.Vector<java.lang.String> getNamePattern()
Return the list of ObjectObj name patterns

Returns:
Vector of ObjectObj name patterns
See Also:
addNamePattern(String), setNamePatterns(Vector)

addRevisionPattern

public void addRevisionPattern(java.lang.String revisionPattern)
Add a revision pattern; used to filter ObjectObj instances

Parameters:
revisionPattern - the ObjectObj revision pattern (use * / ? as wildcards )

setRevisionPatterns

public void setRevisionPatterns(java.util.Vector<java.lang.String> patterns)
Set the list of ObjectObj revision patterns

Since:
4.0

getRevisionPattern

public java.util.Vector<java.lang.String> getRevisionPattern()
Return the list of revision patterns

Returns:
Vector of ObjectObj revision patterns
See Also:
addRevisionPattern(String), setRevisionPatterns(Vector)

addObjectSpacePattern

public void addObjectSpacePattern(java.lang.String osPattern)
Add an ObjectSpace pattern; used to filter ObjectObj instances

Parameters:
osPattern - the ObjectSpace name pattern (use * / ? as wildcards )

setObjectSpacePatterns

public void setObjectSpacePatterns(java.util.Vector<java.lang.String> patterns)
Set the list of ObjectSpace patterns

Since:
4.0

getObjectSpacePattern

public java.util.Vector<java.lang.String> getObjectSpacePattern()
Return the list of ObjectSpace patterns

Returns:
Vector of ObjectSpace name patterns
See Also:
addObjectSpacePattern(String), setObjectSpacePatterns(Vector)

setDumpImages

public void setDumpImages(boolean getImages)
Include / exclude the images/icons in the import/export/compare process

Parameters:
getImages - true to include images

getDumpImages

public boolean getDumpImages()
Get the include images flag


setFullDump

public void setFullDump(boolean fullDump)
Include admin object detailed information in the import/export/compare process

Parameters:
fullDump - true to include detailed info

getFullDump

public boolean getFullDump()
Get the full dump flag


setDumpFiles

public void setDumpFiles(boolean getFiles)
Include / exclude the attached files in the import/export/compare process

Parameters:
getFiles - true to include files

getDumpFiles

public boolean getDumpFiles()
Get the include files flag


setDumpHistory

public void setDumpHistory(boolean getHistory)
Include / exclude the ObjectObj and Link history in the import/export/compare process

Parameters:
getHistory - true to include history

getDumpHistory

public boolean getDumpHistory()
Get the include history flag


setDumpLinks

public void setDumpLinks(boolean getLinks)
Include / exclude the ObjectObj's Links in the import/export/compare process

Parameters:
getLinks - true to include ObjectObj's Links

getDumpLinks

public boolean getDumpLinks()
Get the include Link flag


setDumpStages

public void setDumpStages(boolean getStages)
Include / exclude the ObjectObj's Stage status in the import/export/compare process

Parameters:
getStages - true to include ObjectObj's Stage status

getDumpStages

public boolean getDumpStages()
Get the include Stage flag


setDumpFeatures

public void setDumpFeatures(boolean getFeatures)
Include / exclude the admin object Features in the import/export/compare process

Parameters:
getFeatures - true to include Features

getDumpFeatures

public boolean getDumpFeatures()
Get the include Feature flag


setObjectGroup

public void setObjectGroup(java.lang.String objectGroupName)
Extract / import ObjectObjs from/into a user ObjectGroup

Parameters:
objectGroupName - the name of the ObjectGroup (empty to reset this option)

getObjectGroup

public java.lang.String getObjectGroup()
Get the settled ObjectGroup name

See Also:
setObjectGroup(String)

setXML

public void setXML(boolean xml)
Set the import / export file format as OBEROn xml

Parameters:
xml - true to set the xml format

isXML

public boolean isXML()
Get the xml flag

See Also:
setXML(boolean)

setJSON

public void setJSON(boolean json)
Set the import / export file format as OBEROn JSON format

Parameters:
json - true to set the JSON format
Since:
4.2.3

isJSON

public boolean isJSON()
Get the json flag

Since:
4.2.3
See Also:
setJSON(boolean)

setMatrixXML

public void setMatrixXML(boolean emxxml)
Set the import file format as eMatrix xml

Parameters:
emxxml - true to set the xml format

isMatrixXML

public boolean isMatrixXML()
Get the eMatrix xml flag

See Also:
setMatrixXML(boolean)

setOverwrite

public void setOverwrite(boolean overwrite)
Set the overwrite flag

Parameters:
overwrite - true to update the existing objects

isOverwrite

public boolean isOverwrite()
Get the overwrite flag

See Also:
setOverwrite(boolean)

setForcedImport

public void setForcedImport(boolean force)
Set the force flag for import operations

Parameters:
force - true to ignore optional features if not defined

isForcedInput

public boolean isForcedInput()
Get the force flag for import operations

See Also:
setForcedImport(boolean)

setResume

public void setResume(boolean resume)
Set the resume flag

Parameters:
resume - true to continue the process when an error occurs

isResume

public boolean isResume()
Get the resume flag

See Also:
setResume(boolean)

setCommit

public void setCommit(int commit)
Set the transaction commit number

Parameters:
commit - number of imported objects for each transaction commit (default = 1)

getCommit

public int getCommit()
Get the transaction commit number

See Also:
setCommit(int)

getAdminTypes

public static java.lang.String[] getAdminTypes()
Returns the list of administrative dump types

Since:
2.5

getAdminUserTypes

public static java.lang.String[] getAdminUserTypes()
Returns the list of user dump types

Since:
2.5

setShowObjects

public void setShowObjects(boolean show)
If true, list all manipulated objects in the result log

Parameters:
show - true to set enable the object list
Since:
4.0

isShowObjects

public boolean isShowObjects()
If true, list all manipulated objects in the result log

See Also:
setShowObjects(boolean)

getProperty

public java.lang.String getProperty(java.lang.String propertyName,
                                    java.util.Vector<java.lang.Object> filterArgs,
                                    java.lang.String token,
                                    Framework framework)
[inherited but NOT USED]

Specified by:
getProperty in class OBBase

getTargetNames

public java.util.Vector<?> getTargetNames(java.lang.String composedName,
                                          java.util.Vector<java.lang.Object> filterArgs,
                                          Framework framework)
[inherited but NOT USED]

Specified by:
getTargetNames in class OBBase

toString

public java.lang.String toString()
Return the Dump object properties as a single String

Overrides:
toString in class java.lang.Object

toXML

public org.jdom.Element toXML(Framework framework)
[Inherited but not used]


toXML

public org.jdom.Element toXML(boolean getImage,
                              boolean fullDump,
                              Framework framework)
[Inherited but not used]


getExportCommand

public java.lang.String getExportCommand(java.lang.String fileName,
                                         boolean append)
Return the OOQL command to export objects on the basic of set options.

Since:
4.0

getImportCommand

public java.lang.String getImportCommand(java.lang.String fileName)
Return the OOQL command to import objects on the basic of set options.

Since:
4.0

getCompareCommand

public java.lang.String getCompareCommand(java.lang.String fileName,
                                          java.lang.String logFileName,
                                          boolean append)
Return the OOQL command to compare administrative objects on the basic of set options

Since:
4.0

getExpandCommand

public java.lang.String getExpandCommand(java.lang.String fileName,
                                         boolean append)
Return the OOQL command to expand administrative objects on the basic of set options

Since:
4.0

compareAdminObject

public static java.lang.String compareAdminObject(OBBase refObj,
                                                  OBBase dbObj,
                                                  boolean feature,
                                                  boolean image,
                                                  boolean force,
                                                  Framework framework)
                                           throws java.sql.SQLException,
                                                  OberonException
Compare a reference administrative object with its DB version

Parameters:
refObj - the object to compare
dbObj - the database object
feature - perform feature comparison
image - check if images are equals
force - add the "force" options to the OOQL command
Returns:
the OOQL command to update the database version
Throws:
java.sql.SQLException
OberonException

getName

public java.lang.String getName()
[Inherited but not used]

Specified by:
getName in class OBBase

setProgressCounter

public void setProgressCounter(ProgressCounter counter)
Set the ProgressCounter

Since:
5.0

getProgressCounter

public ProgressCounter getProgressCounter()
Return the ProgressCounter

Since:
5.0

OBEROn SDK

Copyright © 2008-2014 Mirko Solazzi. All Rights Reserved.