J2X1-1152-02ENZ2(01)
Before using this online manual
Preface
Part 1 The Basic for Developing Application
Chapter 1 Overview
1.1 Application Function in Shunsaku
1.2 Types of APIs in Shunsaku
1.3 What Can Do with Shunsaku Application
1.4 Designing the Applications
Chapter 2 Environment Setup
2.1 API Configuration
2.1.1 Java APIs
2.1.2 .NET API
2.1.3 C API
2.2 Setup
2.3 Setting Environment Variables
2.3.1 Setting Environment Variables (Java APIs)
2.3.2 Setting Environment Variables (C APIs)
2.4 Setting Up Environment Files
2.4.1 Specifying a Separate API Environment File for Each Machine on which the APIs are Installed
2.4.2 Specifying a Separate API Environment File for each Application to be Started
2.4.3 Priority of Execution Parameters
Chapter 3 Data Search Methods
3.1 Data Search Overview
3.2 Searching with Character Strings
3.2.1 Searching for Documents that Contain a Keyword
3.2.1.1 An Example of the Path Expressions, Text Expressions or Attribute Expressions
3.2.1.2 Keyword Specification Formats and Search Methods
3.2.2 Searching for Documents that Match a Search Keyword Exactly
3.2.3 Performing a Size Comparison with a Search Keyword
3.3 Searching by Numeric Value
3.4 Searching by Joining Multiple Conditions with Logical Operators
3.5 Sorting Search Results
3.5.1 Sorting by Character String
3.5.2 Sorting by Numeric Value
3.5.3 Sorting with Multiple Keys
3.6 Extracting Search Results
3.6.1 Extracting Data in XML Format
3.6.1.1 Extracting an Entire XML Document
3.6.1.2 Extracting Data in XML Format by Specifying an Element Node
3.6.2 Extracting Data in Text Format
3.7 Extracting Aggregated Results
3.7.1 Grouping Search Results
3.7.1.1 Grouping by Character String
3.7.1.2 Grouping by Numeric Value
3.7.1.3 Grouping by Multiple Keys
3.7.2 Aggregating Search Results
Chapter 4 Data Updating Methods
4.1 Overview of Data Updating
4.2 Adding Data
4.3 Deleting Data
4.4 Updating Data
Chapter 5 Transaction Function
5.1 Overview of Transactions
5.1.1 What is a Transaction?
5.1.2 Starting and Stopping Transactions
5.1.3 Auto Commit and Manual Commit
5.1.4 How Data Appears to the User
5.1.5 Controlling Transaction Concurrency
5.1.6 Relationship between Transaction and Recovery
5.2 Using Transactions with Java APIs
5.2.1 Error Handling
5.3 Using Transactions with .NET APIs
5.3.1 Error Handling
5.4 Using Transactions with C APIs
5.4.1 Error Handling
Chapter 6 Direct Access Function
6.1 Overview of Direct Access Function
6.2 Creating Direct Access Key Environment
6.2.1 Creating Direct Access Key Definition File
6.2.2 Setting the Direct Access Key Definition File
6.2.3 Confirming the Direct Access Key Definition File
6.3 Format of the Direct Access Key
6.4 Searching Data by Direct Access Key
6.4.1 For Java API
6.4.2 For .NET API
6.4.3 For C API
6.5 Deleting Data by Direct Access Key
6.5.1 For Java API
6.5.2 For .NET API
6.5.3 For C API
6.6 Updating Data by Direct Access Key
6.6.1 For Java API
6.6.2 For .NET API
6.6.3 For C API
6.7 Developing Application Using Direct Access Function
6.7.1 Using Direct Search to Delete or Update Data
6.7.2 Using Direct Deletion or Direct Update
Chapter 7 Shunsaku File
7.1 Overview of Shunsaku File
7.2 Methods Used to Access Shunsaku File
7.2.1 Per-connection Specification
7.2.1.1 Specifying with the Java API
7.2.1.2 Specifying with the .NET API
7.2.1.3 Specifying with the C API
7.2.2 Specification in the API Environment File
7.2.3 Setting the Access Range of an Application that does not Specify a Shunsaku File
7.3 Switching Shunsaku Files
7.3.1 Specifying with the Java API
7.3.2 Specifying with the .NET API
7.3.3 Specifying with the C API
7.4 Operating Multiple Shunsaku Files in One Transaction
7.4.1 Sample Code for Java API
7.4.2 Sample Code for .NET API
7.4.3 Sample Code for C API
7.5 Notes on Using Shunsaku Files
7.5.1 Notes on creating Shunsaku Files
7.5.2 Note on updating data from APIs
7.5.3 Note on Direct Access
7.5.4 Note on using multiple Shunsaku Files
Chapter 8 Debugging Applications
8.1 Debugging Applications
8.1.1 Debugging with Debugger
8.1.2 Debugging with Application Debugging Information
8.1.3 Debugging with the API Snapshot Function
8.1.4 Java API Method Information
8.1.5 .NET API Method Information
8.1.6 C API Function Information
Part 2 Developing Applications by APIs
Chapter 9 Developing Java Applications
9.1 Java API Overview
9.2 Developing Applications with Studio
9.2.1 Advantages of Developing with Studio
9.2.2 Flow of Development Using Studio
9.3 How to Use Java APIs
9.3.1 Establishing a Connection
9.3.1.1 Configuring Settings in the API Environment File
9.3.1.2 Establishing a Connection by Setting Java Properties
9.3.1.3 Specifying the Host Name and Port Number Directly
9.3.2 Data Searches
9.3.2.1 Obtaining the Number of XML Documents that Match Search Conditions
9.3.2.2 Obtaining Search Results According to the Number of Data Items
9.3.2.3 Obtaining Search Results While Adding Search Conditions
9.3.2.4 Setting Maximum Value of Number of Hits
9.3.2.5 Extracting Record IDs
9.3.2.6 Using Record IDs to Obtain Entire XML Documents
9.3.2.7 Obtaining Sorted Data
9.3.2.8 Obtaining Consecutive Groups of XML Documents that Match Conditions
9.3.2.9 Aggregating the Content of Data that Matches Search Conditions
9.3.3 Updating Data
9.3.3.1 Adding Data
9.3.3.2 Deleting Data by Specifying Record IDs
9.3.3.3 Updating Data by Specifying Record IDs
9.3.4 Closing Connections
9.3.5 Error Handling
9.3.5.1 An Example of Error Handling
9.4 Debugging Applications
9.5 Character Code Used by Java APIs
Chapter 10 Developing .NET Applications
10.1 .NET API Overview
10.2 Developing Applications with Microsoft(R) Visual Studio(R) .NET
10.2.1 Advantages of Developing with Microsoft(R) Visual Studio(R) .NET
10.2.2 Development Using Microsoft(R) Visual Studio(R) .NET
10.2.2.1 Configuration of Web Application Cooperated with Shunsaku
10.2.2.2 Flow of Developing Web Application Cooperated with Shunsaku
10.3 How to Use .NET APIs
10.3.1 Establishing a Connection
10.3.1.1 Configuring Settings in the API Environment File
10.3.1.2 Specifying Host Name and Port Number by Properties
10.3.1.3 Specifying Host Name and Port Number by Constructor
10.3.2 Data Searches
10.3.2.1 Obtaining the Number of XML Documents that Match Search Conditions
10.3.2.2 Obtaining Search Results According to the Number of Data Items
10.3.2.3 Obtaining Search Results While Adding Search Conditions
10.3.2.4 Setting the Maximum Value of Number of Hits
10.3.2.5 Using Record IDs to Obtain Entire XML Documents
10.3.2.6 Obtaining Sorted Data
10.3.2.7 Obtaining Consecutive Groups of XML Documents that Match Conditions
10.3.2.8 Aggregating the Content of Data that Matches Search Conditions
10.3.3 Updating Data
10.3.3.1 Adding Data
10.3.3.2 Deleting Data by Specifying Record IDs
10.3.3.3 Updating Data by Specifying Record IDs
10.3.4 Closing Connections
10.3.5 Error Handling
10.4 Debugging Applications
10.5 Character Code Used by .NET APIs
Chapter 11 Developing C Applications
11.1 C API Overview
11.1.1 Using Handle
11.1.2 Connection Handles
11.1.3 Data Manipulation Handles
11.1.4 Common Functions
11.2 How to Use C APIs
11.2.1 Establishing a Connection
11.2.1.1 Configuring Settings in the API Environment File
11.2.1.2 Specifying the Host Name and Port Number Directly
11.2.2 Data Searches
11.2.2.1 Obtaining the Number of XML Documents that Match Search Conditions
11.2.2.2 Obtaining Search Results with a Specified Number of Data Items
11.2.2.3 Obtaining Search Results while Adding Search Conditions
11.2.2.4 Setting the Maximum Value of Number of Hits
11.2.2.5 Using Record IDs to Obtain Entire XML Documents
11.2.2.6 Obtaining Sorted Data
11.2.2.7 Obtaining Consecutive Groups of XML Documents that Match Conditions
11.2.2.8 Aggregating the Content of the Data that Matches Search Conditions
11.2.3 Updating Data
11.2.3.1 Adding Data
11.2.3.2 Deleting Data by Specifying Record IDs
11.2.3.3 Updating Data by Specifying Record IDs
11.2.4 Closing Connections
11.2.5 Error Handling
11.2.5.1 An Example of Error Handling
11.3 Debugging Applications
11.4 Character Code Used by C APIs
Part 3 Other Application Developments
Chapter 12 XML Conversion Function
12.1 Overview of the XML Conversion Function
12.1.1 Converting Data from Databases to XML Documents
12.1.2 Converting Data from CSV Files to XML documents
12.2 Designing the XML Conversion Function
12.2.1 Determine the Source of Input Data
12.2.2 Determine the Structure of the XML Documents
12.2.3 Determine the Output Format of the XML Documents
12.3 Setting up the XML Conversion Function APIs
12.3.1 API Configuration
12.3.2 Setting Environment Variables
12.4 Creating a Mapping Rule File
12.5 Designing Applications
12.5.1 List of APIs
12.5.2 Processing Procedure of Applications that Use the XML Conversion Function
12.5.2.1 Procedure for Converting Data in a Database to XML Documents
12.5.2.2 Procedure for Converting Data in a CSV File to an XML Document
12.6 Examples of API Usage
12.6.1 Startup Through to ResultSet Acquisition (Database Records)
12.6.2 Startup Through to ResultSet Acquisition (CSV File)
12.6.3 Creation of XMLGenerator to Acquisition of XML Documents
12.6.4 Sample Program for the XML Conversion Function
12.7 Data Types Supported by the XML Conversion Function
12.8 CSV Formats Supported by the XML Conversion Function
Appendix A Execution Parameters in API Environment Files
A.1 Types of Execution Parameters in API Environment File
A.2 Meanings of Execution Parameters in API Environment File
A.3 Sample Code of Execution Parameter in API Environment File
Appendix B Format of Search, Return and Sort Expressions
B.1 Syntax Notation Method
B.2 Common Format
B.2.1 Path Expressions
B.2.2 Text Expressions
B.2.3 Attribute Expressions
B.2.4 Single-line Function Specification
B.3 Search Expressions
B.3.1 Conditional Expressions
B.3.2 Keywords
B.3.3 Escape Characters
B.3.4 Patterns
B.3.5 Character String
B.3.6 Numeric Values
B.3.7 Compatible Format
B.3.8 Filter Expressions
B.4 Return Expressions
B.4.1 Format Used when not Aggregating
B.4.2 Example Return Expressions when not Aggregating
B.4.3 Format Used when Aggregating
B.4.4 Example Return Expressions used when Aggregating
B.5 Sort Expressions
B.5.1 Sort Expression Format
B.5.2 Example Sort Expressions
Appendix C Allowable Values
C.1 Allowable Values for Search Expressions and Return Expressions
C.2 Allowable Values for Sort Requests
C.3 Allowable Values for Aggregation Requests
C.4 Allowable Values for the Direct Access
Appendix D Estimating Resources
D.1 Estimating Local Memory Requirements when Java APIs are Used
D.2 Estimating Local Memory Requirements when .NET APIs are Used
D.3 Estimating Local Memory Requirements when C APIs are Used
D.4 Estimating the Stack Size when C APIs are Used
Appendix E Notes on XML Documents
E.1 The Format of XML Documents
E.2 XML Document in Text Files
E.3 Notes on the XML Format
E.3.1 Setting Default Value of Attribute in DTD Declarations
E.3.2 Use @ as the Starting Character for the Element Name
Appendix F Sample Java Programs
F.1 Searching Data
F.1.1 Obtaining the Number of XML Documents that Match Search Conditions
F.1.2 Obtaining XML Documents that Match Search Conditions in a Specified Format
F.1.3 Obtain Every Instance of Particular XML Documents
F.1.4 Obtaining XML Documents that Match Search Conditions after they have been Sorted
F.1.5 Aggregating the Values of XML Documents that Match Search Conditions
F.1.6 Setting the Maximum Value of Number of Hits
F.2 Updating Data
F.2.1 Adding Data
F.2.2 Deleting Data
F.2.3 Updating Data
F.3 Advanced Applications
F.3.1 Sample Applications Using Transactions and Shunsaku File
F.3.2 Searching Data Using Direct Access Key
F.3.3 Delete Data Using Direct Access Key
F.3.4 Update Data Using Direct Access Key
Appendix G Sample C# .NET Programs
G.1 Searching Data
G.1.1 Obtaining the Number of XML Documents that Match Search Conditions
G.1.2 Obtaining XML Documents that Match Search Conditions in a Specified Format
G.1.3 Obtain Every Instance of Particular XML Documents
G.1.4 Obtaining XML Documents that Match Search Conditions after they have been Sorted
G.1.5 Aggregating the Values of XML Documents that Match Search Conditions
G.1.6 Setting the Maximum Value of Number of Hits
G.2 Updating Data
G.2.1 Adding Data
G.2.2 Deleting Data
G.2.3 Updating Data
G.3 Advanced Applications
G.3.1 Sample Applications Using Transactions and Shunsaku File
G.3.2 Searching Data Using Direct Access Key
G.3.3 Delete Data Using Direct Access Key
G.3.4 Update Data Using Direct Access Key
Appendix H Sample VB .NET Programs
H.1 Searching Data
H.1.1 Obtaining the Number of XML Documents that Match Search Conditions
H.1.2 Obtaining XML Documents that Match Search Conditions in a Specified Format
H.1.3 Obtain Every Instance of Particular XML Documents
H.1.4 Obtaining XML Documents that Match Search Conditions after they have been Sorted
H.1.5 Aggregating the Values of XML Documents that Match Search Conditions
H.1.6 Setting the Maximum Value of Number of Hits
H.2 Updating Data
H.2.1 Adding Data
H.2.2 Deleting Data
H.2.3 Updating Data
H.3 Advanced Applications
H.3.1 Sample Applications Using Transactions and Shunsaku File
H.3.2 Searching Data Using Direct Access Key
H.3.3 Delete Data Using Direct Access Key
H.3.4 Update Data Using Direct Access Key
Appendix I Sample C++ .NET Programs
I.1 Searching Data
I.1.1 Obtaining the Number of XML Documents that Match Search Conditions
I.1.2 Obtaining XML Documents that Match Search Conditions in a Specified Format
I.1.3 Obtain Every Instance of Particular XML Documents
I.1.4 Obtaining XML Documents that Match Search Conditions after they have been Sorted
I.1.5 Aggregating the Values of XML Documents that Match Search Conditions
I.1.6 Setting the Maximum Value of Number of Hits
I.2 Updating Data
I.2.1 Adding Data
I.2.2 Deleting Data
I.2.3 Updating Data
I.3 Advanced Applications
I.3.1 Sample Applications Using Transactions and Shunsaku File
I.3.2 Searching Data Using Direct Access Key
I.3.3 Delete Data Using Direct Access Key
I.3.4 Update Data Using Direct Access Key
Appendix J Sample C Programs
J.1 Searching Data
J.1.1 Obtaining the Number of XML Documents that Match Search Conditions
J.1.2 Obtaining XML Documents that Match Search Conditions in a Specified Format
J.1.3 Obtain Every Instance of Particular XML Documents
J.1.4 Obtaining XML Documents that Match Search Conditions after they have been Sorted
J.1.5 Aggregating the Values of XML Documents that Match Search Conditions
J.1.6 Setting the Maximum Value of Number of Hits
J.2 Updating Data
J.2.1 Adding Data
J.2.2 Deleting Data
J.2.3 Updating Data
J.3 Advanced Applications
J.3.1 Sample Applications Using Transactions and Shunsaku File
J.3.2 Searching Data Using Direct Access Key
J.3.3 Delete Data Using Direct Access Key
J.3.4 Update Data Using Direct Access Key
Appendix K XML Conversion Function APIs
K.1 DocumentFountain Interface
K.1.1 getXMLDocument
K.1.2 hasXMLDocument
K.1.3 setDestination
K.1.4 setEncoding
K.2 CSVSource Class
K.2.1 CSVSource
K.2.2 setEncoding
K.2.3 setDelimiter
K.2.4 setQuote
K.2.5 setNullCharacter
K.2.6 setFirstRecordToColumn
K.2.7 setRandomMode
K.2.8 getResultSet
K.2.9 setEnableEscapeChar
K.3 GeneratorMap Class
K.3.1 GeneratorMap
K.4 XMLGenerator Class
K.4.1 XMLGenerator
K.4.2 createDocumentFountain
K.5 XMLConverterException Class
K.5.1 getCode
K.5.2 getException
K.5.3 getMessage
K.6 CSVException Class
K.6.1 CSVException
K.7 XMLGenException Class
K.7.1 XMLGenException
K.8 Error Codes Posted when XML Conversion Function APIs are Used
Appendix L XML Conversion Function Mapping Rules
L.1 Mapping Rule File Definition Format
L.1.1 MappingRule
L.1.2 parentRule
L.1.3 columnRule
L.1.4 attributeRule
L.1.5 documentRule
L.1.6 extensionRule
L.2 Mapping Rule Examples
L.3 Mapping Rule Conversion Examples
L.3.1 Extracting Unstructured Data in XML Format
L.3.2 Extracting Structured Data in XML Format
L.3.3 Extracting Fixed Values
L.3.4 Extracting Column Data as Attribute Values
L.3.5 Extracting Column Data as Fixed Attributes
L.3.6 Extracting Column Names as Attribute Values
L.3.7 Extracting Data in XML Format that has Multi-level Tag Structures Based on Consolidation
L.3.8 Extracting Binary Data
Appendix M Java APIs Used in V6.0L20 and Earlier
M.1 ShunSearch Class
M.1.1 create
M.1.2 executeSearch1
M.1.3 executeSearch2
M.1.4 executeSearch3
M.1.5 getHitCount
M.1.6 getRetNum
M.1.7 getRecNo
M.1.8 getRecData
M.2 ShunBatch Class
M.2.1 ShunBatch
M.2.2 executeAdd
M.2.3 executeDelete
M.3 Character Encoding
M.4 Error Codes Output
Appendix N C APIs Used in V6.0L30 and Earlier
N.1 shunadd
N.2 shundeletebyrecid
N.3 shunsearch1
N.4 shunsearch2
N.5 shunsearch3
N.6 shunsort
N.7 Error Codes Output