Change Password

Input error
Input error
Input error
Submit
v2.x

GraphSet and Property

GraphSet Management

A graphset contains:

  • all meta-data of a graph, which are nodes and edges
  • indexes created for the properties of these meta-data
  • other information of this graph including the executed/executing algorithms, statiscial information and user priviledges

List Graph

List<Table> tables = client.listGraph();
println(tables);

Response including graphset name and number of meta-data:

[{"tableName":"","records":[{"totalEdges":"3387374","graph":"default","totalNodes":"403426"}]}]

Get Graph

List<PairValue> values = client.getGraph("default");

Create Graph

client.createGraph(graphName);

Drop Graph

client.dropGraph(graphName);

Switch Graph

Pass the name of graphset when creating DefaultConnection object so that the operation commands sent to the Ultipa Server will be executed against the specified graphset.

The graphset name can be passed in below two ways:

  • via method getConnection() of UltipaClientDriver:
UltipaClientDriver driver = new UltipaClientDriver();
Connection client = driver.getConnection(graphName);
  • via DefaultConnection():
Connection client = new DefaultConnection(graphName);

Update Graph

client.updateGraph(graphName, newGraphName);

Meta-data Properties

Show Property

List<Table> tables = client.showProperty(UqlProperty.PROPERTY);

Show Node Property

List<Table> tables = client.showProperty(UqlProperty.NODE_PROPERTY);

Show Edge Property

List<Table> tables = client.showProperty(UqlProperty.EDGE_PROPERTY);

Create Node Property

CreatePropertyRequest request = new CreatePropertyRequest();
Property property = new Property(propertyName,UqlPropertyType.UQL_STRING);
request.setAttrType(UqlAttrType.NODE);
request.setProperty(property);
client.createProperty(request);

Create Edge Property

CreatePropertyRequest request = new CreatePropertyRequest();
Property property = new Property(propertyName,UqlPropertyType.UQL_STRING);
request.setAttrType(UqlAttrType.EDGE);
request.setProperty(property);
client.createProperty(request);

Drop Node Property

DropPropertyRequest request = new DropPropertyRequest();
request.setAttrType(UqlAttrType.NODE);
request.setPropertyName(propertyName);
client.dropProperty(request);

Drop Edge Property

DropPropertyRequest request = new DropPropertyRequest();
request.setAttrType(UqlAttrType.EDGE);
request.setPropertyName(propertyName);
client.dropProperty(request);

Load Property to Engine(LTE)

LTERequest request = new LTERequest();
request.setAttrType(UqlAttrType.EDGE);
request.setPropertyName(propertyName);
client.lte(request);

Unload Property from Engine(UFE)

UFERequest request = new UFERequest();
request.setAttrType(UqlAttrType.EDGE);
request.setPropertyName(propertyName);
client.ufe(request);

State

List<Table> tables = client.stat();
println(tables);