@Override public Set<String> resolve(SpecifierContext ctxt) { return _shorthandSpecifier.getMatchingNodes(ctxt); } }
@Override public boolean getDataPlane() { for (Question question : _questions) { if (question.getDataPlane()) { return true; } } return false; }
/** * Checks is this row is covered by the provided exclusion. * * @param exclusion The exclusion to check against. * @return The result of the check */ public boolean isCovered(ObjectNode exclusion) { return Exclusion.firstCoversSecond(exclusion, _data); }
private DisplayHints getComposition(String displayVariable) { DisplayHints displayHints = new DisplayHints(); Map<String, Composition> compositions = new HashMap<>(); Composition composition = _displayHints.getCompositions().get(displayVariable); compositions.put(displayVariable, composition); displayHints.setCompositions(compositions); Map<String, Extraction> extractions = new HashMap<>(); for (String varName : composition.getDictionary().values()) { extractions.put(varName, _displayHints.getExtractions().get(varName)); } displayHints.setExtractions(extractions); return displayHints; }
@Override public String loadQuestionClassId( NetworkId networkId, QuestionId questionId, AnalysisId analysisId) throws IOException { return Question.parseQuestion(loadQuestion(networkId, questionId, analysisId)).getName(); }
public static TableMetadata createMetadata(Question question) { String textDesc = DEFAULT_TEXT_DESC; DisplayHints dhints = question.getDisplayHints(); if (dhints != null && dhints.getTextDesc() != null) { textDesc = dhints.getTextDesc(); } return new TableMetadata(COLUMN_METADATA, textDesc); }
/** * Returns a list of suggestions based on the query, based on {@link * PropertySpecifier#baseAutoComplete}. */ public static List<AutocompleteSuggestion> autoComplete(String query) { return PropertySpecifier.baseAutoComplete(query, JAVA_MAP.keySet()); }
/** Returns what is actually inserted into the answer */ static SelfDescribingObject insertedObject(Object obj, String structType) { Schema targetSchema = NamedStructureSpecifier.JAVA_MAP.get(structType).getSchema(); return new SelfDescribingObject( targetSchema, PropertySpecifier.convertTypeIfNeeded(obj, targetSchema)); } }
protected FilterTableQuestion() { _innerQuestion = new Question() { @Override public boolean getDataPlane() { return false; } @Override public String getName() { return null; } }; }
public static TableMetadata createMetadata(Question question) { String textDesc = DEFAULT_TEXT_DESC; DisplayHints dhints = question.getDisplayHints(); if (dhints != null && dhints.getTextDesc() != null) { textDesc = dhints.getTextDesc(); } return new TableMetadata(COLUMN_METADATA, textDesc); } }
/** * Returns a list of suggestions based on the query, based on {@link * PropertySpecifier#baseAutoComplete}. */ public static List<AutocompleteSuggestion> autoComplete(String query) { return PropertySpecifier.baseAutoComplete(query, JAVA_MAP.keySet()); }
@Override public boolean getDataPlane() { return _innerQuestion.getDataPlane(); }
/** * Returns a list of suggestions based on the query. The current implementation treats the query * as a prefix of the property string. * * @param query The query to auto complete * @return The list of suggestions */ public static List<AutocompleteSuggestion> autoComplete(String query) { return PropertySpecifier.baseAutoComplete(query, JAVA_MAP.keySet()); }
@Override public boolean getDataPlane() { return _innerQuestion.getDataPlane(); }
/** * Returns a list of suggestions based on the query, based on {@link * PropertySpecifier#baseAutoComplete}. */ public static List<AutocompleteSuggestion> autoComplete(String query) { return PropertySpecifier.baseAutoComplete(query, MAP.keySet()); }
@Override public boolean getDataPlane() { return _innerQuestion.getDataPlane(); }
/** * Returns a list of suggestions based on the query. The current implementation treats the query * as a prefix of the property string. * * @param query The query to auto complete * @return The list of suggestions */ public static List<AutocompleteSuggestion> autoComplete(String query) { return PropertySpecifier.baseAutoComplete(query, JAVA_MAP.keySet()); }
/** * Returns a list of suggestions based on the query, based on {@link * PropertySpecifier#baseAutoComplete}. */ public static List<AutocompleteSuggestion> autoComplete(String query) { return PropertySpecifier.baseAutoComplete(query, _map.keySet()); }
/** * Returns a list of suggestions based on the query, based on {@link * PropertySpecifier#baseAutoComplete}. */ public static List<AutocompleteSuggestion> autoComplete(String query) { return PropertySpecifier.baseAutoComplete(query, JAVA_MAP.keySet()); }