git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/branches/jdk8@1231 f203690c-595d-4dc9-a70b-905162fa7fd2tags/jackcess-3.0.0
@@ -189,6 +189,35 @@ | |||
<plugin> | |||
<groupId>com.google.code.maven-replacer-plugin</groupId> | |||
<artifactId>replacer</artifactId> | |||
<executions> | |||
<execution> | |||
<id>with-regex2</id> | |||
<phase>site</phase> | |||
<goals> | |||
<goal>replace</goal> | |||
</goals> | |||
<configuration> | |||
<includes> | |||
<include>${project.build.directory}/site/apidocs/**/*.html</include> | |||
</includes> | |||
<regex>true</regex> | |||
<replacements> | |||
<replacement> | |||
<token>_general_(method|class|field)_</token> | |||
<value><span class="UsageGeneral"><span class="UsageGeneralHeader">General</span>: This $1 is general use.</span></value> | |||
</replacement> | |||
<replacement> | |||
<token>_intermediate_(method|class|field)_</token> | |||
<value><span class="UsageIntermediate"><span class="UsageIntermediateHeader">Intermediate</span>: This $1 requires moderate API knowledge.</span></value> | |||
</replacement> | |||
<replacement> | |||
<token>_advanced_(method|class|field)_</token> | |||
<value><span class="UsageAdvanced"><span class="UsageAdvancedHeader">Advanced</span>: This $1 is for advanced/internal use.</span></value> | |||
</replacement> | |||
</replacements> | |||
</configuration> | |||
</execution> | |||
</executions> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
@@ -201,7 +230,7 @@ | |||
<dependency> | |||
<groupId>commons-logging</groupId> | |||
<artifactId>commons-logging</artifactId> | |||
<version>1.1.3</version> | |||
<version>1.2</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>log4j</groupId> | |||
@@ -221,7 +250,7 @@ | |||
<dependency> | |||
<groupId>org.apache.poi</groupId> | |||
<artifactId>poi</artifactId> | |||
<version>3.9</version> | |||
<version>4.0.0</version> | |||
<optional>true</optional> | |||
</dependency> | |||
@@ -250,9 +279,9 @@ | |||
<plugin> | |||
<artifactId>maven-javadoc-plugin</artifactId> | |||
<configuration> | |||
<additionalJOption>-J-DTaglets.ConfigurationFile=${basedir}/src/site/javadoc/taglets.properties -J-DTaglets.NoDefaultConfiguration=true</additionalJOption> | |||
<minmemory>128m</minmemory> | |||
<maxmemory>512</maxmemory> | |||
<doclint>-accessibility,-missing</doclint> | |||
<links> | |||
<list>https://docs.oracle.com/javase/8/docs/api/</list> | |||
<list>http://docs.oracle.com/javaee/5/api/</list> | |||
@@ -267,16 +296,6 @@ | |||
<head>Usage:</head> | |||
</tag> | |||
</tags> | |||
<taglets> | |||
<taglet> | |||
<tagletClass>net.sourceforge.taglets.Taglets</tagletClass> | |||
<tagletArtifact> | |||
<groupId>net.sourceforge.taglets</groupId> | |||
<artifactId>taglets</artifactId> | |||
<version>2.0.3</version> | |||
</tagletArtifact> | |||
</taglet> | |||
</taglets> | |||
<quiet>true</quiet> | |||
</configuration> | |||
</plugin> | |||
@@ -289,20 +308,6 @@ | |||
</plugin> | |||
</plugins> | |||
</reporting> | |||
<repositories> | |||
<repository> | |||
<releases> | |||
<enabled>true</enabled> | |||
</releases> | |||
<snapshots> | |||
<enabled>false</enabled> | |||
</snapshots> | |||
<id>taglets</id> | |||
<name>Taglets</name> | |||
<url>http://maven.geotoolkit.org/</url> | |||
<layout>default</layout> | |||
</repository> | |||
</repositories> | |||
<distributionManagement> | |||
<site> | |||
<id>jackcess-build-site</id> |
@@ -31,7 +31,7 @@ import com.healthmarketscience.jackcess.util.IterableBuilder; | |||
* of table modification during traversal (although depending on how the table | |||
* is traversed, row updates may or may not be seen). Multiple cursors may | |||
* traverse the same table simultaneously. | |||
* <p/> | |||
* <br> | |||
* Basic cursors will generally iterate table data in the order it appears in | |||
* the database and searches will require scanning the entire table. | |||
* Additional features are available when utilizing an {@link Index} backed | |||
@@ -135,7 +135,7 @@ public interface Cursor extends Iterable<Row> | |||
* Iterator which will iterate through all the rows of this table. Use of | |||
* the Iterator follows the same restrictions as a call to | |||
* {@link #getNextRow}. | |||
* <p/> | |||
* <br> | |||
* For more flexible iteration see {@link #newIterable}. | |||
* @throws RuntimeIOException if an IOException is thrown by one of the | |||
* operations, the actual exception will be contained within | |||
@@ -151,7 +151,7 @@ public interface Cursor extends Iterable<Row> | |||
/** | |||
* Delete the current row. | |||
* <p/> | |||
* <br> | |||
* Note, re-deleting an already deleted row is allowed (it does nothing). | |||
* @throws IllegalStateException if the current row is not valid (at | |||
* beginning or end of table) | |||
@@ -178,7 +178,7 @@ public interface Cursor extends Iterable<Row> | |||
/** | |||
* Moves to the next row in the table and returns it. | |||
* @return The next row in this table (Column name -> Column value), or | |||
* @return The next row in this table (Column name -> Column value), or | |||
* {@code null} if no next row is found | |||
*/ | |||
public Row getNextRow() throws IOException; | |||
@@ -186,7 +186,7 @@ public interface Cursor extends Iterable<Row> | |||
/** | |||
* Moves to the next row in the table and returns it. | |||
* @param columnNames Only column names in this collection will be returned | |||
* @return The next row in this table (Column name -> Column value), or | |||
* @return The next row in this table (Column name -> Column value), or | |||
* {@code null} if no next row is found | |||
*/ | |||
public Row getNextRow(Collection<String> columnNames) | |||
@@ -194,7 +194,7 @@ public interface Cursor extends Iterable<Row> | |||
/** | |||
* Moves to the previous row in the table and returns it. | |||
* @return The previous row in this table (Column name -> Column value), or | |||
* @return The previous row in this table (Column name -> Column value), or | |||
* {@code null} if no previous row is found | |||
*/ | |||
public Row getPreviousRow() throws IOException; | |||
@@ -202,7 +202,7 @@ public interface Cursor extends Iterable<Row> | |||
/** | |||
* Moves to the previous row in the table and returns it. | |||
* @param columnNames Only column names in this collection will be returned | |||
* @return The previous row in this table (Column name -> Column value), or | |||
* @return The previous row in this table (Column name -> Column value), or | |||
* {@code null} if no previous row is found | |||
*/ | |||
public Row getPreviousRow(Collection<String> columnNames) | |||
@@ -325,12 +325,12 @@ public interface Cursor extends Iterable<Row> | |||
public int movePreviousRows(int numRows) throws IOException; | |||
/** | |||
* Returns the current row in this cursor (Column name -> Column value). | |||
* Returns the current row in this cursor (Column name -> Column value). | |||
*/ | |||
public Row getCurrentRow() throws IOException; | |||
/** | |||
* Returns the current row in this cursor (Column name -> Column value). | |||
* Returns the current row in this cursor (Column name -> Column value). | |||
* @param columnNames Only column names in this collection will be returned | |||
*/ | |||
public Row getCurrentRow(Collection<String> columnNames) |
@@ -34,14 +34,14 @@ import com.healthmarketscience.jackcess.util.ColumnMatcher; | |||
* Builder style class for constructing a {@link Cursor}. By default, a | |||
* cursor is created at the beginning of the table, and any start/end rows are | |||
* inclusive. | |||
* <p/> | |||
* <br> | |||
* Simple example traversal: | |||
* <pre> | |||
* for(Row row : table.newCursor().toCursor()) { | |||
* // ... process each row ... | |||
* } | |||
* </pre> | |||
* <p/> | |||
* <br> | |||
* Simple example search: | |||
* <pre> | |||
* Row row = CursorBuilder.findRow(table, Collections.singletonMap(col, "foo")); |
@@ -44,11 +44,11 @@ import com.healthmarketscience.jackcess.util.TableIterableBuilder; | |||
* Database has been opened, you can interact with the data via the relevant | |||
* {@link Table}. When a Database instance is no longer useful, it should | |||
* <b>always</b> be closed ({@link #close}) to avoid corruption. | |||
* <p/> | |||
* <br> | |||
* Database instances (and all the related objects) are <i>not</i> | |||
* thread-safe. However, separate Database instances (and their respective | |||
* objects) can be used by separate threads without a problem. | |||
* <p/> | |||
* <br> | |||
* Database instances do not implement any "transactional" support, and | |||
* therefore concurrent editing of the same database file by multiple Database | |||
* instances (or with outside programs such as MS Access) <i>will generally | |||
@@ -240,7 +240,7 @@ public interface Database extends Iterable<Table>, Closeable, Flushable | |||
/** | |||
* Finds all the relationships in the database in <i>non-system</i> tables. | |||
* </p> | |||
* <br> | |||
* Warning, this may load <i>all</i> the Tables (metadata, not data) in the | |||
* database which could cause memory issues. | |||
* @usage _intermediate_method_ | |||
@@ -250,7 +250,7 @@ public interface Database extends Iterable<Table>, Closeable, Flushable | |||
/** | |||
* Finds <i>all</i> the relationships in the database, <i>including system | |||
* tables</i>. | |||
* </p> | |||
* <br> | |||
* Warning, this may load <i>all</i> the Tables (metadata, not data) in the | |||
* database which could cause memory issues. | |||
* @usage _intermediate_method_ |
@@ -35,12 +35,12 @@ import com.healthmarketscience.jackcess.util.MemFileChannel; | |||
/** | |||
* Builder style class for opening/creating a {@link Database}. | |||
* <p/> | |||
* <br> | |||
* Simple example usage: | |||
* <pre> | |||
* Database db = DatabaseBuilder.open(new File("test.mdb")); | |||
* </pre> | |||
* <p/> | |||
* <br> | |||
* Advanced example usage: | |||
* <pre> | |||
* Database db = new DatabaseBuilder(new File("test.mdb")) |
@@ -41,9 +41,9 @@ public interface IndexCursor extends Cursor | |||
* @param entryValues the column values for the index's columns. | |||
* @return the matching row or {@code null} if a match could not be found. | |||
*/ | |||
public Row findRowByEntry(Object... entryValues) | |||
public Row findRowByEntry(Object... entryValues) | |||
throws IOException; | |||
/** | |||
* Moves to the first row (as defined by the cursor) where the index entries | |||
* match the given values. If a match is not found (or an exception is | |||
@@ -56,32 +56,32 @@ public interface IndexCursor extends Cursor | |||
* @return {@code true} if a valid row was found with the given values, | |||
* {@code false} if no row was found | |||
*/ | |||
public boolean findFirstRowByEntry(Object... entryValues) | |||
public boolean findFirstRowByEntry(Object... entryValues) | |||
throws IOException; | |||
/** | |||
* Moves to the first row (as defined by the cursor) where the index entries | |||
* are >= the given values. If a an exception is thrown, the cursor is | |||
* are >= the given values. If a an exception is thrown, the cursor is | |||
* restored to its previous state. | |||
* | |||
* @param entryValues the column values for the index's columns. | |||
*/ | |||
public void findClosestRowByEntry(Object... entryValues) | |||
public void findClosestRowByEntry(Object... entryValues) | |||
throws IOException; | |||
/** | |||
* Returns {@code true} if the current row matches the given index entries. | |||
* | |||
* | |||
* @param entryValues the column values for the index's columns. | |||
*/ | |||
public boolean currentRowMatchesEntry(Object... entryValues) | |||
public boolean currentRowMatchesEntry(Object... entryValues) | |||
throws IOException; | |||
/** | |||
* Convenience method for constructing a new EntryIterableBuilder for this | |||
* cursor. An EntryIterableBuilder provides a variety of options for more | |||
* flexible iteration based on a specific index entry. | |||
* | |||
* | |||
* @param entryValues the column values for the index's columns. | |||
*/ | |||
public EntryIterableBuilder newEntryIterable(Object... entryValues); |
@@ -80,7 +80,7 @@ public interface PropertyMap extends Iterable<PropertyMap.Property> | |||
* determine the type of the property based on the name and value (the | |||
* property names listed above have their types builtin, otherwise the type | |||
* of the value is used). | |||
* <p/> | |||
* <br> | |||
* Note, this change will not be persisted until the {@link #save} method | |||
* has been called. | |||
* | |||
@@ -92,7 +92,7 @@ public interface PropertyMap extends Iterable<PropertyMap.Property> | |||
/** | |||
* Creates a new (or updates an existing) property in the map. | |||
* <p/> | |||
* <br> | |||
* Note, this change will not be persisted until the {@link #save} method | |||
* has been called. | |||
* | |||
@@ -102,7 +102,7 @@ public interface PropertyMap extends Iterable<PropertyMap.Property> | |||
/** | |||
* Creates a new (or updates an existing) property in the map. | |||
* <p/> | |||
* <br> | |||
* Note, this change will not be persisted until the {@link #save} method | |||
* has been called. | |||
* | |||
@@ -151,7 +151,7 @@ public interface PropertyMap extends Iterable<PropertyMap.Property> | |||
/** | |||
* Sets the new value for this property. | |||
* <p/> | |||
* <br> | |||
* Note, this change will not be persisted until the {@link | |||
* PropertyMap#save} method has been called. | |||
*/ |
@@ -32,7 +32,7 @@ import com.healthmarketscience.jackcess.impl.RelationshipImpl; | |||
* if integrity enforcement is enabled, there must already be a unique index | |||
* on the "from" Table for the relevant columns (same requirement as MS | |||
* Access). | |||
* <p/> | |||
* <br> | |||
* Example: | |||
* <pre> | |||
* Relationship rel = new RelationshipBuilder("FromTable", "ToTable") |
@@ -26,7 +26,7 @@ import com.healthmarketscience.jackcess.util.OleBlob; | |||
/** | |||
* A row of data as column name->value pairs. Values are strongly typed, and | |||
* A row of data as column name->value pairs. Values are strongly typed, and | |||
* column names are case sensitive. | |||
* | |||
* @author James Ahlborn | |||
@@ -35,7 +35,7 @@ import com.healthmarketscience.jackcess.util.OleBlob; | |||
public interface Row extends Map<String,Object> | |||
{ | |||
/** | |||
* @return the id of this row | |||
* @return the id of this row | |||
*/ | |||
public RowId getId(); | |||
@@ -108,7 +108,7 @@ public interface Row extends Map<String,Object> | |||
/** | |||
* Convenience method which gets the value for the row with the given name, | |||
* converting it to an {@link OleBlob} (DataTypes OLE). | |||
* </p> | |||
* <br> | |||
* Note, <i>the OleBlob should be closed after use</i>. | |||
*/ | |||
public OleBlob getBlob(String name) throws IOException; |
@@ -33,7 +33,7 @@ import com.healthmarketscience.jackcess.util.ErrorHandler; | |||
* {@link TableBuilder}. The {@link com.healthmarketscience.jackcess.util.Joiner} utility can be used to traverse | |||
* table relationships (e.g. find rows in another table based on a foreign-key | |||
* relationship). | |||
* <p/> | |||
* <br> | |||
* A Table instance is not thread-safe (see {@link Database} for more | |||
* thread-safety details). | |||
* | |||
@@ -160,14 +160,14 @@ public interface Table extends Iterable<Row> | |||
public Index getForeignKeyIndex(Table otherTable); | |||
/** | |||
* Converts a map of columnName -> columnValue to an array of row values | |||
* Converts a map of columnName -> columnValue to an array of row values | |||
* appropriate for a call to {@link #addRow(Object...)}. | |||
* @usage _general_method_ | |||
*/ | |||
public Object[] asRow(Map<String,?> rowMap); | |||
/** | |||
* Converts a map of columnName -> columnValue to an array of row values | |||
* Converts a map of columnName -> columnValue to an array of row values | |||
* appropriate for a call to {@link Cursor#updateCurrentRow(Object...)}. | |||
* @usage _general_method_ | |||
*/ | |||
@@ -203,7 +203,7 @@ public interface Table extends Iterable<Row> | |||
/** | |||
* Calls {@link #asRow} on the given row map and passes the result to {@link | |||
* #addRow}. | |||
* <p/> | |||
* <br> | |||
* Note, if this table has an auto-number column, the value generated will be | |||
* put back into the given row map. | |||
* @return the given row map, which will contain any autonumbers generated | |||
@@ -242,7 +242,7 @@ public interface Table extends Iterable<Row> | |||
/** | |||
* Calls {@link #asRow} on the given row maps and passes the results to | |||
* {@link #addRows}. | |||
* <p/> | |||
* <br> | |||
* Note, if this table has an auto-number column, the values generated will | |||
* be put back into the appropriate row maps. | |||
* <p> | |||
@@ -278,7 +278,7 @@ public interface Table extends Iterable<Row> | |||
* Iterator which will iterate through all the rows of this table. Use of | |||
* the Iterator follows the same restrictions as a call to | |||
* {@link #getNextRow}. | |||
* <p/> | |||
* <br> | |||
* For more advanced iteration, use the {@link #getDefaultCursor default | |||
* cursor} directly. | |||
* @throws RuntimeIOException if an IOException is thrown by one of the | |||
@@ -296,7 +296,7 @@ public interface Table extends Iterable<Row> | |||
public void reset(); | |||
/** | |||
* @return The next row in this table (Column name -> Column value) (uses | |||
* @return The next row in this table (Column name -> Column value) (uses | |||
* the {@link #getDefaultCursor default cursor}) | |||
* @usage _general_method_ | |||
*/ |
@@ -32,7 +32,7 @@ import com.healthmarketscience.jackcess.impl.TableCreator; | |||
/** | |||
* Builder style class for constructing a {@link Table}. | |||
* <p/> | |||
* <br> | |||
* Example: | |||
* <pre> | |||
* Table table = new TableBuilder("Test") |
@@ -147,8 +147,8 @@ public class TemporalConfig | |||
/** | |||
* Instantiates a new TemporalConfig with the given configuration. Note | |||
* that the date/time format variants will be created by concatenating the | |||
* relevant date and time formats, separated by a single space, e.g. "<date> | |||
* <time>". | |||
* relevant date and time formats, separated by a single space, e.g. "<date> | |||
* <time>". | |||
* | |||
* @param dateFormat the date (no time) format | |||
* @param dateImplicitYearFormat the date (no time) with no year format |
@@ -20,13 +20,13 @@ limitations under the License. | |||
* but can be globally enabled via the system property | |||
* "com.healthmarketscience.jackcess.enableExpressionEvaluation" or | |||
* selectively enabled on a per database basis using {@link com.healthmarketscience.jackcess.Database#setEvaluateExpressions(Boolean)}. | |||
* <p/> | |||
* <br> | |||
* The expression evaluation engine implementation does its best to follow all | |||
* the warts and idiosyncracies of Access expression evaluation (both those | |||
* that are documented as well as those discovered through experimentation). | |||
* These include such things as value conversions, "Null" handling, rounding | |||
* rules, and implicit interpretations of expression in certain contexts. | |||
* <p/> | |||
* <br> | |||
* Expressions can be used in a number of different places within an Access | |||
* database. When enabled, Jackcess supports the following usage: | |||
* <ul> | |||
@@ -50,14 +50,14 @@ limitations under the License. | |||
* record validation rules will be run for the entire record before | |||
* update. Failures are handled in a similar manner.</li> | |||
* </ul> | |||
* <p/> | |||
* <br> | |||
* <h2>Supporting Classes</h2> | |||
* <p/> | |||
* <br> | |||
* The classes in this package make up the public api for expression handling | |||
* in Jackcess. They generally fall into two categories: | |||
* <p/> | |||
* <br> | |||
* <h3>General Use Classes</h3> | |||
* <p/> | |||
* <br> | |||
* <ul> | |||
* <li>{@link com.healthmarketscience.jackcess.expr.EvalConfig} allows for customization of the expression | |||
* evaluation context for a given {@link com.healthmarketscience.jackcess.Database} instance.</li> | |||
@@ -72,9 +72,9 @@ limitations under the License. | |||
* <li>{@link com.healthmarketscience.jackcess.expr.ParseException} wrapper exception thrown for failures which | |||
* occur during expression parsing.</li> | |||
* </ul> | |||
* <p/> | |||
* <br> | |||
* <h3>Advanced Use Classes</h3> | |||
* <p/> | |||
* <br> | |||
* <ul> | |||
* <li>{@link com.healthmarketscience.jackcess.expr.EvalContext} encapsulates all shared state for expression | |||
* parsing and evaluation.</li> | |||
@@ -86,9 +86,9 @@ limitations under the License. | |||
* database field).</li> | |||
* <li>{@link com.healthmarketscience.jackcess.expr.Value} represents a typed primitive value.</li> | |||
* </ul> | |||
* <p/> | |||
* <br> | |||
* <h2>Function Support</h2> | |||
* <p/> | |||
* <br> | |||
* Jackcess supports many of the standard Access functions. The following | |||
* tables list the (hopefully) current status of support built into Jackcess. | |||
* |
@@ -26,7 +26,7 @@ import com.healthmarketscience.jackcess.InvalidValueException; | |||
/** | |||
* Utility code for dealing with calculated columns. | |||
* <p/> | |||
* <br> | |||
* These are the currently possible calculated types: FLOAT, DOUBLE, INT, | |||
* LONG, BIG_INT, GUID, SHORT_DATE_TIME, MONEY, BOOLEAN, NUMERIC, TEXT, MEMO. | |||
* |
@@ -36,12 +36,12 @@ import org.apache.commons.lang3.builder.ToStringBuilder; | |||
import org.apache.poi.poifs.filesystem.DirectoryEntry; | |||
import org.apache.poi.poifs.filesystem.DocumentEntry; | |||
import org.apache.poi.poifs.filesystem.DocumentInputStream; | |||
import org.apache.poi.poifs.filesystem.NPOIFSFileSystem; | |||
import org.apache.poi.poifs.filesystem.POIFSFileSystem; | |||
/** | |||
* Utility code for working with OLE data which is in the compound storage | |||
* format. This functionality relies on the optional POI library. | |||
* <p/> | |||
* <br> | |||
* Note that all POI usage is restricted to this file so that the basic ole | |||
* support in OleUtil can be utilized without requiring POI. | |||
* | |||
@@ -57,7 +57,7 @@ public class CompoundOleUtil implements CompoundPackageFactory | |||
static { | |||
// force a poi class to be loaded to ensure that when this class is | |||
// loaded, we know that the poi classes are available | |||
NPOIFSFileSystem.class.getName(); | |||
POIFSFileSystem.class.getName(); | |||
} | |||
public CompoundOleUtil() | |||
@@ -139,7 +139,7 @@ public class CompoundOleUtil implements CompoundPackageFactory | |||
extends EmbeddedPackageContentImpl | |||
implements CompoundContent | |||
{ | |||
private NPOIFSFileSystem _fs; | |||
private POIFSFileSystem _fs; | |||
private CompoundContentImpl( | |||
OleBlobImpl blob, String prettyName, String className, | |||
@@ -152,9 +152,9 @@ public class CompoundOleUtil implements CompoundPackageFactory | |||
return ContentType.COMPOUND_STORAGE; | |||
} | |||
private NPOIFSFileSystem getFileSystem() throws IOException { | |||
private POIFSFileSystem getFileSystem() throws IOException { | |||
if(_fs == null) { | |||
_fs = new NPOIFSFileSystem(MemFileChannel.newChannel(getStream(), "r")); | |||
_fs = new POIFSFileSystem(MemFileChannel.newChannel(getStream(), "r")); | |||
} | |||
return _fs; | |||
} |
@@ -299,7 +299,7 @@ public abstract class CursorImpl implements Cursor | |||
* Moves to another row in the table based on the given direction and | |||
* returns it. | |||
* @param columnNames Only column names in this collection will be returned | |||
* @return another row in this table (Column name -> Column value), where | |||
* @return another row in this table (Column name -> Column value), where | |||
* "next" may be backwards if moveForward is {@code false}, or | |||
* {@code null} if there is not another row in the given direction. | |||
*/ |
@@ -27,8 +27,8 @@ import com.healthmarketscience.jackcess.util.OleBlob; | |||
/** | |||
* A row of data as column->value pairs. | |||
* </p> | |||
* A row of data as column->value pairs. | |||
* <br> | |||
* Note that the {@link #equals} and {@link #hashCode} methods work on the row | |||
* contents <i>only</i> (i.e. they ignore the id). | |||
* | |||
@@ -36,7 +36,7 @@ import com.healthmarketscience.jackcess.util.OleBlob; | |||
*/ | |||
public class RowImpl extends LinkedHashMap<String,Object> implements Row | |||
{ | |||
private static final long serialVersionUID = 20130314L; | |||
private static final long serialVersionUID = 20130314L; | |||
private final RowIdImpl _id; | |||
@@ -2086,7 +2086,7 @@ public class TableImpl implements Table, PropertyMaps.Owner | |||
} | |||
/** | |||
* Converts a map of columnName -> columnValue to an array of row values | |||
* Converts a map of columnName -> columnValue to an array of row values | |||
* appropriate for a call to {@link #addRow(Object...)}, where the generated | |||
* RowId will be an extra value at the end of the array. | |||
* @see ColumnImpl#RETURN_ROW_ID | |||
@@ -2110,7 +2110,7 @@ public class TableImpl implements Table, PropertyMaps.Owner | |||
} | |||
/** | |||
* Converts a map of columnName -> columnValue to an array of row values. | |||
* Converts a map of columnName -> columnValue to an array of row values. | |||
*/ | |||
private Object[] asRow(Map<String,?> rowMap, Object defaultValue, | |||
boolean returnRowId) |
@@ -41,11 +41,11 @@ import com.healthmarketscience.jackcess.impl.DatabaseImpl; | |||
* where disk usage may not be possible or desirable). Obviously, this | |||
* requires enough jvm heap space to fit the file data. Use one of the | |||
* {@code newChannel()} methods to construct an instance of this class. | |||
* <p/> | |||
* <br> | |||
* In order to use this class with a Database, you <i>must</i> use the {@link | |||
* DatabaseBuilder} to open/create the Database instance, passing an instance | |||
* of this class to the {@link DatabaseBuilder#setChannel} method. | |||
* <p/> | |||
* <br> | |||
* Implementation note: this class is optimized for use with {@link Database}. | |||
* Therefore not all methods may be implemented and individual read/write | |||
* operations are only supported within page boundaries. |
@@ -34,7 +34,7 @@ import com.healthmarketscience.jackcess.impl.OleUtil; | |||
* with nested filesystems!), and jackcess only supports a small portion of | |||
* it. That said, jackcess should support the bulk of the common | |||
* functionality. | |||
* <p/> | |||
* <br> | |||
* The main Blob methods will interact with the <i>entire</i> OLE field data | |||
* which, in most cases, contains additional wrapper information. In order to | |||
* access the ultimate "content" contained within the OLE data, the {@link | |||
@@ -42,15 +42,15 @@ import com.healthmarketscience.jackcess.impl.OleUtil; | |||
* variety of formats, so additional sub-interfaces are available to interact | |||
* with it. The most specific sub-interface can be determined by the {@link | |||
* ContentType} of the Content. | |||
* <p/> | |||
* <br> | |||
* Once an OleBlob is no longer useful, <i>it should be closed</i> using | |||
* {@link #free} or {@link #close} methods (after which, the instance will no | |||
* longer be functional). | |||
* <p/> | |||
* <br> | |||
* Note, the OleBlob implementation is read-only (through the interface). In | |||
* order to modify blob contents, create a new OleBlob instance using {@link | |||
* OleBlob.Builder} and write it to the access database. | |||
* <p/> | |||
* <br> | |||
* <b>Example for interpreting an existing OLE field:</b> | |||
* <pre> | |||
* OleBlob oleBlob = null; | |||
@@ -66,7 +66,7 @@ import com.healthmarketscience.jackcess.impl.OleUtil; | |||
* if(oleBlob != null) { oleBlob.close(); } | |||
* } | |||
* </pre> | |||
* <p/> | |||
* <br> | |||
* <b>Example for creating new, embedded ole data:</b> | |||
* <pre> | |||
* OleBlob oleBlob = null; | |||
@@ -79,7 +79,7 @@ import com.healthmarketscience.jackcess.impl.OleUtil; | |||
* if(oleBlob != null) { oleBlob.close(); } | |||
* } | |||
* </pre> | |||
* <p/> | |||
* <br> | |||
* <b>Example for creating new, linked ole data:</b> | |||
* <pre> | |||
* OleBlob oleBlob = null; |
@@ -28,7 +28,7 @@ import com.healthmarketscience.jackcess.Database; | |||
/** | |||
* Wrapper for existing FileChannel which is read-only. | |||
* <p/> | |||
* <br> | |||
* Implementation note: this class is optimized for use with {@link Database}. | |||
* Therefore not all methods may be implemented. | |||
* |
@@ -1,41 +0,0 @@ | |||
# basic taglets config | |||
Taglets.splash=false | |||
Taglets.verbose=false | |||
Taglets.debug=false | |||
Taglets.drivers= drivers/j2se15.jar, drivers/j2se14.jar | |||
# custom usage formatting | |||
Taglets.shutdown.usage-tag= net.sourceforge.taglets.simple.shutdown.RegexReplacer | |||
Taglets.shutdown.usage-tag.files= **/*.html | |||
Taglets.shutdown.usage-tag.token.0=_general_method_ | |||
Taglets.shutdown.usage-tag.value.0=<span class="UsageGeneral"><span class="UsageGeneralHeader">General</span>: This method is general use.</span> | |||
Taglets.shutdown.usage-tag.token.1=_intermediate_method_ | |||
Taglets.shutdown.usage-tag.value.1=<span class="UsageIntermediate"><span class="UsageIntermediateHeader">Intermediate</span>: This method requires moderate API knowledge.</span> | |||
Taglets.shutdown.usage-tag.token.2=_advanced_method_ | |||
Taglets.shutdown.usage-tag.value.2=<span class="UsageAdvanced"><span class="UsageAdvancedHeader">Advanced</span>: This method is for advanced/internal use.</span> | |||
Taglets.shutdown.usage-tag.token.3=_general_class_ | |||
Taglets.shutdown.usage-tag.value.3=<span class="UsageGeneral"><span class="UsageGeneralHeader">General</span>: This class is general use.</span> | |||
Taglets.shutdown.usage-tag.token.4=_intermediate_class_ | |||
Taglets.shutdown.usage-tag.value.4=<span class="UsageIntermediate"><span class="UsageIntermediateHeader">Intermediate</span>: This class requires moderate API knowledge.</span> | |||
Taglets.shutdown.usage-tag.token.5=_advanced_class_ | |||
Taglets.shutdown.usage-tag.value.5=<span class="UsageAdvanced"><span class="UsageAdvancedHeader">Advanced</span>: This class is for advanced/internal use.</span> | |||
Taglets.shutdown.usage-tag.token.6=_general_field_ | |||
Taglets.shutdown.usage-tag.value.6=<span class="UsageGeneral"><span class="UsageGeneralHeader">General</span>: This field is general use.</span> | |||
Taglets.shutdown.usage-tag.token.7=_intermediate_field_ | |||
Taglets.shutdown.usage-tag.value.7=<span class="UsageIntermediate"><span class="UsageIntermediateHeader">Intermediate</span>: This field requires moderate API knowledge.</span> | |||
Taglets.shutdown.usage-tag.token.8=_advanced_field_ | |||
Taglets.shutdown.usage-tag.value.8=<span class="UsageAdvanced"><span class="UsageAdvancedHeader">Advanced</span>: This field is for advanced/internal use.</span> | |||
# apparently we need one "normal" tag or the taglets code gets unhappy | |||
Taglets.taglet.todo= net.sourceforge.taglets.simple.block.ParamBlockTaglet | |||
Taglets.taglet.todo.dl.class= tagletsTodo | |||
Taglets.taglet.todo.dl.header= <b>Todo:</b> |
@@ -34,7 +34,7 @@ import com.healthmarketscience.jackcess.impl.CompoundOleUtil; | |||
import junit.framework.TestCase; | |||
import org.apache.poi.poifs.filesystem.DocumentEntry; | |||
import org.apache.poi.poifs.filesystem.DocumentInputStream; | |||
import org.apache.poi.poifs.filesystem.NPOIFSFileSystem; | |||
import org.apache.poi.poifs.filesystem.POIFSFileSystem; | |||
import static com.healthmarketscience.jackcess.TestUtil.*; | |||
import static com.healthmarketscience.jackcess.impl.JetFormatTest.*; | |||
@@ -42,7 +42,7 @@ import static com.healthmarketscience.jackcess.impl.JetFormatTest.*; | |||
* | |||
* @author James Ahlborn | |||
*/ | |||
public class OleBlobTest extends TestCase | |||
public class OleBlobTest extends TestCase | |||
{ | |||
public OleBlobTest(String name) { | |||
@@ -73,7 +73,7 @@ public class OleBlobTest extends TestCase | |||
} finally { | |||
ByteUtil.closeQuietly(blob); | |||
} | |||
try { | |||
blob = new OleBlob.Builder() | |||
.setLink(sampleFile) | |||
@@ -82,7 +82,7 @@ public class OleBlobTest extends TestCase | |||
} finally { | |||
ByteUtil.closeQuietly(blob); | |||
} | |||
try { | |||
blob = new OleBlob.Builder() | |||
.setPackagePrettyName("Text File") | |||
@@ -109,14 +109,14 @@ public class OleBlobTest extends TestCase | |||
assertEquals(sampleFilePath, spc.getFilePath()); | |||
assertEquals(sampleFilePath, spc.getLocalFilePath()); | |||
assertEquals(sampleFileName, spc.getFileName()); | |||
assertEquals(OleBlob.Builder.PACKAGE_PRETTY_NAME, | |||
assertEquals(OleBlob.Builder.PACKAGE_PRETTY_NAME, | |||
spc.getPrettyName()); | |||
assertEquals(OleBlob.Builder.PACKAGE_TYPE_NAME, | |||
assertEquals(OleBlob.Builder.PACKAGE_TYPE_NAME, | |||
spc.getTypeName()); | |||
assertEquals(OleBlob.Builder.PACKAGE_TYPE_NAME, | |||
assertEquals(OleBlob.Builder.PACKAGE_TYPE_NAME, | |||
spc.getClassName()); | |||
assertEquals(sampleFileBytes.length, spc.length()); | |||
assertTrue(Arrays.equals(sampleFileBytes, | |||
assertTrue(Arrays.equals(sampleFileBytes, | |||
toByteArray(spc.getStream(), spc.length()))); | |||
break; | |||
@@ -130,7 +130,7 @@ public class OleBlobTest extends TestCase | |||
assertEquals(OleBlob.Builder.PACKAGE_TYPE_NAME, lc.getTypeName()); | |||
assertEquals(OleBlob.Builder.PACKAGE_TYPE_NAME, lc.getClassName()); | |||
break; | |||
case 3: | |||
OleBlob.OtherContent oc = (OleBlob.OtherContent)content; | |||
assertEquals(OleBlob.ContentType.OTHER, oc.getType()); | |||
@@ -138,7 +138,7 @@ public class OleBlobTest extends TestCase | |||
assertEquals("Text.File", oc.getClassName()); | |||
assertEquals("TextFile", oc.getTypeName()); | |||
assertEquals(sampleFileBytes.length, oc.length()); | |||
assertTrue(Arrays.equals(sampleFileBytes, | |||
assertTrue(Arrays.equals(sampleFileBytes, | |||
toByteArray(oc.getStream(), oc.length()))); | |||
break; | |||
default: | |||
@@ -149,8 +149,8 @@ public class OleBlobTest extends TestCase | |||
} | |||
} | |||
db.close(); | |||
} | |||
db.close(); | |||
} | |||
} | |||
public void testReadBlob() throws Exception | |||
@@ -198,7 +198,7 @@ public class OleBlobTest extends TestCase | |||
} else { | |||
if("test_word.doc".equals(name)) { | |||
checkCompoundEntries(cc, | |||
checkCompoundEntries(cc, | |||
"/%02OlePres000", 466, | |||
"/WordDocument", 4096, | |||
"/%05SummaryInformation", 4096, | |||
@@ -210,7 +210,7 @@ public class OleBlobTest extends TestCase | |||
"/%01Ole", 20); | |||
checkCompoundStorage(cc, attach); | |||
} else if("test_excel.xls".equals(name)) { | |||
checkCompoundEntries(cc, | |||
checkCompoundEntries(cc, | |||
"/%02OlePres000", 1326, | |||
"/%03AccessObjSiteData", 56, | |||
"/%05SummaryInformation", 200, | |||
@@ -243,10 +243,10 @@ public class OleBlobTest extends TestCase | |||
} | |||
db.close(); | |||
} | |||
} | |||
} | |||
private static void checkCompoundEntries(OleBlob.CompoundContent cc, | |||
private static void checkCompoundEntries(OleBlob.CompoundContent cc, | |||
Object... entryInfo) | |||
throws Exception | |||
{ | |||
@@ -262,7 +262,7 @@ public class OleBlobTest extends TestCase | |||
} | |||
} | |||
private static void checkCompoundStorage(OleBlob.CompoundContent cc, | |||
private static void checkCompoundStorage(OleBlob.CompoundContent cc, | |||
Attachment attach) | |||
throws Exception | |||
{ | |||
@@ -273,7 +273,7 @@ public class OleBlobTest extends TestCase | |||
fout.write(attach.getFileData()); | |||
fout.close(); | |||
NPOIFSFileSystem attachFs = new NPOIFSFileSystem(tmpData, true); | |||
POIFSFileSystem attachFs = new POIFSFileSystem(tmpData, true); | |||
for(OleBlob.CompoundContent.Entry e : cc) { | |||
DocumentEntry attachE = null; | |||
@@ -284,7 +284,7 @@ public class OleBlobTest extends TestCase | |||
continue; | |||
} | |||
byte[] attachEBytes = toByteArray(new DocumentInputStream(attachE), | |||
byte[] attachEBytes = toByteArray(new DocumentInputStream(attachE), | |||
attachE.getSize()); | |||
byte[] entryBytes = toByteArray(e.getStream(), e.length()); | |||
@@ -292,9 +292,9 @@ public class OleBlobTest extends TestCase | |||
} | |||
ByteUtil.closeQuietly(attachFs); | |||
} finally { | |||
tmpData.delete(); | |||
} | |||
} | |||
} | |||
} |