SkrDrag commented on issue #2539:
URL: 
https://github.com/apache/incubator-hugegraph/issues/2539#issuecomment-2134467739

   > > Thank you for your question. Please keep the issue **title** in 
**English** at least and maintain the basic `[Question] xxx` format. Thank you 
for your understanding
   > 
   > To access the properties of edges and vertices after obtaining an edge 
iterator with `Iterator<Edge> edges = edgesOfVertex(source, dir, label, 
degree);`, follow these steps:
   > 
   > 1. **Edge Attributes:**
   >    
   >    * To set a property, use `edge.property("key", "value");` where `"key"` 
is the property name and `"value"` is the property value.
   >    * To get a property, if there's a method to access properties, use it 
to retrieve the value by the property name, e.g., `String value = (String) 
edge.properties().get("propertyName");`.
   > 2. **Vertex Attributes:**
   >    
   >    * Accessing vertex attributes directly from an edge requires you to 
first get the vertex object. The edge object provides methods like `sourceId()` 
and `targetId()` to get vertex identifiers, but to access vertex properties, 
you'll need to use the vertex object itself, which is not detailed in your 
snippet.
   > 3. **Attribute Types:**
   >    
   >    * Attributes can be of any type, not just `String`. When you set or get 
a property, it's treated as an `Object`. Ensure to cast it to the correct type 
when retrieving.
   > 
   > This approach assumes you're working with the HugeGraph toolchain. For 
specific implementations or methods to access properties directly, refer to the 
documentation or source code of the HugeGraph client library you're using.
   > 
   > #### Details
   > **Sources**
   > 
   > * 
[hugegraph-client/src/main/java/org/apache/hugegraph/structure/graph/Edge.java](https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-client/src/main/java/org/apache/hugegraph/structure/graph/Edge.java)
   > * 
[hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdge.java](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeEdge.java)
   > * 
[hugegraph-client/src/main/java/org/apache/hugegraph/structure/graph/Graph.java](https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-client/src/main/java/org/apache/hugegraph/structure/graph/Graph.java)
   > * 
[hugegraph-client/src/main/java/org/apache/hugegraph/example/BatchExample.java](https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-client/src/main/java/org/apache/hugegraph/example/BatchExample.java)
   > * 
[content/en/docs/language/hugegraph-example.md](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/en/docs/language/hugegraph-example.md)
   > * 
[hugegraph-client/src/main/java/org/apache/hugegraph/example/SingleExample.java](https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-client/src/main/java/org/apache/hugegraph/example/SingleExample.java)
   > * 
[content/en/docs/quickstart/hugegraph-client.md](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/en/docs/quickstart/hugegraph-client.md)
   > * 
[hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/Example1.java](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-example/src/main/java/org/apache/hugegraph/example/Example1.java)
   > * 
[hugegraph-client/src/main/java/org/apache/hugegraph/structure/graph/Vertex.java](https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-client/src/main/java/org/apache/hugegraph/structure/graph/Vertex.java)
   > * 
[hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeVertex.java](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeVertex.java)
   > * 
[hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/service/schema/PropertyKeyService.java](https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/service/schema/PropertyKeyService.java)
   > 
   > 
   > **About Dosu** This response is meant to be useful and save you time. It 
is **not meant to be a precise solution**, but rather a starting point for your 
own research.
   > 
   > Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is 
irrelevant.
   > 
   > _To continue the conversation, mention @dosu._
   
   根据点Id是否能够同时查到点的邻边和另一端顶点的属性
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to