public static String getAnnotation(Dataflow dataflow, Class<? extends AbstractTextualValueAssertion> annotation, String defaultValue) { return annotationTools.getAnnotationString(dataflow, annotation, defaultValue); }
public static String getAnnotation(Dataflow dataflow, Class<? extends AbstractTextualValueAssertion> annotation, String defaultValue) { return annotationTools.getAnnotationString(dataflow, annotation, defaultValue); }
String value = annotationTools.getAnnotationString(annotated, c, MISSING_VALUE);
private Annotated<?> findSuitableAnnotated(Annotated<?> annotatedUnderConsideration, Class<?> c) { String value = annotationTools.getAnnotationString(annotatedUnderConsideration, c, MISSING_VALUE); if (!value.equals(MISSING_VALUE)) { return annotatedUnderConsideration; } if (annotatedUnderConsideration instanceof Processor) { List<? extends Activity<?>> activities = ((Processor) annotatedUnderConsideration).getActivityList(); if (!activities.isEmpty()) { return findSuitableAnnotated(activities.get(0), c); } } if (annotatedUnderConsideration instanceof NestedDataflow) { return findSuitableAnnotated(((NestedDataflow) annotatedUnderConsideration).getNestedDataflow(), c); } return null; }
String annotationValue = aTools.getAnnotationString(realizingDataflow, c, null); if (annotationValue == null)
.getComponentRegistry(); String title = annotationTools.getAnnotationString(dataflow, DescriptiveTitle.class, "Untitled");
private MyExperimentComponentVersion internalAddVersionBasedOn(Dataflow dataflow, String revisionComment, String permissionsString) throws RegistryException { String title = annotationTools.getAnnotationString(dataflow, DescriptiveTitle.class, "Untitled"); String dataflowString; try { ByteArrayOutputStream dataflowStream = new ByteArrayOutputStream(); FileManager.getInstance().saveDataflowSilently(dataflow, new T2FlowFileType(), dataflowStream, false); dataflowString = dataflowStream.toString("UTF-8"); } catch (OverwriteException e) { throw new RegistryException(e); } catch (SaveException e) { throw new RegistryException(e); } catch (IllegalStateException e) { throw new RegistryException(e); } catch (UnsupportedEncodingException e) { throw new RegistryException(e); } Element workflowElement = componentRegistry.getPackItem(urlString, "workflow"); String versionUri = workflowElement.getAttributeValue("uri"); String workflowUri = StringUtils.substringBeforeLast(versionUri, "&"); Element componentWorkflow = componentRegistry.updateWorkflow(workflowUri, dataflowString, title, revisionComment, license, permissionsString); Element componentElement = componentRegistry.getResource(urlString); componentRegistry.deletePackItem(componentElement, "workflow"); componentRegistry.addPackItem(componentElement, componentWorkflow); Element componentPack = componentRegistry.snapshotPack(urlString); String version = componentPack.getAttributeValue("version"); MyExperimentComponentVersion myExperimentComponentVersion = new MyExperimentComponentVersion(componentRegistry, this, urlString+"&version="+version); return myExperimentComponentVersion; }
private MyExperimentComponentVersion internalAddVersionBasedOn(Dataflow dataflow, String revisionComment, String permissionsString) throws RegistryException { String title = annotationTools.getAnnotationString(dataflow, DescriptiveTitle.class, "Untitled"); String dataflowString; try { ByteArrayOutputStream dataflowStream = new ByteArrayOutputStream(); FileManager.getInstance().saveDataflowSilently(dataflow, new T2FlowFileType(), dataflowStream, false); dataflowString = dataflowStream.toString("UTF-8"); } catch (OverwriteException e) { throw new RegistryException(e); } catch (SaveException e) { throw new RegistryException(e); } catch (IllegalStateException e) { throw new RegistryException(e); } catch (UnsupportedEncodingException e) { throw new RegistryException(e); } Element workflowElement = componentRegistry.getPackItem(urlString, "workflow"); String versionUri = workflowElement.getAttributeValue("uri"); String workflowUri = StringUtils.substringBeforeLast(versionUri, "&"); Element componentWorkflow = componentRegistry.updateWorkflow(workflowUri, dataflowString, title, revisionComment, license, permissionsString); Element componentElement = componentRegistry.getResource(urlString); componentRegistry.deletePackItem(componentElement, "workflow"); componentRegistry.addPackItem(componentElement, componentWorkflow); Element componentPack = componentRegistry.snapshotPack(urlString); String version = componentPack.getAttributeValue("version"); MyExperimentComponentVersion myExperimentComponentVersion = new MyExperimentComponentVersion(componentRegistry, this, urlString+"&version="+version); return myExperimentComponentVersion; }
.getComponentRegistry(); String title = annotationTools.getAnnotationString(dataflow, DescriptiveTitle.class, "Untitled");