gpt4 book ai didi

org.jboss.windup.graph.model.WindupVertexFrame类的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 13:41:05 26 4
gpt4 key购买 nike

本文整理了Java中org.jboss.windup.graph.model.WindupVertexFrame类的一些代码示例,展示了WindupVertexFrame类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WindupVertexFrame类的具体详情如下:
包路径:org.jboss.windup.graph.model.WindupVertexFrame
类名称:WindupVertexFrame

WindupVertexFrame介绍

[英]The base VertexFrame type implemented by all model types.
[中]由所有模型类型实现的基本VertexFrame类型。

代码示例

代码示例来源:origin: windup/windup

public T getUniqueByProperty(String property, Object value, boolean enforceType) throws NonUniqueResultException
{
  Iterable<T> results = findAllByProperty(property, value, enforceType);
  T result = null;
  for (WindupVertexFrame item : results)
  {
    // There can be other types using the same property name.
    if (!type.isInstance(item))
      continue;
    if (result != null)
    {
      throw new NonUniqueResultException("Expected unique value, but returned non-unique: " + property + " Conflicting models:"
          + NL + "\t" + StringUtils.join(item.getClass().getInterfaces(), ", ") + NL + "\t\t" + item.toPrettyString()
          + NL + "\t" + StringUtils.join(result.getClass().getInterfaces(), ", ") + NL + "\t\t" + result.toPrettyString());
    }
    result = (T) item;
  }
  return result;
}

代码示例来源:origin: windup/windup

private void fillInNextFrame() {
  while(wrappedIterator.hasNext() && nextFrame==null) {
    T frame = wrappedIterator.next();
    String frameId = frame.getElement().id().toString();
    if(!ids.contains(frameId)) {
      ids.add(frameId);
      nextFrame=frame;
    }
  }
}

代码示例来源:origin: org.jboss.windup.graph/windup-graph-api

@SuppressWarnings("unchecked")
public static <T extends WindupVertexFrame> T refresh(GraphContext context, T frame)
{
  Vertex v = context.getGraph().traversal().V((Long)frame.getId()).next();
  return (T) context.getFramed().frameElement(v, WindupVertexFrame.class);
}

代码示例来源:origin: windup/windup

@SuppressWarnings("unchecked")
public static <T extends WindupVertexFrame> T refresh(GraphContext context, T frame)
{
  Vertex v = context.getGraph().traversal().V((Long)frame.getId()).next();
  return (T) context.getFramed().frameElement(v, WindupVertexFrame.class);
}

代码示例来源:origin: org.jboss.windup.graph/windup-graph-api

public T getUniqueByProperty(String property, Object value, boolean enforceType) throws NonUniqueResultException
{
  Iterable<T> results = findAllByProperty(property, value, enforceType);
  T result = null;
  for (WindupVertexFrame item : results)
  {
    // There can be other types using the same property name.
    if (!type.isInstance(item))
      continue;
    if (result != null)
    {
      throw new NonUniqueResultException("Expected unique value, but returned non-unique: " + property + " Conflicting models:"
          + NL + "\t" + StringUtils.join(item.getClass().getInterfaces(), ", ") + NL + "\t\t" + item.toPrettyString()
          + NL + "\t" + StringUtils.join(result.getClass().getInterfaces(), ", ") + NL + "\t\t" + result.toPrettyString());
    }
    result = (T) item;
  }
  return result;
}

代码示例来源:origin: org.jboss.windup.graph/windup-graph-api

private void fillInNextFrame() {
  while(wrappedIterator.hasNext() && nextFrame==null) {
    T frame = wrappedIterator.next();
    String frameId = frame.getElement().id().toString();
    if(!ids.contains(frameId)) {
      ids.add(frameId);
      nextFrame=frame;
    }
  }
}

代码示例来源:origin: windup/windup

/**
 * Returns the ReportModel with given name.
 */
@SuppressWarnings("unchecked")
public <T extends ReportModel> T getReportByName(String name, Class<T> clazz)
{
  WindupVertexFrame model = this.getUniqueByProperty(ReportModel.REPORT_NAME, name);
  try
  {
    return (T) model;
  }
  catch (ClassCastException ex)
  {
    throw new WindupException("The vertex is not of expected frame type " + clazz.getName() + ": " + model.toPrettyString());
  }
}

代码示例来源:origin: org.jboss.windup.web.addons/windup-web-support-impl

protected List<Map<String, Object>> frameIterableToResult(long executionID, Iterable<? extends WindupVertexFrame> frames, int depth)
{
  GraphMarshallingContext ctx = new GraphMarshallingContext(executionID, null, depth, false, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), true);
  List<Map<String, Object>> result = new ArrayList<>();
  for (WindupVertexFrame frame : frames)
  {
    result.add(convertToMap(ctx, frame.getElement()));
  }
  return result;
}

代码示例来源:origin: org.jboss.windup.reporting/windup-reporting-api

/**
 * Returns the ReportModel with given name.
 */
@SuppressWarnings("unchecked")
public <T extends ReportModel> T getReportByName(String name, Class<T> clazz)
{
  WindupVertexFrame model = this.getUniqueByProperty(ReportModel.REPORT_NAME, name);
  try
  {
    return (T) model;
  }
  catch (ClassCastException ex)
  {
    throw new WindupException("The vertex is not of expected frame type " + clazz.getName() + ": " + model.toPrettyString());
  }
}

代码示例来源:origin: org.jboss.windup.graph/windup-graph-api

@Override
public void remove(final T model)
{
  ExecutionStatistics.performBenchmarked("GraphService.commit", () ->
  {
    model.getElement().remove();
    return null;
  });
}

代码示例来源:origin: windup/windup

private XmlFileModel getXmlFileModelFromVertex(WindupVertexFrame vertexFrame) {
  final XmlFileModel xml;
  if (vertexFrame instanceof FileReferenceModel)
  {
    xml = (XmlFileModel) ((FileReferenceModel) vertexFrame).getFile();
  }
  else if (vertexFrame instanceof XmlFileModel)
  {
    xml = (XmlFileModel) vertexFrame;
  }
  else
  {
    throw new WindupException("XmlFile was called on the wrong graph type ( " + vertexFrame.toPrettyString()
          + ")");
  }
  return xml;
}

代码示例来源:origin: windup/windup

@Override
public void remove(final T model)
{
  ExecutionStatistics.performBenchmarked("GraphService.commit", () ->
  {
    model.getElement().remove();
    return null;
  });
}

代码示例来源:origin: org.jboss.windup.config/windup-config-api

+ System.lineSeparator()+"    Old: %s"
    + System.lineSeparator()+"    New: %s"
    + "%s", frame.toPrettyString(), last, frame,
    paramValueStoreOverwritten ? "" : System.lineSeparator()+"Further incidents will be logged at FINER level as it may occur millions of times."));
paramValueStoreOverwritten = true;

代码示例来源:origin: windup/windup

/**
 * Adds the specified type to this frame, and returns a new object that implements this type.
 */
public static <T extends WindupVertexFrame> T addTypeToModel(GraphContext graphContext, WindupVertexFrame frame, Class<T> type)
{
  Vertex vertex = frame.getElement();
  graphContext.getGraphTypeManager().addTypeToElement(type, vertex);
  return graphContext.getFramed().frameElement(vertex, type);
}

代码示例来源:origin: org.jboss.windup.rules.apps/windup-rules-java-ee

LOG.warning(payload.toPrettyString());
return;

代码示例来源:origin: windup/windup

/**
 * Removes the specified type from the frame.
 */
public static <T extends WindupVertexFrame> WindupVertexFrame removeTypeFromModel(GraphContext graphContext, WindupVertexFrame frame, Class<T> type)
{
  Vertex vertex = frame.getElement();
  graphContext.getGraphTypeManager().removeTypeFromElement(type, vertex);
  return graphContext.getFramed().frameElement(vertex, WindupVertexFrame.class);
}

代码示例来源:origin: windup/windup

+ System.lineSeparator()+"    Old: %s"
    + System.lineSeparator()+"    New: %s"
    + "%s", frame.toPrettyString(), last, frame,
    paramValueStoreOverwritten ? "" : System.lineSeparator()+"Further incidents will be logged at FINER level as it may occur millions of times."));
paramValueStoreOverwritten = true;

代码示例来源:origin: org.jboss.windup.web.addons/windup-web-support-impl

entity.getElement(),
1,
false,

代码示例来源:origin: windup/windup

LOG.warning(payload.toPrettyString());
return;

代码示例来源:origin: org.jboss.windup.graph/windup-graph-api

/**
 * Adds the specified type to this frame, and returns a new object that implements this type.
 */
public static <T extends WindupVertexFrame> T addTypeToModel(GraphContext graphContext, WindupVertexFrame frame, Class<T> type)
{
  Vertex vertex = frame.getElement();
  graphContext.getGraphTypeManager().addTypeToElement(type, vertex);
  return graphContext.getFramed().frameElement(vertex, type);
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com