Unnamed: 0
int64
0
6.7k
func
stringlengths
12
89.6k
target
bool
2 classes
project
stringlengths
45
151
2,600
public class WrappingNeoServerBootstrapperDocIT extends ExclusiveServerTestBase { public @Rule TestData<RESTDocsGenerator> gen = TestData.producedThrough( RESTDocsGenerator.PRODUCER ); static GraphDatabaseAPI myDb; @BeforeClass public static void setup() throws IOException { myDb =...
false
community_server_src_test_java_org_neo4j_server_WrappingNeoServerBootstrapperDocIT.java
2,601
@Deprecated public class WrappingNeoServerBootstrapper extends Bootstrapper { private final GraphDatabaseAPI db; private final Configurator configurator; /** * Create an instance with default settings. * * @param db */ public WrappingNeoServerBootstrapper( GraphDatabaseAPI db ) ...
false
community_server_src_main_java_org_neo4j_server_WrappingNeoServerBootstrapper.java
2,602
public class IndexRelationshipDocIT extends AbstractRestFunctionalTestBase { private static FunctionalTestHelper functionalTestHelper; private static GraphDbHelper helper; private static RestRequest request; private enum MyRelationshipTypes implements RelationshipType { KNOWS } @Be...
false
community_server_src_test_java_org_neo4j_server_rest_IndexRelationshipDocIT.java
2,603
public class JaxRsResponse extends Response { private final int status; private final MultivaluedMap<String,Object> metaData; private final MultivaluedMap<String, String> headers; private final URI location; private String data; private MediaType type; public JaxRsResponse( ClientResponse ...
false
community_server_src_test_java_org_neo4j_server_rest_JaxRsResponse.java
2,604
public class RestfulGraphDatabasePagedTraversalTest { private static final String BASE_URI = "http://neo4j.org:7474/"; private RestfulGraphDatabase service; private Database database; private EntityOutputFormat output; private GraphDbHelper helper; private LeaseManager leaseManager; private...
false
community_server_src_test_java_org_neo4j_server_rest_web_RestfulGraphDatabasePagedTraversalTest.java
2,605
{ @Override public void run() { // start and block until finish transactionHandle.execute( statements, mock( ExecutionResultSerializer.class ) ); } } ).start();
false
community_server_src_test_java_org_neo4j_server_rest_transactional_ConcurrentTransactionAccessTest.java
2,606
public class ConcurrentTransactionAccessTest { @Test public void shouldThrowSpecificExceptionOnConcurrentTransactionAccess() throws Exception { // given TransactionRegistry registry = new TransactionHandleRegistry( mock( Clock.class), 0, StringLogger.DEV_NULL ); Trans...
false
community_server_src_test_java_org_neo4j_server_rest_transactional_ConcurrentTransactionAccessTest.java
2,607
public class CommitOnSuccessfulStatusCodeRepresentationWriteHandler implements RepresentationWriteHandler { private final HttpContext httpContext; private final Transaction transaction; public CommitOnSuccessfulStatusCodeRepresentationWriteHandler( HttpContext httpContext, Transaction transaction ) { ...
false
community_server_src_main_java_org_neo4j_server_rest_transactional_CommitOnSuccessfulStatusCodeRepresentationWriteHandler.java
2,608
class AggregatingWriter implements ResultDataContentWriter { private final ResultDataContentWriter[] writers; public AggregatingWriter( ResultDataContentWriter[] writers ) { this.writers = writers; } @Override public void write( JsonGenerator out, Iterable<String> columns, Map<String, ...
false
community_server_src_main_java_org_neo4j_server_rest_transactional_AggregatingWriter.java
2,609
public class StreamingTraverserDocIT extends TraverserDocIT { @Override public RESTDocsGenerator gen() { return super.gen().noDoc().withHeader(StreamingJsonFormat.STREAM_HEADER, "true"); } }
false
community_server_src_test_java_org_neo4j_server_rest_streaming_StreamingTraverserDocIT.java
2,610
public class StreamingRelationshipDocIT extends RelationshipDocIT { @Override public RESTDocsGenerator gen() { return super.gen().noDoc().withHeader(StreamingJsonFormat.STREAM_HEADER, "true"); } }
false
community_server_src_test_java_org_neo4j_server_rest_streaming_StreamingRelationshipDocIT.java
2,611
public class StreamingPathsDocIT extends PathsDocIT { @Override public RESTDocsGenerator gen() { return super.gen().noDoc().withHeader(StreamingJsonFormat.STREAM_HEADER, "true"); } }
false
community_server_src_test_java_org_neo4j_server_rest_streaming_StreamingPathsDocIT.java
2,612
public class StreamingIndexNodeDocIT extends IndexNodeDocIT { @Override public RESTDocsGenerator gen() { return super.gen().noDoc().withHeader(StreamingJsonFormat.STREAM_HEADER, "true"); } }
false
community_server_src_test_java_org_neo4j_server_rest_streaming_StreamingIndexNodeDocIT.java
2,613
public class StreamingCypherDocIT extends CypherDocIT { @Override public RESTDocsGenerator gen() { return super.gen().noDoc().withHeader(StreamingJsonFormat.STREAM_HEADER, "true"); } }
false
community_server_src_test_java_org_neo4j_server_rest_streaming_StreamingCypherDocIT.java
2,614
public class StreamingBatchOperationDocIT extends AbstractRestFunctionalTestBase { /** * By specifying an extended header attribute in the HTTP request, * the server will stream the results back as soon as they are processed on the server side * instead of constructing a full response when all entit...
false
community_server_src_test_java_org_neo4j_server_rest_streaming_StreamingBatchOperationDocIT.java
2,615
public class UriPathWildcardMatcherTest { @Test public void shouldFailWithoutAsteriskAtStart() { UriPathWildcardMatcher matcher = new UriPathWildcardMatcher("/some/uri/path"); assertFalse(matcher.matches("preamble/some/uri/path")); } @Test public void shouldFailWithoutAsteriskA...
false
community_server_src_test_java_org_neo4j_server_rest_security_UriPathWildcardMatcherTest.java
2,616
public class UriPathWildcardMatcher { private final String uriPath; public UriPathWildcardMatcher(String uriPath) { this.uriPath = uriPath.replace("*", ".*"); } public boolean matches(String uri) { return uri.matches(uriPath); } }
false
community_server_src_main_java_org_neo4j_server_rest_security_UriPathWildcardMatcher.java
2,617
public class SecurityRulesDocIT extends ExclusiveServerTestBase { private CommunityNeoServer server; private FunctionalTestHelper functionalTestHelper; public @Rule TestData<RESTDocsGenerator> gen = TestData.producedThrough( RESTDocsGenerator.PRODUCER ); @After public void stopServer() ...
false
community_server_src_test_java_org_neo4j_server_rest_security_SecurityRulesDocIT.java
2,618
public class SecurityFilterTest { @Test public void shouldPassThroughRequestToAnUnsecuredPath() throws Exception { // given SecurityRule rule = mock( SecurityRule.class ); when( rule.forUriPath() ).thenReturn( "/some-path" ); FilterChain filterChain = mock( FilterChain.class...
false
community_server_src_test_java_org_neo4j_server_rest_security_SecurityFilterTest.java
2,619
public class SecurityFilter implements Filter { private final HashMap<UriPathWildcardMatcher, HashSet<SecurityRule>> rules = new HashMap<UriPathWildcardMatcher, HashSet<SecurityRule>>(); public SecurityFilter( SecurityRule rule, SecurityRule... rules ) { this( merge( rule, rules ) ); } pub...
false
community_server_src_main_java_org_neo4j_server_rest_security_SecurityFilter.java
2,620
public class PermanentlyPassingSecurityRule implements SecurityRule { public static final String REALM = "WallyWorld"; // as per RFC2617 :-); @Override public boolean isAuthorized( HttpServletRequest request ) { return true; // always passes } @Override public String forUriPat...
false
community_server_src_test_java_org_neo4j_server_rest_security_PermanentlyPassingSecurityRule.java
2,621
public class PermanentlyFailingSecurityRuleWithWildcardPath implements SecurityRule { public static final String REALM = "WallyWorld"; // as per RFC2617 :-) public boolean isAuthorized( HttpServletRequest request ) { return false; } //START SNIPPET: failingRuleWithWildcardPath public...
false
community_server_src_test_java_org_neo4j_server_rest_security_PermanentlyFailingSecurityRuleWithWildcardPath.java
2,622
public class PermanentlyFailingSecurityRuleWithComplexWildcardPath implements SecurityRule { public static final String REALM = "WallyWorld"; // as per RFC2617 :-) @Override public boolean isAuthorized( HttpServletRequest request ) { return false; } @Override public String forUriP...
false
community_server_src_test_java_org_neo4j_server_rest_security_PermanentlyFailingSecurityRuleWithComplexWildcardPath.java
2,623
public class PermanentlyFailingSecurityRule implements SecurityRule { public static final String REALM = "WallyWorld"; // as per RFC2617 :-) @Override public boolean isAuthorized( HttpServletRequest request ) { return false; // always fails - a production implementation performs ...
false
community_server_src_test_java_org_neo4j_server_rest_security_PermanentlyFailingSecurityRule.java
2,624
public class NoAccessToWebAdminSecurityRule implements SecurityRule { private static boolean wasInvoked = false; public static boolean wasInvoked() { return wasInvoked; } @Override public boolean isAuthorized( HttpServletRequest request ) { wasInvoked = true; return...
false
community_server_src_test_java_org_neo4j_server_rest_security_NoAccessToWebAdminSecurityRule.java
2,625
{ @Override public Boolean answer( InvocationOnMock invocation ) throws Throwable { latch.startAndAwaitFinish(); return false; } } );
false
community_server_src_test_java_org_neo4j_server_rest_transactional_ConcurrentTransactionAccessTest.java
2,626
private static class DisgustingUriScheme implements TransactionUriScheme { private static long parseTxId( URI txUri ) { return parseLong( txUri.toString() ); } @Override public URI txUri( long id ) { return URI.create( String.valueOf( id )...
false
community_server_src_test_java_org_neo4j_server_rest_transactional_ConcurrentTransactionAccessTest.java
2,627
@Provider public class AuthenticationExceptionMapper implements ExceptionMapper<AuthenticationException> { public Response toResponse( AuthenticationException e ) { if ( e.getRealm() != null ) { return Response.status( Status.UNAUTHORIZED ) .header( "WWW-Authenti...
false
community_server_src_main_java_org_neo4j_server_rest_security_AuthenticationExceptionMapper.java
2,628
public class DeserializationException extends Exception { DeserializationException( String message ) { super( message ); } DeserializationException( String message, Throwable cause ) { super( message + ": " + cause.getMessage(), cause ); } }
false
community_server_src_main_java_org_neo4j_server_rest_transactional_DeserializationException.java
2,629
public class TransactionDocTest extends AbstractRestFunctionalTestBase { /** * Begin a transaction * * You begin a new transaction by posting zero or more Cypher statements * to the transaction endpoint. The server will respond with the result of * your statements, as well as the location o...
false
community_server_src_test_java_org_neo4j_server_rest_transactional_TransactionDocTest.java
2,630
public class StubStatementDeserializer extends StatementDeserializer { private final Iterator<Statement> statements; private final Iterator<Neo4jError> errors; public static StubStatementDeserializer statements( Statement... statements ) { return new StubStatementDeserializer( IteratorUtil.<Neo...
false
community_server_src_test_java_org_neo4j_server_rest_transactional_StubStatementDeserializer.java
2,631
{ @Override public String toString() { return "TestInputStream"; } } );
false
community_server_src_test_java_org_neo4j_server_rest_transactional_StatementDeserializerTest.java
2,632
public class StatementDeserializerTest { @Test @SuppressWarnings("unchecked") public void shouldDeserializeSingleStatement() throws Exception { // Given String json = createJsonFrom( map( "statements", asList( map( "statement", "Blah blah", "parameters", map( "one", 12 ) ) ) ) ); ...
false
community_server_src_test_java_org_neo4j_server_rest_transactional_StatementDeserializerTest.java
2,633
public class StatementDeserializer extends PrefetchingIterator<Statement> { private static final JsonFactory JSON_FACTORY = new JsonFactory().setCodec( new Neo4jJsonCodec() ); private static final Map<String, Object> NO_PARAMETERS = unmodifiableMap( map() ); private static final Iterator<Neo4jError> NO_ERRO...
false
community_server_src_main_java_org_neo4j_server_rest_transactional_StatementDeserializer.java
2,634
public class Statement { private final String statement; private final Map<String, Object> parameters; private final boolean includeStats; private final ResultDataContent[] resultDataContents; public Statement( String statement, Map<String, Object> parameters, boolean includeStats, ...
false
community_server_src_main_java_org_neo4j_server_rest_transactional_Statement.java
2,635
public class RowWriterTests { @Test public void shouldWriteNestedMaps() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); JsonGenerator json = new JsonFactory(new Neo4jJsonCodec()).createJsonGenerator( out ); JsonNode row = serialize( out, json, new RowWrit...
false
community_server_src_test_java_org_neo4j_server_rest_transactional_RowWriterTests.java
2,636
class RowWriter implements ResultDataContentWriter { @Override public void write( JsonGenerator out, Iterable<String> columns, Map<String, Object> row ) throws IOException { out.writeArrayFieldStart( "row" ); try { for ( String key : columns ) { ...
false
community_server_src_main_java_org_neo4j_server_rest_transactional_RowWriter.java
2,637
rest { @Override public ResultDataContentWriter writer( URI baseUri ) { return new RestRepresentationWriter( baseUri ); } };
false
community_server_src_main_java_org_neo4j_server_rest_transactional_ResultDataContent.java
2,638
graph { @Override public ResultDataContentWriter writer( URI baseUri ) { return new GraphExtractionWriter(); } },
false
community_server_src_main_java_org_neo4j_server_rest_transactional_ResultDataContent.java
2,639
row { @Override public ResultDataContentWriter writer( URI baseUri ) { return new RowWriter(); } },
false
community_server_src_main_java_org_neo4j_server_rest_transactional_ResultDataContent.java
2,640
public class RestRepresentationWriterTests { @Test public void shouldWriteNestedMaps() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); JsonGenerator json = new JsonFactory( new Neo4jJsonCodec() ).createJsonGenerator( out ); JsonNode rest = serialize( out,...
false
community_server_src_test_java_org_neo4j_server_rest_transactional_RestRepresentationWriterTests.java
2,641
class RestRepresentationWriter implements ResultDataContentWriter { private final URI baseUri; RestRepresentationWriter( URI baseUri ) { this.baseUri = baseUri; } @Override public void write( JsonGenerator out, Iterable<String> columns, Map<String, Object> row ) throws IOException ...
false
community_server_src_main_java_org_neo4j_server_rest_transactional_RestRepresentationWriter.java
2,642
public class Neo4jJsonCodec extends ObjectMapper { @Override public void writeValue( JsonGenerator out, Object value ) throws IOException { if ( value instanceof PropertyContainer ) { writePropertyContainer( out, (PropertyContainer) value ); } else if ( value ins...
false
community_server_src_main_java_org_neo4j_server_rest_transactional_Neo4jJsonCodec.java
2,643
public class GraphExtractionWriterTest { private final Node n1 = node( 17, properties( property( "name", "n1" ) ), "Foo" ); private final Node n2 = node( 666, properties( property( "name", "n2" ) ) ); private final Node n3 = node( 42, properties( property( "name", "n3" ) ), "Foo", "Bar" ); private final...
false
community_server_src_test_java_org_neo4j_server_rest_transactional_GraphExtractionWriterTest.java
2,644
class GraphExtractionWriter implements ResultDataContentWriter { @Override public void write( JsonGenerator out, Iterable<String> columns, Map<String, Object> row ) throws IOException { Set<Node> nodes = new HashSet<>(); Set<Relationship> relationships = new HashSet<>(); extract( nod...
false
community_server_src_main_java_org_neo4j_server_rest_transactional_GraphExtractionWriter.java
2,645
{ @Override public void close() { } @Override public boolean hasNext() { return inner.hasNext(); } @Override public Map<String, Object> next() { r...
false
community_server_src_test_java_org_neo4j_server_rest_transactional_ExecutionResultSerializerTest.java
2,646
public class ExecutionResultSerializerTest { @Test public void shouldSerializeResponseWithCommitUriOnly() throws Exception { // given ByteArrayOutputStream output = new ByteArrayOutputStream(); ExecutionResultSerializer serializer = new ExecutionResultSerializer( output, null, org.ne...
false
community_server_src_test_java_org_neo4j_server_rest_transactional_ExecutionResultSerializerTest.java
2,647
public class ExecutionResultSerializer { public ExecutionResultSerializer( OutputStream output, URI baseUri, StringLogger log ) { this.baseUri = baseUri; this.log = log; JsonGenerator generator = null; try { generator = JSON_FACTORY.createJsonGenerator( output...
false
community_server_src_main_java_org_neo4j_server_rest_transactional_ExecutionResultSerializer.java
2,648
public class NoAccessToDatabaseSecurityRule implements SecurityRule { private static boolean wasInvoked = false; public static boolean wasInvoked() { return wasInvoked; } @Override public boolean isAuthorized( HttpServletRequest request ) { wasInvoked = true; return...
false
community_server_src_test_java_org_neo4j_server_rest_security_NoAccessToDatabaseSecurityRule.java
2,649
public class AuthenticationException extends RuntimeException { private static final long serialVersionUID = 3662922094534872711L; private String realm; public AuthenticationException( String msg, String realm ) { super( msg ); this.realm = realm; } public String getRealm() ...
false
community_server_src_main_java_org_neo4j_server_rest_security_AuthenticationException.java
2,650
@Provider public class TransactionFilter extends InjectableProvider<Void> implements ResourceMethodDispatchAdapter { private Database database; public TransactionFilter( Database database ) { super( Void.class ); this.database = database; } @Override public Void getValue( HttpC...
false
community_server_src_main_java_org_neo4j_server_rest_transactional_TransactionFilter.java
2,651
{ @Override protected void serialize( MappingSerializer serializer ) { ArrayList<Representation> maps = new ArrayList<Representation>(); maps.add( new MappingRepresentation( "map" ) { @Override ...
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_JsonFormatTest.java
2,652
{ @Override protected void serialize( MappingSerializer serializer ) { serializer.putMapping( "nested", new MappingRepresentation( "data" ) { @Override protected void serialize( MappingSerializer nested )...
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_JsonFormatTest.java
2,653
{ @Override protected void serialize( MappingSerializer serializer ) { serializer.putUri( "URL", "subpath" ); } } );
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_JsonFormatTest.java
2,654
{ @Override protected void serialize( MappingSerializer serializer ) { serializer.putString( "key", "expected string" ); } } );
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_JsonFormatTest.java
2,655
{ @Override protected void serialize( MappingSerializer serializer ) { } } );
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_JsonFormatTest.java
2,656
public class JsonFormatTest { private OutputFormat json; @Before public void createOutputFormat() throws Exception { json = new OutputFormat( new JsonFormat(), new URI( "http://localhost/" ), null ); } @Test public void canFormatString() throws Exception { String entity...
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_JsonFormatTest.java
2,657
public class JsonFormat extends RepresentationFormat { public JsonFormat() { super( MediaType.APPLICATION_JSON_TYPE ); } @Override protected ListWriter serializeList( String type ) { return new ListWrappingWriter( new ArrayList<Object>() ); } @Override protected Str...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_JsonFormat.java
2,658
EXCEPTION( Representation.EXCEPTION ) { @Override String render( Map<String, Object> serialized ) { StringBuilder entity = new StringBuilder( "<html>" ); entity.append( "<head><title>Error</title></head><body>" ); Object...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_HtmlFormat.java
2,659
GRAPHDB( Representation.GRAPHDB ) { @Override String render( Map<String, Object> serialized ) { Map<Object, Object> map = new HashMap<>(); transfer( serialized, map, "index", "node_index", "relationship_index"/*, "extensions_info"*/); ...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_HtmlFormat.java
2,660
RELATIONSHIP_INDEXES( Representation.RELATIONSHIP_INDEXES ) { @Override String render( Map<String, Object> serialized ) { return renderIndex( serialized ); } },
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_HtmlFormat.java
2,661
NODE_INDEXES( Representation.NODE_INDEXES ) { @Override String render( Map<String, Object> serialized ) { return renderIndex( serialized ); } },
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_HtmlFormat.java
2,662
RELATIONSHIP( Representation.RELATIONSHIP ) { @Override String render( Map<String, Object> serialized ) { Map<Object, Object> map = new LinkedHashMap<Object, Object>(); transfer( serialized, map, "type", "data", "start", "end" ); ...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_HtmlFormat.java
2,663
NODE( Representation.NODE ) { @Override String render( Map<String, Object> serialized ) { String javascript = ""; StringBuilder builder = HtmlHelper.start( HtmlHelper.ObjectType.NODE, javascript ); HtmlHelper.append( bui...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_HtmlFormat.java
2,664
RELATIONSHIPS { @Override String render( List<Object> data ) { if ( data.isEmpty() ) { StringBuilder builder = HtmlHelper.start( HtmlHelper.ObjectType.RELATIONSHIP, null ); HtmlHelper.appendMessag...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_HtmlFormat.java
2,665
NODES { @Override String render( List<Object> data ) { StringBuilder builder = HtmlHelper.start( "Index hits", null ); if ( data.isEmpty() ) { HtmlHelper.appendMessage( builder, "No index hits" ); ...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_HtmlFormat.java
2,666
private static class HtmlMap extends MapWrappingWriter { private final MappingTemplate template; public HtmlMap( MappingTemplate template ) { super( new HashMap<String, Object>(), true ); this.template = template; } String complete() { ...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_HtmlFormat.java
2,667
private static class HtmlList extends ListWrappingWriter { private final ListTemplate template; public HtmlList( ListTemplate template ) { super( new ArrayList<Object>(), true ); this.template = template; } String complete() { ...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_HtmlFormat.java
2,668
public class HtmlFormat extends RepresentationFormat { public HtmlFormat() { super( MediaType.TEXT_HTML_TYPE ); } private enum MappingTemplate { NODE( Representation.NODE ) { @Override String render( Map<String, Object> serialized ) { ...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_HtmlFormat.java
2,669
public class DefaultFormatTest { private DefaultFormat input; @Before public void setUp() throws Exception { JsonFormat inner = new JsonFormat(); ArrayList<MediaType> supported = new ArrayList<MediaType>(); MediaType requested = MediaType.APPLICATION_JSON_TYPE; input = n...
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_DefaultFormatTest.java
2,670
{ @Override protected void serialize( MappingSerializer serializer ) { serializer.putString( "key", "expected string" ); } } );
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_CompactJsonFormatTest.java
2,671
{ @Override protected void serialize( MappingSerializer nested ) { nested.putString( "data", "expected data" ); } } );
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_JsonFormatTest.java
2,672
{ @Override protected void serialize( MappingSerializer serializer ) { serializer.putString( "foo", "bar" ); } } );
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_JsonFormatTest.java
2,673
public class RFC1123Test { private final Calendar calendar = Calendar.getInstance( RFC1123.GMT, Locale.US ); @Test public void shouldParseRFC1123() throws Exception { // given String input = "Mon, 15 Aug 2005 15:52:01 +0000"; // when Date result = RFC1123.parseTimestamp...
false
community_server_src_test_java_org_neo4j_server_rest_repr_util_RFC1123Test.java
2,674
public class JsonInputTest { private final JsonFormat input = new JsonFormat(); @Test public void canReadEmptyMap() throws Exception { Map<String, Object> map = input.readMap( "{}" ); assertNotNull( map ); assertTrue( "map is not empty", map.isEmpty() ); } @Test pub...
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_JsonInputTest.java
2,675
public final class RFC1123 { private static final ThreadLocal<RFC1123> INSTANCES = new ThreadLocal<RFC1123>(); public static final TimeZone GMT = TimeZone.getTimeZone( "GMT" ); private static final Date Y2K_START_DATE; static { Calendar calendar = Calendar.getInstance(); calendar.setT...
false
community_server_src_main_java_org_neo4j_server_rest_repr_util_RFC1123.java
2,676
public class UrlFormFormatTest { @Test public void shouldParseEmptyMap() throws Exception { UrlFormFormat format = new UrlFormFormat(); Map<String, Object> map = format.readMap( "" ); assertThat( map.size(), is( 0 ) ); } @Test public void canParseSingleKeyMap() throws E...
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_UrlFormFormatTest.java
2,677
public class UrlFormFormat extends RepresentationFormat { public UrlFormFormat() { super( MediaType.APPLICATION_FORM_URLENCODED_TYPE ); } @Override protected String serializeValue( final String type, final Object value ) { throw new RuntimeException( "Not implemented!" ); } ...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_UrlFormFormat.java
2,678
public class StreamingJsonUtils { public static String readCurrentValueAsString(JsonParser jp, JsonToken token) throws JsonParseException, IOException { return readCurrentValueInto(jp, token, new StringBuilder()).toString(); } private static StringBuilder readCurrentValueInto(JsonParser jp...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_StreamingJsonUtils.java
2,679
{ @Override protected void serialize( MappingSerializer nested ) { nested.putString( "data", "expected data" ); } } );
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_StreamingJsonFormatTest.java
2,680
{ @Override protected void serialize( MappingSerializer serializer ) { serializer.putMapping( "nested", new MappingRepresentation( "data" ) { @Override protected void serialize( MappingSerializer nested )...
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_StreamingJsonFormatTest.java
2,681
{ @Override protected void serialize( MappingSerializer serializer ) { serializer.putUri( "URL", "subpath" ); } } );
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_StreamingJsonFormatTest.java
2,682
{ @Override protected void serialize( MappingSerializer serializer ) { serializer.putString( "key", "expected string" ); } } );
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_StreamingJsonFormatTest.java
2,683
{ @Override protected void serialize( MappingSerializer serializer ) { } } );
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_StreamingJsonFormatTest.java
2,684
public class StreamingJsonFormatTest { private OutputFormat json; private ByteArrayOutputStream stream; @Before public void createOutputFormat() throws Exception { stream = new ByteArrayOutputStream(); json = new OutputFormat( new StreamingJsonFormat().writeTo(stream).usePrettyPrint...
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_StreamingJsonFormatTest.java
2,685
@Ignore public class StreamingJsonFormatPerformanceTest { public static final String QUERY = "start n=node(*) match p=n-[r:TYPE]->m return n,r,m,p"; private GraphDatabaseService gdb; private WrappingNeoServer server; @Before public void setUp() { gdb = new TestGraphDatabaseFactory().newImp...
false
community_server_src_test_java_org_neo4j_server_rest_repr_formats_StreamingJsonFormatPerformanceTest.java
2,686
public static class StreamingRepresentationFormat extends RepresentationFormat { private final JsonGenerator g; private final InputFormat inputFormat; public StreamingRepresentationFormat( JsonGenerator g, InputFormat inputFormat ) { super( StreamingFormat.MEDIA_TYPE...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_StreamingJsonFormat.java
2,687
private static class StreamingMappingWriter extends MappingWriter { private final JsonGenerator g; public StreamingMappingWriter( JsonGenerator g ) { this.g = g; try { g.writeStartObject(); } catch ( IOException...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_StreamingJsonFormat.java
2,688
private static class StreamingListWriter extends ListWriter { private final JsonGenerator g; public StreamingListWriter( JsonGenerator g ) { this.g = g; try { g.writeStartArray(); } catch ( IOException e ) ...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_StreamingJsonFormat.java
2,689
{ @Override protected JsonGenerator _createUTF8JsonGenerator( OutputStream out, IOContext ctxt ) throws IOException { final int bufferSize = 1024 * 8; Utf8Generator gen = new Utf8Generator( ctxt, _generatorFeatures, _objectCodec, out, ...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_StreamingJsonFormat.java
2,690
@Service.Implementation(RepresentationFormat.class) public class StreamingJsonFormat extends RepresentationFormat implements StreamingFormat { private final JsonFactory factory; public StreamingJsonFormat() { super( MEDIA_TYPE ); this.factory = createJsonFactory(); } private JsonF...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_StreamingJsonFormat.java
2,691
public class NullFormat extends RepresentationFormat { private final Collection<MediaType> supported; private final MediaType[] requested; public NullFormat( Collection<MediaType> supported, MediaType... requested ) { super( null ); this.supported = supported; this.requested = r...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_NullFormat.java
2,692
public class MapWrappingWriter extends MappingWriter { final Map<String, Object> data; final boolean interactive; public MapWrappingWriter( Map<String, Object> data ) { this( data, false ); } public MapWrappingWriter( Map<String, Object> data, boolean interactive ) { this.d...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_MapWrappingWriter.java
2,693
public class ListWrappingWriter extends ListWriter { final List<Object> data; private final boolean interactive; public ListWrappingWriter( List<Object> data ) { this( data, false ); } ListWrappingWriter( List<Object> data, boolean interactive ) { this.data = data; ...
false
community_server_src_main_java_org_neo4j_server_rest_repr_formats_ListWrappingWriter.java
2,694
public class TransactionFacade { private final TransitionalPeriodTransactionMessContainer kernel; private final ExecutionEngine engine; private final TransactionRegistry registry; private final StringLogger log; private final URI baseUri; public TransactionFacade( TransitionalPeriodTransactionM...
false
community_server_src_main_java_org_neo4j_server_rest_transactional_TransactionFacade.java
2,695
{ @Override public RequestDispatcher create( AbstractResourceMethod abstractResourceMethod ) { final RequestDispatcher requestDispatcher = resourceMethodDispatchProvider.create( abstractResourceMethod ); return new Tran...
false
community_server_src_main_java_org_neo4j_server_rest_transactional_TransactionFilter.java
2,696
public class JmxServiceDocIT extends AbstractRestFunctionalTestBase { private static FunctionalTestHelper functionalTestHelper; @BeforeClass public static void setupServer() throws IOException { functionalTestHelper = new FunctionalTestHelper( server() ); } @Before public void clea...
false
community_server_src_test_java_org_neo4j_server_rest_JmxServiceDocIT.java
2,697
@Path( "/relationship/types" ) public class DatabaseMetadataService { private final Database database; private RepresentationWriteHandler representationWriteHandler = RepresentationWriteHandler.DO_NOTHING; public DatabaseMetadataService( @Context Database database ) { this.database = database; ...
false
community_server_src_main_java_org_neo4j_server_rest_web_DatabaseMetadataService.java
2,698
public class DatabaseActionsTest { private static GraphDbHelper graphdbHelper; private static Database database; private static AbstractGraphDatabase graph; private static DatabaseActions actions; @BeforeClass public static void createDb() throws IOException { graph = (AbstractGraph...
false
community_server_src_test_java_org_neo4j_server_rest_web_DatabaseActionsTest.java
2,699
private class UniqueRelationshipFactory extends UniqueFactory.UniqueRelationshipFactory { private final Node start, end; private final RelationshipType type; private final Map<String, Object> properties; UniqueRelationshipFactory( String index, Node start, Node end, String type,...
false
community_server_src_main_java_org_neo4j_server_rest_web_DatabaseActions.java