本文整理了Java中com.syncleus.ferma.WrappedFramedGraph.addFramedVertex()
方法的一些代码示例,展示了WrappedFramedGraph.addFramedVertex()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WrappedFramedGraph.addFramedVertex()
方法的具体详情如下:
包路径:com.syncleus.ferma.WrappedFramedGraph
类名称:WrappedFramedGraph
方法名:addFramedVertex
暂无
代码示例来源:origin: Syncleus/Ferma
/**
* Add new isolated vertex to the graph.
*
* @param <T>
* The type used to frame the element.
* @param kind
* The kind of the vertex
* @return The framed vertex
*
*/
default <T> T addVertex(Class<T> kind) {
return getGraph().addFramedVertex(kind);
}
代码示例来源:origin: com.syncleus.ferma/ferma
/**
* Add new isolated vertex to the graph.
*
* @param <T>
* The type used to frame the element.
* @param kind
* The kind of the vertex
* @return The framed vertex
*
*/
default <T> T addVertex(Class<T> kind) {
return getGraph().addFramedVertex(kind);
}
代码示例来源:origin: windup/windup
/**
* Create a new instance of the given {@link WindupVertexFrame} type. The ID is generated by the underlying graph database.
*/
@Override
public T create()
{
return ExecutionStatistics.performBenchmarked("GraphService.create", () -> context.getFramed().addFramedVertex(type));
}
代码示例来源:origin: org.jboss.windup.graph/windup-graph-api
/**
* Create a new instance of the given {@link WindupVertexFrame} type. The ID is generated by the underlying graph database.
*/
@Override
public T create()
{
return ExecutionStatistics.performBenchmarked("GraphService.create", () -> context.getFramed().addFramedVertex(type));
}
代码示例来源:origin: org.jboss.windup.rules.apps/windup-rules-java-api
public void perform(GraphRewrite event, EvaluationContext context) {
if (!isPerformMavenization(event.getGraphContext()))
return;
GlobalBomModel bom = event.getGraphContext().getFramed().addFramedVertex(GlobalBomModel.class);
ArchiveCoordinateModel jbossParent = event.getGraphContext().getFramed().addFramedVertex(ArchiveCoordinateModel.class);
copyTo(JBOSS_PARENT, jbossParent);
bom.setParent(jbossParent);
}
})
代码示例来源:origin: windup/windup
public void perform(GraphRewrite event, EvaluationContext context) {
if (!isPerformMavenization(event.getGraphContext()))
return;
GlobalBomModel bom = event.getGraphContext().getFramed().addFramedVertex(GlobalBomModel.class);
ArchiveCoordinateModel jbossParent = event.getGraphContext().getFramed().addFramedVertex(ArchiveCoordinateModel.class);
copyTo(JBOSS_PARENT, jbossParent);
bom.setParent(jbossParent);
}
})
代码示例来源:origin: windup/windup
public NamespaceMetaModel createNamespaceSchemaLocation(String namespaceURI, String schemaLocation)
{
Iterable<? extends NamespaceMetaModel> results = getGraphContext().getQuery(NamespaceMetaModel.class)
.traverse(g -> g.has("namespaceURI", namespaceURI).has("schemaLocation", schemaLocation))
.toList(NamespaceMetaModel.class);
if (results.iterator().hasNext())
{
return results.iterator().next();
}
// otherwise, create it.
NamespaceMetaModel meta = getGraphContext().getFramed().addFramedVertex(NamespaceMetaModel.class);
meta.setSchemaLocation(schemaLocation);
meta.setURI(namespaceURI);
return meta;
}
代码示例来源:origin: org.jboss.windup.rules.apps/windup-rules-java-api
public JavaMethodModel addJavaMethod(JavaClassModel jcm, String methodName, JavaClassModel[] params)
{
ExecutionStatistics.get().begin("JavaClassService.addJavaMethod(jcm, methodName, params)");
JavaMethodModel javaMethodModel = getGraphContext().getFramed().addFramedVertex(JavaMethodModel.class);
javaMethodModel.setMethodName(methodName);
for (int i = 0; i < params.length; i++)
{
JavaClassModel param = params[i];
JavaParameterModel paramModel = getGraphContext().getFramed().addFramedVertex(JavaParameterModel.class);
paramModel.setJavaType(param);
paramModel.setPosition(i);
javaMethodModel.addMethodParameter(paramModel);
}
jcm.addJavaMethod(javaMethodModel);
ExecutionStatistics.get().end("JavaClassService.addJavaMethod(jcm, methodName, params)");
return javaMethodModel;
}
代码示例来源:origin: windup/windup
public JavaMethodModel addJavaMethod(JavaClassModel jcm, String methodName, JavaClassModel[] params)
{
ExecutionStatistics.get().begin("JavaClassService.addJavaMethod(jcm, methodName, params)");
JavaMethodModel javaMethodModel = getGraphContext().getFramed().addFramedVertex(JavaMethodModel.class);
javaMethodModel.setMethodName(methodName);
for (int i = 0; i < params.length; i++)
{
JavaClassModel param = params[i];
JavaParameterModel paramModel = getGraphContext().getFramed().addFramedVertex(JavaParameterModel.class);
paramModel.setJavaType(param);
paramModel.setPosition(i);
javaMethodModel.addMethodParameter(paramModel);
}
jcm.addJavaMethod(javaMethodModel);
ExecutionStatistics.get().end("JavaClassService.addJavaMethod(jcm, methodName, params)");
return javaMethodModel;
}
代码示例来源:origin: org.jboss.windup.rules.apps/windup-rules-java-api
private ApplicationReportModel createAboutWindup(GraphContext context, ProjectModel projectModel)
{
ApplicationReportService applicationReportService = new ApplicationReportService(context);
ApplicationReportModel applicationReportModel = applicationReportService.create();
applicationReportModel.setReportPriority(10000);
applicationReportModel.setReportName(REPORT_NAME);
applicationReportModel.setDescription(REPORT_DESCRIPTION);
applicationReportModel.setReportIconClass("fa fa-question-circle");
applicationReportModel.setMainApplicationReport(false);
applicationReportModel.setDisplayInApplicationReportIndex(true);
if (projectModel == null)
applicationReportModel.setDisplayInGlobalApplicationIndex(true);
else
applicationReportModel.setProjectModel(projectModel);
applicationReportModel.setTemplatePath(TEMPLATE_APPLICATION_REPORT);
applicationReportModel.setTemplateType(TemplateType.FREEMARKER);
Map<String, WindupVertexFrame> related = new HashMap<>();
AboutWindupModel aboutWindupModel = context.getFramed().addFramedVertex(AboutWindupModel.class);
aboutWindupModel.setWindupRuntimeVersion(addon.getId().getVersion().toString());
related.put("windupAbout", aboutWindupModel);
applicationReportModel.setRelatedResource(related);
// Set the filename for the report
ReportService reportService = new ReportService(context);
String filename = projectModel == null ? "about_global" : "about_" + projectModel.getName();
reportService.setUniqueFilename(applicationReportModel, filename, "html");
return applicationReportModel;
}
代码示例来源:origin: windup/windup
private ApplicationReportModel createAboutWindup(GraphContext context, ProjectModel projectModel)
{
ApplicationReportService applicationReportService = new ApplicationReportService(context);
ApplicationReportModel applicationReportModel = applicationReportService.create();
applicationReportModel.setReportPriority(10000);
applicationReportModel.setReportName(REPORT_NAME);
applicationReportModel.setDescription(REPORT_DESCRIPTION);
applicationReportModel.setReportIconClass("fa fa-question-circle");
applicationReportModel.setMainApplicationReport(false);
applicationReportModel.setDisplayInApplicationReportIndex(true);
if (projectModel == null)
applicationReportModel.setDisplayInGlobalApplicationIndex(true);
else
applicationReportModel.setProjectModel(projectModel);
applicationReportModel.setTemplatePath(TEMPLATE_APPLICATION_REPORT);
applicationReportModel.setTemplateType(TemplateType.FREEMARKER);
Map<String, WindupVertexFrame> related = new HashMap<>();
AboutWindupModel aboutWindupModel = context.getFramed().addFramedVertex(AboutWindupModel.class);
aboutWindupModel.setWindupRuntimeVersion(addon.getId().getVersion().toString());
related.put("windupAbout", aboutWindupModel);
applicationReportModel.setRelatedResource(related);
// Set the filename for the report
ReportService reportService = new ReportService(context);
String filename = projectModel == null ? "about_global" : "about_" + projectModel.getName();
reportService.setUniqueFilename(applicationReportModel, filename, "html");
return applicationReportModel;
}
代码示例来源:origin: windup/windup
DoctypeMetaModel meta = event.getGraphContext().getFramed().addFramedVertex(DoctypeMetaModel.class);
meta.addXmlResource(xmlResourceModel);
meta.setBaseURI(docType.getBaseURI());
内容来源于网络,如有侵权,请联系作者删除!