public void addAnnotation(String category, String annotation, String resolution, Priority priority) { addAnnotation(new Annotation(category, annotation, resolution, priority)); }
public void addAnnotation(String category, String annotation, String resolution, Priority priority) { addAnnotation(new Annotation(category, annotation, resolution, priority)); }
public void addAnnotation(String category, String annotation, String resolution, Priority priority) { addAnnotation(new Annotation(category, annotation, resolution, priority)); }
private static void recordAnnotation(AnalysisRecord analysis, String type, Priority priority, String msgKey, Object... parts) { if (analysis.recordAnnotations()) { Annotation annotation = new Annotation(type, QueryPlugin.Util.getString(msgKey, parts), null, priority); analysis.addAnnotation(annotation); } }
public void recordDebugAnnotation(String annotation, Object modelID, String resolution, AnalysisRecord record, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException { if (record != null && record.recordAnnotations()) { boolean current = this.modified; this.modified = true; record.addAnnotation(Annotation.RELATIONAL_PLANNER, annotation + (modelID != null?" " + (metadata!=null?metadata.getName(modelID):modelID):""), resolution + " " + this.nodeToString(false), Priority.LOW); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ this.modified = current; } }
private void markInvalid(LanguageObject object, String reason) { this.valid = false; setAbort(true); if (analysisRecord != null && analysisRecord.recordAnnotations()) { try { analysisRecord.addAnnotation(Annotation.RELATIONAL_PLANNER, reason + " " + this.metadata.getName(this.modelID), object + " was not pushed", Priority.LOW); //$NON-NLS-1$ //$NON-NLS-2$ } catch (QueryMetadataException e) { } catch (TeiidComponentException e) { } } }
public void recordDebugAnnotation(String annotation, Object modelID, String resolution, AnalysisRecord record, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException { if (record != null && record.recordAnnotations()) { boolean current = this.modified; this.modified = true; record.addAnnotation(Annotation.RELATIONAL_PLANNER, annotation + (modelID != null?" " + (metadata!=null?metadata.getName(modelID):modelID):""), resolution + " " + this.nodeToString(false), Priority.LOW); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ this.modified = current; } }
public void recordDebugAnnotation(String annotation, Object modelID, String resolution, AnalysisRecord record, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException { if (record != null && record.recordAnnotations()) { boolean current = this.modified; this.modified = true; record.addAnnotation(Annotation.RELATIONAL_PLANNER, annotation + (modelID != null?" " + (metadata!=null?metadata.getName(modelID):modelID):""), resolution + " " + this.nodeToString(false), Priority.LOW); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ this.modified = current; } }
private void markInvalid(LanguageObject object, String reason) { this.valid = false; setAbort(true); if (analysisRecord != null && analysisRecord.recordAnnotations()) { try { analysisRecord.addAnnotation(Annotation.RELATIONAL_PLANNER, reason + " " + this.metadata.getName(this.modelID), object + " was not pushed", Priority.LOW); //$NON-NLS-1$ //$NON-NLS-2$ } catch (QueryMetadataException e) { } catch (TeiidComponentException e) { } } }
private static void recordAnnotation(AnalysisRecord analysis, String type, Priority priority, String msgKey, Object... parts) { if (analysis.recordAnnotations()) { Annotation annotation = new Annotation(type, QueryPlugin.Util.getString(msgKey, parts), null, priority); analysis.addAnnotation(annotation); } }
private void markInvalid(LanguageObject object, String reason) { this.valid = false; setAbort(true); if (analysisRecord != null && analysisRecord.recordAnnotations()) { try { analysisRecord.addAnnotation(Annotation.RELATIONAL_PLANNER, reason + " " + this.metadata.getName(this.modelID), object + " was not pushed", Priority.LOW); //$NON-NLS-1$ //$NON-NLS-2$ } catch (QueryMetadataException e) { } catch (TeiidComponentException e) { } } }
private static void recordAnnotation(AnalysisRecord analysis, String type, Priority priority, String msgKey, Object... parts) { if (analysis.recordAnnotations()) { Annotation annotation = new Annotation(type, QueryPlugin.Util.getString(msgKey, parts), null, priority); analysis.addAnnotation(annotation); } }
} catch (IllegalArgumentException e) { if (record.recordAnnotations()) { record.addAnnotation(XQUERY_PLANNING, "Invalid streaming path " + xQueryString + " "+ e.getMessage(), "Document streaming will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } catch (IllegalStateException e) { if (record.recordAnnotations()) { record.addAnnotation(XQUERY_PLANNING, "Multiple context items exist " + xQueryString, "Document projection will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$ record.addAnnotation(XQUERY_PLANNING, "No context item reference was found in the XQuery " + xQueryString, "Document projection will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$ if (finalNodes.size() != 1) { if (record.recordAnnotations()) { record.addAnnotation(XQUERY_PLANNING, "multiple return items exist " + xQueryString, "Document projection will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$ record.addAnnotation(XQUERY_PLANNING, "There are unknown dependencies (most likely a user defined function) in " + xQueryString, "Document projection will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$ showArcs(sb, parentRoot, 0); record.addAnnotation(XQUERY_PLANNING, "Projection conditions met for " + xQueryString, "Document projection will be used" + (sb != null ? "\n" +sb.toString():""), Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
this.analysisRecord.addAnnotation(new Annotation(Annotation.HINTS, msg, "ignoring hint", Priority.MEDIUM)); //$NON-NLS-1$
this.analysisRecord.addAnnotation(new Annotation(Annotation.HINTS, msg, "ignoring hint", Priority.MEDIUM)); //$NON-NLS-1$
this.analysisRecord.addAnnotation(new Annotation(Annotation.HINTS, msg, "ignoring hint", Priority.MEDIUM)); //$NON-NLS-1$
if (axis != AxisInfo.NAMESPACE && axis != AxisInfo.ATTRIBUTE) { if (record.recordAnnotations()) { record.addAnnotation(XQUERY_PLANNING, "The column path contains an invalid reverse axis " + xmlColumn.getPath(), "Document streaming will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$ record.addAnnotation(XQUERY_PLANNING, "The column path contains an invalid reverse axis " + xmlColumn.getPath(), "Document streaming will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$ if (current.getTarget().isReturnable()) { if (record.recordAnnotations()) { record.addAnnotation(XQUERY_PLANNING, "The column path contains an invalid reverse axis " + xmlColumn.getPath(), "Document streaming will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$ } else { if (record.recordAnnotations()) { record.addAnnotation(XQUERY_PLANNING, "The column path may not reference an ancestor or subtree " + xmlColumn.getPath(), "Document streaming will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$
public void testAnnotations() { AnalysisRecord rec = new AnalysisRecord(true, false); assertTrue(rec.recordAnnotations()); Annotation ann1 = new Annotation("cat", "ann", "res", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ Annotation ann2 = new Annotation("cat2", "ann2", "res2", Priority.HIGH); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ rec.addAnnotation(ann1); rec.addAnnotation(ann2); Collection<Annotation> annotations = rec.getAnnotations(); assertEquals(2, annotations.size()); assertTrue(annotations.contains(ann1)); assertTrue(annotations.contains(ann2)); }
if (containsRootFunction(internalExpression)) { if (record.recordAnnotations()) { record.addAnnotation(XQUERY_PLANNING, "Root function used in column path " + xmlColumn.getPath(), "Document projection will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$ if (subContextRoot != null) { if (record.recordAnnotations()) { record.addAnnotation(XQUERY_PLANNING, "Multiple context items exist in column path " + xmlColumn.getPath(), "Document projection will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$
if (subContextRoot != null) { if (record.recordAnnotations()) { record.addAnnotation(XQUERY_PLANNING, "Multiple context items exist in column path " + xmlColumn.getPath(), "Document projection will not be used", Priority.MEDIUM); //$NON-NLS-1$ //$NON-NLS-2$