Unnamed: 0 int64 0 6.7k | func stringlengths 12 89.6k | target bool 2
classes | project stringlengths 45 151 |
|---|---|---|---|
2,800 | path( RepresentationType.PATH )
{
@Override
public MappingRepresentation toRepresentation( Path position )
{
return new org.neo4j.server.rest.repr.PathRepresentation<Path>( position );
}
}, | false | community_server_src_main_java_org_neo4j_server_rest_domain_TraverserReturnType.java |
2,801 | relationship( RepresentationType.RELATIONSHIP )
{
@Override
public Representation toRepresentation( Path position )
{
Relationship lastRelationship = position.lastRelationship();
return lastRelationship != null? new org.neo4j.server.rest.repr.Relation... | false | community_server_src_main_java_org_neo4j_server_rest_domain_TraverserReturnType.java |
2,802 | node( RepresentationType.NODE )
{
@Override
public MappingRepresentation toRepresentation( Path position )
{
return new org.neo4j.server.rest.repr.NodeRepresentation( position.endNode() );
}
}, | false | community_server_src_main_java_org_neo4j_server_rest_domain_TraverserReturnType.java |
2,803 | public class TraversalDescriptionBuilderTest
{
@Test(expected = IllegalArgumentException.class)
public void throwsIllegalArgumentOnUnknownExpanderType() throws Exception
{
// Given
TraversalDescriptionBuilder builder = new TraversalDescriptionBuilder( true );
Collection<Map<String,O... | false | community_server_src_test_java_org_neo4j_server_rest_domain_TraversalDescriptionBuilderTest.java |
2,804 | public class TraversalDescriptionBuilder
{
private final EvaluatorFactory evaluatorFactory;
public TraversalDescriptionBuilder( boolean enableSandboxing )
{
this.evaluatorFactory = new EvaluatorFactory( enableSandboxing );
}
public TraversalDescription from( Map<String, Object> descriptio... | false | community_server_src_main_java_org_neo4j_server_rest_domain_TraversalDescriptionBuilder.java |
2,805 | @SuppressWarnings( "serial" )
public class StartNodeSameAsEndNodeException extends Exception
{
} | false | community_server_src_main_java_org_neo4j_server_rest_domain_StartNodeSameAsEndNodeException.java |
2,806 | @SuppressWarnings( "serial" )
public class StartNodeNotFoundException extends Exception
{
} | false | community_server_src_main_java_org_neo4j_server_rest_domain_StartNodeNotFoundException.java |
2,807 | public class RelationshipExpanderBuilder
{
@SuppressWarnings( "unchecked" )
public static RelationshipExpander describeRelationships( Map<String, Object> description )
{
Expander expander = Traversal.emptyExpander();
Object relationshipsDescription = description.get( "relationships" );
... | false | community_server_src_main_java_org_neo4j_server_rest_domain_RelationshipExpanderBuilder.java |
2,808 | public class PropertySettingStrategyTest
{
private static GraphDatabaseAPI db;
private Transaction tx;
private static PropertySettingStrategy propSetter;
@BeforeClass
public static void createDb()
{
db = (GraphDatabaseAPI) new TestGraphDatabaseFactory().newImpermanentDatabase();
... | false | community_server_src_test_java_org_neo4j_server_rest_domain_PropertySettingStrategyTest.java |
2,809 | public class LeaseManagerTest
{
private static final long SIXTY_SECONDS = 60;
@Test
public void shouldNotAcceptLeasesWithNegativeTTL() throws Exception
{
FakeClock fakeClock = new FakeClock();
LeaseManager manager = new LeaseManager( fakeClock );
assertNull( manager.createLease(... | false | community_server_src_test_java_org_neo4j_server_rest_paging_LeaseManagerTest.java |
2,810 | public class PagedTraverser implements Iterator<List<Path>>, Iterable<List<Path>>, Leasable
{
private final int pageSize;
private final Traverser traverser;
private Iterator<Path> iterator;
public PagedTraverser( Traverser traverser, int pageSize )
{
this.traverser = traverser;
this... | false | community_server_src_main_java_org_neo4j_server_rest_paging_PagedTraverser.java |
2,811 | @SuppressWarnings( "serial" )
public class JsonParseException extends org.neo4j.server.rest.web.PropertyValueException
{
public JsonParseException( String message, Throwable cause )
{
super( message, cause );
}
public JsonParseException( String message )
{
super( message );
}
... | false | community_server_src_main_java_org_neo4j_server_rest_domain_JsonParseException.java |
2,812 | public class PagedTraverserDocIT extends ExclusiveServerTestBase
{
private static CommunityNeoServer server;
private static FunctionalTestHelper functionalTestHelper;
private Node theStartNode;
private static final String PAGED_TRAVERSE_LINK_REL = "paged_traverse";
private static final int SHORT_LI... | false | community_server_src_test_java_org_neo4j_server_rest_paging_PagedTraverserDocIT.java |
2,813 | public class DiscoveryRepresentation extends MappingRepresentation
{
private static final String DATA_URI_KEY = "data";
private static final String MANAGEMENT_URI_KEY = "management";
private static final String DISCOVERY_REPRESENTATION_TYPE = "discovery";
private final String managementUri;
private... | false | community_server_src_main_java_org_neo4j_server_rest_repr_DiscoveryRepresentation.java |
2,814 | public class DefaultFormat extends RepresentationFormat
{
private final RepresentationFormat inner;
private final Collection<MediaType> supported;
private final MediaType[] requested;
public DefaultFormat( RepresentationFormat inner, Collection<MediaType> supported, MediaType... requested )
{
... | false | community_server_src_main_java_org_neo4j_server_rest_repr_DefaultFormat.java |
2,815 | public class DatabaseRepresentation extends MappingRepresentation implements ExtensibleRepresentation
{
public DatabaseRepresentation()
{
super( RepresentationType.GRAPHDB );
}
@Override
public String getIdentity()
{
// This is in fact correct - there is only one graphdb - henc... | false | community_server_src_main_java_org_neo4j_server_rest_repr_DatabaseRepresentation.java |
2,816 | public class CypherResultRepresentationTest
{
private static final ResourceIterator EMPTY_ITERATOR = emptyIterator();
@Test
@SuppressWarnings("unchecked")
public void shouldSerializeProfilingResult() throws Exception
{
// Given
String name = "Kalle";
PlanDescription plan = ... | false | community_server_src_test_java_org_neo4j_server_rest_repr_CypherResultRepresentationTest.java |
2,817 | return new Function<Object,PlanDescription>(){
@Override
public PlanDescription apply( Object from )
{
return result.executionPlanDescription();
}
}; | false | community_server_src_main_java_org_neo4j_server_rest_repr_CypherResultRepresentation.java |
2,818 | return createPlanRepresentation( new Function<Object, PlanDescription>(){
@Override
public PlanDescription apply( Object from )
{
... | false | community_server_src_main_java_org_neo4j_server_rest_repr_CypherResultRepresentation.java |
2,819 | new IterableWrapper<Representation, PlanDescription>(planDescription.getChildren()) {
@Override
protected Representation underlyingObjectToObject( final PlanDescription childPlan )
... | false | community_server_src_main_java_org_neo4j_server_rest_repr_CypherResultRepresentation.java |
2,820 | return new MappingRepresentation( "plan" ) {
@Override
protected void serialize( MappingSerializer mappingSerializer )
{
final PlanDescription planDescription = getPlan.apply( null );
mappingSerializer.putString( "name", planDescription.getNam... | false | community_server_src_main_java_org_neo4j_server_rest_repr_CypherResultRepresentation.java |
2,821 | new IterableWrapper<Representation,String>(columns) {
@Override
protected Representation underlyingObjectToObject(String column) {
return getRepresentation( row.get( column ) );
}
}); | false | community_server_src_main_java_org_neo4j_server_rest_repr_CypherResultRepresentation.java |
2,822 | return new ListRepresentation( "data", new IterableWrapper<Representation,Map<String,Object>>(inner) {
@Override
protected Representation underlyingObjectToObject(final Map<String, Object> row) {
return new ListRepresentation("row",
new IterableWrapper<R... | false | community_server_src_main_java_org_neo4j_server_rest_repr_CypherResultRepresentation.java |
2,823 | {
@Override
protected void serialize( MappingSerializer serializer )
{
serializer.putBoolean( "contains_updates", stats.containsUpdates() );
serializer.putNumber( "nodes_created", stats.getNodesCreated() );
serializer.putNumber(... | false | community_server_src_main_java_org_neo4j_server_rest_repr_CypherResultRepresentation.java |
2,824 | public class CypherResultRepresentation extends MappingRepresentation
{
private static final RepresentationDispatcher REPRESENTATION_DISPATCHER = new CypherRepresentationDispatcher();
private final ListRepresentation resultRepresentation;
private final ListRepresentation columns;
private final MappingR... | false | community_server_src_main_java_org_neo4j_server_rest_repr_CypherResultRepresentation.java |
2,825 | public class CypherRepresentationDispatcher extends RepresentationDispatcher
{
@Override
protected Representation dispatchOtherProperty( Object property, String param )
{
if ( property instanceof Map )
{
return new MapRepresentation( (Map) property );
}
else
... | false | community_server_src_main_java_org_neo4j_server_rest_repr_CypherRepresentationDispatcher.java |
2,826 | {
@Override
public Representation apply( String propertyKey )
{
return ValueRepresentation.string( propertyKey );
}
}; | false | community_server_src_main_java_org_neo4j_server_rest_repr_ConstraintDefinitionRepresentation.java |
2,827 | public class ConstraintDefinitionRepresentation extends MappingRepresentation
{
protected final ConstraintDefinition constraintDefinition;
public ConstraintDefinitionRepresentation( ConstraintDefinition constraintDefinition )
{
super( CONSTRAINT_DEFINITION );
this.constraintDefinition = con... | false | community_server_src_main_java_org_neo4j_server_rest_repr_ConstraintDefinitionRepresentation.java |
2,828 | public class BadInputException extends Exception
{
public BadInputException( Throwable cause )
{
super( cause.getMessage(), cause );
}
public BadInputException( String message )
{
super( message );
}
public BadInputException( String message, Throwable cause )
{
... | false | community_server-api_src_main_java_org_neo4j_server_rest_repr_BadInputException.java |
2,829 | public class PagedTraverserTest
{
private static final int LIST_LENGTH = 100;
private Database database;
private Node startNode;
@Before
public void clearDb() throws Throwable
{
database = new EphemeralDatabase( Configurator.EMPTY );
database.start();
createLinkedList( L... | false | community_server_src_test_java_org_neo4j_server_rest_paging_PagedTraverserTest.java |
2,830 | {
@Override
public Void call() throws Exception
{
server.stop();
return null;
}
} ); | false | community_server_src_test_java_org_neo4j_server_rest_paging_PagedTraverserDocIT.java |
2,831 | {
@Override
public Void call() throws Exception
{
server.start();
return null;
}
} ); | false | community_server_src_test_java_org_neo4j_server_rest_paging_PagedTraverserDocIT.java |
2,832 | public class PropertySettingStrategy
{
private final GraphDatabaseAPI db;
public PropertySettingStrategy( GraphDatabaseAPI db )
{
this.db = db;
}
/**
* Set all properties on an entity, deleting any properties that existed on the entity but not in the
* provided map.
*
*... | false | community_server_src_main_java_org_neo4j_server_rest_domain_PropertySettingStrategy.java |
2,833 | public class JsonHelper
{
static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
public static JsonNode jsonNode(String json) throws JsonParseException
{
try
{
return OBJECT_MAPPER.readTree( json );
}
catch ( IOException e )
{
throw new... | false | community_server_src_main_java_org_neo4j_server_rest_domain_JsonHelper.java |
2,834 | RELATIONSHIP( Representation.RELATIONSHIP )
{
@Override
String render( Map<String, Object> serialized )
{
return JsonHelper.createJsonFrom( MapUtil.map( "self", serialized.get( "self" ), "data",
serialized.get( "data" ) ) );
... | false | community_server_src_main_java_org_neo4j_server_rest_repr_formats_CompactJsonFormat.java |
2,835 | public class TraverserDocIT extends AbstractRestFunctionalTestBase
{
@Test
public void shouldGet404WhenTraversingFromNonExistentNode()
{
gen().expectedStatus( Status.NOT_FOUND.getStatusCode() ).payload(
"{}" ).post( getDataUri() + "node/10000/traverse/node" ).entity();
}
@T... | false | community_server_src_test_java_org_neo4j_server_rest_TraverserDocIT.java |
2,836 | public class SetNodePropertiesDocIT extends
AbstractRestFunctionalTestBase
{
/**
* Update node properties.
*
* This will replace all existing properties on the node with the new set
* of attributes.
*/
@Graph( "jim knows joe" )
@Documented
@Test
public void shouldRe... | false | community_server_src_test_java_org_neo4j_server_rest_SetNodePropertiesDocIT.java |
2,837 | public class SchemaIndexDocIT extends AbstractRestFunctionalTestBase
{
/**
* Create index.
*
* This will start a background job in the database that will create and populate the index.
* You can check the status of your index by listing all the indexes for the relevant label.
* The created ... | false | community_server_src_test_java_org_neo4j_server_rest_SchemaIndexDocIT.java |
2,838 | public class SchemaConstraintsDocIT extends AbstractRestFunctionalTestBase
{
/**
* Create uniqueness constraint.
* Create a uniqueness constraint on a property.
*/
@Documented
@Test
@GraphDescription.Graph( nodes = {} )
public void createPropertyUniquenessConstraint() throws PropertyV... | false | community_server_src_test_java_org_neo4j_server_rest_SchemaConstraintsDocIT.java |
2,839 | public class RetrieveRelationshipsFromNodeDocIT extends AbstractRestFunctionalTestBase
{
private long nodeWithRelationships;
private long nodeWithoutRelationships;
private long nonExistingNode;
private static FunctionalTestHelper functionalTestHelper;
private static GraphDbHelper helper;
privat... | false | community_server_src_test_java_org_neo4j_server_rest_RetrieveRelationshipsFromNodeDocIT.java |
2,840 | public class RetrieveNodeDocIT extends AbstractRestFunctionalTestBase
{
private URI nodeUri;
private static FunctionalTestHelper functionalTestHelper;
@BeforeClass
public static void setupServer() throws IOException
{
functionalTestHelper = new FunctionalTestHelper( server() );
}
@... | false | community_server_src_test_java_org_neo4j_server_rest_RetrieveNodeDocIT.java |
2,841 | public class RestRequest {
private final URI baseUri;
private final static Client DEFAULT_CLIENT = Client.create();
private final Client client;
private MediaType accept = MediaType.APPLICATION_JSON_TYPE;
private Map<String, String> headers=new HashMap<String, String>();
public RestRequest( UR... | false | community_server_src_test_java_org_neo4j_server_rest_RestRequest.java |
2,842 | public class RemoveRelationshipDocIT extends AbstractRestFunctionalTestBase
{
private static FunctionalTestHelper functionalTestHelper;
private static GraphDbHelper helper;
@BeforeClass
public static void setupServer() throws IOException
{
functionalTestHelper = new FunctionalTestHelper( se... | false | community_server_src_test_java_org_neo4j_server_rest_RemoveRelationshipDocIT.java |
2,843 | public class RemoveNodePropertiesDocIT extends AbstractRestFunctionalTestBase
{
private static FunctionalTestHelper functionalTestHelper;
private static GraphDbHelper helper;
@BeforeClass
public static void setupServer() throws IOException
{
functionalTestHelper = new FunctionalTestHelper( ... | false | community_server_src_test_java_org_neo4j_server_rest_RemoveNodePropertiesDocIT.java |
2,844 | public class RelationshipDocIT extends AbstractRestFunctionalTestBase
{
private static FunctionalTestHelper functionalTestHelper;
@BeforeClass
public static void setupServer() throws IOException
{
functionalTestHelper = new FunctionalTestHelper( server() );
}
@Test
@Graph(nodes = {... | false | community_server_src_test_java_org_neo4j_server_rest_RelationshipDocIT.java |
2,845 | public class RedirectorDocIT extends AbstractRestFunctionalTestBase
{
@Before
public void cleanTheDatabase()
{
cleanDatabase();
}
@Test
public void shouldRedirectRootToWebadmin() throws Exception {
JaxRsResponse response = new RestRequest(server().baseUri()).get();
asse... | false | community_server_src_test_java_org_neo4j_server_rest_RedirectorDocIT.java |
2,846 | public static class ResponseEntity
{
private final String entity;
private final JaxRsResponse response;
public ResponseEntity( ClientResponse response, String entity )
{
this.response = new JaxRsResponse(response,entity);
this.entity = entity;
}
... | false | community_server_src_test_java_org_neo4j_server_rest_RESTDocsGenerator.java |
2,847 | {
@Override
public RESTDocsGenerator create( GraphDefinition graph, String title, String documentation )
{
RESTDocsGenerator gen = RESTDocsGenerator.create( title );
gen.description(documentation);
return gen;
}
@Override
public vo... | false | community_server_src_test_java_org_neo4j_server_rest_RESTDocsGenerator.java |
2,848 | public class RESTDocsGenerator extends AsciiDocGenerator
{
private static final String EQUAL_SIGNS = "======";
private static final Builder REQUEST_BUILDER = ClientRequest.create();
private static final List<String> RESPONSE_HEADERS = Arrays.asList( "Content-Type", "Location" );
private static final ... | false | community_server_src_test_java_org_neo4j_server_rest_RESTDocsGenerator.java |
2,849 | public class PrettyJSON extends JSONStringer
{
@Override
public String toString()
{
String json = super.toString();
return JSONPrettifier.parse( json );
}
} | false | community_server_src_test_java_org_neo4j_server_rest_PrettyJSON.java |
2,850 | public class PathsDocIT extends AbstractRestFunctionalTestBase
{
/**
* The +shortestPath+ algorithm can find multiple paths between the same
* nodes, like in this example.
*/
@Test
@Graph( value = { "a to c", "a to d", "c to b", "d to e", "b to f", "c to f", "f to g", "d to g", "e to g",
... | false | community_server_src_test_java_org_neo4j_server_rest_PathsDocIT.java |
2,851 | public class ManageNodeDocIT extends AbstractRestFunctionalTestBase
{
private static final long NON_EXISTENT_NODE_ID = 999999;
private static String NODE_URI_PATTERN = "^.*/node/[0-9]+$";
private static FunctionalTestHelper functionalTestHelper;
private static GraphDbHelper helper;
@BeforeClass
... | false | community_server_src_test_java_org_neo4j_server_rest_ManageNodeDocIT.java |
2,852 | public class ListPropertyKeysDocIT extends AbstractRestFunctionalTestBase
{
/**
* List all property keys.
*/
@Test
@Documented
@GraphDescription.Graph( nodes = {
@GraphDescription.NODE( name = "a", setNameProperty = true ),
@GraphDescription.NODE( name = "b", setNamePro... | false | community_server_src_test_java_org_neo4j_server_rest_ListPropertyKeysDocIT.java |
2,853 | {
@Override
public T apply( Object from )
{
Map<?, ?> node = (Map<?, ?>) from;
Map<?, ?> data = (Map<?, ?>) node.get( "data" );
return propertyType.cast( data.get( propertyKey ) );
}
}; | false | community_server_src_test_java_org_neo4j_server_rest_LabelsDocIT.java |
2,854 | public class LabelsDocIT extends AbstractRestFunctionalTestBase
{
/**
* Adding a label to a node.
*/
@Documented
@Test
@GraphDescription.Graph( nodes = { @NODE( name = "Clint Eastwood", setNameProperty = true ) } )
public void adding_a_label_to_a_node() throws PropertyValueException
{... | false | community_server_src_test_java_org_neo4j_server_rest_LabelsDocIT.java |
2,855 | public class SetRelationshipPropertiesDocIT extends AbstractRestFunctionalTestBase
{
private URI propertiesUri;
private URI badUri;
private static FunctionalTestHelper functionalTestHelper;
@BeforeClass
public static void setupServer() throws IOException
{
functionalTestHelper = new Fu... | false | community_server_src_test_java_org_neo4j_server_rest_SetRelationshipPropertiesDocIT.java |
2,856 | public class BatchOperationResults
{
private static final String CLOSING_BRACKET = "]";
private static final String OPENING_BRACKET = "[";
private static final String OPENING_CURLY = "{";
private static final String CLOSING_CURLY = "}";
private static final String COMMA = ",";
private StringWri... | false | community_server_src_main_java_org_neo4j_server_rest_batch_BatchOperationResults.java |
2,857 | @SuppressWarnings( "serial" )
public class JsonBuildRuntimeException extends RuntimeException
{
public JsonBuildRuntimeException( String message, Throwable cause )
{
super( message, cause );
}
public JsonBuildRuntimeException( String message )
{
super( message );
}
public ... | false | community_server_src_main_java_org_neo4j_server_rest_domain_JsonBuildRuntimeException.java |
2,858 | public abstract class BatchOperations
{
protected static final String ID_KEY = "id";
protected static final String METHOD_KEY = "method";
protected static final String BODY_KEY = "body";
protected static final String TO_KEY = "to";
protected static final JsonFactory jsonFactory = new JsonFactory();
... | false | community_server_src_main_java_org_neo4j_server_rest_batch_BatchOperations.java |
2,859 | public class HtmlHelper
{
private final static String STYLE_LOCATION = "http://resthtml.neo4j.org/style/";
private final static String HTML_JAVASCRIPT_LOCATION = "/webadmin/htmlbrowse.js";
public static String from( final Object object, final ObjectType objectType )
{
StringBuilder builder = st... | false | community_server_src_main_java_org_neo4j_server_rest_domain_HtmlHelper.java |
2,860 | {
@Override
public boolean accept( ConstraintDefinition item )
{
if ( item.isConstraintType( ConstraintType.UNIQUENESS ) )
{
Iterable<String> keys = item.getPropertyKeys();
... | false | community_server_src_test_java_org_neo4j_server_rest_domain_GraphDbHelper.java |
2,861 | {
@Override
protected String underlyingObjectToObject( Label object )
{
return object.name();
}
}; | false | community_server_src_test_java_org_neo4j_server_rest_domain_GraphDbHelper.java |
2,862 | public class GraphDbHelper
{
private final Database database;
public GraphDbHelper( Database database )
{
this.database = database;
}
public int getNumberOfNodes()
{
return numberOfEntitiesFor( Node.class );
}
public int getNumberOfRelationships()
{
return ... | false | community_server_src_test_java_org_neo4j_server_rest_domain_GraphDbHelper.java |
2,863 | public class GraphDatabaseName
{
public static final GraphDatabaseName NO_NAME = new GraphDatabaseName(
"org.neo4j.rest.domain.GraphDatabaseName.NO_NAME" );
private final String name;
public GraphDatabaseName( String name )
{
this.name = name;
}
public String getName()
... | false | community_server_src_main_java_org_neo4j_server_rest_domain_GraphDatabaseName.java |
2,864 | private static class ScriptedReturnEvaluator extends ScriptedEvaluator implements Evaluator
{
ScriptedReturnEvaluator( ScriptExecutor executor )
{
super( executor );
}
@Override
public Evaluation evaluate( Path path )
{
return Evaluation.o... | false | community_server_src_main_java_org_neo4j_server_rest_domain_EvaluatorFactory.java |
2,865 | private static class ScriptedPruneEvaluator extends ScriptedEvaluator implements Evaluator
{
ScriptedPruneEvaluator( ScriptExecutor executor )
{
super( executor );
}
@Override
public Evaluation evaluate( Path path )
{
return Evalua... | false | community_server_src_main_java_org_neo4j_server_rest_domain_EvaluatorFactory.java |
2,866 | private static abstract class ScriptedEvaluator
{
private final ScriptExecutor executor;
private final Map<String, Object> scriptContext = new HashMap<>(1);
ScriptedEvaluator( ScriptExecutor executor )
{
this.executor = executor;
}
protected boolean ... | false | community_server_src_main_java_org_neo4j_server_rest_domain_EvaluatorFactory.java |
2,867 | public class EvaluatorFactory
{
private static final String BUILTIN = "builtin";
private static final String KEY_LANGUAGE = "language";
private static final String KEY_BODY = "body";
private static final String KEY_NAME = "name";
private final ScriptExecutorFactoryRepository factoryRepo;
publi... | false | community_server_src_main_java_org_neo4j_server_rest_domain_EvaluatorFactory.java |
2,868 | @SuppressWarnings( "serial" )
public class EvaluationException extends RuntimeException
{
public EvaluationException()
{
super();
}
public EvaluationException( String message, Throwable cause )
{
super( message, cause );
}
public EvaluationException( String message )
{
... | false | community_server_src_main_java_org_neo4j_server_rest_domain_EvaluationException.java |
2,869 | @SuppressWarnings( "serial" )
public class EndNodeNotFoundException extends Exception
{
} | false | community_server_src_main_java_org_neo4j_server_rest_domain_EndNodeNotFoundException.java |
2,870 | public class BatchOperationFailedException extends RuntimeException {
private int status;
public BatchOperationFailedException( int status, String message, Exception e ) {
super(message,e);
this.status = status;
}
public int getStatus() {
return status;
}
} | false | community_server_src_main_java_org_neo4j_server_rest_domain_BatchOperationFailedException.java |
2,871 | public class DiscoveryServiceTest
{
@Test
public void shouldReturnValidJSONWithDataAndManagementUris() throws Exception
{
Configuration mockConfig = mock( Configuration.class );
String managementUri = "/management";
when(
mockConfig.getString( Configurator.MANAGEMENT_... | false | community_server_src_test_java_org_neo4j_server_rest_discovery_DiscoveryServiceTest.java |
2,872 | @Path( "/" )
public class DiscoveryService
{
private static final Logger LOGGER = Log.getLogger(DiscoveryService.class);
private final Configuration configuration;
private final OutputFormat outputFormat;
public DiscoveryService( @Context Configuration configuration, @Context OutputFormat outputFormat... | false | community_server_src_main_java_org_neo4j_server_rest_discovery_DiscoveryService.java |
2,873 | return new ServletOutputStream() {
@Override
public void write(int i) throws IOException {
if ( redirectError( i ) ) return;
writeChar( i );
bytesWritten++;
checkHead();
}
}; | false | community_server_src_main_java_org_neo4j_server_rest_batch_StreamingBatchOperationResults.java |
2,874 | public class StreamingBatchOperationResults
{
public static final int HEAD_BUFFER = 10;
public static final int IS_ERROR = -1;
private final String encoding = "UTF-8";
private final Map<Integer, String> locations = new HashMap<Integer, String>();
private final JsonGenerator g;
private final Serv... | false | community_server_src_main_java_org_neo4j_server_rest_batch_StreamingBatchOperationResults.java |
2,875 | public class NonStreamingBatchOperations extends BatchOperations
{
private BatchOperationResults results;
public NonStreamingBatchOperations( WebServer webServer )
{
super( webServer );
}
public BatchOperationResults performBatchJobs( UriInfo uriInfo, HttpHeaders httpHeaders, InputStream ... | false | community_server_src_main_java_org_neo4j_server_rest_batch_NonStreamingBatchOperations.java |
2,876 | private final BatchOperations ops = new BatchOperations(null) {
@Override
protected void invoke(String method, String path, String body, Integer id, URI targetUri, InternalJettyServletRequest req, InternalJettyServletResponse res) throws IOException, ServletException {
}
}; | false | community_server_src_test_java_org_neo4j_server_rest_batch_BatchOperationsTest.java |
2,877 | public class BatchOperationsTest {
private final BatchOperations ops = new BatchOperations(null) {
@Override
protected void invoke(String method, String path, String body, Integer id, URI targetUri, InternalJettyServletRequest req, InternalJettyServletResponse res) throws IOException, ServletExcept... | false | community_server_src_test_java_org_neo4j_server_rest_batch_BatchOperationsTest.java |
2,878 | public class DiscoveryRepresentationTest
{
@Test
public void shouldCreateAMapContainingDataAndManagementURIs() throws Exception
{
String managementUri = "/management";
String dataUri = "/data";
DiscoveryRepresentation dr = new DiscoveryRepresentation( managementUri, dataUri );
... | false | community_server_src_test_java_org_neo4j_server_rest_repr_DiscoveryRepresentationTest.java |
2,879 | public class ExceptionRepresentation extends MappingRepresentation
{
private final Throwable exception;
public ExceptionRepresentation( Throwable exception )
{
super( RepresentationType.EXCEPTION );
this.exception = exception;
}
@Override
protected void serialize( MappingSerial... | false | community_server_src_main_java_org_neo4j_server_rest_repr_ExceptionRepresentation.java |
2,880 | public final class ExtensionPointRepresentation extends ObjectRepresentation implements ParameterDescriptionConsumer
{
private final RepresentationType extended;
private final String name;
private final String desciption;
private final List<ParameterRepresentation> parameters = new ArrayList<ParameterRe... | false | community_server_src_main_java_org_neo4j_server_rest_repr_ExtensionPointRepresentation.java |
2,881 | public final class RepresentationType
{
private static final Map<Class<?>, Class<?>> boxed = new HashMap<>();
static
{
boxed.put( byte.class, Byte.class );
boxed.put( char.class, Character.class );
boxed.put( short.class, Short.class );
boxed.put( int.class, Integer.class );... | false | community_server-api_src_main_java_org_neo4j_server_rest_repr_RepresentationType.java |
2,882 | private static class StringFormat extends RepresentationFormat
{
StringFormat()
{
super( MediaType.WILDCARD_TYPE );
}
@Override
protected String serializeValue( String type, Object value )
{
return value.toString();
}
@Ove... | false | community_server_src_test_java_org_neo4j_server_rest_repr_RepresentationTestAccess.java |
2,883 | public class RepresentationTestAccess
{
private static final URI BASE_URI = URI.create( "http://neo4j.org/" );
public static Object serialize( Representation repr )
{
if ( repr instanceof ValueRepresentation )
{
return serialize( (ValueRepresentation) repr );
}
e... | false | community_server_src_test_java_org_neo4j_server_rest_repr_RepresentationTestAccess.java |
2,884 | {
@Override
public Response.ResponseBuilder answer( InvocationOnMock invocationOnMock ) throws Throwable
{
ref.set( (StreamingOutput) invocationOnMock.getArguments()[0] );
return responseBuilder;
... | false | community_server_src_test_java_org_neo4j_server_rest_repr_RepresentationFormatRepositoryTest.java |
2,885 | public class RepresentationFormatRepositoryTest
{
private final RepresentationFormatRepository repository = new RepresentationFormatRepository( null );
@Test
public void canProvideJsonFormat() throws Exception
{
assertNotNull( repository.inputFormat( MediaType.valueOf( "application/json" ) ) );... | false | community_server_src_test_java_org_neo4j_server_rest_repr_RepresentationFormatRepositoryTest.java |
2,886 | public final class RepresentationFormatRepository
{
private final Map<MediaType, RepresentationFormat> formats;
private final AbstractNeoServer injectorProvider;
public RepresentationFormatRepository( AbstractNeoServer injectorProvider )
{
this.injectorProvider = injectorProvider;
this.... | false | community_server_src_main_java_org_neo4j_server_rest_repr_RepresentationFormatRepository.java |
2,887 | {
@Override
protected Boolean convertBoolean( Object value ) throws BadInputException
{
return RepresentationFormat.this.convertBoolean( value );
}
@Override
protected Byte convertByte( Object value ) throws BadInputExcepti... | false | community_server-api_src_main_java_org_neo4j_server_rest_repr_RepresentationFormat.java |
2,888 | public abstract class RepresentationFormat implements InputFormat
{
final MediaType mediaType;
public RepresentationFormat( MediaType mediaType )
{
this.mediaType = mediaType;
}
@Override
public String toString()
{
return String.format( "%s[%s]", getClass().getSimpleName(),... | false | community_server-api_src_main_java_org_neo4j_server_rest_repr_RepresentationFormat.java |
2,889 | public class RepresentationExceptionHandlingIterable<T> extends ExceptionHandlingIterable<T> {
public RepresentationExceptionHandlingIterable(Iterable<T> source) {
super(source);
}
@Override
protected Iterator<T> exceptionOnIterator(Throwable t) {
if (t instanceof Exception) rethrow(new... | false | community_server_src_main_java_org_neo4j_server_rest_repr_RepresentationExceptionHandlingIterable.java |
2,890 | public abstract class RepresentationDispatcher extends PropertyTypeDispatcher<String, Representation>
{
@Override
protected Representation dispatchBooleanProperty( boolean property, String param )
{
return bool( property );
}
@Override
protected Representation dispatchDoubleProperty( do... | false | community_server_src_main_java_org_neo4j_server_rest_repr_RepresentationDispatcher.java |
2,891 | {
@Override
boolean isEmpty()
{
return true;
}
@Override
String serialize( RepresentationFormat format, URI baseUri, ExtensionInjector extensions )
{
return "";
}
@Overri... | false | community_server-api_src_main_java_org_neo4j_server_rest_repr_Representation.java |
2,892 | public abstract class Representation
{
// non-inlineable constants
public static final String GRAPHDB = RepresentationType.GRAPHDB.valueName;
public static final String INDEX = RepresentationType.INDEX.valueName;
public static final String NODE_INDEXES = RepresentationType.NODE_INDEX_ROOT.valueName;
... | false | community_server-api_src_main_java_org_neo4j_server_rest_repr_Representation.java |
2,893 | public class RelationshipRepresentationTest
{
@Test
public void shouldHaveSelfLink() throws BadInputException
{
assertUriMatches( RELATIONSHIP_URI_PATTERN, relrep( 1234 ).selfUri() );
}
@Test
public void shouldHaveType()
{
assertNotNull( relrep( 1234 ).getType() );
}
... | false | community_server_src_test_java_org_neo4j_server_rest_repr_RelationshipRepresentationTest.java |
2,894 | {
@Override
protected Representation underlyingObjectToObject( Relationship relationship )
{
return new RelationshipRepresentation( relationship );
}
} ); | false | community_server_src_main_java_org_neo4j_server_rest_repr_RelationshipRepresentation.java |
2,895 | public final class RelationshipRepresentation extends ObjectRepresentation implements ExtensibleRepresentation,
EntityRepresentation
{
private final Relationship rel;
public RelationshipRepresentation( Relationship rel )
{
super( RepresentationType.RELATIONSHIP );
this.rel = rel;
... | false | community_server_src_main_java_org_neo4j_server_rest_repr_RelationshipRepresentation.java |
2,896 | public class RelationshipIndexRootRepresentation extends MappingRepresentation
{
private IndexManager indexManager;
public RelationshipIndexRootRepresentation( IndexManager indexManager )
{
super( "relationship-index" );
this.indexManager = indexManager;
}
@Override
protected v... | false | community_server_src_main_java_org_neo4j_server_rest_repr_RelationshipIndexRootRepresentation.java |
2,897 | public class RelationshipIndexRepresentation extends IndexRepresentation
{
public RelationshipIndexRepresentation( String name )
{
this( name, Collections.EMPTY_MAP );
}
public RelationshipIndexRepresentation( String name, Map<String, String> config )
{
super( name, config );
}... | false | community_server_src_main_java_org_neo4j_server_rest_repr_RelationshipIndexRepresentation.java |
2,898 | public class RelationshipAutoIndexRepresentation extends IndexRepresentation {
public RelationshipAutoIndexRepresentation() {
super("", Collections.EMPTY_MAP);
}
@Override
protected String path()
{
return RestfulGraphDatabase.PATH_AUTO_INDEX.replace("{type}", RestfulGraphDatabase.RELATIONSHIP_AUTO_I... | false | community_server_src_main_java_org_neo4j_server_rest_repr_RelationshipAutoIndexRepresentation.java |
2,899 | public class PropertiesRepresentationTest
{
@Test
public void shouldContainAddedPropertiesWhenCreatedFromPropertyContainer()
{
Map<String, Object> values = new HashMap<String, Object>();
values.put( "foo", "bar" );
Map<String, Object> serialized = serialize( new PropertiesRepresentat... | false | community_server_src_test_java_org_neo4j_server_rest_repr_PropertiesRepresentationTest.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.