private String getUpdateConditions(Column cl) throws IOException, SQLException { PropertyMap map = cl.getProperties(); Property exprp = map.get(PropertyMap.EXPRESSION_PROP); if (exprp != null) { Set<String> setu = SQLConverter.getFormulaDependencies(exprp.getValue().toString()); if (setu.size() > 0) { String or = ""; StringBuffer cw = new StringBuffer(); for (String dep : setu) { dep = escapeIdentifier(dep); cw.append(or).append("oldrow.").append(dep).append("<>").append("newrow.").append(dep); or = " OR "; } return cw.toString(); } } return " FALSE "; }
for (PropertyMap.Property p : dbp) { parentMetadata.add(JackcessParser.MDB_PROPERTY_PREFIX + p.getName(), toString(p.getValue(), p.getType())); for (PropertyMap.Property p : up) { parentMetadata.add(JackcessParser.USER_DEFINED_PROPERTY_PREFIX+ p.getName(), toString(p.getValue(), p.getType())); parentMetadata.set(TikaCoreProperties.TITLE, toString(title.getValue(), title.getType())); found.add(title.getName()); if (author != null && author.getValue() != null) { String authorString = toString(author.getValue(), author.getType()); SummaryExtractor.addMulti(parentMetadata, TikaCoreProperties.CREATOR, authorString); found.add(author.getName()); parentMetadata.set(OfficeOpenXMLExtended.COMPANY, toString(company.getValue(), company.getType())); found.add(company.getName()); if (! found.contains(p.getName())) { parentMetadata.add(JackcessParser.SUMMARY_PROPERTY_PREFIX + p.getName(), toString(p.getValue(), p.getType()));
private String getExpression(Column cl) throws IOException { PropertyMap map = cl.getProperties(); Property exprp = map.get(PropertyMap.EXPRESSION_PROP); if (exprp != null) { Table tl = cl.getTable(); String expr = SQLConverter.convertPowOperator((String) exprp.getValue()); for (Column cl1 : tl.getColumns()) { expr = expr.replaceAll("\\[(?i)(" + Pattern.quote(cl1.getName()) + ")\\]", "newrow.$0"); } return expr; } return null; }
for (PropertyMap.Property p : dbp) { parentMetadata.add(JackcessParser.MDB_PROPERTY_PREFIX + p.getName(), toString(p.getValue(), p.getType())); for (PropertyMap.Property p : up) { parentMetadata.add(JackcessParser.USER_DEFINED_PROPERTY_PREFIX+ p.getName(), toString(p.getValue(), p.getType())); parentMetadata.set(TikaCoreProperties.TITLE, toString(title.getValue(), title.getType())); found.add(title.getName()); if (author != null && author.getValue() != null) { String authorString = toString(author.getValue(), author.getType()); SummaryExtractor.addMulti(parentMetadata, TikaCoreProperties.CREATOR, authorString); found.add(author.getName()); parentMetadata.set(OfficeOpenXMLExtended.COMPANY, toString(company.getValue(), company.getType())); found.add(company.getName()); if (! found.contains(p.getName())) { parentMetadata.add(JackcessParser.SUMMARY_PROPERTY_PREFIX + p.getName(), toString(p.getValue(), p.getType()));
for (PropertyMap.Property p : dbp) { parentMetadata.add(JackcessParser.MDB_PROPERTY_PREFIX + p.getName(), toString(p.getValue(), p.getType())); for (PropertyMap.Property p : up) { parentMetadata.add(JackcessParser.USER_DEFINED_PROPERTY_PREFIX+ p.getName(), toString(p.getValue(), p.getType())); parentMetadata.set(TikaCoreProperties.TITLE, toString(title.getValue(), title.getType())); found.add(title.getName()); if (author != null && author.getValue() != null) { String authorString = toString(author.getValue(), author.getType()); SummaryExtractor.addMulti(parentMetadata, TikaCoreProperties.CREATOR, authorString); found.add(author.getName()); parentMetadata.set(OfficeOpenXMLExtended.COMPANY, toString(company.getValue(), company.getType())); found.add(company.getName()); if (! found.contains(p.getName())) { parentMetadata.add(JackcessParser.SUMMARY_PROPERTY_PREFIX + p.getName(), toString(p.getValue(), p.getType()));
public PropertyImpl put(Property prop) { return put(prop.getName(), prop.getType(), prop.getValue(), prop.isDdl()); }
private Object readColumnProperty(com.healthmarketscience.jackcess.Column column, String propertyName, Object defaultValue) throws IOException { PropertyMap.Property property = column.getProperties().get(propertyName); if (property != null) return property.getValue(); return defaultValue; }
@Override public Object getValue(String name, Object defaultValue) { Property prop = get(name); return ((prop != null) ? prop.getValue() : defaultValue); }
private DataType getReturnType(Column cl) throws IOException { if (cl.getProperties().get(PropertyMap.EXPRESSION_PROP) == null || cl.getProperties().get(PropertyMap.RESULT_TYPE_PROP) == null) { return null; } byte pos = (Byte) cl.getProperties().get(PropertyMap.RESULT_TYPE_PROP).getValue(); return DataType.fromByte(pos); }