public static SingleInputSemanticProperties getSemanticPropsSingleFromString(String[] constantSet, String[] constantSetExcept, String[] readSet, TypeInformation<?> inType, TypeInformation<?> outType) { SingleInputSemanticProperties result = new SingleInputSemanticProperties(); parseConstantFields(constantSet, result, inType, outType); parseConstantFieldsExcept(constantSetExcept, result, inType, outType); parseReadFields(readSet, result, inType, outType); return result; }
public static SingleInputSemanticProperties getSemanticPropsSingle(Set<Annotation> set, TypeInformation<?> inType, TypeInformation<?> outType) { if (set == null) { return null; } Iterator<Annotation> it = set.iterator(); SingleInputSemanticProperties result = null; //non tuple types are not yet supported for annotations if (!inType.isTupleType() || !outType.isTupleType()) { return null; } while (it.hasNext()) { if (result == null) { result = new SingleInputSemanticProperties(); } Annotation ann = it.next(); if (ann instanceof ConstantFields) { ConstantFields cf = (ConstantFields) ann; parseConstantFields(cf.value(), result, inType, outType); } else if (ann instanceof ConstantFieldsExcept) { ConstantFieldsExcept cfe = (ConstantFieldsExcept) ann; parseConstantFieldsExcept(cfe.value(), result, inType, outType); } else if (ann instanceof ReadFields) { ReadFields rf = (ReadFields) ann; parseReadFields(rf.value(), result, inType, outType); } } return result; }
SingleInputSemanticProperties props = new SingleInputSemanticProperties();
SingleInputSemanticProperties semanticProperties = new SingleInputSemanticProperties();