use of org.neo4j.graphdb.RelationshipType in project neo4j by neo4j.
the class DatabaseMetadataService method getRelationshipTypes.
@GET
@Produces(MediaType.APPLICATION_JSON)
public Response getRelationshipTypes(@QueryParam("in_use") @DefaultValue("true") boolean inUse) {
try {
GraphDatabaseAPI db = database.getGraph();
Iterable<RelationshipType> relationshipTypes = inUse ? db.getAllRelationshipTypesInUse() : db.getAllRelationshipTypes();
return Response.ok().type(MediaType.APPLICATION_JSON).entity(generateJsonRepresentation(relationshipTypes)).build();
} finally {
representationWriteHandler.onRepresentationFinal();
}
}
Aggregations