• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java EdgeFrame类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.syncleus.ferma.EdgeFrame的典型用法代码示例。如果您正苦于以下问题:Java EdgeFrame类的具体用法?Java EdgeFrame怎么用?Java EdgeFrame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

EdgeFrame类属于com.syncleus.ferma包,在下文中一共展示了EdgeFrame类的40个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: resolve

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Override
public <T> Class<? extends T> resolve(final Element element, final Class<T> kind) {
	final String nodeClazz = element.getProperty(this.typeResolutionKey);
	if (nodeClazz == null) {
		return kind;
	}

	final Class<T> nodeKind = (Class<T>) this.reflectionCache.forName(nodeClazz);

	if (kind.isAssignableFrom(nodeKind) || kind.equals(VertexFrame.class) || kind.equals(EdgeFrame.class)
			|| kind.equals(AbstractVertexFrame.class) || kind.equals(AbstractEdgeFrame.class) || kind.equals(Object.class)) {
		return nodeKind;
	} else {
		return kind;
	}
}
 

开发者ID:gentics,
项目名称:mesh,
代码行数:17,
代码来源:MeshTypeResolver.java

示例2: setPublished

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Override
public void setPublished(NodeGraphFieldContainer container, String releaseUuid) {
	String languageTag = container.getLanguage().getLanguageTag();

	// Remove an existing published edge
	EdgeFrame currentPublished = getGraphFieldContainerEdge(languageTag, releaseUuid, PUBLISHED);
	if (currentPublished != null) {
		// We need to remove the edge first since updateWebrootPathInfo will
		// check the published edge again
		NodeGraphFieldContainerImpl oldPublishedContainer = currentPublished.inV().nextOrDefaultExplicit(NodeGraphFieldContainerImpl.class, null);
		currentPublished.remove();
		oldPublishedContainer.updateWebrootPathInfo(releaseUuid, "node_conflicting_segmentfield_publish");
	}

	// create new published edge
	GraphFieldContainerEdge edge = addFramedEdge(HAS_FIELD_CONTAINER, container, GraphFieldContainerEdgeImpl.class);
	edge.setLanguageTag(languageTag);
	edge.setReleaseUuid(releaseUuid);
	edge.setType(PUBLISHED);
	container.updateWebrootPathInfo(releaseUuid, "node_conflicting_segmentfield_publish");
}
 

开发者ID:gentics,
项目名称:mesh,
代码行数:22,
代码来源:NodeImpl.java

示例3: resolve

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Override
public <T> Class<? extends T> resolve(final Element element, final Class<T> kind) {
    final Property<String> nodeClazzProperty = element.<String>property(this.typeResolutionKey);
    final String nodeClazz;
    if( nodeClazzProperty.isPresent() )
        nodeClazz = nodeClazzProperty.value();
    else
        return kind;

    final Class<T> nodeKind = (Class<T>) this.reflectionCache.forName(nodeClazz);

    if (kind.isAssignableFrom(nodeKind) || kind.equals(VertexFrame.class) || kind.equals(EdgeFrame.class) || kind.equals(AbstractVertexFrame.class) || kind.equals(AbstractEdgeFrame.class) || kind.
          equals(Object.class))
        return nodeKind;
    else
        return kind;
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:18,
代码来源:PolymorphicTypeResolver.java

示例4: testGetSonEdgesDefault

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetSonEdgesDefault() {
    final TinkerGraph godGraph = TinkerGraph.open();
    GodGraphLoader.load(godGraph);

    final FramedGraph framedGraph = new DelegatingFramedGraph(godGraph, TEST_TYPES);

    final List<? extends God> gods = framedGraph.traverse(
        input -> input.V().has("name", "jupiter")).toList(God.class);

    final God father = gods.iterator().next();
    Assert.assertTrue(father != null);
    final VertexFrame fatherVertex = father;
    Assert.assertEquals(fatherVertex.getProperty("name"), "jupiter");

    final Iterator<? extends EdgeFrame> childEdgeIterator = father.getSonEdges();
    Assert.assertTrue(childEdgeIterator.hasNext());
    final EdgeFrame childEdge = childEdgeIterator.next();
    Assert.assertEquals(childEdge.getElement().outVertex().property("name").value(), "hercules");
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:21,
代码来源:IncidenceMethodHandlerTest.java

示例5: testGetSonEdgesListDefault

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetSonEdgesListDefault() {
    final TinkerGraph godGraph = TinkerGraph.open();
    GodGraphLoader.load(godGraph);

    final FramedGraph framedGraph = new DelegatingFramedGraph(godGraph, TEST_TYPES);

    final List<? extends God> gods = framedGraph.traverse(
        input -> input.V().has("name", "jupiter")).toList(God.class);

    final God father = gods.iterator().next();
    Assert.assertTrue(father != null);
    final VertexFrame fatherVertex = father;
    Assert.assertEquals(fatherVertex.getProperty("name"), "jupiter");

    final List<? extends EdgeFrame> edgesList = father.getSonEdgesList();
    Assert.assertFalse(edgesList.isEmpty());
    final EdgeFrame childEdge = edgesList.get(0);
    Assert.assertEquals(childEdge.getElement().outVertex().property("name").value(), "hercules");
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:21,
代码来源:IncidenceMethodHandlerTest.java

示例6: testGetSonEdgesSetDefault

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetSonEdgesSetDefault() {
    final TinkerGraph godGraph = TinkerGraph.open();
    GodGraphLoader.load(godGraph);

    final FramedGraph framedGraph = new DelegatingFramedGraph(godGraph, TEST_TYPES);

    final List<? extends God> gods = framedGraph.traverse(
        input -> input.V().has("name", "jupiter")).toList(God.class);

    final God father = gods.iterator().next();
    Assert.assertTrue(father != null);
    final VertexFrame fatherVertex = father;
    Assert.assertEquals(fatherVertex.getProperty("name"), "jupiter");

    final Set<? extends EdgeFrame> sonEdgesSet = father.getSonEdgesSet();
    Assert.assertFalse(sonEdgesSet.isEmpty());
    final EdgeFrame childEdge = sonEdgesSet.iterator().next();
    Assert.assertEquals(childEdge.getElement().outVertex().property("name").value(), "hercules");
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:21,
代码来源:IncidenceMethodHandlerTest.java

示例7: testGetSonEdgesByType

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetSonEdgesByType() {
    final TinkerGraph godGraph = TinkerGraph.open();
    GodGraphLoader.load(godGraph);

    final FramedGraph framedGraph = new DelegatingFramedGraph(godGraph, TEST_TYPES);

    final List<? extends God> gods = framedGraph.traverse(
        input -> input.V().has("name", "jupiter")).toList(God.class);

    final God father = gods.iterator().next();
    Assert.assertTrue(father != null);
    final VertexFrame fatherVertex = father;
    Assert.assertEquals(fatherVertex.getProperty("name"), "jupiter");

    final Iterator<? extends FatherEdge> childEdgeIterator = father.getSonEdges(FatherEdge.class);
    Assert.assertTrue(childEdgeIterator.hasNext());
    final FatherEdge childEdge = childEdgeIterator.next();
    Assert.assertTrue(childEdge != null);
    final EdgeFrame edge = childEdge;
    Assert.assertEquals(edge.getElement().outVertex().property("name").value(), "hercules");
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:23,
代码来源:IncidenceMethodHandlerTest.java

示例8: testGetSonEdgesListByType

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetSonEdgesListByType() {
    final TinkerGraph godGraph = TinkerGraph.open();
    GodGraphLoader.load(godGraph);

    final FramedGraph framedGraph = new DelegatingFramedGraph(godGraph, TEST_TYPES);

    final List<? extends God> gods = framedGraph.traverse(
        input -> input.V().has("name", "jupiter")).toList(God.class);

    final God father = gods.iterator().next();
    Assert.assertTrue(father != null);
    final VertexFrame fatherVertex = father;
    Assert.assertEquals(fatherVertex.getProperty("name"), "jupiter");

    final List<? extends FatherEdge> childEdges = father.getSonEdgesList(FatherEdge.class);
    Assert.assertFalse(childEdges.isEmpty());
    final FatherEdge childEdge = childEdges.get(0);
    Assert.assertTrue(childEdge != null);
    final EdgeFrame edge = childEdge;
    Assert.assertEquals(edge.getElement().outVertex().property("name").value(), "hercules");
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:23,
代码来源:IncidenceMethodHandlerTest.java

示例9: testGetSonEdgesSetByType

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetSonEdgesSetByType() {
    final TinkerGraph godGraph = TinkerGraph.open();
    GodGraphLoader.load(godGraph);

    final FramedGraph framedGraph = new DelegatingFramedGraph(godGraph, TEST_TYPES);

    final List<? extends God> gods = framedGraph.traverse(
        input -> input.V().has("name", "jupiter")).toList(God.class);

    final God father = gods.iterator().next();
    Assert.assertTrue(father != null);
    final VertexFrame fatherVertex = father;
    Assert.assertEquals(fatherVertex.getProperty("name"), "jupiter");

    final Set<? extends FatherEdge> childEdges = father.getSonEdgesSet(FatherEdge.class);
    Assert.assertFalse(childEdges.isEmpty());
    final FatherEdge childEdge = childEdges.iterator().next();
    Assert.assertTrue(childEdge != null);
    final EdgeFrame edge = childEdge;
    Assert.assertEquals(edge.getElement().outVertex().property("name").value(), "hercules");
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:23,
代码来源:IncidenceMethodHandlerTest.java

示例10: testObtainSonEdgesByType

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testObtainSonEdgesByType() {
    final TinkerGraph godGraph = TinkerGraph.open();
    GodGraphLoader.load(godGraph);

    final FramedGraph framedGraph = new DelegatingFramedGraph(godGraph, TEST_TYPES);

    final List<? extends God> gods = framedGraph.traverse(
        input -> input.V().has("name", "jupiter")).toList(God.class);

    final God father = gods.iterator().next();
    Assert.assertTrue(father != null);
    final VertexFrame fatherVertex = father;
    Assert.assertEquals(fatherVertex.getProperty("name"), "jupiter");

    final Iterator<? extends FatherEdge> childEdgeIterator = father.obtainSonEdges(FatherEdge.class);
    Assert.assertTrue(childEdgeIterator.hasNext());
    final FatherEdge childEdge = childEdgeIterator.next();
    Assert.assertTrue(childEdge != null);
    final EdgeFrame edge = childEdge;
    Assert.assertEquals(edge.getElement().outVertex().property("name").value(), "hercules");
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:23,
代码来源:IncidenceMethodHandlerTest.java

示例11: testGetSonEdgesExtended

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetSonEdgesExtended() {
    final TinkerGraph godGraph = TinkerGraph.open();
    GodGraphLoader.load(godGraph);

    final FramedGraph framedGraph = new DelegatingFramedGraph(godGraph, TEST_TYPES);

    final List<? extends God> gods = framedGraph.traverse(
        input -> input.V().has("name", "jupiter")).toList(God.class);

    final God father = gods.iterator().next();
    Assert.assertTrue(father != null);
    final VertexFrame fatherVertex = father;
    Assert.assertEquals(fatherVertex.getProperty("name"), "jupiter");

    final Iterator<? extends FatherEdge> childEdgeIterator = father.getSonEdges(FatherEdgeExtended.class);
    Assert.assertTrue(childEdgeIterator.hasNext());
    final FatherEdge childEdge = childEdgeIterator.next();
    Assert.assertTrue(childEdge instanceof FatherEdgeExtended);
    Assert.assertTrue(childEdge instanceof EdgeFrame);
    final EdgeFrame edge = childEdge;
    Assert.assertEquals(edge.getElement().outVertex().property("name").value(), "hercules");
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:24,
代码来源:IncidenceMethodHandlerTest.java

示例12: testGetSonEdgeDefault

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetSonEdgeDefault() {
    final TinkerGraph godGraph = TinkerGraph.open();
    GodGraphLoader.load(godGraph);

    final FramedGraph framedGraph = new DelegatingFramedGraph(godGraph, TEST_TYPES);

    final List<? extends God> gods = framedGraph.traverse(
        input -> input.V().has("name", "jupiter")).toList(God.class);

    final God father = gods.iterator().next();
    Assert.assertTrue(father != null);
    final VertexFrame fatherVertex = father;
    Assert.assertEquals(fatherVertex.getProperty("name"), "jupiter");

    final EdgeFrame childEdge = father.getSonEdge();
    Assert.assertEquals(childEdge.getElement().outVertex().property("name").value(), "hercules");
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:19,
代码来源:IncidenceMethodHandlerTest.java

示例13: testGetSonEdgeByType

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetSonEdgeByType() {
    final TinkerGraph godGraph = TinkerGraph.open();
    GodGraphLoader.load(godGraph);

    final FramedGraph framedGraph = new DelegatingFramedGraph(godGraph, TEST_TYPES);

    final List<? extends God> gods = framedGraph.traverse(
        input -> input.V().has("name", "jupiter")).toList(God.class);

    final God father = gods.iterator().next();
    Assert.assertTrue(father != null);
    final VertexFrame fatherVertex = father;
    Assert.assertEquals(fatherVertex.getProperty("name"), "jupiter");

    final FatherEdge childEdge = father.getSonEdge(FatherEdge.class);
    Assert.assertTrue(childEdge != null);
    final EdgeFrame edge = childEdge;
    Assert.assertEquals(childEdge.getElement().outVertex().property("name").value(), "hercules");
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:21,
代码来源:IncidenceMethodHandlerTest.java

示例14: testRemoveSonEdge

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testRemoveSonEdge() {
    final TinkerGraph godGraph = TinkerGraph.open();
    GodGraphLoader.load(godGraph);

    final FramedGraph framedGraph = new DelegatingFramedGraph(godGraph, TEST_TYPES);

    final List<? extends God> gods = framedGraph.traverse(
        input -> input.V().has("name", "jupiter")).toList(God.class);

    final God father = gods.iterator().next();
    Assert.assertTrue(father != null);
    final VertexFrame fatherVertex = father;
    Assert.assertEquals(fatherVertex.getProperty("name"), "jupiter");

    final FatherEdge child = father.getSonEdge(FatherEdge.class);
    Assert.assertNotNull(child);
    Assert.assertTrue(child instanceof EdgeFrame);
    final EdgeFrame childEdge = child;
    Assert.assertEquals(childEdge.getRawTraversal().outV().next().property("name").value(), "hercules");

    father.removeSonEdge(child);

    Assert.assertFalse(father.getSonEdges(FatherEdge.class).hasNext());
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:26,
代码来源:IncidenceMethodHandlerTest.java

示例15: testDeleteSonEdge

点赞 3

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testDeleteSonEdge() {
    final TinkerGraph godGraph = TinkerGraph.open();
    GodGraphLoader.load(godGraph);

    final FramedGraph framedGraph = new DelegatingFramedGraph(godGraph, TEST_TYPES);

    final List<? extends God> gods = framedGraph.traverse(
        input -> input.V().has("name", "jupiter")).toList(God.class);

    final God father = gods.iterator().next();
    Assert.assertTrue(father != null);
    final VertexFrame fatherVertex = father;
    Assert.assertEquals(fatherVertex.getProperty("name"), "jupiter");

    final FatherEdge child = father.getSonEdge(FatherEdge.class);
    Assert.assertNotNull(child);
    Assert.assertTrue(child instanceof EdgeFrame);
    final EdgeFrame childEdge = child;
    Assert.assertEquals(childEdge.getRawTraversal().outV().next().property("name").value(), "hercules");

    father.deleteSonEdge(child);

    Assert.assertFalse(father.getSonEdges(FatherEdge.class).hasNext());
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:26,
代码来源:IncidenceMethodHandlerTest.java

示例16: setupElementClasses

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Override
public void setupElementClasses() {
	Set<Class<?>> classes = typeResolver.getGraphElementClasses();
	for (Class<?> clazz : classes) {
		if (VertexFrame.class.isAssignableFrom(clazz)) {
			addVertexClass(clazz.getSimpleName(), "V");
		}
		if (EdgeFrame.class.isAssignableFrom(clazz)) {
			addEdgeClass(clazz.getSimpleName());
		}
	}
}
 

开发者ID:Syncleus,
项目名称:Ferma-OrientDB,
代码行数:13,
代码来源:OrientTransactionFactoryImpl.java

示例17: resolve

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
private <T> Class<? extends T> resolve(String type, Class<T> kind) {
	final Class<T> nodeKind = (Class<T>) this.elementTypCache.forName(type);
	if (kind.isAssignableFrom(nodeKind) || kind.equals(VertexFrame.class) || kind.equals(EdgeFrame.class)
			|| kind.equals(AbstractVertexFrame.class) || kind.equals(AbstractEdgeFrame.class) || kind.equals(Object.class)) {
		return nodeKind;
	} else {
		return kind;
	}
}
 

开发者ID:Syncleus,
项目名称:Ferma-OrientDB,
代码行数:10,
代码来源:OrientDBTypeResolver.java

示例18: takeOffline

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Override
public void takeOffline(InternalActionContext ac, SearchQueueBatch batch, Release release, PublishParameters parameters) {
	List<? extends NodeGraphFieldContainer> published = getGraphFieldContainers(release, PUBLISHED);

	String releaseUuid = release.getUuid();

	// Remove the published edge for each found container
	List<? extends NodeGraphFieldContainer> publishedContainers = getGraphFieldContainers(releaseUuid, PUBLISHED);
	getGraphFieldContainerEdges(releaseUuid, PUBLISHED).stream().forEach(EdgeFrame::remove);
	// Reset the webroot property for each published container
	published.forEach(c -> {
		c.setProperty(NodeGraphFieldContainer.PUBLISHED_WEBROOT_PROPERTY_KEY, null);
		c.setProperty(NodeGraphFieldContainer.PUBLISHED_WEBROOT_URLFIELD_PROPERTY_KEY, null);
	});

	// Handle recursion
	if (parameters.isRecursive()) {
		for (Node node : getChildren()) {
			node.takeOffline(ac, batch, release, parameters);
		}
	}

	assertPublishConsistency(ac, release);

	// Remove the published node from the index
	for (NodeGraphFieldContainer container : publishedContainers) {
		batch.delete(container, releaseUuid, PUBLISHED, false);
	}
}
 

开发者ID:gentics,
项目名称:mesh,
代码行数:30,
代码来源:NodeImpl.java

示例19: resolve

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Override
public <T> Class<? extends T> resolve(final Element element, final Class<T> kind) {
    if (VertexFrame.class.equals(kind) || AbstractVertexFrame.class.equals(kind))
        return (Class<? extends T>) TVertex.class;
    else if (EdgeFrame.class.equals(kind) || AbstractEdgeFrame.class.equals(kind))
        return (Class<? extends T>) TEdge.class;
    return kind;
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:9,
代码来源:UntypedTypeResolver.java

示例20: testResolveWithDefault

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testResolveWithDefault() {
    Element mockElement = Mockito.mock(Element.class);
    Assert.assertEquals(resolver.resolve(mockElement, VertexFrame.class), TVertex.class);
    Mockito.verifyZeroInteractions(mockElement);
    Assert.assertEquals(resolver.resolve(mockElement, AbstractVertexFrame.class), TVertex.class);
    Mockito.verifyZeroInteractions(mockElement);
    Assert.assertEquals(resolver.resolve(mockElement, EdgeFrame.class), TEdge.class);
    Mockito.verifyZeroInteractions(mockElement);
    Assert.assertEquals(resolver.resolve(mockElement, AbstractEdgeFrame.class), TEdge.class);
    Mockito.verifyZeroInteractions(mockElement);
    Assert.assertEquals(resolver.resolve(mockElement, God.class), God.class);
    Mockito.verifyZeroInteractions(mockElement);
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:15,
代码来源:UntypedTypeResolverTest.java

示例21: init

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Override
public void init(Element element, Class<?> kind)
{
    if (VertexFrame.class.isAssignableFrom(kind) || EdgeFrame.class.isAssignableFrom(kind))
    {
        addTypeToElement((Class<? extends WindupFrame<?>>) kind, element);
    }
}
 

开发者ID:windup,
项目名称:windup,
代码行数:9,
代码来源:GraphTypeManager.java

示例22: compute

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Override
public Traversal<?, ?, ?, ?> compute(EdgeFrame argument) {
	return argument.traversal().has(GraphFieldContainerEdgeImpl.LANGUAGE_TAG_KEY, languageTag);
}
 

开发者ID:gentics,
项目名称:mesh,
代码行数:5,
代码来源:GraphFieldContainerEdgeImpl.java

示例23: createGraphFieldContainer

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Override
public NodeGraphFieldContainer createGraphFieldContainer(Language language, Release release, User editor, NodeGraphFieldContainer original,
		boolean handleDraftEdge) {
	NodeGraphFieldContainerImpl previous = null;
	EdgeFrame draftEdge = null;
	String languageTag = language.getLanguageTag();
	String releaseUuid = release.getUuid();

	// check whether there is a current draft version

	if (handleDraftEdge) {
		draftEdge = getGraphFieldContainerEdge(languageTag, releaseUuid, DRAFT);
		if (draftEdge != null) {
			previous = draftEdge.inV().nextOrDefault(NodeGraphFieldContainerImpl.class, null);
		}
	}

	// Create the new container
	NodeGraphFieldContainerImpl container = getGraph().addFramedVertex(NodeGraphFieldContainerImpl.class);
	if (original != null) {
		container.setEditor(editor);
		container.setLastEditedTimestamp();
		container.setLanguage(language);
		container.setSchemaContainerVersion(original.getSchemaContainerVersion());
	} else {
		container.setEditor(editor);
		container.setLastEditedTimestamp();
		container.setLanguage(language);
		// We need create a new container with no reference. So use the latest version available to use.
		container.setSchemaContainerVersion(release.findLatestSchemaVersion(getSchemaContainer()));
	}
	if (previous != null) {
		// set the next version number
		container.setVersion(previous.getVersion().nextDraft());
		previous.setNextVersion(container);
	} else {
		// set the initial version number
		container.setVersion(new VersionNumber());
	}

	// clone the original or the previous container
	if (original != null) {
		container.clone(original);
	} else if (previous != null) {
		container.clone(previous);
	}

	// remove existing draft edge
	if (draftEdge != null) {
		previous.setProperty(NodeGraphFieldContainerImpl.WEBROOT_PROPERTY_KEY, null);
		previous.setProperty(NodeGraphFieldContainerImpl.WEBROOT_URLFIELD_PROPERTY_KEY, null);
		container.updateWebrootPathInfo(releaseUuid, "node_conflicting_segmentfield_update");
		draftEdge.remove();
	}
	// We need to update the display field property since we created a new
	// node graph field container.
	container.updateDisplayFieldValue();

	if (handleDraftEdge) {
		// create a new draft edge
		GraphFieldContainerEdge edge = addFramedEdge(HAS_FIELD_CONTAINER, container, GraphFieldContainerEdgeImpl.class);
		edge.setLanguageTag(languageTag);
		edge.setReleaseUuid(releaseUuid);
		edge.setType(DRAFT);
	}

	// if there is no initial edge, create one
	if (getGraphFieldContainerEdge(languageTag, releaseUuid, INITIAL) == null) {
		GraphFieldContainerEdge initialEdge = addFramedEdge(HAS_FIELD_CONTAINER, container, GraphFieldContainerEdgeImpl.class);
		initialEdge.setLanguageTag(languageTag);
		initialEdge.setReleaseUuid(releaseUuid);
		initialEdge.setType(INITIAL);
	}

	return container;
}
 

开发者ID:gentics,
项目名称:mesh,
代码行数:77,
代码来源:NodeImpl.java

示例24: getVertex

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@RuntimeType
public static Object getVertex(@This final EdgeFrame thiz, @Origin final Method method) {
    return thiz.traverse(GraphTraversal::outV).next(method.getReturnType());
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:5,
代码来源:OutVertexMethodHandler.java

示例25: getVertex

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@RuntimeType
public static Object getVertex(@This final EdgeFrame thiz, @Origin final Method method) {
    return thiz.traverse(GraphTraversal::inV).next(method.getReturnType());
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:5,
代码来源:InVertexMethodHandler.java

示例26: getImplementedInterfaceEdgeFrames

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Incidence(label = "implements", direction = Direction.OUT, operation = Incidence.Operation.GET)
Iterator<EdgeFrame> getImplementedInterfaceEdgeFrames();
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:3,
代码来源:JavaClassVertex.java

示例27: getImplementedInterfaceEdgeFramesList

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Incidence(label = "implements", direction = Direction.OUT, operation = Incidence.Operation.GET)
List<EdgeFrame> getImplementedInterfaceEdgeFramesList();
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:3,
代码来源:JavaClassVertex.java

示例28: getImplementedInterfaceEdgeFramesSet

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Incidence(label = "implements", direction = Direction.OUT, operation = Incidence.Operation.GET)
Set<EdgeFrame> getImplementedInterfaceEdgeFramesSet();
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:3,
代码来源:JavaClassVertex.java

示例29: getBothDirectionsExtendEdgeFrames

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Incidence(label = "extends", direction = Direction.BOTH, operation = Incidence.Operation.GET)
Iterator<EdgeFrame> getBothDirectionsExtendEdgeFrames();
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:3,
代码来源:JavaClassVertex.java

示例30: getBothDirectionsExtendEdgeFramesList

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Incidence(label = "extends", direction = Direction.BOTH, operation = Incidence.Operation.GET)
List<EdgeFrame> getBothDirectionsExtendEdgeFramesList();
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:3,
代码来源:JavaClassVertex.java

示例31: getBothDirectionsExtendEdgeFramesSet

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Incidence(label = "extends", direction = Direction.BOTH, operation = Incidence.Operation.GET)
Set<EdgeFrame> getBothDirectionsExtendEdgeFramesSet();
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:3,
代码来源:JavaClassVertex.java

示例32: getAnyImplementsEdge

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Incidence(label = "implements", direction = Direction.BOTH, operation = Incidence.Operation.GET)
EdgeFrame getAnyImplementsEdge();
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:3,
代码来源:JavaInterfaceVertex.java

示例33: doesAcceptEdgeFrame

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
public void doesAcceptEdgeFrame(EdgeFrame frame) {
    // Implementation is irrelevant
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:4,
代码来源:ReflectionUtilityTest.java

示例34: ReframingEdgeIterator

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
public ReframingEdgeIterator(Iterator<? extends EdgeFrame> edgeFrameIterator, Class<T> framedType) {
    this.edgeFrameIterator = edgeFrameIterator;
    this.framedType = framedType;
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:5,
代码来源:ReframingEdgeIterator.java

示例35: testGetEdgesIteratorDefault

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetEdgesIteratorDefault() {
    Iterator<EdgeFrame> actualLinkedListIfaces = linkedList.getImplementedInterfaceEdgeFrames();
    Iterator<ImplementsEdge> actialEdgesReframed = new ReframingEdgeIterator<>(actualLinkedListIfaces, ImplementsEdge.class);
    assertImplementsEdges(linkedList, getLinkedListExpectedImplIfaces(), actialEdgesReframed);
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:7,
代码来源:IncidenceHandlerWithJavaClassVerticesTest.java

示例36: testGetEdgesListDefault

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetEdgesListDefault() {
    Iterator<EdgeFrame> actualLinkedListIfaces = linkedList.getImplementedInterfaceEdgeFramesList().iterator();
    Iterator<ImplementsEdge> actialEdgesReframed = new ReframingEdgeIterator<>(actualLinkedListIfaces, ImplementsEdge.class);
    assertImplementsEdges(linkedList, getLinkedListExpectedImplIfaces(), actialEdgesReframed);
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:7,
代码来源:IncidenceHandlerWithJavaClassVerticesTest.java

示例37: testGetEdgesSetDefault

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetEdgesSetDefault() {
    Iterator<EdgeFrame> actualLinkedListIfaces = linkedList.getImplementedInterfaceEdgeFramesSet().iterator();
    Iterator<ImplementsEdge> actialEdgesReframed = new ReframingEdgeIterator<>(actualLinkedListIfaces, ImplementsEdge.class);
    assertImplementsEdges(linkedList, getLinkedListExpectedImplIfaces(), actialEdgesReframed);
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:7,
代码来源:IncidenceHandlerWithJavaClassVerticesTest.java

示例38: testGetBothDirectionsEdgesDefaultUntyped

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetBothDirectionsEdgesDefaultUntyped() {
    Iterator<EdgeFrame> actualEdges = abstractList.getBothDirectionsExtendEdgeFrames();
    Iterator<ExtendsEdge> framedExtendsEdges = new ReframingEdgeIterator<>(actualEdges, ExtendsEdge.class);
    assertExtendsEdges(getAbstrListBothDirectionsExtEdges(), framedExtendsEdges);
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:7,
代码来源:IncidenceHandlerWithJavaClassVerticesTest.java

示例39: testGetBothDirectionsEdgesDefaultUntypedList

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetBothDirectionsEdgesDefaultUntypedList() {
    Iterator<EdgeFrame> actualEdges = abstractList.getBothDirectionsExtendEdgeFramesList().iterator();
    Iterator<ExtendsEdge> framedExtendsEdges = new ReframingEdgeIterator<>(actualEdges, ExtendsEdge.class);
    assertExtendsEdges(getAbstrListBothDirectionsExtEdges(), framedExtendsEdges);
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:7,
代码来源:IncidenceHandlerWithJavaClassVerticesTest.java

示例40: testGetBothDirectionsEdgesDefaultUntypedSet

点赞 2

import com.syncleus.ferma.EdgeFrame; //导入依赖的package包/类
@Test
public void testGetBothDirectionsEdgesDefaultUntypedSet() {
    Iterator<EdgeFrame> actualEdges = abstractList.getBothDirectionsExtendEdgeFramesSet().iterator();
    Iterator<ExtendsEdge> framedExtendsEdges = new ReframingEdgeIterator<>(actualEdges, ExtendsEdge.class);
    assertExtendsEdges(getAbstrListBothDirectionsExtEdges(), framedExtendsEdges);
}
 

开发者ID:Syncleus,
项目名称:Ferma,
代码行数:7,
代码来源:IncidenceHandlerWithJavaClassVerticesTest.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)