@Override public ResourceIterable<RelationshipType> getAllRelationshipTypes() { return database.getAllRelationshipTypes(); }
@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(); } }
@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(); } }
@Override public ResourceIterable<RelationshipType> getAllRelationshipTypes() { return database.getAllRelationshipTypes(); }
@Override public ResourceIterable<RelationshipType> getAllRelationshipTypes() { return actual.getAllRelationshipTypes(); }