repo_name stringlengths 7 104 | file_path stringlengths 13 198 | context stringlengths 67 7.15k | import_statement stringlengths 16 4.43k | code stringlengths 40 6.98k | prompt stringlengths 227 8.27k | next_line stringlengths 8 795 |
|---|---|---|---|---|---|---|
eclecticlogic/pedal-dialect | src/main/java/com/eclecticlogic/pedal/provider/hibernate/HibernateProviderAccessSpiImpl.java | // Path: src/main/java/com/eclecticlogic/pedal/provider/Consumer.java
// public interface Consumer<T> {
//
//
// void accept(T value);
//
// }
//
// Path: src/main/java/com/eclecticlogic/pedal/provider/Function.java
// public interface Function<T, R> {
//
// R apply(T value);
// }
//
// Path: src/... | import org.hibernate.persister.entity.SingleTableEntityPersister;
import com.eclecticlogic.pedal.provider.Consumer;
import com.eclecticlogic.pedal.provider.Function;
import com.eclecticlogic.pedal.provider.ProviderAccessSpi;
import java.io.Serializable;
import java.sql.Connection;
import java.sql.SQLException;
import j... | /**
* Copyright (c) 2014-2015 Eclectic Logic LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | // Path: src/main/java/com/eclecticlogic/pedal/provider/Consumer.java
// public interface Consumer<T> {
//
//
// void accept(T value);
//
// }
//
// Path: src/main/java/com/eclecticlogic/pedal/provider/Function.java
// public interface Function<T, R> {
//
// R apply(T value);
// }
//
// Path: src/... | public void run(EntityManager entityManager, final Consumer<Connection> work) { |
eclecticlogic/pedal-dialect | src/main/java/com/eclecticlogic/pedal/provider/hibernate/HibernateProviderAccessSpiImpl.java | // Path: src/main/java/com/eclecticlogic/pedal/provider/Consumer.java
// public interface Consumer<T> {
//
//
// void accept(T value);
//
// }
//
// Path: src/main/java/com/eclecticlogic/pedal/provider/Function.java
// public interface Function<T, R> {
//
// R apply(T value);
// }
//
// Path: src/... | import org.hibernate.persister.entity.SingleTableEntityPersister;
import com.eclecticlogic.pedal.provider.Consumer;
import com.eclecticlogic.pedal.provider.Function;
import com.eclecticlogic.pedal.provider.ProviderAccessSpi;
import java.io.Serializable;
import java.sql.Connection;
import java.sql.SQLException;
import j... | * @param entityClass Entity class for which the table name is required.
* @return Table name if the entity class is a single table.
*/
@Override
public String getTableName(Class<? extends Serializable> entityClass) {
SessionFactory sf = emf.unwrap(HibernateEntityManagerFactory.class).getS... | // Path: src/main/java/com/eclecticlogic/pedal/provider/Consumer.java
// public interface Consumer<T> {
//
//
// void accept(T value);
//
// }
//
// Path: src/main/java/com/eclecticlogic/pedal/provider/Function.java
// public interface Function<T, R> {
//
// R apply(T value);
// }
//
// Path: src/... | public <R> R exec(EntityManager entityManager, final Function<Connection, R> work) { |
eclecticlogic/pedal-dialect | src/main/java/com/eclecticlogic/pedal/dialect/postgresql/AbstractCopyCommandImpl.java | // Path: src/main/java/com/eclecticlogic/pedal/connection/ConnectionAccessor.java
// public interface ConnectionAccessor {
//
// /**
// * @param providerConnection Connection accessible via JPA provider
// * @return Underlying database connection.
// */
// Connection getRawConnection(Connection ... | import com.eclecticlogic.pedal.connection.ConnectionAccessor;
import com.eclecticlogic.pedal.provider.ProviderAccessSpi;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.Serializable; | /*
* Copyright (c) 2017 Eclectic Logic LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | // Path: src/main/java/com/eclecticlogic/pedal/connection/ConnectionAccessor.java
// public interface ConnectionAccessor {
//
// /**
// * @param providerConnection Connection accessible via JPA provider
// * @return Underlying database connection.
// */
// Connection getRawConnection(Connection ... | protected ProviderAccessSpi providerAccessSpi; |
eclecticlogic/pedal-dialect | src/main/java/com/eclecticlogic/pedal/dialect/postgresql/eval/SimpleColumnEvaluator.java | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyAttribute.java
// public class CopyAttribute {
//
// private final List<Method> methods = new ArrayList<>();
// private AtomicLong variableCounter = new AtomicLong();
// private ThreadLocal<String> currentVariable = new ThreadLocal<>();
... | import com.eclecticlogic.pedal.dialect.postgresql.CopyAttribute;
import javax.persistence.Column;
import java.lang.reflect.Method; | /*
* Copyright (c) 2017 Eclectic Logic LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyAttribute.java
// public class CopyAttribute {
//
// private final List<Method> methods = new ArrayList<>();
// private AtomicLong variableCounter = new AtomicLong();
// private ThreadLocal<String> currentVariable = new ThreadLocal<>();
... | CopyAttribute attribute = new CopyAttribute(); |
eclecticlogic/pedal-dialect | src/main/java/com/eclecticlogic/pedal/dialect/postgresql/eval/JoinColumnEvaluator.java | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyAttribute.java
// public class CopyAttribute {
//
// private final List<Method> methods = new ArrayList<>();
// private AtomicLong variableCounter = new AtomicLong();
// private ThreadLocal<String> currentVariable = new ThreadLocal<>();
... | import com.eclecticlogic.pedal.dialect.postgresql.CopyAttribute;
import javax.persistence.JoinColumn;
import java.lang.reflect.Method; | /*
* Copyright (c) 2017 Eclectic Logic LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyAttribute.java
// public class CopyAttribute {
//
// private final List<Method> methods = new ArrayList<>();
// private AtomicLong variableCounter = new AtomicLong();
// private ThreadLocal<String> currentVariable = new ThreadLocal<>();
... | CopyAttribute attribute = new CopyAttribute(); |
eclecticlogic/pedal-dialect | src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyCommandImpl.java | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/eval/EvaluatorChain.java
// public interface EvaluatorChain {
//
// Class<?> getEntityClass();
//
//
// /**
// * Add attribute to evaluated attributes list.
// * @param attribute
// */
// void add(CopyAttribute attribute);
/... | import com.eclecticlogic.pedal.dialect.postgresql.eval.EvaluatorChain;
import com.eclecticlogic.pedal.dialect.postgresql.eval.MethodEvaluator;
import com.google.common.base.Stopwatch;
import javassist.*;
import org.postgresql.copy.CopyIn;
import org.postgresql.copy.CopyManager;
import org.postgresql.core.BaseConnection... | try {
for (E e : entityList) {
byte[] buf = encoding.encode(extractor.getValueList(e));
cp.writeToCopy(buf, 0, buf.length);
}
records = cp.endCopy();
} finally {
... | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/eval/EvaluatorChain.java
// public interface EvaluatorChain {
//
// Class<?> getEntityClass();
//
//
// /**
// * Add attribute to evaluated attributes list.
// * @param attribute
// */
// void add(CopyAttribute attribute);
/... | protected MethodEvaluator getMethodEvaluator() { |
eclecticlogic/pedal-dialect | src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyCommandImpl.java | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/eval/EvaluatorChain.java
// public interface EvaluatorChain {
//
// Class<?> getEntityClass();
//
//
// /**
// * Add attribute to evaluated attributes list.
// * @param attribute
// */
// void add(CopyAttribute attribute);
/... | import com.eclecticlogic.pedal.dialect.postgresql.eval.EvaluatorChain;
import com.eclecticlogic.pedal.dialect.postgresql.eval.MethodEvaluator;
import com.google.common.base.Stopwatch;
import javassist.*;
import org.postgresql.copy.CopyIn;
import org.postgresql.copy.CopyManager;
import org.postgresql.core.BaseConnection... | cp.writeToCopy(buf, 0, buf.length);
}
records = cp.endCopy();
} finally {
if (cp.isActive()) {
cp.cancelCopy();
}
}
assert records == entityList... | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/eval/EvaluatorChain.java
// public interface EvaluatorChain {
//
// Class<?> getEntityClass();
//
//
// /**
// * Add attribute to evaluated attributes list.
// * @param attribute
// */
// void add(CopyAttribute attribute);
/... | public void evaluate(Method method, EvaluatorChain chain) { |
eclecticlogic/pedal-dialect | src/main/java/com/eclecticlogic/pedal/dialect/postgresql/eval/EmbeddedIdColumnEvaluator.java | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyAttribute.java
// public class CopyAttribute {
//
// private final List<Method> methods = new ArrayList<>();
// private AtomicLong variableCounter = new AtomicLong();
// private ThreadLocal<String> currentVariable = new ThreadLocal<>();
... | import com.eclecticlogic.pedal.dialect.postgresql.CopyAttribute;
import javax.persistence.AttributeOverride;
import javax.persistence.EmbeddedId;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
i... | /*
* Copyright (c) 2017 Eclectic Logic LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyAttribute.java
// public class CopyAttribute {
//
// private final List<Method> methods = new ArrayList<>();
// private AtomicLong variableCounter = new AtomicLong();
// private ThreadLocal<String> currentVariable = new ThreadLocal<>();
... | CopyAttribute attribute = new CopyAttribute(); |
eclecticlogic/pedal-dialect | src/main/java/com/eclecticlogic/pedal/dialect/postgresql/eval/MethodEvaluator.java | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyAttribute.java
// public class CopyAttribute {
//
// private final List<Method> methods = new ArrayList<>();
// private AtomicLong variableCounter = new AtomicLong();
// private ThreadLocal<String> currentVariable = new ThreadLocal<>();
... | import com.eclecticlogic.pedal.dialect.postgresql.CopyAttribute;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List; | /*
* Copyright (c) 2017 Eclectic Logic LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyAttribute.java
// public class CopyAttribute {
//
// private final List<Method> methods = new ArrayList<>();
// private AtomicLong variableCounter = new AtomicLong();
// private ThreadLocal<String> currentVariable = new ThreadLocal<>();
... | default void evaluate(Method method, Class<?> clz, List<CopyAttribute> attributes) { |
eclecticlogic/pedal-dialect | src/main/java/com/eclecticlogic/pedal/dialect/postgresql/eval/EmbeddedColumnEvaluator.java | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyAttribute.java
// public class CopyAttribute {
//
// private final List<Method> methods = new ArrayList<>();
// private AtomicLong variableCounter = new AtomicLong();
// private ThreadLocal<String> currentVariable = new ThreadLocal<>();
... | import com.eclecticlogic.pedal.dialect.postgresql.CopyAttribute;
import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.EmbeddedId;
import javax.persistence.Transient;
import java.lang.reflect.Method;
import java.util.Arrays;
import jav... | /*
* Copyright (c) 2017 Eclectic Logic LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyAttribute.java
// public class CopyAttribute {
//
// private final List<Method> methods = new ArrayList<>();
// private AtomicLong variableCounter = new AtomicLong();
// private ThreadLocal<String> currentVariable = new ThreadLocal<>();
... | CopyAttribute attribute = new CopyAttribute(); |
eclecticlogic/pedal-dialect | src/main/java/com/eclecticlogic/pedal/dialect/postgresql/eval/EvaluatorChain.java | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyAttribute.java
// public class CopyAttribute {
//
// private final List<Method> methods = new ArrayList<>();
// private AtomicLong variableCounter = new AtomicLong();
// private ThreadLocal<String> currentVariable = new ThreadLocal<>();
... | import com.eclecticlogic.pedal.dialect.postgresql.CopyAttribute; | /*
* Copyright (c) 2017 Eclectic Logic LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | // Path: src/main/java/com/eclecticlogic/pedal/dialect/postgresql/CopyAttribute.java
// public class CopyAttribute {
//
// private final List<Method> methods = new ArrayList<>();
// private AtomicLong variableCounter = new AtomicLong();
// private ThreadLocal<String> currentVariable = new ThreadLocal<>();
... | void add(CopyAttribute attribute); |
LinkedDataFragments/Server.Java | src/main/java/org/linkeddatafragments/datasource/sparql/SparqlBasedRequestProcessorForTPFs.java | // Path: src/main/java/org/linkeddatafragments/datasource/IFragmentRequestProcessor.java
// public interface IFragmentRequestProcessor extends Closeable
// {
//
// /**
// *
// * @param request
// * @return
// * @throws IllegalArgumentException
// */
// ILinkedDataFragment createRequest... | import java.net.URI;
import java.net.URISyntaxException;
import org.apache.http.client.utils.URIBuilder;
import org.apache.jena.query.ParameterizedSparqlString;
import org.apache.jena.query.Query;
import org.apache.jena.query.QueryExecution;
import org.apache.jena.query.QueryExecutionFactory;
import org.apache.j... | package org.linkeddatafragments.datasource.sparql;
/**
* Implementation of {@link IFragmentRequestProcessor} that processes
* {@link ITriplePatternFragmentRequest}s over data stored behind a SPARQL-Query endpoint.
*
* @author <a href="mailto:bart.hanssens@fedict.be">Bart Hanssens</a>
* @author <a hre... | // Path: src/main/java/org/linkeddatafragments/datasource/IFragmentRequestProcessor.java
// public interface IFragmentRequestProcessor extends Closeable
// {
//
// /**
// *
// * @param request
// * @return
// * @throws IllegalArgumentException
// */
// ILinkedDataFragment createRequest... | protected ILinkedDataFragment createFragment(
|
LinkedDataFragments/Server.Java | src/main/java/org/linkeddatafragments/datasource/tdb/JenaTDBDataSource.java | // Path: src/main/java/org/linkeddatafragments/datasource/DataSourceBase.java
// public abstract class DataSourceBase implements IDataSource {
//
// /**
// * Get the datasource title
// */
// protected String title;
//
// /**
// * Get the datasource description
// */
// protected S... | import java.io.File;
import org.linkeddatafragments.datasource.DataSourceBase;
import org.linkeddatafragments.datasource.IFragmentRequestProcessor;
import org.linkeddatafragments.fragments.IFragmentRequestParser;
import org.linkeddatafragments.fragments.tpf.TPFRequestParserForJenaBackends;
| package org.linkeddatafragments.datasource.tdb;
/**
* Experimental Jena TDB-backed data source of Basic Linked Data Fragments.
*
* @author <a href="mailto:bart.hanssens@fedict.be">Bart Hanssens</a>
* @author <a href="http://olafhartig.de">Olaf Hartig</a>
*/
public class JenaTDBDataSource extends DataS... | // Path: src/main/java/org/linkeddatafragments/datasource/DataSourceBase.java
// public abstract class DataSourceBase implements IDataSource {
//
// /**
// * Get the datasource title
// */
// protected String title;
//
// /**
// * Get the datasource description
// */
// protected S... | public IFragmentRequestParser getRequestParser()
|
LinkedDataFragments/Server.Java | src/main/java/org/linkeddatafragments/datasource/tdb/JenaTDBDataSource.java | // Path: src/main/java/org/linkeddatafragments/datasource/DataSourceBase.java
// public abstract class DataSourceBase implements IDataSource {
//
// /**
// * Get the datasource title
// */
// protected String title;
//
// /**
// * Get the datasource description
// */
// protected S... | import java.io.File;
import org.linkeddatafragments.datasource.DataSourceBase;
import org.linkeddatafragments.datasource.IFragmentRequestProcessor;
import org.linkeddatafragments.fragments.IFragmentRequestParser;
import org.linkeddatafragments.fragments.tpf.TPFRequestParserForJenaBackends;
| package org.linkeddatafragments.datasource.tdb;
/**
* Experimental Jena TDB-backed data source of Basic Linked Data Fragments.
*
* @author <a href="mailto:bart.hanssens@fedict.be">Bart Hanssens</a>
* @author <a href="http://olafhartig.de">Olaf Hartig</a>
*/
public class JenaTDBDataSource extends DataS... | // Path: src/main/java/org/linkeddatafragments/datasource/DataSourceBase.java
// public abstract class DataSourceBase implements IDataSource {
//
// /**
// * Get the datasource title
// */
// protected String title;
//
// /**
// * Get the datasource description
// */
// protected S... | public IFragmentRequestProcessor getRequestProcessor()
|
LinkedDataFragments/Server.Java | src/main/java/org/linkeddatafragments/datasource/tdb/JenaTDBBasedRequestProcessorForTPFs.java | // Path: src/main/java/org/linkeddatafragments/datasource/IFragmentRequestProcessor.java
// public interface IFragmentRequestProcessor extends Closeable
// {
//
// /**
// *
// * @param request
// * @return
// * @throws IllegalArgumentException
// */
// ILinkedDataFragment createRequest... | import java.io.File;
import org.apache.jena.query.Dataset;
import org.apache.jena.query.Query;
import org.apache.jena.query.QueryExecution;
import org.apache.jena.query.QueryExecutionFactory;
import org.apache.jena.query.QueryFactory;
import org.apache.jena.query.QuerySolution;
import org.apache.jena.query.Query... | package org.linkeddatafragments.datasource.tdb;
/**
* Implementation of {@link IFragmentRequestProcessor} that processes
* {@link ITriplePatternFragmentRequest}s over data stored in Jena TDB.
*
* @author <a href="mailto:bart.hanssens@fedict.be">Bart Hanssens</a>
* @author <a href="http://olafhartig.de"... | // Path: src/main/java/org/linkeddatafragments/datasource/IFragmentRequestProcessor.java
// public interface IFragmentRequestProcessor extends Closeable
// {
//
// /**
// *
// * @param request
// * @return
// * @throws IllegalArgumentException
// */
// ILinkedDataFragment createRequest... | protected ILinkedDataFragment createFragment(
|
LinkedDataFragments/Server.Java | src/main/java/org/linkeddatafragments/views/RdfWriterImpl.java | // Path: src/main/java/org/linkeddatafragments/fragments/ILinkedDataFragment.java
// public interface ILinkedDataFragment extends Closeable
// {
// /**
// * Returns an iterator over the RDF data of this fragment (possibly only
// * partial if the data is paged, as indicated by {@link #isPageOnly()}).
// ... | import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import org.apache.jena.query.ARQ;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.riot.Lang;
i... | package org.linkeddatafragments.views;
/**
* Serializes an {@link ILinkedDataFragment} to an RDF format
*
* @author Miel Vander Sande
*/
class RdfWriterImpl extends LinkedDataFragmentWriterBase implements ILinkedDataFragmentWriter {
private final Lang contentType;
public RdfWriterImpl(Map<String, Str... | // Path: src/main/java/org/linkeddatafragments/fragments/ILinkedDataFragment.java
// public interface ILinkedDataFragment extends Closeable
// {
// /**
// * Returns an iterator over the RDF data of this fragment (possibly only
// * partial if the data is paged, as indicated by {@link #isPageOnly()}).
// ... | public void writeFragment(ServletOutputStream outputStream, IDataSource datasource, ILinkedDataFragment fragment, ILinkedDataFragmentRequest ldfRequest) throws Exception { |
LinkedDataFragments/Server.Java | src/main/java/org/linkeddatafragments/datasource/IFragmentRequestProcessor.java | // Path: src/main/java/org/linkeddatafragments/fragments/ILinkedDataFragment.java
// public interface ILinkedDataFragment extends Closeable
// {
// /**
// * Returns an iterator over the RDF data of this fragment (possibly only
// * partial if the data is paged, as indicated by {@link #isPageOnly()}).
// ... | import java.io.Closeable;
import org.linkeddatafragments.fragments.ILinkedDataFragment;
import org.linkeddatafragments.fragments.ILinkedDataFragment;
import org.linkeddatafragments.fragments.ILinkedDataFragmentRequest;
import org.linkeddatafragments.fragments.ILinkedDataFragmentRequest; | package org.linkeddatafragments.datasource;
/**
* Processes {@link ILinkedDataFragmentRequest}s and returns
* the requested {@link ILinkedDataFragment}s.
*
* @author <a href="http://olafhartig.de">Olaf Hartig</a>
*/
public interface IFragmentRequestProcessor extends Closeable
{
/**
*
* @param req... | // Path: src/main/java/org/linkeddatafragments/fragments/ILinkedDataFragment.java
// public interface ILinkedDataFragment extends Closeable
// {
// /**
// * Returns an iterator over the RDF data of this fragment (possibly only
// * partial if the data is paged, as indicated by {@link #isPageOnly()}).
// ... | ILinkedDataFragment createRequestedFragment( |
LinkedDataFragments/Server.Java | src/main/java/org/linkeddatafragments/datasource/index/IndexRequestProcessorForTPFs.java | // Path: src/main/java/org/linkeddatafragments/datasource/IFragmentRequestProcessor.java
// public interface IFragmentRequestProcessor extends Closeable
// {
//
// /**
// *
// * @param request
// * @return
// * @throws IllegalArgumentException
// */
// ILinkedDataFragment createRequest... | import java.util.HashMap;
import java.util.Map;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.Property;
import org.apache.jena.rdf.model.RDFNode;
import org.apache.jena.rdf.model.Resource;
import org.apache.jena.rdf.model.ResourceFactory;
import ... | }
/**
* Worker for the index
*/
protected class Worker
extends AbstractRequestProcessorForTriplePatterns.Worker<RDFNode,String,String>
{
/**
* Creates a Worker for the datasource index
*
* @param req
*/
public Worker(
... | // Path: src/main/java/org/linkeddatafragments/datasource/IFragmentRequestProcessor.java
// public interface IFragmentRequestProcessor extends Closeable
// {
//
// /**
// *
// * @param request
// * @return
// * @throws IllegalArgumentException
// */
// ILinkedDataFragment createRequest... | protected ILinkedDataFragment createFragment( |
LinkedDataFragments/Server.Java | src/test/java/org/linkeddatafragments/test/datasource/DataSourceTest.java | // Path: src/main/java/org/linkeddatafragments/datasource/IFragmentRequestProcessor.java
// public interface IFragmentRequestProcessor extends Closeable
// {
//
// /**
// *
// * @param request
// * @return
// * @throws IllegalArgumentException
// */
// ILinkedDataFragment createRequest... | import com.google.gson.JsonObject;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import org.junit.Assert;
import org.junit.Test;
import org.linkeddatafragments.datasource.IDataSource;
import org.linkeddatafragme... | */
public static JsonObject createConfig(String title, String desc, String type) {
JsonObject config = new JsonObject();
config.addProperty("title", title);
config.addProperty("description", desc);
config.addProperty("type", type);
return config;
}
... | // Path: src/main/java/org/linkeddatafragments/datasource/IFragmentRequestProcessor.java
// public interface IFragmentRequestProcessor extends Closeable
// {
//
// /**
// *
// * @param request
// * @return
// * @throws IllegalArgumentException
// */
// ILinkedDataFragment createRequest... | final IFragmentRequestProcessor proc = getDatasource().getRequestProcessor();
|
LinkedDataFragments/Server.Java | src/test/java/org/linkeddatafragments/test/datasource/DataSourceTest.java | // Path: src/main/java/org/linkeddatafragments/datasource/IFragmentRequestProcessor.java
// public interface IFragmentRequestProcessor extends Closeable
// {
//
// /**
// *
// * @param request
// * @return
// * @throws IllegalArgumentException
// */
// ILinkedDataFragment createRequest... | import com.google.gson.JsonObject;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import org.junit.Assert;
import org.junit.Test;
import org.linkeddatafragments.datasource.IDataSource;
import org.linkeddatafragme... | public static JsonObject createConfig(String title, String desc, String type) {
JsonObject config = new JsonObject();
config.addProperty("title", title);
config.addProperty("description", desc);
config.addProperty("type", type);
return config;
}
/**
... | // Path: src/main/java/org/linkeddatafragments/datasource/IFragmentRequestProcessor.java
// public interface IFragmentRequestProcessor extends Closeable
// {
//
// /**
// *
// * @param request
// * @return
// * @throws IllegalArgumentException
// */
// ILinkedDataFragment createRequest... | final ILinkedDataFragment ldf = proc.createRequestedFragment( request );
|
LinkedDataFragments/Server.Java | src/test/java/org/linkeddatafragments/test/datasource/DataSourceTest.java | // Path: src/main/java/org/linkeddatafragments/datasource/IFragmentRequestProcessor.java
// public interface IFragmentRequestProcessor extends Closeable
// {
//
// /**
// *
// * @param request
// * @return
// * @throws IllegalArgumentException
// */
// ILinkedDataFragment createRequest... | import com.google.gson.JsonObject;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import org.junit.Assert;
import org.junit.Test;
import org.linkeddatafragments.datasource.IDataSource;
import org.linkeddatafragme... | JsonObject config = new JsonObject();
config.addProperty("title", title);
config.addProperty("description", desc);
config.addProperty("type", type);
return config;
}
/**
* Test total size of empty TPF
*
*/
@Test
public void testEmpt... | // Path: src/main/java/org/linkeddatafragments/datasource/IFragmentRequestProcessor.java
// public interface IFragmentRequestProcessor extends Closeable
// {
//
// /**
// *
// * @param request
// * @return
// * @throws IllegalArgumentException
// */
// ILinkedDataFragment createRequest... | final ITriplePatternFragment tpf = (ITriplePatternFragment) ldf;
|
LinkedDataFragments/Server.Java | src/main/java/org/linkeddatafragments/datasource/sparql/SparqlDataSource.java | // Path: src/main/java/org/linkeddatafragments/datasource/DataSourceBase.java
// public abstract class DataSourceBase implements IDataSource {
//
// /**
// * Get the datasource title
// */
// protected String title;
//
// /**
// * Get the datasource description
// */
// protected S... | import java.io.File;
import java.net.URI;
import org.linkeddatafragments.datasource.DataSourceBase;
import org.linkeddatafragments.datasource.IFragmentRequestProcessor;
import org.linkeddatafragments.fragments.IFragmentRequestParser;
import org.linkeddatafragments.fragments.tpf.TPFRequestParserForJenaBackends;
| package org.linkeddatafragments.datasource.sparql;
/**
* Experimental SPARQL-endpoint-backed data source of Basic Linked Data Fragments.
*
* @author <a href="mailto:bart.hanssens@fedict.be">Bart Hanssens</a>
* @author <a href="http://olafhartig.de">Olaf Hartig</a>
* @author <a href="https://awoods.io">... | // Path: src/main/java/org/linkeddatafragments/datasource/DataSourceBase.java
// public abstract class DataSourceBase implements IDataSource {
//
// /**
// * Get the datasource title
// */
// protected String title;
//
// /**
// * Get the datasource description
// */
// protected S... | public IFragmentRequestParser getRequestParser()
|
LinkedDataFragments/Server.Java | src/main/java/org/linkeddatafragments/datasource/sparql/SparqlDataSource.java | // Path: src/main/java/org/linkeddatafragments/datasource/DataSourceBase.java
// public abstract class DataSourceBase implements IDataSource {
//
// /**
// * Get the datasource title
// */
// protected String title;
//
// /**
// * Get the datasource description
// */
// protected S... | import java.io.File;
import java.net.URI;
import org.linkeddatafragments.datasource.DataSourceBase;
import org.linkeddatafragments.datasource.IFragmentRequestProcessor;
import org.linkeddatafragments.fragments.IFragmentRequestParser;
import org.linkeddatafragments.fragments.tpf.TPFRequestParserForJenaBackends;
| package org.linkeddatafragments.datasource.sparql;
/**
* Experimental SPARQL-endpoint-backed data source of Basic Linked Data Fragments.
*
* @author <a href="mailto:bart.hanssens@fedict.be">Bart Hanssens</a>
* @author <a href="http://olafhartig.de">Olaf Hartig</a>
* @author <a href="https://awoods.io">... | // Path: src/main/java/org/linkeddatafragments/datasource/DataSourceBase.java
// public abstract class DataSourceBase implements IDataSource {
//
// /**
// * Get the datasource title
// */
// protected String title;
//
// /**
// * Get the datasource description
// */
// protected S... | public IFragmentRequestProcessor getRequestProcessor()
|
luoyuan800/IPMIUtil4J | src/test/util/ReadFileAsInput.java | // Path: src/main/java/command/OutputResult.java
// public class OutputResult extends LinkedList<String>{
// /**
// *
// */
// private static final long serialVersionUID = 10L;
//
// @Override
// public String toString(){
// StringBuilder sb= new StringBuilder();
// for(String s : this){
// sb.append(s... | import command.OutputResult;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader; | package util;/*
* util.ReadFileAsInput.java
* Date: 7/15/2015
* Time: 12:24 PM
*
* Copyright 2015 luoyuan.
* ALL RIGHTS RESERVED.
*/
public class ReadFileAsInput { | // Path: src/main/java/command/OutputResult.java
// public class OutputResult extends LinkedList<String>{
// /**
// *
// */
// private static final long serialVersionUID = 10L;
//
// @Override
// public String toString(){
// StringBuilder sb= new StringBuilder();
// for(String s : this){
// sb.append(s... | public static OutputResult readFile(String path) throws IOException { |
luoyuan800/IPMIUtil4J | src/test/request/testFru.java | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | import client.LocalIPMIClient;
import command.Command;
import model.ComponentFru;
import org.junit.Assert;
import org.junit.Test;
import param.Platform;
import respond.FruRespond;
import java.io.IOException;
import static org.mockito.Matchers.contains;
import static org.mockito.Mockito.mock;
import static org.mockito.M... | /*
* testFru.java
* Date: 7/14/2015
* Time: 5:24 PM
*
* Copyright 2015 luoyuan.
* ALL RIGHTS RESERVED.
*/
package request;
public class TestFru {
@Test
public void testFruRequest() throws IOException { | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | Command command = mock(Command.class); |
luoyuan800/IPMIUtil4J | src/test/request/testFru.java | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | import client.LocalIPMIClient;
import command.Command;
import model.ComponentFru;
import org.junit.Assert;
import org.junit.Test;
import param.Platform;
import respond.FruRespond;
import java.io.IOException;
import static org.mockito.Matchers.contains;
import static org.mockito.Mockito.mock;
import static org.mockito.M... | /*
* testFru.java
* Date: 7/14/2015
* Time: 5:24 PM
*
* Copyright 2015 luoyuan.
* ALL RIGHTS RESERVED.
*/
package request;
public class TestFru {
@Test
public void testFruRequest() throws IOException {
Command command = mock(Command.class);
when(command.exeCmd(contains("ipmiutil fru... | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | LocalIPMIClient client = new LocalIPMIClient(Platform.Win64); |
luoyuan800/IPMIUtil4J | src/test/request/testFru.java | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | import client.LocalIPMIClient;
import command.Command;
import model.ComponentFru;
import org.junit.Assert;
import org.junit.Test;
import param.Platform;
import respond.FruRespond;
import java.io.IOException;
import static org.mockito.Matchers.contains;
import static org.mockito.Mockito.mock;
import static org.mockito.M... | /*
* testFru.java
* Date: 7/14/2015
* Time: 5:24 PM
*
* Copyright 2015 luoyuan.
* ALL RIGHTS RESERVED.
*/
package request;
public class TestFru {
@Test
public void testFruRequest() throws IOException {
Command command = mock(Command.class);
when(command.exeCmd(contains("ipmiutil fru... | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | LocalIPMIClient client = new LocalIPMIClient(Platform.Win64); |
luoyuan800/IPMIUtil4J | src/test/request/testFru.java | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | import client.LocalIPMIClient;
import command.Command;
import model.ComponentFru;
import org.junit.Assert;
import org.junit.Test;
import param.Platform;
import respond.FruRespond;
import java.io.IOException;
import static org.mockito.Matchers.contains;
import static org.mockito.Mockito.mock;
import static org.mockito.M... | /*
* testFru.java
* Date: 7/14/2015
* Time: 5:24 PM
*
* Copyright 2015 luoyuan.
* ALL RIGHTS RESERVED.
*/
package request;
public class TestFru {
@Test
public void testFruRequest() throws IOException {
Command command = mock(Command.class);
when(command.exeCmd(contains("ipmiutil fru... | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | FruRespond respond = request.sendTo(client); |
luoyuan800/IPMIUtil4J | src/test/request/testFru.java | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | import client.LocalIPMIClient;
import command.Command;
import model.ComponentFru;
import org.junit.Assert;
import org.junit.Test;
import param.Platform;
import respond.FruRespond;
import java.io.IOException;
import static org.mockito.Matchers.contains;
import static org.mockito.Mockito.mock;
import static org.mockito.M... | /*
* testFru.java
* Date: 7/14/2015
* Time: 5:24 PM
*
* Copyright 2015 luoyuan.
* ALL RIGHTS RESERVED.
*/
package request;
public class TestFru {
@Test
public void testFruRequest() throws IOException {
Command command = mock(Command.class);
when(command.exeCmd(contains("ipmiutil fru... | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | Assert.assertSame(respond.getFrus(ComponentFru.class).size(), 3); |
luoyuan800/IPMIUtil4J | src/test/request/TestSensor.java | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | import client.LocalIPMIClient;
import command.Command;
import org.junit.Assert;
import org.junit.Test;
import param.Platform;
import respond.SensorRespond;
import java.io.IOException;
import static org.mockito.Matchers.contains;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import stat... | /*
* TestSensor.java
* Date: 7/15/2015
* Time: 12:22 PM
*
* Copyright 2015 luoyuan.
* ALL RIGHTS RESERVED.
*/
package request;
public class TestSensor {
@Test
public void testSensor() throws IOException { | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | Command command = mock(Command.class); |
luoyuan800/IPMIUtil4J | src/test/request/TestSensor.java | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | import client.LocalIPMIClient;
import command.Command;
import org.junit.Assert;
import org.junit.Test;
import param.Platform;
import respond.SensorRespond;
import java.io.IOException;
import static org.mockito.Matchers.contains;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import stat... | /*
* TestSensor.java
* Date: 7/15/2015
* Time: 12:22 PM
*
* Copyright 2015 luoyuan.
* ALL RIGHTS RESERVED.
*/
package request;
public class TestSensor {
@Test
public void testSensor() throws IOException {
Command command = mock(Command.class);
when(command.exeCmd(contains("ipmiutil s... | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | LocalIPMIClient client = new LocalIPMIClient(Platform.Win64); |
luoyuan800/IPMIUtil4J | src/test/request/TestSensor.java | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | import client.LocalIPMIClient;
import command.Command;
import org.junit.Assert;
import org.junit.Test;
import param.Platform;
import respond.SensorRespond;
import java.io.IOException;
import static org.mockito.Matchers.contains;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import stat... | /*
* TestSensor.java
* Date: 7/15/2015
* Time: 12:22 PM
*
* Copyright 2015 luoyuan.
* ALL RIGHTS RESERVED.
*/
package request;
public class TestSensor {
@Test
public void testSensor() throws IOException {
Command command = mock(Command.class);
when(command.exeCmd(contains("ipmiutil s... | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | LocalIPMIClient client = new LocalIPMIClient(Platform.Win64); |
luoyuan800/IPMIUtil4J | src/test/request/TestSensor.java | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | import client.LocalIPMIClient;
import command.Command;
import org.junit.Assert;
import org.junit.Test;
import param.Platform;
import respond.SensorRespond;
import java.io.IOException;
import static org.mockito.Matchers.contains;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import stat... | /*
* TestSensor.java
* Date: 7/15/2015
* Time: 12:22 PM
*
* Copyright 2015 luoyuan.
* ALL RIGHTS RESERVED.
*/
package request;
public class TestSensor {
@Test
public void testSensor() throws IOException {
Command command = mock(Command.class);
when(command.exeCmd(contains("ipmiutil s... | // Path: src/main/java/client/LocalIPMIClient.java
// public class LocalIPMIClient extends IPMIClient {
//
// public LocalIPMIClient(Platform platform) {
// super("127.0.0.1","", "", null, platform);
// }
//
// }
//
// Path: src/main/java/command/Command.java
// public class Command {
// public OutputResult exe... | SensorRespond respond = request.sendTo(client); |
luoyuan800/IPMIUtil4J | src/main/java/model/Sensor.java | // Path: src/main/java/param/SDRType.java
// public enum SDRType {
// Full, Comp, FRU, IPMB, OEM;
// }
| import param.SDRType; | /*
* Sensor.java
* Date: 7/15/2015
* Time: 10:53 AM
*
* Copyright 2015 luoyuan.
* ALL RIGHTS RESERVED.
*/
package model;
public class Sensor {
private String description;
private Double reading;
private String unit; | // Path: src/main/java/param/SDRType.java
// public enum SDRType {
// Full, Comp, FRU, IPMB, OEM;
// }
// Path: src/main/java/model/Sensor.java
import param.SDRType;
/*
* Sensor.java
* Date: 7/15/2015
* Time: 10:53 AM
*
* Copyright 2015 luoyuan.
* ALL RIGHTS RESERVED.
*/
package model;
public class Sen... | private SDRType type; |
junkdog/ecs-matrix | matrix/src/main/java/net/onedaybeard/ecs/util/MatrixStringUtil.java | // Path: matrix/src/main/java/net/onedaybeard/ecs/model/RowTypeMapping.java
// public final class RowTypeMapping {
//
// public static enum EcsRowType {
// PACKAGE_NAME(null),
// SYSTEM("gear"),
// MANAGER("gears"),
// FACTORY("user-plus"),
// POJO("coffee"); // not used, yet
//
// public final String sy... | import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.objectweb.asm.Type;
import net.onedaybeard.ecs.model.RowTypeMapping; | package net.onedaybeard.ecs.util;
public final class MatrixStringUtil {
private MatrixStringUtil() {}
| // Path: matrix/src/main/java/net/onedaybeard/ecs/model/RowTypeMapping.java
// public final class RowTypeMapping {
//
// public static enum EcsRowType {
// PACKAGE_NAME(null),
// SYSTEM("gear"),
// MANAGER("gears"),
// FACTORY("user-plus"),
// POJO("coffee"); // not used, yet
//
// public final String sy... | public static String findLongestClassName(Map<String, List<RowTypeMapping>> mappings) { |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/manager/SomeManager.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/factory/FactoryA.java
// @Bind({Position.class, Velocity.class})
// public interface FactoryA extends EntityFactory<FactoryA> {
// @Bind(ExtPosition.class) FactoryA extPos();
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/system/SomeSystem.java
// public cl... | import com.artemis.Manager;
import net.onedaybeard.ecs.factory.FactoryA;
import net.onedaybeard.ecs.system.SomeSystem; | package net.onedaybeard.ecs.manager;
public class SomeManager extends Manager {
private FactoryA factory; | // Path: matrix/src/test/java/net/onedaybeard/ecs/factory/FactoryA.java
// @Bind({Position.class, Velocity.class})
// public interface FactoryA extends EntityFactory<FactoryA> {
// @Bind(ExtPosition.class) FactoryA extPos();
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/system/SomeSystem.java
// public cl... | private SomeSystem someSystem; |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/system/AnotherSystem.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
| import com.artemis.Aspect;
import com.artemis.Entity;
import com.artemis.annotations.Wire;
import net.onedaybeard.ecs.component.Position;
import net.onedaybeard.ecs.component.Velocity;
import com.artemis.systems.EntityProcessingSystem; | package net.onedaybeard.ecs.system;
@Wire
public class AnotherSystem extends EntityProcessingSystem {
private ExtSomeSystem someSystem;
public AnotherSystem() { | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
// Path: matrix/src/test/java/net/onedaybeard/ecs/system/AnotherSy... | super(Aspect.getAspectForAll(Position.class).one( Velocity.class)); |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/system/AnotherSystem.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
| import com.artemis.Aspect;
import com.artemis.Entity;
import com.artemis.annotations.Wire;
import net.onedaybeard.ecs.component.Position;
import net.onedaybeard.ecs.component.Velocity;
import com.artemis.systems.EntityProcessingSystem; | package net.onedaybeard.ecs.system;
@Wire
public class AnotherSystem extends EntityProcessingSystem {
private ExtSomeSystem someSystem;
public AnotherSystem() { | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
// Path: matrix/src/test/java/net/onedaybeard/ecs/system/AnotherSy... | super(Aspect.getAspectForAll(Position.class).one( Velocity.class)); |
junkdog/ecs-matrix | matrix-cli/src/main/java/com/artemis/cli/MatrixCommand.java | // Path: matrix-cli/src/main/java/com/artemis/cli/converter/FileOutputConverter.java
// public class FileOutputConverter implements IStringConverter<File> {
//
// @Override
// public File convert(String value) {
// File file = new File(value);
// if (file.isDirectory())
// file = new File(file, "matrix.html")... | import java.io.File;
import java.util.Arrays;
import com.artemis.cli.converter.FileOutputConverter;
import com.artemis.cli.converter.FolderConverter;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
import net.onedaybeard.ecs.model.ComponentDependencyMatrix; | package com.artemis.cli;
@Parameters(
commandDescription="Generate the Component Dependency Matrix from existing classes")
public class MatrixCommand {
static final String COMMAND = "matrix";
@Parameter(
names = {"-h", "--help"},
description= "Displays this help message.",
help = true)
boolean help;
@P... | // Path: matrix-cli/src/main/java/com/artemis/cli/converter/FileOutputConverter.java
// public class FileOutputConverter implements IStringConverter<File> {
//
// @Override
// public File convert(String value) {
// File file = new File(value);
// if (file.isDirectory())
// file = new File(file, "matrix.html")... | converter = FolderConverter.class, |
junkdog/ecs-matrix | matrix-cli/src/main/java/com/artemis/cli/MatrixCommand.java | // Path: matrix-cli/src/main/java/com/artemis/cli/converter/FileOutputConverter.java
// public class FileOutputConverter implements IStringConverter<File> {
//
// @Override
// public File convert(String value) {
// File file = new File(value);
// if (file.isDirectory())
// file = new File(file, "matrix.html")... | import java.io.File;
import java.util.Arrays;
import com.artemis.cli.converter.FileOutputConverter;
import com.artemis.cli.converter.FolderConverter;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
import net.onedaybeard.ecs.model.ComponentDependencyMatrix; | package com.artemis.cli;
@Parameters(
commandDescription="Generate the Component Dependency Matrix from existing classes")
public class MatrixCommand {
static final String COMMAND = "matrix";
@Parameter(
names = {"-h", "--help"},
description= "Displays this help message.",
help = true)
boolean help;
@P... | // Path: matrix-cli/src/main/java/com/artemis/cli/converter/FileOutputConverter.java
// public class FileOutputConverter implements IStringConverter<File> {
//
// @Override
// public File convert(String value) {
// File file = new File(value);
// if (file.isDirectory())
// file = new File(file, "matrix.html")... | converter = FileOutputConverter.class, |
junkdog/ecs-matrix | matrix-cli/src/main/java/com/artemis/cli/MatrixCommand.java | // Path: matrix-cli/src/main/java/com/artemis/cli/converter/FileOutputConverter.java
// public class FileOutputConverter implements IStringConverter<File> {
//
// @Override
// public File convert(String value) {
// File file = new File(value);
// if (file.isDirectory())
// file = new File(file, "matrix.html")... | import java.io.File;
import java.util.Arrays;
import com.artemis.cli.converter.FileOutputConverter;
import com.artemis.cli.converter.FolderConverter;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
import net.onedaybeard.ecs.model.ComponentDependencyMatrix; | package com.artemis.cli;
@Parameters(
commandDescription="Generate the Component Dependency Matrix from existing classes")
public class MatrixCommand {
static final String COMMAND = "matrix";
@Parameter(
names = {"-h", "--help"},
description= "Displays this help message.",
help = true)
boolean help;
@P... | // Path: matrix-cli/src/main/java/com/artemis/cli/converter/FileOutputConverter.java
// public class FileOutputConverter implements IStringConverter<File> {
//
// @Override
// public File convert(String value) {
// File file = new File(value);
// if (file.isDirectory())
// file = new File(file, "matrix.html")... | ComponentDependencyMatrix cdm = |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/system/SomeSystem.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/manager/SomeManager.java
// public class SomeManager extends Manager {
// private FactoryA factory;
// private SomeSystem someSystem;
// }
| import com.artemis.Aspect;
import com.artemis.Entity;
import net.onedaybeard.ecs.component.ExtPosition;
import net.onedaybeard.ecs.component.Position;
import net.onedaybeard.ecs.manager.SomeManager;
import com.artemis.systems.EntityProcessingSystem; | package net.onedaybeard.ecs.system;
public class SomeSystem extends EntityProcessingSystem {
private SomeManager someManager;
private AnotherSystem anotherSystem;
public SomeSystem() { | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/manager/SomeManager.java
// public class SomeManager extends Manager {
// private FactoryA factory;
// private SomeSystem someSystem;
// }
... | super(Aspect.getAspectForAll(ExtPosition.class).exclude(Position.class)); |
junkdog/ecs-matrix | matrix/src/main/java/net/onedaybeard/ecs/model/scan/ParentChainFinder.java | // Path: matrix/src/main/java/net/onedaybeard/ecs/model/scan/TypeConfiguration.java
// static Type type(Class<?> klazz) {
// return type(klazz.getName());
// }
| import static net.onedaybeard.ecs.model.scan.TypeConfiguration.type;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type; | package net.onedaybeard.ecs.model.scan;
/**
* Builds relationship pairs of parent-child classes - different children may overwrite
* the previous parent, but it's sufficient to detect if it's an ECS class or not.
*/
public class ParentChainFinder extends ClassVisitor {
private Map<Type,Set<Type>> parentChildre... | // Path: matrix/src/main/java/net/onedaybeard/ecs/model/scan/TypeConfiguration.java
// static Type type(Class<?> klazz) {
// return type(klazz.getName());
// }
// Path: matrix/src/main/java/net/onedaybeard/ecs/model/scan/ParentChainFinder.java
import static net.onedaybeard.ecs.model.scan.TypeConfiguration.type;
impo... | Type visited = type(name); |
junkdog/ecs-matrix | matrix/src/main/java/net/onedaybeard/ecs/model/ComponentDependencyMatrix.java | // Path: matrix/src/main/java/net/onedaybeard/ecs/util/MatrixStringUtil.java
// public final class MatrixStringUtil {
// private MatrixStringUtil() {}
//
// public static String findLongestClassName(Map<String, List<RowTypeMapping>> mappings) {
// return findLongestString(mappings, new LongestClassName());
// }
... | import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
import java.util.SortedMap;
import net.onedaybeard.ecs.util.MatrixStringUtil;
import org.objectweb.asm.Opcodes;
i... | process(typeInspector);
return "Found ECS framework: " + ecs;
}
}
return "Failed finding any ECS related classes.";
}
public void process() {
process("");
}
public void process(String resourcePrefix) {
process(new EcsTypeInspector(files, resourcePrefix));
}
private void process(EcsTypeInspe... | // Path: matrix/src/main/java/net/onedaybeard/ecs/util/MatrixStringUtil.java
// public final class MatrixStringUtil {
// private MatrixStringUtil() {}
//
// public static String findLongestClassName(Map<String, List<RowTypeMapping>> mappings) {
// return findLongestString(mappings, new LongestClassName());
// }
... | chunk.set("longestName", MatrixStringUtil.findLongestClassName(mappedSystems).replaceAll(".", "_") + "______"); |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/model/scan/ConfigurationResolverTest.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | import net.onedaybeard.ecs.component.ExtPosition;
import net.onedaybeard.ecs.component.Position;
import net.onedaybeard.ecs.component.Velocity;
import net.onedaybeard.ecs.factory.FactoryA;
import net.onedaybeard.ecs.manager.SomeManager;
import net.onedaybeard.ecs.model.TestHelper;
import net.onedaybeard.ecs.system.Anot... | package net.onedaybeard.ecs.model.scan;
public final class ConfigurationResolverTest {
private static ConfigurationResolver resolver;
@BeforeClass
public static void setup() { | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | resolver = new ConfigurationResolver(TestHelper.classRootPath(), ""); |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/model/scan/ConfigurationResolverTest.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | import net.onedaybeard.ecs.component.ExtPosition;
import net.onedaybeard.ecs.component.Position;
import net.onedaybeard.ecs.component.Velocity;
import net.onedaybeard.ecs.factory.FactoryA;
import net.onedaybeard.ecs.manager.SomeManager;
import net.onedaybeard.ecs.model.TestHelper;
import net.onedaybeard.ecs.system.Anot... | package net.onedaybeard.ecs.model.scan;
public final class ConfigurationResolverTest {
private static ConfigurationResolver resolver;
@BeforeClass
public static void setup() {
resolver = new ConfigurationResolver(TestHelper.classRootPath(), "");
resolver.clearDefaultTypes();
}
@Test
public void systemIn... | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | types(EmptySystem.class, ExtSomeSystem.class, SomeSystem.class, AnotherSystem.class), |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/model/scan/ConfigurationResolverTest.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | import net.onedaybeard.ecs.component.ExtPosition;
import net.onedaybeard.ecs.component.Position;
import net.onedaybeard.ecs.component.Velocity;
import net.onedaybeard.ecs.factory.FactoryA;
import net.onedaybeard.ecs.manager.SomeManager;
import net.onedaybeard.ecs.model.TestHelper;
import net.onedaybeard.ecs.system.Anot... | package net.onedaybeard.ecs.model.scan;
public final class ConfigurationResolverTest {
private static ConfigurationResolver resolver;
@BeforeClass
public static void setup() {
resolver = new ConfigurationResolver(TestHelper.classRootPath(), "");
resolver.clearDefaultTypes();
}
@Test
public void systemIn... | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | types(EmptySystem.class, ExtSomeSystem.class, SomeSystem.class, AnotherSystem.class), |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/model/scan/ConfigurationResolverTest.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | import net.onedaybeard.ecs.component.ExtPosition;
import net.onedaybeard.ecs.component.Position;
import net.onedaybeard.ecs.component.Velocity;
import net.onedaybeard.ecs.factory.FactoryA;
import net.onedaybeard.ecs.manager.SomeManager;
import net.onedaybeard.ecs.model.TestHelper;
import net.onedaybeard.ecs.system.Anot... | package net.onedaybeard.ecs.model.scan;
public final class ConfigurationResolverTest {
private static ConfigurationResolver resolver;
@BeforeClass
public static void setup() {
resolver = new ConfigurationResolver(TestHelper.classRootPath(), "");
resolver.clearDefaultTypes();
}
@Test
public void systemIn... | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | types(EmptySystem.class, ExtSomeSystem.class, SomeSystem.class, AnotherSystem.class), |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/model/scan/ConfigurationResolverTest.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | import net.onedaybeard.ecs.component.ExtPosition;
import net.onedaybeard.ecs.component.Position;
import net.onedaybeard.ecs.component.Velocity;
import net.onedaybeard.ecs.factory.FactoryA;
import net.onedaybeard.ecs.manager.SomeManager;
import net.onedaybeard.ecs.model.TestHelper;
import net.onedaybeard.ecs.system.Anot... | package net.onedaybeard.ecs.model.scan;
public final class ConfigurationResolverTest {
private static ConfigurationResolver resolver;
@BeforeClass
public static void setup() {
resolver = new ConfigurationResolver(TestHelper.classRootPath(), "");
resolver.clearDefaultTypes();
}
@Test
public void systemIn... | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | types(EmptySystem.class, ExtSomeSystem.class, SomeSystem.class, AnotherSystem.class), |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/model/scan/ConfigurationResolverTest.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | import net.onedaybeard.ecs.component.ExtPosition;
import net.onedaybeard.ecs.component.Position;
import net.onedaybeard.ecs.component.Velocity;
import net.onedaybeard.ecs.factory.FactoryA;
import net.onedaybeard.ecs.manager.SomeManager;
import net.onedaybeard.ecs.model.TestHelper;
import net.onedaybeard.ecs.system.Anot... | package net.onedaybeard.ecs.model.scan;
public final class ConfigurationResolverTest {
private static ConfigurationResolver resolver;
@BeforeClass
public static void setup() {
resolver = new ConfigurationResolver(TestHelper.classRootPath(), "");
resolver.clearDefaultTypes();
}
@Test
public void systemIn... | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | assertTypes(types(SomeManager.class), resolver.managers); |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/model/scan/ConfigurationResolverTest.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | import net.onedaybeard.ecs.component.ExtPosition;
import net.onedaybeard.ecs.component.Position;
import net.onedaybeard.ecs.component.Velocity;
import net.onedaybeard.ecs.factory.FactoryA;
import net.onedaybeard.ecs.manager.SomeManager;
import net.onedaybeard.ecs.model.TestHelper;
import net.onedaybeard.ecs.system.Anot... | package net.onedaybeard.ecs.model.scan;
public final class ConfigurationResolverTest {
private static ConfigurationResolver resolver;
@BeforeClass
public static void setup() {
resolver = new ConfigurationResolver(TestHelper.classRootPath(), "");
resolver.clearDefaultTypes();
}
@Test
public void systemIn... | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | assertTypes(types(ExtPosition.class, Position.class, Velocity.class), resolver.components); |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/model/scan/ConfigurationResolverTest.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | import net.onedaybeard.ecs.component.ExtPosition;
import net.onedaybeard.ecs.component.Position;
import net.onedaybeard.ecs.component.Velocity;
import net.onedaybeard.ecs.factory.FactoryA;
import net.onedaybeard.ecs.manager.SomeManager;
import net.onedaybeard.ecs.model.TestHelper;
import net.onedaybeard.ecs.system.Anot... | package net.onedaybeard.ecs.model.scan;
public final class ConfigurationResolverTest {
private static ConfigurationResolver resolver;
@BeforeClass
public static void setup() {
resolver = new ConfigurationResolver(TestHelper.classRootPath(), "");
resolver.clearDefaultTypes();
}
@Test
public void systemIn... | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | assertTypes(types(ExtPosition.class, Position.class, Velocity.class), resolver.components); |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/model/scan/ConfigurationResolverTest.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | import net.onedaybeard.ecs.component.ExtPosition;
import net.onedaybeard.ecs.component.Position;
import net.onedaybeard.ecs.component.Velocity;
import net.onedaybeard.ecs.factory.FactoryA;
import net.onedaybeard.ecs.manager.SomeManager;
import net.onedaybeard.ecs.model.TestHelper;
import net.onedaybeard.ecs.system.Anot... | package net.onedaybeard.ecs.model.scan;
public final class ConfigurationResolverTest {
private static ConfigurationResolver resolver;
@BeforeClass
public static void setup() {
resolver = new ConfigurationResolver(TestHelper.classRootPath(), "");
resolver.clearDefaultTypes();
}
@Test
public void systemIn... | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | assertTypes(types((FactoryA.class)), resolver.factories); |
junkdog/ecs-matrix | matrix/src/test/java/net/onedaybeard/ecs/model/scan/ConfigurationResolverTest.java | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | import net.onedaybeard.ecs.component.ExtPosition;
import net.onedaybeard.ecs.component.Position;
import net.onedaybeard.ecs.component.Velocity;
import net.onedaybeard.ecs.factory.FactoryA;
import net.onedaybeard.ecs.manager.SomeManager;
import net.onedaybeard.ecs.model.TestHelper;
import net.onedaybeard.ecs.system.Anot... | public void systemIntrospectionTest() {
assertTypes(
types(EmptySystem.class, ExtSomeSystem.class, SomeSystem.class, AnotherSystem.class),
resolver.systems);
}
@Test
public void managerIntrospectionTest() {
assertTypes(types(SomeManager.class), resolver.managers);
}
@Test
public void componentIntrosp... | // Path: matrix/src/test/java/net/onedaybeard/ecs/component/Position.java
// public class Position extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/component/Velocity.java
// public class Velocity extends Component {
// }
//
// Path: matrix/src/test/java/net/onedaybeard/ecs/factory/Factor... | expectedTypes.add(type(klazz)); |
dgraziotin/openpomo | src/it/unibz/pomodroid/CleanDatabase.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import it.unibz.pomodroid.exceptions.PomodroidException;
import it.unibz.pomodroid.models.*;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button; | /**
* This file is part of Pomodroid.
*
* Pomodroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pomodroid is ... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | throw new PomodroidException( |
dgraziotin/openpomo | src/it/unibz/pomodroid/Preferences.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import it.unibz.pomodroid.exceptions.PomodroidException;
import it.unibz.pomodroid.models.*;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.TextView; | /**
* This file is part of Pomodroid.
*
* Pomodroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pomodroid is ... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | private void checkUserInput() throws PomodroidException { |
dgraziotin/openpomo | src/it/unibz/pomodroid/models/Event.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import com.db4o.ObjectSet;
import com.db4o.query.Predicate;
import it.unibz.pomodroid.exceptions.PomodroidException;
import it.unibz.pomodroid.models.*;
import java.util.Date;
import java.util.List; | /**
* @param activity the activity to set
*/
public void setActivity(Activity activity) {
this.activity = activity;
}
/**
* @return number of pomodoro
*/
public long getAtPomodoroValue() {
return atPomodoroValue;
}
/**
* The number of pomodoro to se... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | public void save(DBHelper dbHelper) throws PomodroidException { |
dgraziotin/openpomo | src/it/unibz/pomodroid/models/DBHelper.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import android.content.Context;
import android.util.Log;
import com.db4o.Db4o;
import com.db4o.ObjectContainer;
import com.db4o.config.Configuration;
import com.db4o.defragment.Defragment;
import it.unibz.pomodroid.exceptions.PomodroidException;
import it.unibz.pomodroid.models.*;
import java.io.File; | /**
* This file is part of Pomodroid.
*
* Pomodroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pomodroid is ... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | public ObjectContainer getDatabase() throws PomodroidException { |
dgraziotin/openpomo | src/it/unibz/pomodroid/EditActivity.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import it.unibz.pomodroid.exceptions.PomodroidException;
import it.unibz.pomodroid.models.*;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.DatePicker;
import android.widget.Edi... | /**
* This file is part of Pomodroid.
*
* Pomodroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pomodroid is ... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | } catch (PomodroidException e) { |
dgraziotin/openpomo | src/it/unibz/pomodroid/ListServices.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import android.app.AlertDialog;
import android.app.ListActivity;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import java.util.ArrayList;
import java.util.List;
import it.unibz.... | setContentView(R.layout.listservices);
dbHelper = new DBHelper(this);
this.context = this;
services = new ArrayList<Service>();
this.adapter = new ServiceAdapter(this, R.layout.serviceentry, services);
setListAdapter(this.adapter);
}
/**
* Refreshes the list... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | } catch (PomodroidException e) { |
dgraziotin/openpomo | src/it/unibz/pomodroid/SharedListActivity.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import java.util.ArrayList;
import it.unibz.pomodroid.exceptions.PomodroidException;
import it.unibz.pomodroid.models.*;
import android.app.AlertDialog;
import android.app.ListActivity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Inte... | *
* @param resourceLayout
*/
public void setResourceLayout(int resourceLayout) {
this.resourceLayout = resourceLayout;
}
/**
* Default onCreate behavior is defined here
*
* @see android.app.Activity#onCreate(android.os.Bundle)
*/
@Override
public void onCr... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | } catch (PomodroidException e) { |
dgraziotin/openpomo | src/it/unibz/pomodroid/PomodoroService.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import it.unibz.pomodroid.models.*;
import it.unibz.pomodroid.exceptions.PomodroidException;
import java.util.Date;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
impor... | package it.unibz.pomodroid;
/**
* this is the service that is hooked by the main activity - File Scanner this
* will read the params and do something
*
* @author sschauhan
*/
public class PomodoroService extends android.app.Service {
/**
* How many seconds are in a minute
*/
private final s... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | } catch (PomodroidException e) { |
dgraziotin/openpomo | src/it/unibz/pomodroid/models/Service.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import java.util.List;
import android.util.Log;
import it.unibz.pomodroid.exceptions.PomodroidException;
import com.db4o.ObjectSet;
import com.db4o.query.Predicate;
import com.db4o.query.Query; | */
public String getType() {
return type;
}
/**
* Helper method for updating an existing Service
*
* @param service
*/
public void update(Service service) {
this.name = service.getName();
this.url = service.getUrl();
this.type = service.getType()... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | DBHelper dbHelper) throws PomodroidException { |
dgraziotin/openpomo | src/it/unibz/pomodroid/Pomodroid.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import android.os.Bundle;
import it.unibz.pomodroid.exceptions.PomodroidException; | /**
* This file is part of Pomodroid.
*
* Pomodroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pomodroid is ... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | } catch (PomodroidException e) { |
dgraziotin/openpomo | src/it/unibz/pomodroid/TodoTodaySheet.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.util.Log;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.u... | /**
* This file is part of Pomodroid.
*
* Pomodroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pomodroid is ... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | throw new PomodroidException("INFO: Activity saved."); |
dgraziotin/openpomo | src/it/unibz/pomodroid/SharedActivity.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import it.unibz.pomodroid.exceptions.PomodroidException;
import it.unibz.pomodroid.models.*;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle; | /**
* This file is part of Pomodroid.
*
* Pomodroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pomodroid is ... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | } catch (PomodroidException e) { |
dgraziotin/openpomo | src/it/unibz/pomodroid/models/User.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import android.util.Log;
import com.db4o.ObjectSet;
import it.unibz.pomodroid.exceptions.PomodroidException;
import java.util.Date; | * Every 4 pomodoro the user should do a longer break
*
* @return
*/
public boolean isFourthPomodoro() {
return (this.facedPomodoro % 4 == 0);
}
/**
* Add one pomodoro
*/
public void addPomodoro() {
this.facedPomodoro++;
}
public boolean isDisplayDo... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | public static boolean isPresent(DBHelper dbHelper) throws PomodroidException { |
dgraziotin/openpomo | src/it/unibz/pomodroid/factories/ActivityFactory.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import java.util.Date;
import java.util.HashMap;
import java.util.Vector;
import it.unibz.pomodroid.exceptions.PomodroidException;
import it.unibz.pomodroid.models.*; | /**
* This file is part of Pomodroid.
*
* Pomodroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pomodroid is ... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | DBHelper dbHelper) throws PomodroidException { |
dgraziotin/openpomo | src/it/unibz/pomodroid/TrashSheet.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import java.util.ArrayList;
import java.util.List;
import it.unibz.pomodroid.exceptions.PomodroidException;
import it.unibz.pomodroid.models.*;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.Menu; | /**
* This file is part of Pomodroid.
*
* Pomodroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pomodroid is ... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | protected void retrieveActivities() throws PomodroidException { |
dgraziotin/openpomo | src/it/unibz/pomodroid/Statistics.java | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | import android.os.Bundle;
import android.widget.TextView;
import it.unibz.pomodroid.exceptions.PomodroidException;
import it.unibz.pomodroid.models.*; | /**
* This file is part of Pomodroid.
*
* Pomodroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pomodroid is ... | // Path: src/it/unibz/pomodroid/exceptions/PomodroidException.java
// public class PomodroidException extends Exception {
//
// /**
// * Required by the compiler
// */
// private static final long serialVersionUID = 1L;
// /**
// * A Custom title for an Exception when displayed to User
// ... | } catch (PomodroidException e) { |
MrBW/resilient-transport-service | booking-service/src/main/java/de/codecentric/resilient/booking/BookingServiceApplication.java | // Path: service-library/src/main/java/de/codecentric/resilient/configuration/DefautConfiguration.java
// @Configuration
// public class DefautConfiguration {
//
// private static final Logger LOGGER = LoggerFactory.getLogger(DefautConfiguration.class);
//
// @RefreshScope
// @Bean
// public AbstractC... | import de.codecentric.resilient.configuration.DefautConfiguration;
import de.mrbw.chaos.monkey.EnableChaosMonkey;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.spri... | package de.codecentric.resilient.booking;
/**
* Connote Service
*
* @author Benjamin Wilms
*/
@EnableChaosMonkey
@EnableDiscoveryClient
@EnableAutoConfiguration
@RefreshScope
@SpringBootApplication
@EnableCircuitBreaker | // Path: service-library/src/main/java/de/codecentric/resilient/configuration/DefautConfiguration.java
// @Configuration
// public class DefautConfiguration {
//
// private static final Logger LOGGER = LoggerFactory.getLogger(DefautConfiguration.class);
//
// @RefreshScope
// @Bean
// public AbstractC... | @Import(DefautConfiguration.class) |
MrBW/resilient-transport-service | address-service/src/main/java/de/codecentric/resilient/address/service/AddressService.java | // Path: address-service/src/main/java/de/codecentric/resilient/address/repository/AddressRepository.java
// public interface AddressRepository extends CrudRepository<Address, Long>, QueryByExampleExecutor<Address> {
//
// }
//
// Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.jav... | import static org.springframework.data.domain.ExampleMatcher.GenericPropertyMatchers.contains;
import static org.springframework.data.domain.ExampleMatcher.GenericPropertyMatchers.startsWith;
import de.codecentric.resilient.address.repository.AddressRepository;
import org.springframework.beans.factory.annotation.Autowi... | package de.codecentric.resilient.address.service;
/**
* @author Benjamin Wilms (xd98870)
*/
@Service
public class AddressService {
| // Path: address-service/src/main/java/de/codecentric/resilient/address/repository/AddressRepository.java
// public interface AddressRepository extends CrudRepository<Address, Long>, QueryByExampleExecutor<Address> {
//
// }
//
// Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.jav... | private final AddressRepository addressRepository; |
MrBW/resilient-transport-service | address-service/src/main/java/de/codecentric/resilient/address/service/AddressService.java | // Path: address-service/src/main/java/de/codecentric/resilient/address/repository/AddressRepository.java
// public interface AddressRepository extends CrudRepository<Address, Long>, QueryByExampleExecutor<Address> {
//
// }
//
// Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.jav... | import static org.springframework.data.domain.ExampleMatcher.GenericPropertyMatchers.contains;
import static org.springframework.data.domain.ExampleMatcher.GenericPropertyMatchers.startsWith;
import de.codecentric.resilient.address.repository.AddressRepository;
import org.springframework.beans.factory.annotation.Autowi... | package de.codecentric.resilient.address.service;
/**
* @author Benjamin Wilms (xd98870)
*/
@Service
public class AddressService {
private final AddressRepository addressRepository;
@Autowired
public AddressService(AddressRepository addressRepository) {
this.addressRepository = addressReposit... | // Path: address-service/src/main/java/de/codecentric/resilient/address/repository/AddressRepository.java
// public interface AddressRepository extends CrudRepository<Address, Long>, QueryByExampleExecutor<Address> {
//
// }
//
// Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.jav... | public Address validateAddress(AddressDTO addressDTO) { |
MrBW/resilient-transport-service | address-service/src/main/java/de/codecentric/resilient/address/service/AddressService.java | // Path: address-service/src/main/java/de/codecentric/resilient/address/repository/AddressRepository.java
// public interface AddressRepository extends CrudRepository<Address, Long>, QueryByExampleExecutor<Address> {
//
// }
//
// Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.jav... | import static org.springframework.data.domain.ExampleMatcher.GenericPropertyMatchers.contains;
import static org.springframework.data.domain.ExampleMatcher.GenericPropertyMatchers.startsWith;
import de.codecentric.resilient.address.repository.AddressRepository;
import org.springframework.beans.factory.annotation.Autowi... | package de.codecentric.resilient.address.service;
/**
* @author Benjamin Wilms (xd98870)
*/
@Service
public class AddressService {
private final AddressRepository addressRepository;
@Autowired
public AddressService(AddressRepository addressRepository) {
this.addressRepository = addressReposit... | // Path: address-service/src/main/java/de/codecentric/resilient/address/repository/AddressRepository.java
// public interface AddressRepository extends CrudRepository<Address, Long>, QueryByExampleExecutor<Address> {
//
// }
//
// Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.jav... | public Address validateAddress(AddressDTO addressDTO) { |
MrBW/resilient-transport-service | address-service/src/main/java/de/codecentric/resilient/address/rest/AddressController.java | // Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.java
// @Entity
// public class Address {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String country;
//
// private String city;
//
// private String postcode;
//
// private String ... | import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Span;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframewor... | package de.codecentric.resilient.address.rest;
/**
* @author Benjamin Wilms
*/
@RestController
@RequestMapping("rest/address")
public class AddressController {
| // Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.java
// @Entity
// public class Address {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String country;
//
// private String city;
//
// private String postcode;
//
// private String ... | private final AddressService addressService; |
MrBW/resilient-transport-service | connote-service/src/main/java/de/codecentric/resilient/connote/service/ConnoteService.java | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | import de.codecentric.resilient.connote.entity.Connote;
import de.codecentric.resilient.connote.repository.ConnoteRepository;
import de.codecentric.resilient.connote.utils.RandomConnoteGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
impo... | package de.codecentric.resilient.connote.service;
/**
* @author Benjamin Wilms
*/
@Service
public class ConnoteService {
private static final Logger LOGGER = LoggerFactory.getLogger(ConnoteService.class);
| // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | private ConnoteRepository connoteRepository; |
MrBW/resilient-transport-service | connote-service/src/main/java/de/codecentric/resilient/connote/service/ConnoteService.java | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | import de.codecentric.resilient.connote.entity.Connote;
import de.codecentric.resilient.connote.repository.ConnoteRepository;
import de.codecentric.resilient.connote.utils.RandomConnoteGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
impo... | package de.codecentric.resilient.connote.service;
/**
* @author Benjamin Wilms
*/
@Service
public class ConnoteService {
private static final Logger LOGGER = LoggerFactory.getLogger(ConnoteService.class);
private ConnoteRepository connoteRepository;
| // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | private final RandomConnoteGenerator connoteGenerator; |
MrBW/resilient-transport-service | connote-service/src/main/java/de/codecentric/resilient/connote/service/ConnoteService.java | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | import de.codecentric.resilient.connote.entity.Connote;
import de.codecentric.resilient.connote.repository.ConnoteRepository;
import de.codecentric.resilient.connote.utils.RandomConnoteGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
impo... | package de.codecentric.resilient.connote.service;
/**
* @author Benjamin Wilms
*/
@Service
public class ConnoteService {
private static final Logger LOGGER = LoggerFactory.getLogger(ConnoteService.class);
private ConnoteRepository connoteRepository;
private final RandomConnoteGenerator connoteGenerat... | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | public ConnoteDTO createConnote() { |
MrBW/resilient-transport-service | connote-service/src/main/java/de/codecentric/resilient/connote/service/ConnoteService.java | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | import de.codecentric.resilient.connote.entity.Connote;
import de.codecentric.resilient.connote.repository.ConnoteRepository;
import de.codecentric.resilient.connote.utils.RandomConnoteGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
impo... | package de.codecentric.resilient.connote.service;
/**
* @author Benjamin Wilms
*/
@Service
public class ConnoteService {
private static final Logger LOGGER = LoggerFactory.getLogger(ConnoteService.class);
private ConnoteRepository connoteRepository;
private final RandomConnoteGenerator connoteGenerat... | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | Connote connoteSaved = createConnote(nextConnote); |
MrBW/resilient-transport-service | transport-api-gateway/src/main/java/de/codecentric/resilient/transport/api/gateway/TransportApiGatewayApplication.java | // Path: service-library/src/main/java/de/codecentric/resilient/configuration/DefautConfiguration.java
// @Configuration
// public class DefautConfiguration {
//
// private static final Logger LOGGER = LoggerFactory.getLogger(DefautConfiguration.class);
//
// @RefreshScope
// @Bean
// public AbstractC... | import de.codecentric.resilient.configuration.DefautConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntitySca... | package de.codecentric.resilient.transport.api.gateway;
/**
* Transport Api Gateway
*
* @author Benjamin Wilms
*/
@EnableDiscoveryClient
@EnableAutoConfiguration
@RefreshScope
@SpringBootApplication
@EnableCircuitBreaker
@EnableAsync | // Path: service-library/src/main/java/de/codecentric/resilient/configuration/DefautConfiguration.java
// @Configuration
// public class DefautConfiguration {
//
// private static final Logger LOGGER = LoggerFactory.getLogger(DefautConfiguration.class);
//
// @RefreshScope
// @Bean
// public AbstractC... | @Import(DefautConfiguration.class) |
MrBW/resilient-transport-service | connote-service/src/main/java/de/codecentric/resilient/connote/ConnoteServiceApplication.java | // Path: service-library/src/main/java/de/codecentric/resilient/configuration/DefautConfiguration.java
// @Configuration
// public class DefautConfiguration {
//
// private static final Logger LOGGER = LoggerFactory.getLogger(DefautConfiguration.class);
//
// @RefreshScope
// @Bean
// public AbstractC... | import de.mrbw.chaos.monkey.EnableChaosMonkey;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.spring... | package de.codecentric.resilient.connote;
/**
* Connote Service
* @author Benjamin Wilms
*/
@EnableChaosMonkey
@EnableDiscoveryClient
@EnableAutoConfiguration
@RefreshScope
@SpringBootApplication | // Path: service-library/src/main/java/de/codecentric/resilient/configuration/DefautConfiguration.java
// @Configuration
// public class DefautConfiguration {
//
// private static final Logger LOGGER = LoggerFactory.getLogger(DefautConfiguration.class);
//
// @RefreshScope
// @Bean
// public AbstractC... | @Import(DefautConfiguration.class) |
MrBW/resilient-transport-service | connote-service/src/main/java/de/codecentric/resilient/connote/rest/ConnoteController.java | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/service/ConnoteService.java
// @Service
// public class ConnoteService {
//
// private static final Logger LOGGER = LoggerFactory.getLogger(ConnoteService.class);
//
// private ConnoteRepository connoteRepository;
//
// private final... | import javax.servlet.http.HttpServletRequest;
import de.codecentric.resilient.connote.service.ConnoteService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Span;
import org.springframework.cloud.sleuth.Trac... | package de.codecentric.resilient.connote.rest;
/**
* @author Benjamin Wilms
*/
@RestController
@RequestMapping("rest/connote")
public class ConnoteController {
private static final Logger LOGGER = LoggerFactory.getLogger(ConnoteController.class);
| // Path: connote-service/src/main/java/de/codecentric/resilient/connote/service/ConnoteService.java
// @Service
// public class ConnoteService {
//
// private static final Logger LOGGER = LoggerFactory.getLogger(ConnoteService.class);
//
// private ConnoteRepository connoteRepository;
//
// private final... | private ConnoteService connoteService; |
MrBW/resilient-transport-service | connote-service/src/main/java/de/codecentric/resilient/connote/rest/ConnoteController.java | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/service/ConnoteService.java
// @Service
// public class ConnoteService {
//
// private static final Logger LOGGER = LoggerFactory.getLogger(ConnoteService.class);
//
// private ConnoteRepository connoteRepository;
//
// private final... | import javax.servlet.http.HttpServletRequest;
import de.codecentric.resilient.connote.service.ConnoteService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Span;
import org.springframework.cloud.sleuth.Trac... | package de.codecentric.resilient.connote.rest;
/**
* @author Benjamin Wilms
*/
@RestController
@RequestMapping("rest/connote")
public class ConnoteController {
private static final Logger LOGGER = LoggerFactory.getLogger(ConnoteController.class);
private ConnoteService connoteService;
private final ... | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/service/ConnoteService.java
// @Service
// public class ConnoteService {
//
// private static final Logger LOGGER = LoggerFactory.getLogger(ConnoteService.class);
//
// private ConnoteRepository connoteRepository;
//
// private final... | public ConnoteDTO createDefault(HttpServletRequest request) { |
MrBW/resilient-transport-service | address-service/src/main/java/de/codecentric/resilient/address/AddressServiceApplication.java | // Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.java
// @Entity
// public class Address {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String country;
//
// private String city;
//
// private String postcode;
//
// private String ... | import de.mrbw.chaos.monkey.EnableChaosMonkey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigu... | package de.codecentric.resilient.address;
/**
* @author Benjamin Wilms
*/
@EnableChaosMonkey
@EnableDiscoveryClient
@EnableAutoConfiguration
@RefreshScope
@SpringBootApplication | // Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.java
// @Entity
// public class Address {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String country;
//
// private String city;
//
// private String postcode;
//
// private String ... | @Import(DefautConfiguration.class) |
MrBW/resilient-transport-service | address-service/src/main/java/de/codecentric/resilient/address/AddressServiceApplication.java | // Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.java
// @Entity
// public class Address {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String country;
//
// private String city;
//
// private String postcode;
//
// private String ... | import de.mrbw.chaos.monkey.EnableChaosMonkey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigu... | package de.codecentric.resilient.address;
/**
* @author Benjamin Wilms
*/
@EnableChaosMonkey
@EnableDiscoveryClient
@EnableAutoConfiguration
@RefreshScope
@SpringBootApplication
@Import(DefautConfiguration.class)
@EntityScan(basePackageClasses = {AddressServiceApplication.class, Jsr310JpaConverters.class})
public c... | // Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.java
// @Entity
// public class Address {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String country;
//
// private String city;
//
// private String postcode;
//
// private String ... | public CommandLineRunner demo(AddressRepository repository) { |
MrBW/resilient-transport-service | address-service/src/main/java/de/codecentric/resilient/address/AddressServiceApplication.java | // Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.java
// @Entity
// public class Address {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String country;
//
// private String city;
//
// private String postcode;
//
// private String ... | import de.mrbw.chaos.monkey.EnableChaosMonkey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigu... | package de.codecentric.resilient.address;
/**
* @author Benjamin Wilms
*/
@EnableChaosMonkey
@EnableDiscoveryClient
@EnableAutoConfiguration
@RefreshScope
@SpringBootApplication
@Import(DefautConfiguration.class)
@EntityScan(basePackageClasses = {AddressServiceApplication.class, Jsr310JpaConverters.class})
public c... | // Path: address-service/src/main/java/de/codecentric/resilient/address/entity/Address.java
// @Entity
// public class Address {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String country;
//
// private String city;
//
// private String postcode;
//
// private String ... | repository.save(new Address("DE", "Solingen", "42697", "Hochstrasse", "11")); |
MrBW/resilient-transport-service | booking-service/src/test/java/de/codecentric/resilient/booking/rest/BookingControllerTest.java | // Path: booking-service/src/main/java/de/codecentric/resilient/booking/service/BookingService.java
// @Service
// public class BookingService {
//
// private static final Logger LOGGER = LoggerFactory.getLogger(BookingService.class);
//
// private final BookingRepository bookingRepository;
//
// private... | import static org.mockito.Mockito.when;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import de.codecentric.resilient.booking.service.BookingService;
import de.codecentric.resilient.dto.*;
i... | package de.codecentric.resilient.booking.rest;
/**
* @author Benjamin Wilms (xd98870)
*/
@RunWith(MockitoJUnitRunner.class)
public class BookingControllerTest {
@Test
public void create1() throws Exception {
}
private MockMvc mockMvc;
@Mock | // Path: booking-service/src/main/java/de/codecentric/resilient/booking/service/BookingService.java
// @Service
// public class BookingService {
//
// private static final Logger LOGGER = LoggerFactory.getLogger(BookingService.class);
//
// private final BookingRepository bookingRepository;
//
// private... | private BookingService bookingServiceMock; |
MrBW/resilient-transport-service | customer-service/src/main/java/de/codecentric/resilient/customer/rest/CustomerController.java | // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Span;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframewor... | package de.codecentric.resilient.customer.rest;
/**
* @author Benjamin Wilms
*/
@RestController
@RequestMapping("rest/customer")
public class CustomerController {
| // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | private final CustomerService customerService; |
MrBW/resilient-transport-service | customer-service/src/main/java/de/codecentric/resilient/customer/rest/CustomerController.java | // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Span;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframewor... | package de.codecentric.resilient.customer.rest;
/**
* @author Benjamin Wilms
*/
@RestController
@RequestMapping("rest/customer")
public class CustomerController {
private final CustomerService customerService;
private final Tracer tracer;
@Autowired
public CustomerController(CustomerService custo... | // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | public ResponseEntity<CustomerDTO> searchById(@RequestParam("customerId") Long customerId, HttpServletRequest request) { |
MrBW/resilient-transport-service | customer-service/src/main/java/de/codecentric/resilient/customer/rest/CustomerController.java | // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Span;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframewor... | package de.codecentric.resilient.customer.rest;
/**
* @author Benjamin Wilms
*/
@RestController
@RequestMapping("rest/customer")
public class CustomerController {
private final CustomerService customerService;
private final Tracer tracer;
@Autowired
public CustomerController(CustomerService custo... | // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | Customer customer; |
MrBW/resilient-transport-service | customer-service/src/main/java/de/codecentric/resilient/customer/rest/CustomerController.java | // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Span;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframewor... | package de.codecentric.resilient.customer.rest;
/**
* @author Benjamin Wilms
*/
@RestController
@RequestMapping("rest/customer")
public class CustomerController {
private final CustomerService customerService;
private final Tracer tracer;
@Autowired
public CustomerController(CustomerService custo... | // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | } catch (CustomerNotFoundException e) { |
MrBW/resilient-transport-service | customer-service/src/main/java/de/codecentric/resilient/customer/service/CustomerService.java | // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | import org.springframework.beans.factory.annotation.Autowired;
import de.codecentric.resilient.customer.entity.Customer;
import de.codecentric.resilient.customer.exception.CustomerNotFoundException;
import de.codecentric.resilient.customer.repository.CustomerRepository;
import org.springframework.stereotype.Service; | package de.codecentric.resilient.customer.service;
/**
* @author Benjamin Wilms
*/
@Service
public class CustomerService {
| // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | private final CustomerRepository customerRepository; |
MrBW/resilient-transport-service | customer-service/src/main/java/de/codecentric/resilient/customer/service/CustomerService.java | // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | import org.springframework.beans.factory.annotation.Autowired;
import de.codecentric.resilient.customer.entity.Customer;
import de.codecentric.resilient.customer.exception.CustomerNotFoundException;
import de.codecentric.resilient.customer.repository.CustomerRepository;
import org.springframework.stereotype.Service; | package de.codecentric.resilient.customer.service;
/**
* @author Benjamin Wilms
*/
@Service
public class CustomerService {
private final CustomerRepository customerRepository;
@Autowired
public CustomerService(CustomerRepository customerRepository) {
this.customerRepository = customerReposito... | // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | public Customer findCustomerById(Long customerId) throws CustomerNotFoundException { |
MrBW/resilient-transport-service | customer-service/src/main/java/de/codecentric/resilient/customer/service/CustomerService.java | // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | import org.springframework.beans.factory.annotation.Autowired;
import de.codecentric.resilient.customer.entity.Customer;
import de.codecentric.resilient.customer.exception.CustomerNotFoundException;
import de.codecentric.resilient.customer.repository.CustomerRepository;
import org.springframework.stereotype.Service; | package de.codecentric.resilient.customer.service;
/**
* @author Benjamin Wilms
*/
@Service
public class CustomerService {
private final CustomerRepository customerRepository;
@Autowired
public CustomerService(CustomerRepository customerRepository) {
this.customerRepository = customerReposito... | // Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
//
// @Id
// @GeneratedValue
// private Long id;
//
// private String name;
//
// public Customer(String name) {
// this.name = name;
// }
//
// pu... | public Customer findCustomerById(Long customerId) throws CustomerNotFoundException { |
MrBW/resilient-transport-service | booking-service/src/main/java/de/codecentric/resilient/booking/mapper/BookingMapper.java | // Path: booking-service/src/main/java/de/codecentric/resilient/booking/entity/Address.java
// @Embeddable
// public class Address {
//
// @Basic
// private String country;
//
// @Basic
// private String city;
//
// @Basic
// private String postcode;
//
// @Basic
// private String st... | import de.codecentric.resilient.dto.*;
import org.springframework.stereotype.Component;
import de.codecentric.resilient.booking.entity.Address;
import de.codecentric.resilient.booking.entity.Booking;
import de.codecentric.resilient.booking.entity.Customer; | package de.codecentric.resilient.booking.mapper;
/**
* @author Benjamin Wilms (xd98870)
*/
@Component
public class BookingMapper {
| // Path: booking-service/src/main/java/de/codecentric/resilient/booking/entity/Address.java
// @Embeddable
// public class Address {
//
// @Basic
// private String country;
//
// @Basic
// private String city;
//
// @Basic
// private String postcode;
//
// @Basic
// private String st... | public Booking mapToBookingEntity(BookingServiceRequestDTO bookingRequestDTO, Long connote) { |
MrBW/resilient-transport-service | booking-service/src/main/java/de/codecentric/resilient/booking/mapper/BookingMapper.java | // Path: booking-service/src/main/java/de/codecentric/resilient/booking/entity/Address.java
// @Embeddable
// public class Address {
//
// @Basic
// private String country;
//
// @Basic
// private String city;
//
// @Basic
// private String postcode;
//
// @Basic
// private String st... | import de.codecentric.resilient.dto.*;
import org.springframework.stereotype.Component;
import de.codecentric.resilient.booking.entity.Address;
import de.codecentric.resilient.booking.entity.Booking;
import de.codecentric.resilient.booking.entity.Customer; | package de.codecentric.resilient.booking.mapper;
/**
* @author Benjamin Wilms (xd98870)
*/
@Component
public class BookingMapper {
public Booking mapToBookingEntity(BookingServiceRequestDTO bookingRequestDTO, Long connote) {
Booking booking = new Booking();
booking.setConnote(connote);
... | // Path: booking-service/src/main/java/de/codecentric/resilient/booking/entity/Address.java
// @Embeddable
// public class Address {
//
// @Basic
// private String country;
//
// @Basic
// private String city;
//
// @Basic
// private String postcode;
//
// @Basic
// private String st... | public Customer mapToCustomer(CustomerResponseDTO customerDTO) { |
MrBW/resilient-transport-service | booking-service/src/main/java/de/codecentric/resilient/booking/mapper/BookingMapper.java | // Path: booking-service/src/main/java/de/codecentric/resilient/booking/entity/Address.java
// @Embeddable
// public class Address {
//
// @Basic
// private String country;
//
// @Basic
// private String city;
//
// @Basic
// private String postcode;
//
// @Basic
// private String st... | import de.codecentric.resilient.dto.*;
import org.springframework.stereotype.Component;
import de.codecentric.resilient.booking.entity.Address;
import de.codecentric.resilient.booking.entity.Booking;
import de.codecentric.resilient.booking.entity.Customer; | package de.codecentric.resilient.booking.mapper;
/**
* @author Benjamin Wilms (xd98870)
*/
@Component
public class BookingMapper {
public Booking mapToBookingEntity(BookingServiceRequestDTO bookingRequestDTO, Long connote) {
Booking booking = new Booking();
booking.setConnote(connote);
... | // Path: booking-service/src/main/java/de/codecentric/resilient/booking/entity/Address.java
// @Embeddable
// public class Address {
//
// @Basic
// private String country;
//
// @Basic
// private String city;
//
// @Basic
// private String postcode;
//
// @Basic
// private String st... | public Address mapToAddressEntity(AddressResponseDTO addressDTO) { |
MrBW/resilient-transport-service | connote-service/src/test/java/de/codecentric/resilient/connote/service/ConnoteServiceTest.java | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
import de.codecentric.resilient.connote.entity.Connote;
import de.codecentric.resilient.connote.repository.ConnoteRepository;
import org.joda.time.LocalDateTime;... | package de.codecentric.resilient.connote.service;
/**
* @author Benjamin Wilms (xd98870)
*/
@RunWith(MockitoJUnitRunner.class)
public class ConnoteServiceTest {
@Mock | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | private ConnoteRepository connoteRepositoryMock; |
MrBW/resilient-transport-service | connote-service/src/test/java/de/codecentric/resilient/connote/service/ConnoteServiceTest.java | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
import de.codecentric.resilient.connote.entity.Connote;
import de.codecentric.resilient.connote.repository.ConnoteRepository;
import org.joda.time.LocalDateTime;... | package de.codecentric.resilient.connote.service;
/**
* @author Benjamin Wilms (xd98870)
*/
@RunWith(MockitoJUnitRunner.class)
public class ConnoteServiceTest {
@Mock
private ConnoteRepository connoteRepositoryMock;
@Mock | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | private RandomConnoteGenerator randomConnoteGeneratorMock; |
MrBW/resilient-transport-service | connote-service/src/test/java/de/codecentric/resilient/connote/service/ConnoteServiceTest.java | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
import de.codecentric.resilient.connote.entity.Connote;
import de.codecentric.resilient.connote.repository.ConnoteRepository;
import org.joda.time.LocalDateTime;... | package de.codecentric.resilient.connote.service;
/**
* @author Benjamin Wilms (xd98870)
*/
@RunWith(MockitoJUnitRunner.class)
public class ConnoteServiceTest {
@Mock
private ConnoteRepository connoteRepositoryMock;
@Mock
private RandomConnoteGenerator randomConnoteGeneratorMock;
private Conn... | // Path: connote-service/src/main/java/de/codecentric/resilient/connote/entity/Connote.java
// @Entity
// public class Connote {
//
// @Id
// private Long connote;
//
// @Column(name = "created", nullable = false)
// private LocalDateTime created = LocalDateTime.now();
//
// public Connote(Long c... | Connote connoteToBeSaved = new Connote(uniqueConnote); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.