conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
public void openPolygonGenerateDialog() {
double defaultHatchAngle = (planningMapFragment.getMapRotation() + 90) % 180;
GridDialog polygonDialog = new GridDialog() {
@Override
public void onPolygonGenerated(List<waypoint> list) {
drone.mission.addWaypoints(list);
update();
}
};
polygonDialog.generatePolygon(defaultHatchAngle, 50.0, polygon,
drone.mission.getLastWaypoint().getCoord(),
drone.mission.getDefaultAlt(), this);
=======
public void setMode(modes mode) {
this.mode = mode;
switch (mode) {
default:
case MISSION:
Toast.makeText(this, string.exiting_polygon_mode,
Toast.LENGTH_SHORT).show();
break;
case POLYGON:
Toast.makeText(this, string.entering_polygon_mode,
Toast.LENGTH_SHORT).show();
break;
}
invalidateOptionsMenu();
>>>>>>>
public void openPolygonGenerateDialog() {
double defaultHatchAngle = (planningMapFragment.getMapRotation() + 90) % 180;
GridDialog polygonDialog = new GridDialog() {
@Override
public void onPolygonGenerated(List<waypoint> list) {
drone.mission.addWaypoints(list);
update();
}
};
polygonDialog.generatePolygon(defaultHatchAngle, 50.0, polygon,
drone.mission.getLastWaypoint().getCoord(),
drone.mission.getDefaultAlt(), this);
}
public void setMode(modes mode) {
this.mode = mode;
switch (mode) {
default:
case MISSION:
Toast.makeText(this, string.exiting_polygon_mode,
Toast.LENGTH_SHORT).show();
break;
case POLYGON:
Toast.makeText(this, string.entering_polygon_mode,
Toast.LENGTH_SHORT).show();
break;
}
invalidateOptionsMenu(); |
<<<<<<<
import com.droidplanner.DroidPlannerApp.OnWaypointUpdateListner;
=======
import com.droidplanner.DroidPlannerApp.OnWaypointReceivedListner;
>>>>>>>
import com.droidplanner.DroidPlannerApp.OnWaypointUpdateListner;
<<<<<<<
@Override
public void onAltitudeChanged(double newAltitude) {
super.onAltitudeChanged(newAltitude);
if(guidedPoint!=null){
Toast.makeText(this, "Guided Mode ("+(int)newAltitude+"m)", Toast.LENGTH_SHORT).show();
drone.state.setGuidedMode(new waypoint(guidedPoint, newAltitude));
guidedPoint = null;
}
}
=======
>>>>>>> |
<<<<<<<
=======
import android.support.v4.app.FragmentManager;
import android.view.Menu;
>>>>>>>
<<<<<<<
=======
import android.view.WindowManager.LayoutParams;
import android.widget.ArrayAdapter;
import android.widget.SpinnerAdapter;
>>>>>>>
<<<<<<<
=======
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_super_activiy, menu);
armButton = menu.findItem(R.id.menu_arm);
connectButton = menu.findItem(R.id.menu_connect);
drone.MavClient.queryConnectionState();
return super.onCreateOptionsMenu(menu);
}
>>>>>>> |
<<<<<<<
arm(drone, arm, null);
}
public static void arm(Drone drone, boolean arm, SimpleCommandListener listener){
=======
arm(drone, arm, false);
}
/**
* Arm or disarm the connected drone.
*
* @param arm true to arm, false to disarm.
* @param emergencyDisarm true to skip landing check and disarm immediately,
* false to disarm only if it is safe to do so.
*/
public static void arm(Drone drone, boolean arm, boolean emergencyDisarm) {
>>>>>>>
arm(drone, arm, false, null);
}
/**
* Arm or disarm the connected drone.
*
* @param arm true to arm, false to disarm.
* @param emergencyDisarm true to skip landing check and disarm immediately,
* false to disarm only if it is safe to do so.
*/
public static void arm(Drone drone, boolean arm, boolean emergencyDisarm, SimpleCommandListener listener) {
<<<<<<<
drone.performAsyncAction(new Action(ACTION_ARM, params), listener);
=======
params.putBoolean(EXTRA_EMERGENCY_DISARM, emergencyDisarm);
drone.performAsyncAction(new Action(ACTION_ARM, params));
>>>>>>>
params.putBoolean(EXTRA_EMERGENCY_DISARM, emergencyDisarm);
drone.performAsyncAction(new Action(ACTION_ARM, params), listener); |
<<<<<<<
import com.droidplanner.MAVLink.parameters.Parameter;
import com.droidplanner.MAVLink.parameters.ParametersManager;
import com.droidplanner.MAVLink.parameters.ParametersManager.OnParameterManagerListner;
import com.droidplanner.MAVLink.waypoints.WaypointMananger;
import com.droidplanner.MAVLink.waypoints.WaypointMananger.OnWaypointManagerListner;
=======
import com.droidplanner.MAVLink.WaypointMananger;
import com.droidplanner.MAVLink.WaypointMananger.OnWaypointManagerListner;
import com.droidplanner.helpers.FollowMe;
>>>>>>>
import com.droidplanner.MAVLink.parameters.Parameter;
import com.droidplanner.MAVLink.parameters.ParametersManager;
import com.droidplanner.MAVLink.parameters.ParametersManager.OnParameterManagerListner;
import com.droidplanner.MAVLink.waypoints.WaypointMananger;
import com.droidplanner.MAVLink.waypoints.WaypointMananger.OnWaypointManagerListner;
import com.droidplanner.helpers.FollowMe;
<<<<<<<
public ParametersManager parameterMananger;
private MavLinkMsgHandler mavLinkMsgHandler;
=======
public FollowMe followMe;
>>>>>>>
public ParametersManager parameterMananger;
private MavLinkMsgHandler mavLinkMsgHandler;
public FollowMe followMe;
<<<<<<<
parameterMananger = new ParametersManager(MAVClient, this);
mavLinkMsgHandler = new com.droidplanner.MAVLink.MavLinkMsgHandler(drone);
=======
followMe = new FollowMe(MAVClient, this,drone);
mavLinkMsgHandler = new com.droidplanner.MAVLink.MavLinkMsgHandler(drone);
>>>>>>>
parameterMananger = new ParametersManager(MAVClient, this);
followMe = new FollowMe(MAVClient, this,drone);
mavLinkMsgHandler = new com.droidplanner.MAVLink.MavLinkMsgHandler(drone); |
<<<<<<<
=======
>>>>>>> |
<<<<<<<
/*notifyTest.testAll();
docTest.testAll();*/
metricsTest.testMetric();
=======
notifyTest.testAll();
docTest.testAll();
>>>>>>>
notifyTest.testAll();
docTest.testAll();
metricsTest.testMetric(); |
<<<<<<<
protected Object _deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException
=======
private final Object _deserialize(JsonParser p, DeserializationContext ctxt) throws IOException
>>>>>>>
protected Object _deserialize(JsonParser p, DeserializationContext ctxt) throws IOException |
<<<<<<<
private CodecUtils() {
}
/**
* Converts an array of shorts to a byte array.
* <p>
* Example: (short) 5 will be stored as {0, 5} since 5 = 00000000 00000101
* </p>
* <p>
* Example: (short) 257 will be stored as {1, 1} since 257 = 00000001
* 00000001
* </p>
*
* @param shorts
* @return byte array containing shorts as their byte value
*/
public static byte[] shortsToBytes(short[] shorts) {
ByteBuffer buffer = ByteBuffer.allocate(shorts.length * 2).order(ByteOrder.BIG_ENDIAN);
for (short num : shorts) {
buffer.putShort(num);
}
return buffer.array();
}
/**
* Converts a single short to a byte array length 2. See
* {@link #shortsToBytes(short[])}
*
* @param number
* @return byte array containing short as a 2-byte array
*/
public static byte[] shortToBytes(short number) {
short[] shorts = new short[] { number };
return shortsToBytes(shorts);
}
/**
* Converts an array of bytes to an array of shorts and returns the first
* element. See {@link #bytesToShorts(byte[])}
*
* @param bytes
* @return array of shorts
*/
public static short bytesToShort(byte[] bytes) {
return bytesToShorts(bytes)[0];
}
/**
* Converts an array of bytes to an array of shorts.
* <p>
* Example: {(byte) 1, (byte) 1} will return {(short) 257} since 257 =
* 00000001 00000001
* </p>
*
* @param bytes
* @return array of shorts
*/
public static short[] bytesToShorts(byte[] bytes) {
ByteBuffer buffer = ByteBuffer.allocate(bytes.length).order(ByteOrder.BIG_ENDIAN);
buffer.put(bytes);
buffer.flip();
int numberOfShorts = bytes.length / 2;
short[] shorts = new short[numberOfShorts];
for (int i = 0; i < numberOfShorts; i++) {
shorts[i] = buffer.getShort();
}
return shorts;
}
/**
* Combines byte arrays.
* @param bytes
* @return combined array
* @throws IOException
*/
public static byte[] mergeBytes(byte[]... bytes) throws IOException {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
for (byte[] bArray : bytes) {
outputStream.write(bArray);
}
return outputStream.toByteArray();
}
public static long bytesToLong(byte[] bytes) {
return bytesToLongs(bytes)[0];
}
public static long[] bytesToLongs(byte[] bytes) {
ByteBuffer buffer = ByteBuffer.allocate(bytes.length).order(ByteOrder.BIG_ENDIAN);
buffer.put(bytes);
buffer.flip();
int numberOfLongs = bytes.length / 8;
long[] longs = new long[numberOfLongs];
for (int i = 0; i < numberOfLongs; i++) {
longs[i] = buffer.getLong();
}
return longs;
}
public static String toHex(byte[] bytes) {
return bytes != null ? DatatypeConverter.printHexBinary(bytes) : "";
}
public static byte[] fromHex(String hex) {
return DatatypeConverter.parseHexBinary(hex);
}
public static String toBase64(byte[] bytes) {
return bytes != null ? DatatypeConverter.printBase64Binary(bytes) : "";
}
public static byte[] fromBase64(String base64) {
return DatatypeConverter.parseBase64Binary(base64);
}
/**
* @param strShort
* String representation of a short integer value in binary or hex
* format. If the string is in binary format, the length must be
* exactly 16 1s and zeros. If Hex format, the length must be
* exactly 4 Hex digits.
*
* @return a byte array equivalent of strShort
*/
public static byte[] shortStringToByteArray(String strShort) {
byte[] byteArrayValue = null;
int radix = radixOf(strShort);
if (radix == 0) {
byteArrayValue = new byte[2]; // NOSONAR
} else {
byteArrayValue = Arrays
.copyOfRange(ByteBuffer.allocate(4).putInt(Integer.parseUnsignedInt(strShort, radix)).array(), 2, 4);
}
return byteArrayValue;
}
/**
* @param strShort
* String representation of a short integer value in binary or hex
* format. If strShort is in binary format, the length must be
* exactly 16 ones and zeros. If strShort is in Hex format, the
* length must be exactly 4 Hex digits.
* @return The radix of the strShort: Currently supporting only binary and
* hex, therefore the return value is either 2 or 16
*/
private static int radixOf(String strShort) {
int radix = 0;
if (strShort == null || strShort.length() == 0) {
radix = 0;
} else if (strShort.length() == 16) {
radix = 2;
} else if (strShort.length() == 4) {
radix = 16;
} else {
throw new IllegalArgumentException("Short String length is invalid: " + strShort.length());
}
return radix;
}
=======
private CodecUtils() {
}
public static byte[] shortsToBytes(short[] shorts) {
ByteBuffer buffer = ByteBuffer.allocate(shorts.length*2).order(ByteOrder.BIG_ENDIAN);
for (short num: shorts) {
buffer.putShort(num);
}
return buffer.array();
}
public static byte[] shortToBytes(short number) {
short[] shorts = new short[] { number };
return shortsToBytes(shorts);
}
public static short bytesToShort(byte[] bytes, int offset, int length, ByteOrder bo) {
return bytesToShorts(bytes, offset, length, bo)[0];
}
public static short[] bytesToShorts(byte[] bytes, int offset, int length, ByteOrder bo) {
ByteBuffer buffer = ByteBuffer.allocate(length).order(bo);
buffer.put(bytes, offset, length);
buffer.flip();
int numberOfShorts = length / 2;
short[] shorts = new short[numberOfShorts];
for (int i = 0; i < numberOfShorts; i++) {
shorts[i] = buffer.getShort();
}
return shorts;
}
public static int bytesToInt(byte[] bytes, int offset, int length, ByteOrder bo) {
return bytesToInts(bytes, offset, length, bo)[0];
}
public static int[] bytesToInts(byte[] bytes, int offset, int length, ByteOrder bo) {
ByteBuffer buffer = ByteBuffer.allocate(length).order(bo);
buffer.put(bytes, offset, length);
buffer.flip();
int numberOfInts = length / 4;
int[] ints = new int[numberOfInts];
for (int i = 0; i < numberOfInts; i++) {
ints[i] = buffer.getInt();
}
return ints;
}
public static long bytesToLong(byte[] bytes, int offset, int length, ByteOrder bo) {
return bytesToLongs(bytes, offset, length, bo)[0];
}
public static long[] bytesToLongs(byte[] bytes, int offset, int length, ByteOrder bo) {
ByteBuffer buffer = ByteBuffer.allocate(length).order(bo);
buffer.put(bytes, offset, length);
buffer.flip();
int numberOfLongs = length / 8;
long[] longs = new long[numberOfLongs];
for (int i = 0; i < numberOfLongs; i++) {
longs[i] = buffer.getLong();
}
return longs;
}
public static byte[] mergeBytes(byte[]... bytes) throws IOException {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
for (byte[] bArray: bytes) {
outputStream.write(bArray);
}
return outputStream.toByteArray();
}
public static String toHex(byte[] bytes) {
return bytes != null ? DatatypeConverter.printHexBinary(bytes) : "";
}
public static byte[] fromHex(String hex) {
return DatatypeConverter.parseHexBinary(hex);
}
public static String toBase64(byte[] bytes) {
return bytes != null ? DatatypeConverter.printBase64Binary(bytes) : "";
}
public static byte[] fromBase64(String base64) {
return DatatypeConverter.parseBase64Binary(base64);
}
/**
* @param strShort String representation of a short integer value in binary or hex format.
* If the string is in binary format, the length must be exactly 16 1s and zeros.
* If Hex format, the length must be exactly 4 Hex digits.
*
* @return a byte array equivalent of strShort
*/
public static byte[] shortStringToByteArray(String strShort) {
byte[] byteArrayValue = null;
int radix = radixOf(strShort);
if (radix == 0) {
byteArrayValue = new byte[2]; //NOSONAR
} else {
byteArrayValue =
Arrays.copyOfRange(ByteBuffer.allocate(4).putInt(
Integer.parseUnsignedInt(strShort, radix)).array(), 2, 4);
}
return byteArrayValue;
}
/**
* @param strShort String representation of a short integer value in binary or hex format.
* If strShort is in binary format, the length must be exactly 16 ones and zeros.
* If strShort is in Hex format, the length must be exactly 4 Hex digits.
* @return The radix of the strShort: Currently supporting only binary and hex, therefore
* the return value is either 2 or 16
*/
private static int radixOf(String strShort) {
int radix = 0;
if (strShort == null || strShort.length() == 0) {
radix = 0;
} else if (strShort.length() == 16) {
radix = 2;
} else if (strShort.length() == 4) {
radix = 16;
} else {
throw new IllegalArgumentException("Short String length is invalid: " + strShort.length());
}
return radix;
}
>>>>>>>
private CodecUtils() {
}
/**
* Converts an array of shorts to a byte array.
* <p>
* Example: (short) 5 will be stored as {0, 5} since 5 = 00000000 00000101
* </p>
* <p>
* Example: (short) 257 will be stored as {1, 1} since 257 = 00000001
* 00000001
* </p>
*
* @param shorts
* @return byte array containing shorts as their byte value
*/
public static byte[] shortsToBytes(short[] shorts) {
ByteBuffer buffer = ByteBuffer.allocate(shorts.length * 2).order(ByteOrder.BIG_ENDIAN);
for (short num : shorts) {
buffer.putShort(num);
}
return buffer.array();
}
/**
* Converts a single short to a byte array length 2. See
* {@link #shortsToBytes(short[])}
*
* @param number
* @return byte array containing short as a 2-byte array
*/
public static byte[] shortToBytes(short number) {
short[] shorts = new short[] { number };
return shortsToBytes(shorts);
}
/**
* Converts an array of bytes to an array of shorts and returns the first
* element. See {@link #bytesToShorts(byte[])}
*
* @param bytes
* @return array of shorts
*/
public static short bytesToShort(byte[] bytes, int offset, int length, ByteOrder bo) {
return bytesToShorts(bytes, offset, length, bo)[0];
}
/**
* Converts an array of bytes to an array of shorts.
* <p>
* Example: {(byte) 1, (byte) 1} will return {(short) 257} since 257 =
* 00000001 00000001
* </p>
*
* @param bytes
* @return array of shorts
*/
public static short[] bytesToShorts(byte[] bytes, int offset, int length, ByteOrder bo) {
ByteBuffer buffer = ByteBuffer.allocate(length).order(bo);
buffer.put(bytes, offset, length);
buffer.flip();
int numberOfShorts = length / 2;
short[] shorts = new short[numberOfShorts];
for (int i = 0; i < numberOfShorts; i++) {
shorts[i] = buffer.getShort();
}
return shorts;
}
/**
* Combines byte arrays.
*
* @param bytes
* @return combined array
* @throws IOException
*/
public static byte[] mergeBytes(byte[]... bytes) throws IOException {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
for (byte[] bArray : bytes) {
outputStream.write(bArray);
}
return outputStream.toByteArray();
}
public static int bytesToInt(byte[] bytes, int offset, int length, ByteOrder bo) {
return bytesToInts(bytes, offset, length, bo)[0];
}
public static int[] bytesToInts(byte[] bytes, int offset, int length, ByteOrder bo) {
ByteBuffer buffer = ByteBuffer.allocate(length).order(bo);
buffer.put(bytes, offset, length);
buffer.flip();
int numberOfInts = length / 4;
int[] ints = new int[numberOfInts];
for (int i = 0; i < numberOfInts; i++) {
ints[i] = buffer.getInt();
}
return ints;
}
public static long bytesToLong(byte[] bytes, int offset, int length, ByteOrder bo) {
return bytesToLongs(bytes, offset, length, bo)[0];
}
public static long[] bytesToLongs(byte[] bytes, int offset, int length, ByteOrder bo) {
ByteBuffer buffer = ByteBuffer.allocate(length).order(bo);
buffer.put(bytes, offset, length);
buffer.flip();
int numberOfLongs = length / 8;
long[] longs = new long[numberOfLongs];
for (int i = 0; i < numberOfLongs; i++) {
longs[i] = buffer.getLong();
}
return longs;
}
public static String toHex(byte[] bytes) {
return bytes != null ? DatatypeConverter.printHexBinary(bytes) : "";
}
public static byte[] fromHex(String hex) {
return DatatypeConverter.parseHexBinary(hex);
}
public static String toBase64(byte[] bytes) {
return bytes != null ? DatatypeConverter.printBase64Binary(bytes) : "";
}
public static byte[] fromBase64(String base64) {
return DatatypeConverter.parseBase64Binary(base64);
}
/**
* @param strShort
* String representation of a short integer value in binary or hex
* format. If the string is in binary format, the length must be
* exactly 16 1s and zeros. If Hex format, the length must be
* exactly 4 Hex digits.
*
* @return a byte array equivalent of strShort
*/
public static byte[] shortStringToByteArray(String strShort) {
byte[] byteArrayValue = null;
int radix = radixOf(strShort);
if (radix == 0) {
byteArrayValue = new byte[2]; // NOSONAR
} else {
byteArrayValue = Arrays
.copyOfRange(ByteBuffer.allocate(4).putInt(Integer.parseUnsignedInt(strShort, radix)).array(), 2, 4);
}
return byteArrayValue;
}
/**
* @param strShort
* String representation of a short integer value in binary or hex
* format. If strShort is in binary format, the length must be
* exactly 16 ones and zeros. If strShort is in Hex format, the
* length must be exactly 4 Hex digits.
* @return The radix of the strShort: Currently supporting only binary and
* hex, therefore the return value is either 2 or 16
*/
private static int radixOf(String strShort) {
int radix = 0;
if (strShort == null || strShort.length() == 0) {
radix = 0;
} else if (strShort.length() == 16) {
radix = 2;
} else if (strShort.length() == 4) {
radix = 16;
} else {
throw new IllegalArgumentException("Short String length is invalid: " + strShort.length());
}
return radix;
} |
<<<<<<<
private ExecutorService bsmImporter;
private ExecutorService messageFrameImporter;
private ExecutorService bsmExporter;
private ExecutorService bsmFilteredExported;
=======
private OdeProperties odeProperties;
>>>>>>>
private OdeProperties odeProperties;
<<<<<<<
bsmImporter = Executors.newSingleThreadExecutor();
messageFrameImporter = Executors.newSingleThreadExecutor();
bsmExporter = Executors.newSingleThreadExecutor();
bsmFilteredExported = Executors.newSingleThreadExecutor();
Path bsmPath = Paths.get(odeProperties.getUploadLocationRoot(), odeProperties.getUploadLocationBsm());
logger.debug("UPLOADER - Bsm directory: {}", bsmPath);
Path messageFramePath = Paths.get(odeProperties.getUploadLocationRoot(),
odeProperties.getUploadLocationMessageFrame());
logger.debug("UPLOADER - Message Frame directory: {}", messageFramePath);
=======
>>>>>>> |
<<<<<<<
import groovy.lang.MissingPropertyException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
=======
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import javax.annotation.PostConstruct;
>>>>>>>
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import javax.annotation.PostConstruct;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
<<<<<<<
import javax.annotation.PostConstruct;
=======
>>>>>>> |
<<<<<<<
import java.io.BufferedInputStream;
=======
>>>>>>>
import java.io.BufferedInputStream; |
<<<<<<<
import us.dot.its.jpo.ode.coder.TimDecoderHelper;
import us.dot.its.jpo.ode.j2735.dsrc.*;
=======
import us.dot.its.jpo.ode.importer.parser.TimLogFileParser;
>>>>>>>
import us.dot.its.jpo.ode.importer.parser.TimLogFileParser;
<<<<<<<
import us.dot.its.jpo.ode.model.OdeAsn1Data;
import us.dot.its.jpo.ode.model.OdeAsn1Metadata;
import us.dot.its.jpo.ode.model.OdeAsn1Payload;
import us.dot.its.jpo.ode.model.OdeDriverAlertData;
import us.dot.its.jpo.ode.model.OdeDriverAlertMetadata;
import us.dot.its.jpo.ode.model.OdeDriverAlertPayload;
import us.dot.its.jpo.ode.model.ReceivedMessageDetails;
import us.dot.its.jpo.ode.plugin.j2735.oss.*;
=======
>>>>>>> |
<<<<<<<
=======
import us.dot.its.jpo.ode.j2735.J2735;
import us.dot.its.jpo.ode.j2735.dsrc.BasicSafetyMessage;
import us.dot.its.jpo.ode.j2735.dsrc.MessageFrame;
import us.dot.its.jpo.ode.j2735.dsrc.TravelerInformation;
import us.dot.its.jpo.ode.model.OdeBsmPayload;
import us.dot.its.jpo.ode.model.OdeData;
import us.dot.its.jpo.ode.model.OdeLogMetadata.SecurityResultCode;
import us.dot.its.jpo.ode.model.OdeLogMetadataReceived;
>>>>>>>
<<<<<<<
=======
import us.dot.its.jpo.ode.model.OdeMsgMetadata.GeneratedBy;
import us.dot.its.jpo.ode.model.OdeTimData;
import us.dot.its.jpo.ode.model.OdeTimPayload;
>>>>>>>
<<<<<<<
=======
import us.dot.its.jpo.ode.model.RxSource;
import us.dot.its.jpo.ode.model.SerialId;
>>>>>>>
import us.dot.its.jpo.ode.model.RxSource; |
<<<<<<<
=======
import us.dot.its.jpo.ode.model.OdeLogMetadata.SecurityResultCode;
import us.dot.its.jpo.ode.model.OdeMsgMetadata.GeneratedBy;
import us.dot.its.jpo.ode.model.SerialId;
import us.dot.its.jpo.ode.plugin.j2735.J2735Bsm;
>>>>>>>
<<<<<<<
// TODO open-ode
// public static OdeBsmData createOdeBsmData(
// J2735Bsm rawBsm,
// IEEE1609p2Message message,
// BsmLogFileParser bsmFileParser) {
//
// OdeBsmPayload payload = new OdeBsmPayload(rawBsm);
//
// OdeBsmMetadata metadata = new OdeBsmMetadata(payload);
// OdeLogMetadataCreatorHelper.updateLogMetadata(metadata, bsmFileParser);
//
// // If we have a valid message, override relevant data from the message
// if (message != null) {
// ZonedDateTime generatedAt;
// Date ieeeGenTime = message.getGenerationTime();
//
// if (ieeeGenTime != null) {
// generatedAt = DateTimeUtils.isoDateTime(ieeeGenTime);
// } else {
// generatedAt = bsmFileParser.getGeneratedAt();
// }
// metadata.setRecordGeneratedAt(generatedAt.toString());
// metadata.setRecordGeneratedBy(GeneratedBy.OBU);
// metadata.setValidSignature(true);
// }
//
// return new OdeBsmData(metadata, payload);
// }
//
// public static OdeBsmData createOdeBsmData(
// J2735Bsm rawBsm, String filename, SerialId serialId) {
// BsmLogFileParser bsmFileParser = new BsmLogFileParser(serialId.getBundleId());
// bsmFileParser.setFilename(filename).setUtcTimeInSec(0).setValidSignature(false);
// return createOdeBsmData(rawBsm, null, bsmFileParser);
// }
=======
public static OdeBsmData createOdeBsmData(
J2735Bsm rawBsm,
IEEE1609p2Message message,
BsmLogFileParser bsmFileParser) {
OdeBsmPayload payload = new OdeBsmPayload(rawBsm);
OdeBsmMetadata metadata = new OdeBsmMetadata(payload);
OdeLogMetadataCreatorHelper.updateLogMetadata(metadata, bsmFileParser);
// If we have a valid message, override relevant data from the message
if (message != null) {
ZonedDateTime generatedAt;
Date ieeeGenTime = message.getGenerationTime();
if (ieeeGenTime != null) {
generatedAt = DateTimeUtils.isoDateTime(ieeeGenTime);
} else if (bsmFileParser != null) {
generatedAt = bsmFileParser.getGeneratedAt();
} else {
generatedAt = DateTimeUtils.nowZDT();
}
metadata.setRecordGeneratedAt(DateTimeUtils.isoDateTime(generatedAt));
metadata.setRecordGeneratedBy(GeneratedBy.OBU);
metadata.setSecurityResultCode(SecurityResultCode.success);
}
return new OdeBsmData(metadata, payload);
}
public static OdeBsmData createOdeBsmData(
J2735Bsm rawBsm, String filename, SerialId serialId) {
BsmLogFileParser bsmFileParser = new BsmLogFileParser(serialId.getBundleId());
bsmFileParser.setFilename(filename).setUtcTimeInSec(0).setSecurityResultCode(SecurityResultCode.unknown);
;
return createOdeBsmData(rawBsm, null, bsmFileParser);
}
>>>>>>>
//TODO open-ode
// public static OdeBsmData createOdeBsmData(
// J2735Bsm rawBsm,
// IEEE1609p2Message message,
// BsmLogFileParser bsmFileParser) {
//
// OdeBsmPayload payload = new OdeBsmPayload(rawBsm);
//
// OdeBsmMetadata metadata = new OdeBsmMetadata(payload);
// OdeLogMetadataCreatorHelper.updateLogMetadata(metadata, bsmFileParser);
//
// // If we have a valid message, override relevant data from the message
// if (message != null) {
// ZonedDateTime generatedAt;
// Date ieeeGenTime = message.getGenerationTime();
//
// if (ieeeGenTime != null) {
// generatedAt = DateTimeUtils.isoDateTime(ieeeGenTime);
// } else if (bsmFileParser != null) {
// generatedAt = bsmFileParser.getGeneratedAt();
// } else {
// generatedAt = DateTimeUtils.nowZDT();
// }
// metadata.setRecordGeneratedAt(DateTimeUtils.isoDateTime(generatedAt));
// metadata.setRecordGeneratedBy(GeneratedBy.OBU);
// metadata.setSecurityResultCode(SecurityResultCode.success);
// }
//
// return new OdeBsmData(metadata, payload);
// }
//
// public static OdeBsmData createOdeBsmData(
// J2735Bsm rawBsm, String filename, SerialId serialId) {
// BsmLogFileParser bsmFileParser = new BsmLogFileParser(serialId.getBundleId());
// bsmFileParser.setFilename(filename).setUtcTimeInSec(0).setSecurityResultCode(SecurityResultCode.unknown);
//
// return createOdeBsmData(rawBsm, null, bsmFileParser);
// } |
<<<<<<<
=======
import us.dot.its.jpo.ode.plugin.j2735.timstorage.MessageFrame;
import us.dot.its.jpo.ode.plugin.j2735.timstorage.TravelerInputData;
>>>>>>>
import us.dot.its.jpo.ode.plugin.j2735.timstorage.MessageFrame;
import us.dot.its.jpo.ode.plugin.j2735.timstorage.TravelerInputData;
<<<<<<<
asd = new DdsAdvisorySituationData(snmp.getDeliverystart(), snmp.getDeliverystop(), ieeeDataTag,
=======
asd = new DdsAdvisorySituationData(snmp.getDeliverystart(), snmp.getDeliverystop(), ieeeDataTag,
>>>>>>>
asd = new DdsAdvisorySituationData(snmp.getDeliverystart(), snmp.getDeliverystop(), ieeeDataTag, |
<<<<<<<
=======
*
* @param ann Annotated entity to introspect
*
* @return True if given annotation is considered an annotation
* bundle; false if not
>>>>>>>
*
* @param ann Annotated entity to introspect
*
* @return True if given annotation is considered an annotation
* bundle; false if not
<<<<<<<
=======
*
* @param ann Annotated entity to introspect
*
* @return Details of Object Id as explained above, if Object Id
* handling to be applied; {@code null} otherwise.
>>>>>>>
*
* @param config Effective mapper configuration in use
* @param ann Annotated entity to introspect
*
* @return Details of Object Id as explained above, if Object Id
* handling to be applied; {@code null} otherwise.
<<<<<<<
=======
*
* @param ann Annotated entity to introspect
* @param objectIdInfo (optional) Base Object Id information, if any; {@code null} if none
*
* @return {@link ObjectIdInfo} augmented with possible additional information
*
* @since 2.1
>>>>>>>
*
* @param config Effective mapper configuration in use
* @param ann Annotated entity to introspect
* @param objectIdInfo (optional) Base Object Id information, if any; {@code null} if none
*
* @return {@link ObjectIdInfo} augmented with possible additional information
<<<<<<<
=======
*<p>
* NOTE: method signature changed in 2.1, to return {@link PropertyName}
* instead of String.
*
* @param ac Annotated class to introspect
*
* @return Root name to use, if any; {@code null} if not
>>>>>>>
*
* @param config Effective mapper configuration in use
* @param ac Annotated class to introspect
<<<<<<<
=======
* This method combines multiple aspects of ignorals and deprecates
* earlier methods such as
* {@link #findPropertiesToIgnore(Annotated, boolean)} and
* {@link #findIgnoreUnknownProperties(AnnotatedClass)}.
*
* @param ac Annotated class to introspect
*
* @since 2.8
>>>>>>>
*
* @param config Effective mapper configuration in use
* @param ac Annotated class to introspect
<<<<<<<
=======
/**
* @param forSerialization True if requesting properties to ignore for serialization;
* false if for deserialization
* @param ac Annotated class to introspect
*
* @return Array of names of properties to ignore
*
* @since 2.6
*
* @deprecated Since 2.8, use {@link #findPropertyIgnorals} instead
*/
@Deprecated // since 2.8
public String[] findPropertiesToIgnore(Annotated ac, boolean forSerialization) {
return null;
}
/**
* @param ac Annotated class to introspect
*
* @return Array of names of properties to ignore
*
* @deprecated Since 2.6, use variant that takes second argument.
*/
@Deprecated // since 2.6
public String[] findPropertiesToIgnore(Annotated ac) {
return null;
}
/**
* Method for checking whether an annotation indicates that all unknown properties
* should be ignored.
*
* @param ac Annotated class to introspect
*
* @return True if class has something indicating "ignore [all] unknown properties"
*
* @deprecated Since 2.8, use {@link #findPropertyIgnorals} instead
*/
@Deprecated // since 2.8
public Boolean findIgnoreUnknownProperties(AnnotatedClass ac) { return null; }
>>>>>>>
<<<<<<<
public Boolean hasAnyGetter(MapperConfig<?> config, Annotated a) {
=======
public Boolean hasAnyGetter(Annotated ann) {
// 21-Nov-2016, tatu: Delegate in 2.9; remove redirect from later versions
if (ann instanceof AnnotatedMethod) {
if (hasAnyGetterAnnotation((AnnotatedMethod) ann)) {
return true;
}
}
>>>>>>>
public Boolean hasAnyGetter(MapperConfig<?> config, Annotated ann) {
<<<<<<<
=======
*
* @param enumType Type of Enumeration
* @param enumValues Values of enumeration
* @param names Matching declared names of enumeration values (with indexes
* matching {@code enumValues} entries)
*
* @return Array of names to use (possible {@code names} passed as argument)
*
* @since 2.7
>>>>>>>
*
* @param enumType Type of Enumeration
* @param enumValues Values of enumeration
* @param names Matching declared names of enumeration values (with indexes
* matching {@code enumValues} entries)
*
* @return Array of names to use (possible {@code names} passed as argument)
<<<<<<<
* @param enumCls The Enum class to scan for the default value.
* @return null if none found or it's not possible to determine one.
=======
* @param enumCls The Enum class to scan for the default value
*
* @return null if none found or it's not possible to determine one
*
* @since 2.8
>>>>>>>
* @param enumCls The Enum class to scan for the default value.
*
* @return null if none found or it's not possible to determine one.
<<<<<<<
=======
/**
* Method for determining the String value to use for serializing
* given enumeration entry; used when serializing enumerations
* as Strings (the standard method).
*
* @param value Enum value to introspect
*
* @return Serialized enum value.
*
* @deprecated Since 2.8: use {@link #findEnumValues} instead because this method
* does not properly handle override settings (defaults to <code>enum.name</code>
* without indicating whether that is explicit or not), and is inefficient to
* call one-by-one.
*/
@Deprecated
public String findEnumValue(Enum<?> value) {
return value.name();
}
/**
* @param am Annotated method to check
*
* @deprecated Since 2.9 Use {@link #hasAsValue(Annotated)} instead.
*/
@Deprecated // since 2.9
public boolean hasAsValueAnnotation(AnnotatedMethod am) {
return false;
}
/**
* @param am Annotated method to check
*
* @deprecated Since 2.9 Use {@link #hasAnyGetter} instead
*/
@Deprecated
public boolean hasAnyGetterAnnotation(AnnotatedMethod am) {
return false;
}
>>>>>>>
<<<<<<<
=======
/**
* Method for accessing annotated type definition that a
* property can have, to be used as the type for deserialization
* instead of the static (declared) type.
* Type is usually narrowing conversion (i.e.subtype of declared type).
* Declared return type of the method is also considered acceptable.
*
* @param ann Annotated entity to introspect
* @param baseType Assumed type before considering annotations
*
* @return Class to use for deserialization instead of declared type
*
* @deprecated Since 2.7 call {@link #refineDeserializationType} instead
*/
@Deprecated
public Class<?> findDeserializationType(Annotated ann, JavaType baseType) {
return null;
}
/**
* Method for accessing additional narrowing type definition that a
* method can have, to define more specific key type to use.
* It should be only be used with {@link java.util.Map} types.
*
* @param ann Annotated entity to introspect
* @param baseKeyType Assumed key type before considering annotations
*
* @return Class specifying more specific type to use instead of
* declared type, if annotation found; null if not
*
* @deprecated Since 2.7 call {@link #refineDeserializationType} instead
*/
@Deprecated
public Class<?> findDeserializationKeyType(Annotated ann, JavaType baseKeyType) {
return null;
}
/**
* Method for accessing additional narrowing type definition that a
* method can have, to define more specific content type to use;
* content refers to Map values and Collection/array elements.
* It should be only be used with Map, Collection and array types.
*
* @param ann Annotated entity to introspect
* @param baseContentType Assumed content (value) type before considering annotations
*
* @return Class specifying more specific type to use instead of
* declared type, if annotation found; null if not
*
* @deprecated Since 2.7 call {@link #refineDeserializationType} instead
*/
@Deprecated
public Class<?> findDeserializationContentType(Annotated ann, JavaType baseContentType) {
return null;
}
>>>>>>>
<<<<<<<
=======
*
* @param ac Annotated class to introspect
*
* @since 2.0
>>>>>>>
*
* @param ac Annotated class to introspect
<<<<<<<
public JsonPOJOBuilder.Value findPOJOBuilderConfig(MapperConfig<?> config, AnnotatedClass ac) {
=======
/**
* @param ac Annotated class to introspect
*
* @since 2.0
*/
public JsonPOJOBuilder.Value findPOJOBuilderConfig(AnnotatedClass ac) {
>>>>>>>
/**
* @param ac Annotated class to introspect
*/
public JsonPOJOBuilder.Value findPOJOBuilderConfig(MapperConfig<?> config, AnnotatedClass ac) {
<<<<<<<
=======
*
* @param ann Annotated entity to check for specified annotation
* @param annoClass Type of annotation to find
*
* @return Value of given annotation (as per {@code annoClass}), if entity
* has one; {@code null} otherwise
*
* @since 2.5
>>>>>>>
*
* @param ann Annotated entity to check for specified annotation
* @param annoClass Type of annotation to find
*
* @return Value of given annotation (as per {@code annoClass}), if entity
* has one; {@code null} otherwise
<<<<<<<
=======
*
* @param ann Annotated entity to check for specified annotation
* @param annoClass Type of annotation to find
*
* @return {@code true} if specified annotation exists in given entity; {@code false} if not
*
* @since 2.5
>>>>>>>
*
* @param ann Annotated entity to check for specified annotation
* @param annoClass Type of annotation to find
*
* @return {@code true} if specified annotation exists in given entity; {@code false} if not
<<<<<<<
=======
*
* @param ann Annotated entity to check for specified annotation
* @param annoClasses Types of annotation to find
*
* @return {@code true} if at least one of specified annotation exists in given entity;
* {@code false} otherwise
*
* @since 2.7
>>>>>>>
*
* @param ann Annotated entity to check for specified annotation
* @param annoClasses Types of annotation to find
*
* @return {@code true} if at least one of specified annotation exists in given entity;
* {@code false} otherwise |
<<<<<<<
=======
import us.dot.its.jpo.ode.plugin.j2735.timstorage.TravelerInputData;
import us.dot.its.jpo.ode.plugin.j2735.timstorage.TravelerInputDataBase;
>>>>>>>
import us.dot.its.jpo.ode.plugin.j2735.timstorage.TravelerInputData;
import us.dot.its.jpo.ode.plugin.j2735.timstorage.TravelerInputDataBase;
<<<<<<<
private static final String SUCCESS = "success";
=======
private static final String WARNING = "warning";
>>>>>>>
private static final String WARNING = "warning";
private static final String SUCCESS = "success";
<<<<<<<
=======
// Short circuit
// If the TIM has no RSU/SNMP or SDW structures, we are done
if ((travelerInputData.getRsus() == null || travelerInputData.getSnmp() == null)
&& travelerInputData.getSdw() == null) {
String warningMsg = "Warning: TIM contains no RSU, SNMP, or SDW fields. Message only published to POJO broadcast stream.";
logger.warn(warningMsg);
return ResponseEntity.status(HttpStatus.OK).body(jsonKeyValue(WARNING, warningMsg));
}
>>>>>>>
// Short circuit
// If the TIM has no RSU/SNMP or SDW structures, we are done
if ((travelerInputData.getRsus() == null || travelerInputData.getSnmp() == null)
&& travelerInputData.getSdw() == null) {
String warningMsg = "Warning: TIM contains no RSU, SNMP, or SDW fields. Message only published to POJO broadcast stream.";
logger.warn(warningMsg);
return ResponseEntity.status(HttpStatus.OK).body(jsonKeyValue(WARNING, warningMsg));
}
<<<<<<<
=======
logger.debug("Converting request to Ieee1609Dot2Data/MessageFrame!");
//Build a MessageFrame
>>>>>>>
logger.debug("Converting request to Ieee1609Dot2Data/MessageFrame!");
//Build a MessageFrame |
<<<<<<<
private int bsmReceiverPort = 46800;
private int bsmBufferSize = 500;
=======
private String kafkaTopicOdeRawEncodedMessageJson = "topic.OdeRawEncodedMessageJson";
>>>>>>>
private String kafkaTopicOdeRawEncodedMessageJson = "topic.OdeRawEncodedMessageJson";
private int bsmReceiverPort = 46800;
private int bsmBufferSize = 500; |
<<<<<<<
private String kafkaTopicBsmSerializedPojo = "topic.J2735Bsm";
private String kafkaTopicBsmRawJson = "j2735BsmRawJson";
private String kafkaTopicBsmFilteredJson = "j2735BsmFilteredJson";
private int vsdmPort = 5556;
private int vsdmBufferSize = 10000;
=======
private String kafkaTopicBsmSerializedPOJO = "topic.J2735Bsm";
private String kafkaTopicBsmJSON = "topic.J2735BsmRawJSON";
private String kafkaTopicVsdm = "topic.J2735Vsdm";
private int receiverPort = 46753;
private int vsdmBufferSize = 500;
>>>>>>>
private String kafkaTopicBsmSerializedPojo = "topic.J2735Bsm";
private String kafkaTopicBsmRawJson = "j2735BsmRawJson";
private String kafkaTopicBsmFilteredJson = "j2735BsmFilteredJson";
private String kafkaTopicVsdm = "topic.J2735Vsdm";
private int receiverPort = 46753;
private int vsdmBufferSize = 500;
<<<<<<<
private int returnPort = 6666;
private int serviceRequestSenderPort = 5556;
private int vsdmSenderPort = 6666;
=======
private int returnPort;
private int forwarderPort;
private int vsdmSenderPort;
>>>>>>>
private int returnPort = 5555;
private int forwarderPort = 5555;
private int vsdmSenderPort = 6666; |
<<<<<<<
=======
import us.dot.its.jpo.ode.importer.parser.TimLogLocation;
import us.dot.its.jpo.ode.j2735.J2735;
import us.dot.its.jpo.ode.j2735.dsrc.BasicSafetyMessage;
import us.dot.its.jpo.ode.j2735.dsrc.MessageFrame;
import us.dot.its.jpo.ode.j2735.dsrc.TravelerInformation;
import us.dot.its.jpo.ode.model.OdeBsmPayload;
import us.dot.its.jpo.ode.model.OdeData;
>>>>>>>
import us.dot.its.jpo.ode.importer.parser.TimLogLocation;
<<<<<<<
import us.dot.its.jpo.ode.plugin.j2735.DsrcPosition3D;
import us.dot.its.jpo.ode.plugin.j2735.builders.AngleBuilder;
import us.dot.its.jpo.ode.plugin.j2735.builders.SpeedOrVelocityBuilder;
=======
import us.dot.its.jpo.ode.model.SerialId;
import us.dot.its.jpo.ode.plugin.j2735.builders.ElevationBuilder;
import us.dot.its.jpo.ode.plugin.j2735.builders.HeadingBuilder;
import us.dot.its.jpo.ode.plugin.j2735.builders.LatitudeBuilder;
import us.dot.its.jpo.ode.plugin.j2735.builders.LongitudeBuilder;
import us.dot.its.jpo.ode.plugin.j2735.builders.SpeedOrVelocityBuilder;
import us.dot.its.jpo.ode.plugin.j2735.oss.Oss1609dot2Coder;
import us.dot.its.jpo.ode.plugin.j2735.oss.OssBsm;
import us.dot.its.jpo.ode.plugin.j2735.oss.OssJ2735Coder;
import us.dot.its.jpo.ode.plugin.j2735.oss.OssMessageFrame.OssMessageFrameException;
import us.dot.its.jpo.ode.plugin.j2735.oss.OssTravelerInformation;
import us.dot.its.jpo.ode.security.SecurityManager;
import us.dot.its.jpo.ode.security.SecurityManager.SecurityManagerException;
import us.dot.its.jpo.ode.util.DateTimeUtils;
>>>>>>>
import us.dot.its.jpo.ode.plugin.j2735.builders.ElevationBuilder;
import us.dot.its.jpo.ode.plugin.j2735.builders.HeadingBuilder;
import us.dot.its.jpo.ode.plugin.j2735.builders.LatitudeBuilder;
import us.dot.its.jpo.ode.plugin.j2735.builders.LongitudeBuilder;
import us.dot.its.jpo.ode.plugin.j2735.builders.SpeedOrVelocityBuilder;
<<<<<<<
new OdeLogMsgMetadataLocation(new DsrcPosition3D(
Long.valueOf(fileParser.getLocation().getLatitude()),
Long.valueOf(fileParser.getLocation().getLongitude()),
Long.valueOf(fileParser.getLocation().getElevation())
),
SpeedOrVelocityBuilder.genericSpeedOrVelocity(fileParser.getLocation().getSpeed()).toString(),
AngleBuilder.longToDecimal(fileParser.getLocation().getHeading()).toString()), null);
=======
new OdeLogMsgMetadataLocation(
LatitudeBuilder.genericLatitude(locationDetails.getLatitude()).toString(),
LongitudeBuilder.genericLongitude(locationDetails.getLongitude()).toString(),
ElevationBuilder.genericElevation(locationDetails.getElevation()).toString(),
SpeedOrVelocityBuilder.genericSpeedOrVelocity(locationDetails.getSpeed()).toString(),
HeadingBuilder.genericHeading(locationDetails.getHeading()).toString()
), null);
>>>>>>>
new OdeLogMsgMetadataLocation(
LatitudeBuilder.genericLatitude(locationDetails.getLatitude()).toString(),
LongitudeBuilder.genericLongitude(locationDetails.getLongitude()).toString(),
ElevationBuilder.genericElevation(locationDetails.getElevation()).toString(),
SpeedOrVelocityBuilder.genericSpeedOrVelocity(locationDetails.getSpeed()).toString(),
HeadingBuilder.genericHeading(locationDetails.getHeading()).toString()
), null); |
<<<<<<<
private int vsdmPort = 5556;
private int vsdmBufferSize = 10000;
private Boolean vsdmVerboseJson = false;
=======
private String sdcIp = "";
private int sdcPort;
private String returnIp = "";
private int returnPort;
private int serviceRequestSenderPort;
private int vsdmSenderPort;
>>>>>>>
private int vsdmPort = 5556;
private int vsdmBufferSize = 10000;
private Boolean vsdmVerboseJson = false;
private String sdcIp = "";
private int sdcPort;
private String returnIp = "";
private int returnPort;
private int serviceRequestSenderPort;
private int vsdmSenderPort;
<<<<<<<
public int getVsdmPort() {
return vsdmPort;
}
public void setVsdmPort(int vsdmPort) {
this.vsdmPort = vsdmPort;
}
public int getVsdmBufferSize() {
return vsdmBufferSize;
}
public void setVsdmBufferSize(int vsdmBufferSize) {
this.vsdmBufferSize = vsdmBufferSize;
}
public Boolean getVsdmVerboseJson() {
return vsdmVerboseJson;
}
public void setVsdmVerboseJson(Boolean vsdmVerboseJson) {
this.vsdmVerboseJson = vsdmVerboseJson;
}
=======
public String getSdcIp() {
return sdcIp;
}
public void setSdcIp(String sdcIp) {
this.sdcIp = sdcIp;
}
public int getSdcPort() {
return sdcPort;
}
public void setSdcPort(int sdcPort) {
this.sdcPort = sdcPort;
}
public String getReturnIp() {
return returnIp;
}
public void setReturnIp(String returnIp) {
this.returnIp = returnIp;
}
public int getReturnPort() {
return returnPort;
}
public void setReturnPort(int returnPort) {
this.returnPort = returnPort;
}
public int getServiceRequestSenderPort() {
return serviceRequestSenderPort;
}
public void setServiceRequestSenderPort(int serviceRequestSenderPort) {
this.serviceRequestSenderPort = serviceRequestSenderPort;
}
public int getVsdmSenderPort() {
return vsdmSenderPort;
}
public void setVsdmSenderPort(int vsdmSenderPort) {
this.vsdmSenderPort = vsdmSenderPort;
}
>>>>>>>
public int getVsdmPort() {
return vsdmPort;
}
public void setVsdmPort(int vsdmPort) {
this.vsdmPort = vsdmPort;
}
public int getVsdmBufferSize() {
return vsdmBufferSize;
}
public void setVsdmBufferSize(int vsdmBufferSize) {
this.vsdmBufferSize = vsdmBufferSize;
}
public Boolean getVsdmVerboseJson() {
return vsdmVerboseJson;
}
public void setVsdmVerboseJson(Boolean vsdmVerboseJson) {
this.vsdmVerboseJson = vsdmVerboseJson;
}
public String getSdcIp() {
return sdcIp;
}
public void setSdcIp(String sdcIp) {
this.sdcIp = sdcIp;
}
public int getSdcPort() {
return sdcPort;
}
public void setSdcPort(int sdcPort) {
this.sdcPort = sdcPort;
}
public String getReturnIp() {
return returnIp;
}
public void setReturnIp(String returnIp) {
this.returnIp = returnIp;
}
public int getReturnPort() {
return returnPort;
}
public void setReturnPort(int returnPort) {
this.returnPort = returnPort;
}
public int getServiceRequestSenderPort() {
return serviceRequestSenderPort;
}
public void setServiceRequestSenderPort(int serviceRequestSenderPort) {
this.serviceRequestSenderPort = serviceRequestSenderPort;
}
public int getVsdmSenderPort() {
return vsdmSenderPort;
}
public void setVsdmSenderPort(int vsdmSenderPort) {
this.vsdmSenderPort = vsdmSenderPort;
} |
<<<<<<<
import us.dot.its.jpo.ode.model.OdeMsgMetadata;
=======
import us.dot.its.jpo.ode.model.OdeLogMetadata;
import us.dot.its.jpo.ode.model.OdeLogMetadata.SecurityResultCode;
import us.dot.its.jpo.ode.model.OdeMsgMetadata.GeneratedBy;
import us.dot.its.jpo.ode.plugin.j2735.J2735Bsm;
>>>>>>>
<<<<<<<
//TODO open-ode
// public static OdeBsmData createOdeBsmData(
// J2735Bsm rawBsm,
// IEEE1609p2Message message,
// BsmLogFileParser bsmFileParser) {
//
// OdeBsmPayload payload = new OdeBsmPayload(rawBsm);
//
// OdeBsmMetadata metadata = new OdeBsmMetadata(payload);
// OdeLogMetadataCreatorHelper.updateLogMetadata(metadata, bsmFileParser);
//
// // If we have a valid message, override relevant data from the message
// if (message != null) {
// ZonedDateTime generatedAt;
// Date ieeeGenTime = message.getGenerationTime();
//
// if (ieeeGenTime != null) {
// generatedAt = DateTimeUtils.isoDateTime(ieeeGenTime);
// } else if (bsmFileParser != null) {
// generatedAt = bsmFileParser.getGeneratedAt();
// } else {
// generatedAt = DateTimeUtils.nowZDT();
// }
// metadata.setRecordGeneratedAt(DateTimeUtils.isoDateTime(generatedAt));
// metadata.setRecordGeneratedBy(GeneratedBy.OBU);
// metadata.setSecurityResultCode(SecurityResultCode.success);
// }
//
// return new OdeBsmData(metadata, payload);
// }
//
// public static OdeBsmData createOdeBsmData(
// J2735Bsm rawBsm, String filename, SerialId serialId) {
// BsmLogFileParser bsmFileParser = new BsmLogFileParser(serialId.getBundleId());
// bsmFileParser.setFilename(filename).setUtcTimeInSec(0).setSecurityResultCode(SecurityResultCode.unknown);
//
// return createOdeBsmData(rawBsm, null, bsmFileParser);
// }
=======
public static OdeBsmData createOdeBsmData(
J2735Bsm rawBsm,
IEEE1609p2Message message,
BsmLogFileParser bsmFileParser) {
OdeBsmPayload payload = new OdeBsmPayload(rawBsm);
OdeLogMetadata metadata = new OdeBsmMetadata(payload);
OdeLogMetadataCreatorHelper.updateLogMetadata(metadata, bsmFileParser);
// If we have a valid message, override relevant data from the message
if (message != null) {
ZonedDateTime generatedAt;
Date ieeeGenTime = message.getGenerationTime();
if (ieeeGenTime != null) {
generatedAt = DateTimeUtils.isoDateTime(ieeeGenTime);
} else if (bsmFileParser != null) {
generatedAt = bsmFileParser.getTimeParser().getGeneratedAt();
} else {
generatedAt = DateTimeUtils.nowZDT();
}
metadata.setRecordGeneratedAt(DateTimeUtils.isoDateTime(generatedAt));
metadata.setRecordGeneratedBy(GeneratedBy.OBU);
metadata.setSecurityResultCode(SecurityResultCode.success);
}
return new OdeBsmData(metadata, payload);
}
public static OdeBsmData createOdeBsmData(
J2735Bsm rawBsm, String filename) {
BsmLogFileParser bsmFileParser = new BsmLogFileParser();
bsmFileParser.setFilename(filename).getTimeParser().setUtcTimeInSec(0).getSecResCodeParser().setSecurityResultCode(SecurityResultCode.unknown);
;
return createOdeBsmData(rawBsm, null, bsmFileParser);
}
>>>>>>>
// public static OdeBsmData createOdeBsmData(
// J2735Bsm rawBsm,
// IEEE1609p2Message message,
// BsmLogFileParser bsmFileParser) {
//
// OdeBsmPayload payload = new OdeBsmPayload(rawBsm);
//
// OdeLogMetadata metadata = new OdeBsmMetadata(payload);
// OdeLogMetadataCreatorHelper.updateLogMetadata(metadata, bsmFileParser);
//
// // If we have a valid message, override relevant data from the message
// if (message != null) {
// ZonedDateTime generatedAt;
// Date ieeeGenTime = message.getGenerationTime();
//
// if (ieeeGenTime != null) {
// generatedAt = DateTimeUtils.isoDateTime(ieeeGenTime);
// } else if (bsmFileParser != null) {
// generatedAt = bsmFileParser.getTimeParser().getGeneratedAt();
// } else {
// generatedAt = DateTimeUtils.nowZDT();
// }
// metadata.setRecordGeneratedAt(DateTimeUtils.isoDateTime(generatedAt));
// metadata.setRecordGeneratedBy(GeneratedBy.OBU);
// metadata.setSecurityResultCode(SecurityResultCode.success);
// }
//
// return new OdeBsmData(metadata, payload);
// }
//
// public static OdeBsmData createOdeBsmData(
// J2735Bsm rawBsm, String filename) {
// BsmLogFileParser bsmFileParser = new BsmLogFileParser();
// bsmFileParser.setFilename(filename).getTimeParser().setUtcTimeInSec(0).getSecResCodeParser().setSecurityResultCode(SecurityResultCode.unknown);
//
// return createOdeBsmData(rawBsm, null, bsmFileParser);
// } |
<<<<<<<
request.put(TimDepositController.RSUS_STRING, rsusOut);
=======
>>>>>>> |
<<<<<<<
=======
import us.dot.its.jpo.ode.model.OdeBsmData;
import us.dot.its.jpo.ode.plugin.PluginFactory;
import us.dot.its.jpo.ode.plugin.j2735.J2735Bsm;
import us.dot.its.jpo.ode.plugin.j2735.J2735MessageFrame;
import us.dot.its.jpo.ode.plugin.j2735.oss.Oss1609dot2Coder;
import us.dot.its.jpo.ode.plugin.j2735.oss.OssJ2735Coder;
>>>>>>> |
<<<<<<<
player.sendMessage(new TextComponentString("Ship construction canceled because its exceeding the ship size limit (Raise with /setPhysConstructionLimit (number)) ; Or because it's attatched to bedrock)"));
=======
player.addChatComponentMessage(new TextComponentString("Ship construction canceled because its exceeding the ship size limit (Raise with /physSettings maxShipSize <number>) ; Or because it's attatched to bedrock)"));
>>>>>>>
player.sendMessage(new TextComponentString("Ship construction canceled because its exceeding the ship size limit (Raise with /physSettings maxShipSize <number>) ; Or because it's attatched to bedrock)"));
<<<<<<<
provider.id2ChunkMap.put(ChunkPos.asLong(x, z), chunk);
=======
if(putInId2ChunkMap){
provider.id2ChunkMap.put(ChunkPos.chunkXZ2Int(x, z), chunk);
}
>>>>>>>
if(putInId2ChunkMap){
provider.id2ChunkMap.put(ChunkPos.asLong(x, z), chunk);
}
<<<<<<<
// moveEntities();
}
//TODO: Remove this shitty check, moving entities should work using an approach similar to MetaWorlds; this is treating Cancer with a Band-Aid!
public boolean shouldMoveEntity(Entity ent){
int i = MathHelper.floor(ent.posX);
int j = MathHelper.floor(ent.posY - 0.20000000298023224D);
int k = MathHelper.floor(ent.posZ);
BlockPos blockpos = new BlockPos(i, j, k);
IBlockState block1State = ent.world.getBlockState(blockpos);
Block block1 = block1State.getBlock();
if (block1.getMaterial(block1State) == Material.AIR||(block1 instanceof BlockLiquid)){
Block block = ent.world.getBlockState(blockpos.down()).getBlock();
if (block instanceof BlockFence || block instanceof BlockWall || block instanceof BlockFenceGate){
block1 = block;
blockpos = blockpos.down();
}
}
return block1.equals(Blocks.AIR);
}
// TODO: Fix the lag here
public void moveEntities() {
List<Entity> riders = worldObj.getEntitiesWithinAABB(Entity.class, collisionBB);
for (Entity ent : riders) {
EntityDraggable draggable = EntityDraggable.getDraggableFromEntity(ent);
if (draggable.worldBelowFeet == this.wrapper&&!(ent instanceof PhysicsWrapperEntity) && !ValkyrienWarfareMod.physicsManager.isEntityFixed(ent) && shouldMoveEntity(ent)) {
float rotYaw = ent.rotationYaw;
float rotPitch = ent.rotationPitch;
float prevYaw = ent.prevRotationYaw;
float prevPitch = ent.prevRotationPitch;
RotationMatrices.applyTransform(coordTransform.prevwToLTransform, coordTransform.prevWToLRotation, ent);
RotationMatrices.applyTransform(coordTransform.lToWTransform, coordTransform.lToWRotation, ent);
ent.rotationYaw = rotYaw;
ent.rotationPitch = rotPitch;
ent.prevRotationYaw = prevYaw;
ent.prevRotationPitch = prevPitch;
Vector oldLookingPos = new Vector(ent.getLook(1.0F));
RotationMatrices.applyTransform(coordTransform.prevWToLRotation, oldLookingPos);
RotationMatrices.applyTransform(coordTransform.lToWRotation, oldLookingPos);
double newPitch = Math.asin(oldLookingPos.Y) * -180D / Math.PI;
double f4 = -Math.cos(-newPitch * 0.017453292D);
double radianYaw = Math.atan2((oldLookingPos.X / f4), (oldLookingPos.Z / f4));
radianYaw += Math.PI;
radianYaw *= -180D / Math.PI;
if (!(Double.isNaN(radianYaw) || Math.abs(newPitch) > 85)) {
double wrappedYaw = MathHelper.wrapDegrees(radianYaw);
double wrappedRotYaw = MathHelper.wrapDegrees(ent.rotationYaw);
double yawDif = wrappedYaw - wrappedRotYaw;
if (Math.abs(yawDif) > 180D) {
if (yawDif < 0) {
yawDif += 360D;
} else {
yawDif -= 360D;
}
}
yawDif %= 360D;
final double threshold = .1D;
if (Math.abs(yawDif) < threshold) {
yawDif = 0D;
}
if (!(ent instanceof EntityPlayer)) {
if (ent instanceof EntityArrow) {
ent.prevRotationYaw = ent.rotationYaw;
ent.rotationYaw -= yawDif;
} else {
ent.prevRotationYaw = ent.rotationYaw;
ent.rotationYaw += yawDif;
}
} else {
if (worldObj.isRemote) {
ent.prevRotationYaw = ent.rotationYaw;
ent.rotationYaw += yawDif;
}
}
}
}
}
=======
>>>>>>> |
<<<<<<<
=======
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
>>>>>>>
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
<<<<<<<
=======
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.Explosion;
>>>>>>>
import net.minecraft.util.text.TextFormatting;
<<<<<<<
=======
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List itemInformation, boolean par4) {
itemInformation.add(TextFormatting.BLUE + "Any Ship hitting this will have a bad time.");
}
>>>>>>>
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List itemInformation, boolean par4) {
itemInformation.add(TextFormatting.BLUE + "Any Ship hitting this will have a bad time.");
} |
<<<<<<<
public static final String MoverTypeName = "net/minecraft/entity/MoverType";
=======
public static final String IChunkGeneratorName = "net/minecraft/world/chunk/IChunkGenerator";
>>>>>>>
public static final String MoverTypeName = "net/minecraft/entity/MoverType";
public static final String IChunkGeneratorName = "net/minecraft/world/chunk/IChunkGenerator"; |
<<<<<<<
shipFor = packetBuf.readUniqueId();
=======
inputType = packetBuf.readEnumValue(ControllerInputType.class);
shipFor = packetBuf.readUuid();
>>>>>>>
inputType = packetBuf.readEnumValue(ControllerInputType.class);
shipFor = packetBuf.readUniqueId();
<<<<<<<
packetBuf.writeUniqueId(shipFor);
=======
packetBuf.writeEnumValue(inputType);
packetBuf.writeUuid(shipFor);
>>>>>>>
packetBuf.writeEnumValue(inputType);
packetBuf.writeUniqueId(shipFor); |
<<<<<<<
import java.util.List;
import java.util.Optional;
=======
>>>>>>>
import java.util.List;
import java.util.Optional; |
<<<<<<<
public void disassembleMultiblockLocal() {
super.disassembleMultiblockLocal();
Optional<PhysicsObject> object = ValkyrienUtils.getPhysicsObject(getWorld(), getPos());
=======
public void dissembleMultiblockLocal() {
super.dissembleMultiblockLocal();
Optional<PhysicsObject> object = ValkyrienUtils.getPhysoManagingBlock(getWorld(), getPos());
>>>>>>>
public void disassembleMultiblockLocal() {
super.disassembleMultiblockLocal();
Optional<PhysicsObject> object = ValkyrienUtils.getPhysoManagingBlock(getWorld(), getPos()); |
<<<<<<<
public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
=======
public void addInformation(ItemStack stack, EntityPlayer player, List itemInformation, boolean par4) {
itemInformation.add(TextFormatting.BLUE + "Right click on the Hover Controller, then right click on any Ether Compressors you wish to automate control.");
}
@Override
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
>>>>>>>
public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
<<<<<<<
// BlockPos gravControllerPos = tileEntity.controllerPos;
// if (gravControllerPos.equals(BlockPos.ORIGIN)) {
// playerIn.sendMessage(new TextComponentString("Set Controller To " + controllerPos.toString()));
// } else {
// playerIn.sendMessage(new TextComponentString("Replaced controller position from: " + gravControllerPos.toString() + " to: " + controllerPos.toString()));
// }
// tileEntity.setController(controllerPos);
=======
BlockPos gravControllerPos = tileEntity.getControllerPos();
if (gravControllerPos == null || gravControllerPos.equals(BlockPos.ORIGIN)) {
playerIn.addChatMessage(new TextComponentString("Set Controller To " + controllerPos.toString()));
} else {
playerIn.addChatMessage(new TextComponentString("Replaced controller position from: " + gravControllerPos.toString() + " to: " + controllerPos.toString()));
}
tileEntity.setControllerPos(controllerPos);
>>>>>>>
BlockPos gravControllerPos = tileEntity.getControllerPos();
if (gravControllerPos == null || gravControllerPos.equals(BlockPos.ORIGIN)) {
playerIn.sendMessage(new TextComponentString("Set Controller To " + controllerPos.toString()));
} else {
playerIn.sendMessage(new TextComponentString("Replaced controller position from: " + gravControllerPos.toString() + " to: " + controllerPos.toString()));
}
tileEntity.setControllerPos(controllerPos); |
<<<<<<<
if(headList == -1){
headList = GLAllocation.generateDisplayLists(1);
GL11.glPushMatrix();
GL11.glNewList(headList, GL11.GL_COMPILE);
vertexbuffer.setTranslation(0, 0, 0);
vertexbuffer.begin(7, DefaultVertexFormats.BLOCK);
BlockPos blockpos = new BlockPos(0,0,0);
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
blockrendererdispatcher.getBlockModelRenderer().renderModel(entity.world, blockrendererdispatcher.getModelForState(headState), headState, blockpos, vertexbuffer, false, 0);
tessellator.draw();
GL11.glEndList();
GL11.glPopMatrix();
}
if(baseList == -1){
baseList = GLAllocation.generateDisplayLists(1);
GL11.glPushMatrix();
GL11.glNewList(baseList, GL11.GL_COMPILE);
vertexbuffer.setTranslation(0, 0, 0);
vertexbuffer.begin(7, DefaultVertexFormats.BLOCK);
BlockPos blockpos = new BlockPos(0,0,0);
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
blockrendererdispatcher.getBlockModelRenderer().renderModel(entity.world, blockrendererdispatcher.getModelForState(baseState), baseState, blockpos, vertexbuffer, false, 0);
tessellator.draw();
GL11.glEndList();
GL11.glPopMatrix();
}
=======
>>>>>>>
<<<<<<<
// BlockPos blockpos = new BlockPos(entity.posX, entity.getEntityBoundingBox().maxY, entity.posZ);
// GlStateManager.translate((float)(x - (double)blockpos.getX() - 0.5D), (float)(y - (double)blockpos.getY()), (float)(z - (double)blockpos.getZ() - 0.5D));
vertexbuffer.setTranslation((float) (0 - .5D), (float) (0), (float) (0 - .5D));
=======
vertexbuffer.setTranslation(0, 0, 0);
>>>>>>>
vertexbuffer.setTranslation(0, 0, 0);
<<<<<<<
=======
>>>>>>> |
<<<<<<<
BlockPos gravControllerPos = tileEntity.controllerPos;
if (gravControllerPos.equals(BlockPos.ORIGIN)) {
playerIn.sendMessage(new TextComponentString("Set Controller To " + controllerPos.toString()));
} else {
playerIn.sendMessage(new TextComponentString("Replaced controller position from: " + gravControllerPos.toString() + " to: " + controllerPos.toString()));
}
tileEntity.setController(controllerPos);
=======
// BlockPos gravControllerPos = tileEntity.controllerPos;
// if (gravControllerPos.equals(BlockPos.ORIGIN)) {
// playerIn.addChatMessage(new TextComponentString("Set Controller To " + controllerPos.toString()));
// } else {
// playerIn.addChatMessage(new TextComponentString("Replaced controller position from: " + gravControllerPos.toString() + " to: " + controllerPos.toString()));
// }
// tileEntity.setController(controllerPos);
>>>>>>>
// BlockPos gravControllerPos = tileEntity.controllerPos;
// if (gravControllerPos.equals(BlockPos.ORIGIN)) {
// playerIn.sendMessage(new TextComponentString("Set Controller To " + controllerPos.toString()));
// } else {
// playerIn.sendMessage(new TextComponentString("Replaced controller position from: " + gravControllerPos.toString() + " to: " + controllerPos.toString()));
// }
// tileEntity.setController(controllerPos); |
<<<<<<<
import java.util.HashMap;
import ValkyrienWarfareBase.Capability.IAirshipCounterCapability;
=======
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import ValkyrienWarfareBase.API.RotationMatrices;
import ValkyrienWarfareBase.API.Vector;
import ValkyrienWarfareBase.CoreMod.ValkyrienWarfarePlugin;
>>>>>>>
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import ValkyrienWarfareBase.API.RotationMatrices;
import ValkyrienWarfareBase.API.Vector;
import ValkyrienWarfareBase.CoreMod.ValkyrienWarfarePlugin;
<<<<<<<
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTPrimitive;
=======
>>>>>>>
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTPrimitive;
<<<<<<<
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextComponentString;
=======
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.Explosion;
>>>>>>>
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.Explosion; |
<<<<<<<
public static void onMarkBlocksForUpdate(ViewFrustum frustum, int p_187474_1_, int p_187474_2_, int p_187474_3_, int p_187474_4_, int p_187474_5_, int p_187474_6_, boolean requiresImmediateUpdate) {
frustum.markBlocksForUpdate(p_187474_1_, p_187474_2_, p_187474_3_, p_187474_4_, p_187474_5_, p_187474_6_, requiresImmediateUpdate);
int midX = (p_187474_1_ + p_187474_4_) / 2;
int midY = (p_187474_2_ + p_187474_5_) / 2;
int midZ = (p_187474_3_ + p_187474_6_) / 2;
BlockPos newPos = new BlockPos(midX, midY, midZ);
PhysicsWrapperEntity wrapper = ValkyrienWarfareMod.physicsManager.getObjectManagingPos(Minecraft.getMinecraft().world, newPos);
if (wrapper != null && wrapper.wrapping.renderer != null) {
wrapper.wrapping.renderer.updateRange(p_187474_1_, p_187474_2_, p_187474_3_, p_187474_4_, p_187474_5_, p_187474_6_);
}
}
=======
>>>>>>>
<<<<<<<
GL11.glPushMatrix();
// GlStateManager.disableAlpha();
// GlStateManager.disableBlend();
GlStateManager.enableLighting();
renderGlobal.mc.entityRenderer.enableLightmap();
double playerX = TileEntityRendererDispatcher.instance.staticPlayerX;
double playerY = TileEntityRendererDispatcher.instance.staticPlayerY;
double playerZ = TileEntityRendererDispatcher.instance.staticPlayerZ;
GL11.glPushMatrix();
for (PhysicsWrapperEntity wrapper : ValkyrienWarfareMod.physicsManager.getManagerForWorld(renderGlobal.world).physicsEntities) {
// Vector centerOfRotation = wrapper.wrapping.centerCoord;
if(wrapper != null && wrapper.wrapping != null && wrapper.wrapping.renderer != null){
if(wrapper.wrapping.renderer.offsetPos != null){
TileEntityRendererDispatcher.instance.staticPlayerX = wrapper.wrapping.renderer.offsetPos.getX();
TileEntityRendererDispatcher.instance.staticPlayerY = wrapper.wrapping.renderer.offsetPos.getY();
TileEntityRendererDispatcher.instance.staticPlayerZ = wrapper.wrapping.renderer.offsetPos.getZ();
GL11.glPushMatrix();
wrapper.wrapping.renderer.setupTranslation(partialTicks);
wrapper.wrapping.renderer.renderTileEntities(partialTicks);
wrapper.wrapping.renderer.renderEntities(partialTicks);
GL11.glPopMatrix();
}
=======
>>>>>>> |
<<<<<<<
=======
MinecraftForge.EVENT_BUS.register(new ExplosionHandler());
>>>>>>>
MinecraftForge.EVENT_BUS.register(new ExplosionHandler()); |
<<<<<<<
=======
WorldPhysObjectManager manager = ValkyrienWarfareMod.physicsManager.getManagerForWorld(worldIn);
if (manager != null) {
PhysicsWrapperEntity wrapperEnt = manager.getManagingObjectForChunk(worldIn.getChunkFromBlockCoords(pos));
if (wrapperEnt != null) {
wrapperEnt.wrapping.doPhysics = !wrapperEnt.wrapping.doPhysics;
return true;
}
}
>>>>>>>
WorldPhysObjectManager manager = ValkyrienWarfareMod.physicsManager.getManagerForWorld(worldIn);
if (manager != null) {
PhysicsWrapperEntity wrapperEnt = manager.getManagingObjectForChunk(worldIn.getChunkFromBlockCoords(pos));
if (wrapperEnt != null) {
wrapperEnt.wrapping.doPhysics = !wrapperEnt.wrapping.doPhysics;
return true;
}
}
<<<<<<<
WorldPhysObjectManager manager = ValkyrienWarfareMod.physicsManager.getManagerForWorld(worldIn);
if (manager != null) {
PhysicsWrapperEntity wrapperEnt = manager.getManagingObjectForChunk(worldIn.getChunkFromBlockCoords(pos));
if (wrapperEnt != null) {
wrapperEnt.wrapping.doPhysics = !wrapperEnt.wrapping.doPhysics;
return true;
}
}
PhysicsWrapperEntity wrapper = new PhysicsWrapperEntity(worldIn, pos.getX(), pos.getY(), pos.getZ(), playerIn, DetectorManager.DetectorIDs.ShipSpawnerGeneral.ordinal());
worldIn.spawnEntity(wrapper);
=======
PhysicsWrapperEntity wrapper = new PhysicsWrapperEntity(worldIn, pos.getX(), pos.getY(), pos.getZ(), playerIn, DetectorManager.DetectorIDs.ShipSpawnerGeneral.ordinal());
worldIn.spawnEntityInWorld(wrapper);
>>>>>>>
PhysicsWrapperEntity wrapper = new PhysicsWrapperEntity(worldIn, pos.getX(), pos.getY(), pos.getZ(), playerIn, DetectorManager.DetectorIDs.ShipSpawnerGeneral.ordinal());
worldIn.spawnEntity(wrapper); |
<<<<<<<
if (uiShield.id == UIShield.NFC_SHIELD.id)
return addToCreatedListAndReturn(uiShield, new NfcFragment());
=======
if (uiShield.id == UIShield.COLOR_DETECTION_SHIELD.id)
return addToCreatedListAndReturn(uiShield, new ColorDetectionFragment());
>>>>>>>
if (uiShield.id == UIShield.NFC_SHIELD.id)
return addToCreatedListAndReturn(uiShield, new NfcFragment());
if (uiShield.id == UIShield.COLOR_DETECTION_SHIELD.id)
return addToCreatedListAndReturn(uiShield, new ColorDetectionFragment()); |
<<<<<<<
return super.setTag(tag);
=======
notifyHardwareOfTwitterSelection();
return super.init(tag);
>>>>>>>
return super.init(tag); |
<<<<<<<
// TODO: Implements call to create IN stuff
=======
if(this.field !=null && this.terms!=null) {
//TODO: Implements call to create IN stuff
}
>>>>>>>
if(this.field !=null && this.terms!=null) {
//TODO: Implements call to create IN stuff
}
<<<<<<<
private Boolean isIncludedInList(List<Serializable> list, Object value) {
// TODO: Implements call to create IN stuff
return false;
}
=======
>>>>>>>
// private Boolean isIncludedInList(List<Serializable> list, Object value) {
// // TODO: Implements call to create IN stuff
//
// return false;
// } |
<<<<<<<
import com.stratio.connector.deep.configuration.ExtractorConnectConstants;
import com.stratio.crossdata.common.data.AlterOptions;
=======
import com.stratio.connector.deep.configuration.DeepConnectorConstants;
>>>>>>>
import com.stratio.crossdata.common.data.AlterOptions;
import com.stratio.connector.deep.configuration.DeepConnectorConstants; |
<<<<<<<
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
=======
import static com.stratio.connector.deep.PrepareFunctionalTest.prepareDataForTest;
import static com.stratio.connector.deep.PrepareFunctionalTest.clearData;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
>>>>>>>
import static com.stratio.connector.deep.PrepareFunctionalTest.clearData;
import static com.stratio.connector.deep.PrepareFunctionalTest.prepareDataForTest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
<<<<<<<
private static final String RIGHTTABLE_MAIN_COLUMN_CONSTANT = "author";
private static final String RIGHTTABLE_MAIN_COLUMN_ALIAS_CONSTANT = "authorAlias";
private static final String RIGHTTABLE_SECONDARY_COLUMN_CONSTANT = "author_name";
=======
private static final String TITLE_CONSTANT = "title";
private static final String TITLE_EX = "Hey Jude";
private static final String YEAR_EX = "2004";
private static final String YEAR_CONSTANT = "year";
>>>>>>>
private static final String TITLE_CONSTANT = "title";
private static final String TITLE_EX = "Hey Jude";
private static final String YEAR_EX = "2004";
private static final String YEAR_CONSTANT = "year"; |
<<<<<<<
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
=======
>>>>>>>
<<<<<<<
import com.stratio.connector.deep.engine.query.utils.PartialResultsUtils;
import com.stratio.deep.commons.config.ExtractorConfig;
=======
>>>>>>>
<<<<<<<
import com.stratio.meta.common.connector.Operations;
import com.stratio.meta.common.data.Cell;
import com.stratio.meta.common.data.ResultSet;
import com.stratio.meta.common.data.Row;
=======
>>>>>>>
<<<<<<<
import com.stratio.meta.common.logicalplan.PartialResults;
import com.stratio.meta.common.logicalplan.Project;
import com.stratio.meta.common.logicalplan.Select;
import com.stratio.meta.common.logicalplan.UnionStep;
import com.stratio.meta.common.metadata.structures.ColumnMetadata;
=======
>>>>>>>
<<<<<<<
import com.stratio.meta2.common.data.ColumnName;
import com.stratio.meta2.common.metadata.ColumnType;
import com.stratio.meta2.common.statements.structures.selectors.ColumnSelector;
=======
>>>>>>>
<<<<<<<
List<LogicalStep> initialSteps = workflow.getInitialSteps();
JavaRDD<Cells> partialResultRdd = null;
for (LogicalStep initialStep : initialSteps) {
Project project = (Project) initialStep;
ExtractorConfig<Cells> extractorConfig = retrieveConfiguration(project.getClusterName());
JavaRDD<Cells> initialRdd = createRDD(project, extractorConfig);
partialResultRdd = executeInitialStep(initialStep.getNextStep(), initialRdd, project.getTableName()
.toString());
}
return buildQueryResult(partialResultRdd, (Select) workflow.getLastStep());
}
/**
* @param clusterName
* @return
* @throws ExecutionException
*/
private ExtractorConfig<Cells> retrieveConfiguration(ClusterName clusterName) throws ExecutionException {
DeepConnection deepConnection = null;
try {
deepConnection = (DeepConnection) deepConnectionHandler.getConnection(clusterName.getName());
} catch (HandlerConnectionException ex) {
throw new ExecutionException("Error retrieving the cluster connection information ["
+ clusterName.toString() + "]", ex);
}
ExtractorConfig<Cells> extractorConfig = null;
if (deepConnection != null) {
extractorConfig = deepConnection.getExtractorConfig().clone();
} else {
throw new ExecutionException("Unknown cluster [" + clusterName.toString() + "]");
}
return extractorConfig;
}
/**
* @param resultRdd
* @return
*/
private QueryResult buildQueryResult(JavaRDD<Cells> resultRdd, Select selectStep) {
// TODO Build the ResultSet
List<Cells> resultCells = resultRdd.collect();
Map<ColumnName, String> columnMap = selectStep.getColumnMap();
Map<String, ColumnType> columnType = selectStep.getTypeMap();
// Adding column metadata information
List<ColumnMetadata> resultMetadata = new LinkedList<>();
for (Entry<ColumnName, String> columnItem : columnMap.entrySet()) {
ColumnName columnName = columnItem.getKey();
String columnAlias = columnItem.getValue();
ColumnMetadata columnMetadata = new ColumnMetadata(columnName.getTableName().getQualifiedName(),
columnName.getName());
columnMetadata.setColumnAlias(columnAlias);
// TODO Check if we have to get the alias or the column qualified name
// columnMetadata.setType(columnType.get(columnAlias));
columnMetadata.setType(columnType.get(columnName.getQualifiedName()));
resultMetadata.add(columnMetadata);
}
List<Row> resultRows = new LinkedList<>();
for (Cells cells : resultCells) {
resultRows.add(buildRowFromCells(cells, columnMap));
}
ResultSet resultSet = new ResultSet();
resultSet.setRows(resultRows);
resultSet.setColumnMetadata(resultMetadata);
QueryResult queryResult = QueryResult.createQueryResult(resultSet);
return queryResult;
}
/**
* @param cells
* @return
*/
private Row buildRowFromCells(Cells cells, Map<ColumnName, String> columnMap) {
Row row = new Row();
for (Entry<ColumnName, String> columnItem : columnMap.entrySet()) {
ColumnName columnName = columnItem.getKey();
// Retrieving the cell to create a new meta cell with its value
com.stratio.deep.commons.entity.Cell cellsCell = cells.getCellByName(columnName.getTableName()
.getQualifiedName(), columnName.getName());
Cell rowCell = new Cell(cellsCell.getCellValue());
// Adding the cell by column alias
row.addCell(columnItem.getValue(), rowCell);
}
return row;
}
/**
* @param projection
* @param extractorConfig
* @return
*/
private JavaRDD<Cells> createRDD(Project projection, ExtractorConfig<Cells> extractorConfig) {
// Retrieving project information
List<String> columnsList = new ArrayList<>();
for (ColumnName columnName : projection.getColumnList()) {
columnsList.add(columnName.getName());
}
extractorConfig.putValue(ExtractorConstants.INPUT_COLUMNS, columnsList.toArray(new String[columnsList.size()]));
extractorConfig.putValue(ExtractorConstants.TABLE, projection.getTableName().getName());
extractorConfig.putValue(ExtractorConstants.CATALOG, projection.getCatalogName());
JavaRDD<Cells> rdd = deepContext.createJavaRDD(extractorConfig);
return rdd;
}
/**
* @param logicalStep
* @param rdd
* @return
* @throws ExecutionException
* @throws UnsupportedException
*/
private JavaRDD<Cells> executeInitialStep(LogicalStep logicalStep, JavaRDD<Cells> rdd, String tableName)
throws ExecutionException, UnsupportedException {
String stepId = tableName;
LogicalStep currentStep = logicalStep;
while (currentStep != null) {
if (currentStep instanceof Filter) {
rdd = executeFilter((Filter) currentStep, rdd);
} else if (currentStep instanceof Select) {
rdd = prepareResult((Select) currentStep, rdd);
} else if (currentStep instanceof UnionStep) {
UnionStep unionStep = (UnionStep) currentStep;
JavaRDD<Cells> joinedRdd = executeUnion(unionStep, rdd);
if (joinedRdd == null) {
break;
} else {
rdd = joinedRdd;
if (unionStep instanceof Join) {
stepId = ((Join) unionStep).getId();
} else {
throw new ExecutionException("Unknown union step found [" + unionStep.getOperation().toString()
+ "]");
}
}
} else {
throw new ExecutionException("Unexpected step found [" + currentStep.getOperation().toString() + "]");
}
currentStep = currentStep.getNextStep();
}
partialResultsMap.put(stepId, rdd);
return rdd;
}
/**
* @param unionStep
* @param rdd
* @throws ExecutionException
* @throws UnsupportedException
*/
private JavaRDD<Cells> executeUnion(UnionStep unionStep, JavaRDD<Cells> rdd) throws ExecutionException,
UnsupportedException {
JavaRDD<Cells> joinedRdd = null;
if (unionStep instanceof Join) {
Join joinStep = (Join) unionStep;
if (joinStep.getOperation().equals(Operations.SELECT_INNER_JOIN_PARTIALS_RESULTS)) {
Iterator<LogicalStep> iterator = joinStep.getPreviousSteps().iterator();
PartialResults partialResults = null;
while (iterator.hasNext() && partialResults == null) {
LogicalStep lStep = iterator.next();
if (lStep instanceof PartialResults) {
partialResults = (PartialResults) lStep;
}
}
if (partialResults == null)
throw new UnsupportedException(
"Missing logical step \"partialResults\" in a join with partial results");
JavaRDD<Cells> leftRdd = PartialResultsUtils.createRDDFromResultSet(deepContext,
partialResults.getResults());
// TODO do an executeJoin where left and right selectar order is checked
joinedRdd = executeUnorderedJoin(leftRdd, rdd, joinStep.getJoinRelations(), partialResults.getResults()
.getColumnMetadata().get(0).getTableName());
} else {
String joinLeftTableName = joinStep.getSourceIdentifiers().get(0);
JavaRDD<Cells> leftRdd = partialResultsMap.get(joinLeftTableName);
if (leftRdd != null) {
joinedRdd = executeJoin(leftRdd, rdd, joinStep.getJoinRelations());
partialResultsMap.remove(joinLeftTableName);
partialResultsMap.put(joinStep.getId(), rdd);
}
}
} else {
throw new ExecutionException("Unknown union step found [" + unionStep.getOperation().toString() + "]");
}
return joinedRdd;
}
/**
* @param leftRdd
* @param rdd
* @param joinRelations
*/
private JavaRDD<Cells> executeJoin(JavaRDD<Cells> leftRdd, JavaRDD<Cells> rdd, List<Relation> joinRelations) {
return QueryFilterUtils.doJoin(leftRdd, rdd, joinRelations);
}
/**
* @param leftRdd
* @param rdd
* @param joinRelations
*/
private JavaRDD<Cells> executeUnorderedJoin(JavaRDD<Cells> partialResultRDD, JavaRDD<Cells> rdd,
List<Relation> joinRelations, String partialResultsQuilifiedName) {
List<Relation> orderedRelations = new ArrayList<Relation>();
for (Relation relation : joinRelations) {
ColumnSelector colSelector = (ColumnSelector) relation.getLeftTerm();
if (colSelector.getName().getTableName().getQualifiedName().equals(partialResultsQuilifiedName)) {
orderedRelations.add(relation);
} else {
orderedRelations.add(new Relation(relation.getRightTerm(), relation.getOperator(), relation
.getLeftTerm()));
}
}
return executeJoin(partialResultRDD, rdd, orderedRelations);
}
/**
* @param selectStep
* @param rdd
*/
private JavaRDD<Cells> prepareResult(Select selectStep, JavaRDD<Cells> rdd) throws ExecutionException {
return QueryFilterUtils.filterSelectedColumns(rdd, selectStep.getColumnMap().keySet());
}
/**
* @param filterStep
* @param rdd
* @throws UnsupportedException
*/
private JavaRDD<Cells> executeFilter(Filter filterStep, JavaRDD<Cells> rdd) throws ExecutionException,
UnsupportedException {
Relation relation = filterStep.getRelation();
if (relation.getOperator().isInGroup(Operator.Group.COMPARATOR)) {
rdd = QueryFilterUtils.doWhere(rdd, relation);
} else {
throw new ExecutionException("Unknown Filter found [" + filterStep.getRelation().getOperator().toString()
+ "]");
}
return rdd;
=======
QueryExecutor executor = new QueryExecutor(deepContext, deepConnectionHandler);
return executor.executeWorkFlow(workflow);
>>>>>>>
return execute(workflow);
}
/*
* (non-Javadoc)
*
* @see com.stratio.meta.common.connector.IQueryEngine#execute(com.stratio.meta.common.logicalplan.LogicalWorkflow)
*/
@Override
public QueryResult executeWorkFlow(LogicalWorkflow workflow) throws UnsupportedException, ExecutionException {
QueryExecutor executor = new QueryExecutor(deepContext, deepConnectionHandler);
return executor.executeWorkFlow(workflow); |
<<<<<<<
* Configurate and create the DeepSparkContext with the {@link com.stratio.crossdata.common.connector.IConfiguration}.
*
=======
* Configurate and create the DeepSparkContext with the {@link com.stratio.crossdata.common.connector.IConfiguration}.
*
*
>>>>>>>
* Configurate and create the DeepSparkContext with the {@link com.stratio.crossdata.common.connector.IConfiguration}. |
<<<<<<<
package com.stratio.connector.deep.engine.query;
=======
package com.stratio.connector.deep.engine.query;
>>>>>>>
package com.stratio.connector.deep.engine.query;
<<<<<<<
=======
import com.stratio.deep.core.context.DeepSparkContext;
>>>>>>> |
<<<<<<<
p.nextToken();
Object builder = deserializeFromObject(p, ctxt);
return finishBuild(ctxt, builder);
=======
return finishBuild(ctxt, deserializeFromObject(p, ctxt));
>>>>>>>
p.nextToken();
return finishBuild(ctxt, deserializeFromObject(p, ctxt)); |
<<<<<<<
extractorconfig.setExtractorImplClassName(clusterProperties.getValue("cluster." + dataBaseName + "."
+ ExtractorConnectConstants.INNERCLASS));
=======
extractorconfig.setExtractorImplClassName(clusterProperties.getValue("cluster." + dataBase + "."
+ ExtractorConstants.INNERCLASS));
>>>>>>>
extractorconfig.setExtractorImplClassName(clusterProperties.getValue("cluster." + dataBaseName + "."
+ ExtractorConstants.INNERCLASS));
<<<<<<<
=======
/**
* return the connection status.
* @param config {@link ConnectorClusterConfig}
* @return String
*/
private String checkDatabaseFromClusterName(ConnectorClusterConfig config) {
String db = "";
if (config.getName().getName().contains(DeepConnectorConstants.DB_CASSANDRA)) {
db = DeepConnectorConstants.DB_CASSANDRA;
} else if (config.getName().getName().contains(DeepConnectorConstants.DB_MONGO)) {
db = DeepConnectorConstants.DB_MONGO;
} else if (config.getName().getName().contains(DeepConnectorConstants.DB_ELASTICSEARCH)) {
db = DeepConnectorConstants.DB_ELASTICSEARCH;
}else if (config.getName().getName().contains(DeepConnectorConstants.HDFS)) {
db = DeepConnectorConstants.HDFS;
}
return db;
}
>>>>>>> |
<<<<<<<
public SmsVerification handle(SendSmsVerificationCodeCommand command) {
if (smsVerificationRepository.exists(command.getMobile(), command.getScope())) {
throw new MobileIsStillUnderVerificationException(command.getMobile(), command.getScope());
=======
public SmsVerification handle(@Valid SendSmsVerificationCodeCommand command) {
if (smsVerificationRepository.exists(command.getMobile())) {
throw new MobileIsStillUnderVerificationException(command.getMobile());
>>>>>>>
public SmsVerification handle(@Valid SendSmsVerificationCodeCommand command) {
if (smsVerificationRepository.exists(command.getMobile(), command.getScope())) {
throw new MobileIsStillUnderVerificationException(command.getMobile(), command.getScope());
<<<<<<<
public void handle(VerifySmsVerificationCodeCommand command) {
SmsVerification smsVerification = smsVerificationRepository
.shouldFindBy(command.getMobile(), command.getScope());
=======
public void handle(@Valid VerifySmsVerificationCodeCommand command) {
SmsVerification smsVerification = smsVerificationRepository.shouldFindBy(command.getMobile());
>>>>>>>
public void handle(@Valid VerifySmsVerificationCodeCommand command) {
SmsVerification smsVerification = smsVerificationRepository
.shouldFindBy(command.getMobile(), command.getScope()); |
<<<<<<<
import com.thebund1st.daming.json.deserializers.SmsVerificationScopeJsonDeserializer;
=======
import com.thebund1st.daming.validation.ValidMobilePhoneNumber;
import com.thebund1st.daming.validation.ValidSmsVerificationCode;
>>>>>>>
import com.thebund1st.daming.json.deserializers.SmsVerificationScopeJsonDeserializer;
import com.thebund1st.daming.validation.ValidMobilePhoneNumber;
import com.thebund1st.daming.validation.ValidSmsVerificationCode;
<<<<<<<
@JsonDeserialize(using = SmsVerificationScopeJsonDeserializer.class)
private SmsVerificationScope scope;
=======
@ValidSmsVerificationCode
>>>>>>>
@JsonDeserialize(using = SmsVerificationScopeJsonDeserializer.class)
private SmsVerificationScope scope;
@ValidSmsVerificationCode |
<<<<<<<
import com.terraformersmc.terrestria.surface.DuneSurfaceBuilder;
=======
import com.terraformersmc.terrestria.Terrestria;
import com.terraformersmc.terrestria.surface.CanyonSurfaceBuilder;
>>>>>>>
import com.terraformersmc.terrestria.surface.DuneSurfaceBuilder;
import com.terraformersmc.terrestria.Terrestria;
import com.terraformersmc.terrestria.surface.CanyonSurfaceBuilder;
<<<<<<<
public static CliffSurfaceBuilder CLIFF;
public static DuneSurfaceBuilder DUNES;
=======
public static CliffSurfaceBuilder BASALT_CLIFF;
public static CanyonSurfaceBuilder CANYON_CLIFF;
>>>>>>>
public static CliffSurfaceBuilder CLIFF;
public static DuneSurfaceBuilder DUNES;
public static CliffSurfaceBuilder BASALT_CLIFF;
public static CanyonSurfaceBuilder CANYON_CLIFF; |
<<<<<<<
import com.terraformersmc.terrestria.feature.TreeDefinition;
import com.terraformersmc.terrestria.feature.arch.CanyonArchGenerator;
import com.terraformersmc.terrestria.feature.arch.CanyonArchStructureFeature;
import com.terraformersmc.terrestria.feature.trees.*;
=======
import com.terraformersmc.terrestria.feature.trees.decorator.SakuraLeafPileDecorator;
import com.terraformersmc.terrestria.feature.trees.decorator.FixSmallLogsDecorator;
import com.terraformersmc.terrestria.feature.trees.templates.CanopyTreeFeatureMega;
>>>>>>>
import com.terraformersmc.terrestria.feature.trees.decorator.SakuraLeafPileDecorator;
import com.terraformersmc.terrestria.feature.trees.decorator.FixSmallLogsDecorator;
import com.terraformersmc.terrestria.feature.trees.templates.CanopyTreeFeatureMega;
import com.terraformersmc.terrestria.feature.TreeDefinition;
import com.terraformersmc.terrestria.feature.arch.CanyonArchGenerator;
import com.terraformersmc.terrestria.feature.arch.CanyonArchStructureFeature;
import com.terraformersmc.terrestria.feature.trees.*;
<<<<<<<
public static CanyonArchStructureFeature CANYON_ARCH_STRUCTURE;
public static StructurePieceType CANYON_ARCH_PIECE;
public static void init() {
BRYCE_TREE = register("bryce_tree",
new BryceTreeFeature(DefaultFeatureConfig::deserialize, false, TerrestriaBlocks.SMALL_OAK_LOG.getDefaultState(), Blocks.OAK_LEAVES.getDefaultState())
);
=======
public static TreeDecoratorType<SakuraLeafPileDecorator> SAKURA_LEAF_PILE_DECORATOR;
public static TreeDecoratorType<FixSmallLogsDecorator> FIX_SMALL_LOGS_DECORATOR;
>>>>>>>
public static TreeDecoratorType<SakuraLeafPileDecorator> SAKURA_LEAF_PILE_DECORATOR;
public static TreeDecoratorType<FixSmallLogsDecorator> FIX_SMALL_LOGS_DECORATOR;
public static CanyonArchStructureFeature CANYON_ARCH_STRUCTURE;
public static StructurePieceType CANYON_ARCH_PIECE;
<<<<<<<
CANYON_ARCH_STRUCTURE = Registry.register(Registry.STRUCTURE_FEATURE, new Identifier(Terrestria.MOD_ID, "canyon_arch"),
new CanyonArchStructureFeature(DefaultFeatureConfig::deserialize)
);
Feature.STRUCTURES.put("canyon_arch", CANYON_ARCH_STRUCTURE);
CANYON_ARCH_PIECE = Registry.register(Registry.STRUCTURE_PIECE, new Identifier(Terrestria.MOD_ID, "canyon_arch"), CanyonArchGenerator::new);
=======
// TODO
/*SAKURA_LEAF_PILE_DECORATOR = Registry.register(
Registry.TREE_DECORATOR_TYPE, new Identifier(Terrestria.MOD_ID, "sakura_leaf_pile"),
MixinTreeDecoratorType.create(SakuraLeafPileDecorator::new)
);
FIX_SMALL_LOGS_DECORATOR = Registry.register(
Registry.TREE_DECORATOR_TYPE, new Identifier(Terrestria.MOD_ID, "fix_small_logs"),
MixinTreeDecoratorType.create(FixSmallLogsDecorator::new)
);*/
>>>>>>>
// TODO
/*SAKURA_LEAF_PILE_DECORATOR = Registry.register(
Registry.TREE_DECORATOR_TYPE, new Identifier(Terrestria.MOD_ID, "sakura_leaf_pile"),
MixinTreeDecoratorType.create(SakuraLeafPileDecorator::new)
);
FIX_SMALL_LOGS_DECORATOR = Registry.register(
Registry.TREE_DECORATOR_TYPE, new Identifier(Terrestria.MOD_ID, "fix_small_logs"),
MixinTreeDecoratorType.create(FixSmallLogsDecorator::new)
);*/
CANYON_ARCH_STRUCTURE = Registry.register(Registry.STRUCTURE_FEATURE, new Identifier(Terrestria.MOD_ID, "canyon_arch"),
new CanyonArchStructureFeature(DefaultFeatureConfig::deserialize)
);
Feature.STRUCTURES.put("canyon_arch", CANYON_ARCH_STRUCTURE);
CANYON_ARCH_PIECE = Registry.register(Registry.STRUCTURE_PIECE, new Identifier(Terrestria.MOD_ID, "canyon_arch"), CanyonArchGenerator::new); |
<<<<<<<
=======
import javax.naming.ConfigurationException;
import com.sun.xml.internal.ws.util.StringUtils;
>>>>>>>
import javax.naming.ConfigurationException;
import com.sun.xml.internal.ws.util.StringUtils; |
<<<<<<<
// handle exception
if(header[3] != (byte) 20){
byteBuf.readerIndex(savedReaderIndex);
byteBuf.skipBytes(tt);
long requestId = Bytes.bytes2long(header, 4);
DubboRpcResponse response = new DubboRpcResponse();
response.setRequestId(requestId);
response.setBytes(new byte[]{1});
return response;
}
byteBuf.readerIndex(savedReaderIndex);
byte[] data = new byte[tt];
byteBuf.readBytes(data);
// HEADER_LENGTH + 1,忽略header & Response value type的读取,直接读取实际Return value
// dubbo返回的body中,前后各有一个换行,去掉
byte[] subArray = Arrays.copyOfRange(data, HEADER_LENGTH + 2, data.length - 1);
long requestId = Bytes.bytes2long(data, 4);
// logger.info("consumer-agent发送dubbo请求编号:{}", requestId);
=======
>>>>>>> |
<<<<<<<
JCloudsCloud original = new JCloudsCloud("aws-profile", "aws-ec2", "identity",
"credential", "", "http://localhost", 1, 30,
600 * 1000, 600 * 1000, null, Collections.<JCloudsSlaveTemplate>emptyList());
=======
JCloudsCloud original = new JCloudsCloud("aws-profile", "aws-ec2", "identity", "credential", "", "endPointUrl", 1,
DEFAULT_INSTANCE_RETENTION_TIME_IN_MINUTES, 600 * 1000, 600 * 1000, null, Collections.<JCloudsSlaveTemplate>emptyList());
>>>>>>>
JCloudsCloud original = new JCloudsCloud("aws-profile", "aws-ec2", "identity",
"credential", "", "http://localhost", 1, DEFAULT_INSTANCE_RETENTION_TIME_IN_MINUTES,
600 * 1000, 600 * 1000, null, Collections.<JCloudsSlaveTemplate>emptyList()); |
<<<<<<<
//Traincraft.degActivateChannel.registerMessage(PacketDEGActivate.Handler.class,
// PacketDEGActivate.class, 10, Side.SERVER);
=======
/*Traincraft.degActivateChannel.registerMessage(PacketDEGActivate.Handler.class,
PacketDEGActivate.class, 10, Side.SERVER);*/
>>>>>>>
//Traincraft.degActivateChannel.registerMessage(PacketDEGActivate.Handler.class,
// PacketDEGActivate.class, 10, Side.SERVER);
/*Traincraft.degActivateChannel.registerMessage(PacketDEGActivate.Handler.class,
PacketDEGActivate.class, 10, Side.SERVER);*/ |
<<<<<<<
=======
for(ItemStack dye : dyeGreen){
cm.addRecipe(2, null, new ItemStack(ItemIDs.bogie.item, 3), new ItemStack(ItemIDs.steelframe.item, 3),
new ItemStack(itemSteel, 1, itemDamageSteel), new ItemStack(ItemIDs.steelchimney.item, 2),
new ItemStack(ItemIDs.steelcab.item, 1), new ItemStack(ItemIDs.boiler.item, 2),
new ItemStack(ItemIDs.firebox.item, 2), null, dye,
new ItemStack (ItemIDs.minecartLocoHallClass.item, 1), 1);
}
for (ItemStack dye : dyeBlack) {
cm.addRecipe(2, null, new ItemStack(ItemIDs.bogie.item, 4), new ItemStack(ItemIDs.steelframe.item, 4),
new ItemStack(itemSteel, 2, itemDamageSteel), new ItemStack(ItemIDs.steelchimney.item, 2),
new ItemStack(ItemIDs.steelcab.item, 1), new ItemStack(ItemIDs.boiler.item, 3),
new ItemStack(ItemIDs.firebox.item, 3), null, dye,
new ItemStack(ItemIDs.minecartLocoBerk1225.item, 1), 1);
cm.addRecipe(2, null, new ItemStack(ItemIDs.bogie.item, 4), new ItemStack(ItemIDs.steelframe.item, 4),
new ItemStack(itemSteel, 2, itemDamageSteel), new ItemStack(ItemIDs.steelchimney.item, 2),
new ItemStack(ItemIDs.steelcab.item, 1), new ItemStack(ItemIDs.boiler.item, 3),
new ItemStack(ItemIDs.firebox.item, 3), null, dye,
new ItemStack(ItemIDs.minecartLocoBerk765.item, 1), 1);
cm.addRecipe(2, null, new ItemStack(ItemIDs.bogie.item, 4), new ItemStack(ItemIDs.steelframe.item, 4),
new ItemStack(itemSteel, 2, itemDamageSteel), new ItemStack(ItemIDs.steelchimney.item, 2),
new ItemStack(ItemIDs.steelcab.item, 1), new ItemStack(ItemIDs.boiler.item, 3),
new ItemStack(ItemIDs.firebox.item, 3), null, dye,
new ItemStack(ItemIDs.minecartLocoFowler.item, 1), 1);
for (ItemStack c : coal) {
cm.addRecipe(2, null, new ItemStack(ItemIDs.bogie.item, 4), new ItemStack(ItemIDs.steelframe.item, 4),
new ItemStack(itemSteel, 2, itemDamageSteel), null, null, null, null,
new ItemStack(c.getItem(), 2), dye,
new ItemStack(ItemIDs.minecarttenderBerk1225.item, 1), 1);
cm.addRecipe(2, null, new ItemStack(ItemIDs.bogie.item, 3), new ItemStack(ItemIDs.steelframe.item, 3),
new ItemStack(itemSteel, 2, itemDamageSteel), null, null, null, null,
new ItemStack(c.getItem(), 2), dye,
new ItemStack(ItemIDs.minecartFowler4FTender.item, 1), 1);
}
}
>>>>>>>
for(ItemStack dye : dyeGreen){
cm.addRecipe(2, null, new ItemStack(ItemIDs.bogie.item, 3), new ItemStack(ItemIDs.steelframe.item, 3),
new ItemStack(itemSteel, 1, itemDamageSteel), new ItemStack(ItemIDs.steelchimney.item, 2),
new ItemStack(ItemIDs.steelcab.item, 1), new ItemStack(ItemIDs.boiler.item, 2),
new ItemStack(ItemIDs.firebox.item, 2), null, dye,
new ItemStack (ItemIDs.minecartLocoHallClass.item, 1), 1);
}
for (ItemStack dye : dyeBlack) {
cm.addRecipe(2, null, new ItemStack(ItemIDs.bogie.item, 4), new ItemStack(ItemIDs.steelframe.item, 4),
new ItemStack(itemSteel, 2, itemDamageSteel), new ItemStack(ItemIDs.steelchimney.item, 2),
new ItemStack(ItemIDs.steelcab.item, 1), new ItemStack(ItemIDs.boiler.item, 3),
new ItemStack(ItemIDs.firebox.item, 3), null, dye,
new ItemStack(ItemIDs.minecartLocoBerk1225.item, 1), 1);
cm.addRecipe(2, null, new ItemStack(ItemIDs.bogie.item, 4), new ItemStack(ItemIDs.steelframe.item, 4),
new ItemStack(itemSteel, 2, itemDamageSteel), new ItemStack(ItemIDs.steelchimney.item, 2),
new ItemStack(ItemIDs.steelcab.item, 1), new ItemStack(ItemIDs.boiler.item, 3),
new ItemStack(ItemIDs.firebox.item, 3), null, dye,
new ItemStack(ItemIDs.minecartLocoBerk765.item, 1), 1);
cm.addRecipe(2, null, new ItemStack(ItemIDs.bogie.item, 4), new ItemStack(ItemIDs.steelframe.item, 4),
new ItemStack(itemSteel, 2, itemDamageSteel), new ItemStack(ItemIDs.steelchimney.item, 2),
new ItemStack(ItemIDs.steelcab.item, 1), new ItemStack(ItemIDs.boiler.item, 3),
new ItemStack(ItemIDs.firebox.item, 3), null, dye,
new ItemStack(ItemIDs.minecartLocoFowler.item, 1), 1);
for (ItemStack c : coal) {
cm.addRecipe(2, null, new ItemStack(ItemIDs.bogie.item, 4), new ItemStack(ItemIDs.steelframe.item, 4),
new ItemStack(itemSteel, 2, itemDamageSteel), null, null, null, null,
new ItemStack(c.getItem(), 2), dye,
new ItemStack(ItemIDs.minecarttenderBerk1225.item, 1), 1);
cm.addRecipe(2, null, new ItemStack(ItemIDs.bogie.item, 3), new ItemStack(ItemIDs.steelframe.item, 3),
new ItemStack(itemSteel, 2, itemDamageSteel), null, null, null, null,
new ItemStack(c.getItem(), 2), dye,
new ItemStack(ItemIDs.minecartFowler4FTender.item, 1), 1);
}
} |
<<<<<<<
import org.apache.commons.lang3.RandomStringUtils;
import org.lwjgl.input.Keyboard;
=======
>>>>>>>
import org.apache.commons.lang3.RandomStringUtils;
import org.lwjgl.input.Keyboard; |
<<<<<<<
}
=======
@Override
public void onUpdate() {
if (worldObj.isRemote && ticksExisted %2 ==0 && !Minecraft.getMinecraft().ingameGUI.getChatGUI().getChatOpen()){
if (FMLClientHandler.instance().getClient().gameSettings.keyBindForward.isPressed()
&& !forwardPressed) {
Traincraft.keyChannel.sendToServer(new PacketKeyPress(4));
forwardPressed = true;
} else if (!FMLClientHandler.instance().getClient().gameSettings.keyBindForward.isPressed()
&& forwardPressed) {
Traincraft.keyChannel.sendToServer(new PacketKeyPress(13));
forwardPressed = false;
}
if (FMLClientHandler.instance().getClient().gameSettings.keyBindBack.isPressed()
&& !backwardPressed) {
Traincraft.keyChannel.sendToServer(new PacketKeyPress(5));
backwardPressed = true;
} else if (!FMLClientHandler.instance().getClient().gameSettings.keyBindBack.isPressed()
&& backwardPressed) {
Traincraft.keyChannel.sendToServer(new PacketKeyPress(14));
backwardPressed = false;
}
if (FMLClientHandler.instance().getClient().gameSettings.keyBindJump.isPressed()
&& !brakePressed) {
Traincraft.keyChannel.sendToServer(new PacketKeyPress(12));
brakePressed = true;
} else if (!FMLClientHandler.instance().getClient().gameSettings.keyBindJump.isPressed()
&& brakePressed) {
Traincraft.keyChannel.sendToServer(new PacketKeyPress(15));
brakePressed = false;
}
>>>>>>>
}
@Override
public void onUpdate() {
if (worldObj.isRemote && ticksExisted %2 ==0 && !Minecraft.getMinecraft().ingameGUI.getChatGUI().getChatOpen()){
if (FMLClientHandler.instance().getClient().gameSettings.keyBindForward.isPressed()
&& !forwardPressed) {
Traincraft.keyChannel.sendToServer(new PacketKeyPress(4));
forwardPressed = true;
} else if (!FMLClientHandler.instance().getClient().gameSettings.keyBindForward.isPressed()
&& forwardPressed) {
Traincraft.keyChannel.sendToServer(new PacketKeyPress(13));
forwardPressed = false;
}
if (FMLClientHandler.instance().getClient().gameSettings.keyBindBack.isPressed()
&& !backwardPressed) {
Traincraft.keyChannel.sendToServer(new PacketKeyPress(5));
backwardPressed = true;
} else if (!FMLClientHandler.instance().getClient().gameSettings.keyBindBack.isPressed()
&& backwardPressed) {
Traincraft.keyChannel.sendToServer(new PacketKeyPress(14));
backwardPressed = false;
}
if (FMLClientHandler.instance().getClient().gameSettings.keyBindJump.isPressed()
&& !brakePressed) {
Traincraft.keyChannel.sendToServer(new PacketKeyPress(12));
brakePressed = true;
} else if (!FMLClientHandler.instance().getClient().gameSettings.keyBindJump.isPressed()
&& brakePressed) {
Traincraft.keyChannel.sendToServer(new PacketKeyPress(15));
brakePressed = false;
}
<<<<<<<
=======
// if (worldObj.isRemote) {
// if (updateTicks % 50 == 0) {
// Traincraft.brakeChannel
// .sendToServer(new PacketParkingBrake(parkingBrake, this.getEntityId()));
// Traincraft.ignitionChannel.sendToServer(new PacketSetLocoTurnedOn(isLocoTurnedOn));//
// sending to client
// updateTicks=0;
// }
// }
if (!worldObj.isRemote) {
if (this.riddenByEntity instanceof EntityLivingBase) {
//EntityLivingBase entity = (EntityLivingBase) this.riddenByEntity;
if (forwardPressed || backwardPressed) {
if (getFuel() > 0 && this.isLocoTurnedOn() && rand.nextInt(4) == 0 && !worldObj.isRemote) {
if (this.getTrainLockedFromPacket() && !((EntityPlayer) this.riddenByEntity).getDisplayName()
.toLowerCase().equals(this.getTrainOwner().toLowerCase())) {
return;
}
if (riddenByEntity instanceof EntityPlayer) {
int dir = MathHelper
.floor_double((((EntityPlayer) riddenByEntity).rotationYaw * 4F) / 360F + 0.5D) & 3;
if (dir == 2){
if (forwardPressed) {
motionZ -= 0.0075 * this.accelerate;
} else {
motionZ += 0.0075 * this.accelerate;
}
} else if (dir == 0){
if (forwardPressed) {
motionZ += 0.0075 * this.accelerate;
} else {
motionZ -= 0.0075 * this.accelerate;
}
} else if (dir == 1){
if (forwardPressed) {
motionX -= 0.0075 * this.accelerate;
} else {
motionX += 0.0075 * this.accelerate;
}
} else if (dir == 3){
if (forwardPressed) {
motionX += 0.0075 * this.accelerate;
} else {
motionX -= 0.0075 * this.accelerate;
}
}
}
}
} else if (brakePressed) {
motionX *= brake;
motionZ *= brake;
}
}
if (ticksExisted % 20 == 0) HandleMaxAttachedCarts.PullPhysic(this);
/**
* Can't use datawatcher here. Locomotives use them all already
* Check inventory The packet never arrives if it is sent when the
* entity reads its NBT (player hasn't been initialised probably)
*/
if (ticksExisted % 200 == 0) {
this.slotsFilled = 0;
for (int i = 0; i < getSizeInventory(); i++) {
ItemStack itemstack = getStackInSlot(i);
if (itemstack != null) {
slotsFilled++;
}
}
Traincraft.slotschannel.sendToAllAround(new PacketSlotsFilled(this, slotsFilled), new TargetPoint(this.worldObj.provider.dimensionId, this.posX, this.posY, this.posZ, 150.0D));
}
/**
* Fuel consumption
*/
//if (this instanceof DieselTrain) consumption /= 5;
if (fuelUpdateTicks >= 100) {
fuelUpdateTicks = 0;
updateFuelTrain(this.getFuelConsumption());
}
fuelUpdateTicks++;
if (!this.isLocoTurnedOn()) {
motionX *= 0;
motionZ *= 0;
}
>>>>>>>
// if (worldObj.isRemote) {
// if (updateTicks % 50 == 0) {
// Traincraft.brakeChannel
// .sendToServer(new PacketParkingBrake(parkingBrake, this.getEntityId()));
// Traincraft.ignitionChannel.sendToServer(new PacketSetLocoTurnedOn(isLocoTurnedOn));//
// sending to client
// updateTicks=0;
// }
// }
if (!worldObj.isRemote) {
if (this.riddenByEntity instanceof EntityLivingBase) {
//EntityLivingBase entity = (EntityLivingBase) this.riddenByEntity;
if (forwardPressed || backwardPressed) {
if (getFuel() > 0 && this.isLocoTurnedOn() && rand.nextInt(4) == 0 && !worldObj.isRemote) {
if (this.getTrainLockedFromPacket() && !((EntityPlayer) this.riddenByEntity).getDisplayName()
.toLowerCase().equals(this.getTrainOwner().toLowerCase())) {
return;
}
if (riddenByEntity instanceof EntityPlayer) {
int dir = MathHelper
.floor_double((((EntityPlayer) riddenByEntity).rotationYaw * 4F) / 360F + 0.5D) & 3;
if (dir == 2){
if (forwardPressed) {
motionZ -= 0.0075 * this.accelerate;
} else {
motionZ += 0.0075 * this.accelerate;
}
} else if (dir == 0){
if (forwardPressed) {
motionZ += 0.0075 * this.accelerate;
} else {
motionZ -= 0.0075 * this.accelerate;
}
} else if (dir == 1){
if (forwardPressed) {
motionX -= 0.0075 * this.accelerate;
} else {
motionX += 0.0075 * this.accelerate;
}
} else if (dir == 3){
if (forwardPressed) {
motionX += 0.0075 * this.accelerate;
} else {
motionX -= 0.0075 * this.accelerate;
}
}
}
}
} else if (brakePressed) {
motionX *= brake;
motionZ *= brake;
}
}
if (ticksExisted % 20 == 0) HandleMaxAttachedCarts.PullPhysic(this);
/**
* Can't use datawatcher here. Locomotives use them all already
* Check inventory The packet never arrives if it is sent when the
* entity reads its NBT (player hasn't been initialised probably)
*/
if (ticksExisted % 200 == 0) {
this.slotsFilled = 0;
for (int i = 0; i < getSizeInventory(); i++) {
ItemStack itemstack = getStackInSlot(i);
if (itemstack != null) {
slotsFilled++;
}
}
Traincraft.slotschannel.sendToAllAround(new PacketSlotsFilled(this, slotsFilled), new TargetPoint(this.worldObj.provider.dimensionId, this.posX, this.posY, this.posZ, 150.0D));
}
/**
* Fuel consumption
*/
//if (this instanceof DieselTrain) consumption /= 5;
if (fuelUpdateTicks >= 100) {
fuelUpdateTicks = 0;
updateFuelTrain(this.getFuelConsumption());
}
fuelUpdateTicks++;
if (!this.isLocoTurnedOn()) {
motionX *= 0;
motionZ *= 0;
}
<<<<<<<
=======
super.onUpdate();
if (!worldObj.isRemote) {
//System.out.println(motionX +" "+motionZ);
dataWatcher.updateObject(25, (int) convertSpeed(Math.sqrt(motionX * motionX + motionZ * motionZ)));
if(ticksExisted%5==0) {
dataWatcher.updateObject(24, fuelTrain);
dataWatcher.updateObject(20, overheatLevel);
dataWatcher.updateObject(22, locoState);
dataWatcher.updateObject(3, destination);
dataWatcher.updateObject(31, ("1c/" + castToString((int) (currentFuelConsumptionChange)) + " per tick"));
}
if(ticksExisted%20==0) {
dataWatcher.updateObject(26, (castToString(currentNumCartsPulled)));
dataWatcher.updateObject(27, (castToString((currentMassPulled)) + " tons"));
dataWatcher.updateObject(28, ((int) currentSpeedSlowDown));
dataWatcher.updateObject(29, (castToString((double) (Math.round(currentAccelSlowDown * 1000)) / 1000)));
dataWatcher.updateObject(30, (castToString((double) (Math.round(currentBrakeSlowDown * 1000)) / 1000)));
dataWatcher.updateObject(15, getMaxSpeed());
}
//System.out.println();
if (ticksExisted % 4 == 0 && this.worldObj.handleMaterialAcceleration(this.boundingBox.expand(0.0D, -0.2000000059604645D, 0.0D).contract(0.001D, 0.001D, 0.001D), Material.water, this)) {
if (!hasDrowned && !worldObj.isRemote && FMLCommonHandler.instance().getMinecraftServerInstance() != null && this.lastEntityRider instanceof EntityPlayer) {
FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().sendChatMsg(new ChatComponentText(((EntityPlayer) this.lastEntityRider).getDisplayName() + " drowned " + this.getTrainOwner() + "'s locomotive"));
FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().sendChatMsg(new ChatComponentText(((EntityPlayer) this.lastEntityRider).getDisplayName() + " drowned " + this.getTrainOwner() + "'s locomotive"));
}
//this.attackEntityFrom(DamageSource.generic, 100);
this.setCustomSpeed(0);// set speed to normal
this.setAccel(0.000001);// simulate a break down
this.setBrake(1);
this.motionX *= 0.97;// slowly slows down
this.motionZ *= 0.97;
this.fuelTrain = 0;
this.hasDrowned = true;
this.canCheckInvent = false;
blowUpDelay++;
if (blowUpDelay > 20) {
this.attackEntityFrom(DamageSource.drown, 100);
}
}/*
* else{ this.canCheckInvent=true; this.hasDrowned=false; }
*/
}
}
>>>>>>>
super.onUpdate();
if (!worldObj.isRemote) {
//System.out.println(motionX +" "+motionZ);
dataWatcher.updateObject(25, (int) convertSpeed(Math.sqrt(motionX * motionX + motionZ * motionZ)));
if(ticksExisted%5==0) {
dataWatcher.updateObject(24, fuelTrain);
dataWatcher.updateObject(20, overheatLevel);
dataWatcher.updateObject(22, locoState);
dataWatcher.updateObject(3, destination);
dataWatcher.updateObject(31, ("1c/" + castToString((int) (currentFuelConsumptionChange)) + " per tick"));
}
if(ticksExisted%20==0) {
dataWatcher.updateObject(26, (castToString(currentNumCartsPulled)));
dataWatcher.updateObject(27, (castToString((currentMassPulled)) + " tons"));
dataWatcher.updateObject(28, ((int) currentSpeedSlowDown));
dataWatcher.updateObject(29, (castToString((double) (Math.round(currentAccelSlowDown * 1000)) / 1000)));
dataWatcher.updateObject(30, (castToString((double) (Math.round(currentBrakeSlowDown * 1000)) / 1000)));
dataWatcher.updateObject(15, getMaxSpeed());
}
//System.out.println();
if (ticksExisted % 4 == 0 && this.worldObj.handleMaterialAcceleration(this.boundingBox.expand(0.0D, -0.2000000059604645D, 0.0D).contract(0.001D, 0.001D, 0.001D), Material.water, this)) {
if (!hasDrowned && !worldObj.isRemote && FMLCommonHandler.instance().getMinecraftServerInstance() != null && this.lastEntityRider instanceof EntityPlayer) {
FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().sendChatMsg(new ChatComponentText(((EntityPlayer) this.lastEntityRider).getDisplayName() + " drowned " + this.getTrainOwner() + "'s locomotive"));
FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().sendChatMsg(new ChatComponentText(((EntityPlayer) this.lastEntityRider).getDisplayName() + " drowned " + this.getTrainOwner() + "'s locomotive"));
}
//this.attackEntityFrom(DamageSource.generic, 100);
this.setCustomSpeed(0);// set speed to normal
this.setAccel(0.000001);// simulate a break down
this.setBrake(1);
this.motionX *= 0.97;// slowly slows down
this.motionZ *= 0.97;
this.fuelTrain = 0;
this.hasDrowned = true;
this.canCheckInvent = false;
blowUpDelay++;
if (blowUpDelay > 20) {
this.attackEntityFrom(DamageSource.drown, 100);
}
}/*
* else{ this.canCheckInvent=true; this.hasDrowned=false; }
*/
}
}
<<<<<<<
// System.out.println("Sendmessage..");
AxisAlignedBB targetBox = AxisAlignedBB.getBoundingBox(this.posX, this.posY, this.posZ, this.posX + 2000, this.posY + 2000, this.posZ + 2000);
List<TileEntity> allTEs = worldObj.loadedTileEntityList;
for (TileEntity te : allTEs) {
=======
if (Loader.isModLoaded("ComputerCraft")) {
// System.out.println("Sendmessage..");
AxisAlignedBB targetBox = AxisAlignedBB.getBoundingBox(this.posX, this.posY, this.posZ, this.posX + 2000, this.posY + 2000, this.posZ + 2000);
List<TileEntity> allTEs = worldObj.loadedTileEntityList;
for (TileEntity te : allTEs) {
>>>>>>>
if (Loader.isModLoaded("ComputerCraft")) {
// System.out.println("Sendmessage..");
AxisAlignedBB targetBox = AxisAlignedBB.getBoundingBox(this.posX, this.posY, this.posZ, this.posX + 2000, this.posY + 2000, this.posZ + 2000);
List<TileEntity> allTEs = worldObj.loadedTileEntityList;
for (TileEntity te : allTEs) { |
<<<<<<<
if (mixin != null) {
_addFieldMixIns(mixin, rawType, fields);
=======
if ((fields != null) && (_mixInResolver != null)) {
Class<?> mixin = _mixInResolver.findMixInClassFor(cls);
if (mixin != null) {
_addFieldMixIns(mixin, cls, fields);
}
>>>>>>>
if ((fields != null) && (mixin != null)) {
_addFieldMixIns(mixin, rawType, fields); |
<<<<<<<
Button tester = (Button) findViewById(R.id.launch_tester);
tester.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, FragmentTester.class));
}
});
Button osgViewer = (Button) findViewById(R.id.launch_osgViewer);
osgViewer.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, OsgViewer.class));
}
});
=======
Button tuning = (Button) findViewById(R.id.launch_tuning);
tuning.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, TuningActivity.class));
}
});
>>>>>>>
Button tester = (Button) findViewById(R.id.launch_tester);
tester.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, FragmentTester.class));
}
});
Button osgViewer = (Button) findViewById(R.id.launch_osgViewer);
osgViewer.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, OsgViewer.class));
}
});
Button tuning = (Button) findViewById(R.id.launch_tuning);
tuning.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, TuningActivity.class));
}
}); |
<<<<<<<
Button tester = (Button) findViewById(R.id.launch_tester);
tester.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, FragmentTester.class));
}
});
=======
Button osgViewer = (Button) findViewById(R.id.launch_osgViewer);
osgViewer.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, OsgViewer.class));
}
});
>>>>>>>
Button tester = (Button) findViewById(R.id.launch_tester);
tester.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, FragmentTester.class));
}
});
Button osgViewer = (Button) findViewById(R.id.launch_osgViewer);
osgViewer.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, OsgViewer.class));
}
}); |
<<<<<<<
static enum EnumWithDefaultAnno {
A, B,
@JsonEnumDefaultValue
OTHER;
}
static enum EnumWithDefaultAnnoAndConstructor {
A, B,
@JsonEnumDefaultValue
OTHER;
@JsonCreator public static EnumWithDefaultAnnoAndConstructor fromId(String value) {
for (EnumWithDefaultAnnoAndConstructor e: values()) {
if (e.name().toLowerCase().equals(value)) return e;
}
return null;
}
}
=======
// [databind#1161]
enum Enum1161 {
A, B, C;
@Override
public String toString() {
return name().toLowerCase();
};
}
>>>>>>>
// [databind#1161]
enum Enum1161 {
A, B, C;
@Override
public String toString() {
return name().toLowerCase();
};
}
static enum EnumWithDefaultAnno {
A, B,
@JsonEnumDefaultValue
OTHER;
}
static enum EnumWithDefaultAnnoAndConstructor {
A, B,
@JsonEnumDefaultValue
OTHER;
@JsonCreator public static EnumWithDefaultAnnoAndConstructor fromId(String value) {
for (EnumWithDefaultAnnoAndConstructor e: values()) {
if (e.name().toLowerCase().equals(value)) return e;
}
return null;
}
}
<<<<<<<
public void testEnumWithDefaultAnnotation() throws Exception {
final ObjectMapper mapper = new ObjectMapper();
mapper.enable(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE);
EnumWithDefaultAnno myEnum = mapper.readValue("\"foo\"", EnumWithDefaultAnno.class);
assertSame(EnumWithDefaultAnno.OTHER, myEnum);
}
public void testEnumWithDefaultAnnotationUsingIndexes() throws Exception {
final ObjectMapper mapper = new ObjectMapper();
mapper.enable(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE);
EnumWithDefaultAnno myEnum = mapper.readValue("9", EnumWithDefaultAnno.class);
assertSame(EnumWithDefaultAnno.OTHER, myEnum);
}
public void testEnumWithDefaultAnnotationWithConstructor() throws Exception {
final ObjectMapper mapper = new ObjectMapper();
mapper.enable(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE);
EnumWithDefaultAnnoAndConstructor myEnum = mapper.readValue("\"foo\"", EnumWithDefaultAnnoAndConstructor.class);
assertNull("When using a constructor, the default value annotation shouldn't be used.", myEnum);
}
}
=======
// [databind#1161], unable to switch READ_ENUMS_USING_TO_STRING
public void testDeserWithToString1161() throws Exception
{
Enum1161 result = MAPPER.readerFor(Enum1161.class)
.readValue(quote("A"));
assertSame(Enum1161.A, result);
result = MAPPER.readerFor(Enum1161.class)
.with(DeserializationFeature.READ_ENUMS_USING_TO_STRING)
.readValue(quote("a"));
assertSame(Enum1161.A, result);
// and once again, going back to defaults
result = MAPPER.readerFor(Enum1161.class)
.without(DeserializationFeature.READ_ENUMS_USING_TO_STRING)
.readValue(quote("A"));
assertSame(Enum1161.A, result);
}}
>>>>>>>
// [databind#1161], unable to switch READ_ENUMS_USING_TO_STRING
public void testDeserWithToString1161() throws Exception
{
Enum1161 result = MAPPER.readerFor(Enum1161.class)
.readValue(quote("A"));
assertSame(Enum1161.A, result);
result = MAPPER.readerFor(Enum1161.class)
.with(DeserializationFeature.READ_ENUMS_USING_TO_STRING)
.readValue(quote("a"));
assertSame(Enum1161.A, result);
// and once again, going back to defaults
result = MAPPER.readerFor(Enum1161.class)
.without(DeserializationFeature.READ_ENUMS_USING_TO_STRING)
.readValue(quote("A"));
assertSame(Enum1161.A, result);
}
public void testEnumWithDefaultAnnotation() throws Exception {
final ObjectMapper mapper = new ObjectMapper();
mapper.enable(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE);
EnumWithDefaultAnno myEnum = mapper.readValue("\"foo\"", EnumWithDefaultAnno.class);
assertSame(EnumWithDefaultAnno.OTHER, myEnum);
}
public void testEnumWithDefaultAnnotationUsingIndexes() throws Exception {
final ObjectMapper mapper = new ObjectMapper();
mapper.enable(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE);
EnumWithDefaultAnno myEnum = mapper.readValue("9", EnumWithDefaultAnno.class);
assertSame(EnumWithDefaultAnno.OTHER, myEnum);
}
public void testEnumWithDefaultAnnotationWithConstructor() throws Exception {
final ObjectMapper mapper = new ObjectMapper();
mapper.enable(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE);
EnumWithDefaultAnnoAndConstructor myEnum = mapper.readValue("\"foo\"", EnumWithDefaultAnnoAndConstructor.class);
assertNull("When using a constructor, the default value annotation shouldn't be used.", myEnum);
}
} |
<<<<<<<
Button tester = (Button) findViewById(R.id.launch_tester);
tester.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, FragmentTester.class));
}
});
=======
Button osgViewer = (Button) findViewById(R.id.launch_osgViewer);
osgViewer.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, OsgViewer.class));
}
});
>>>>>>>
Button tester = (Button) findViewById(R.id.launch_tester);
tester.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, FragmentTester.class));
}
});
Button osgViewer = (Button) findViewById(R.id.launch_osgViewer);
osgViewer.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(HomePage.this, OsgViewer.class));
}
}); |
<<<<<<<
// this field is applicable only for client charges
final Map<String, List<GLAccountData>> incomeOrLiabilityAccountOptions = null;
=======
>>>>>>>
// this field is applicable only for client charges
final Map<String, List<GLAccountData>> incomeOrLiabilityAccountOptions = null; |
<<<<<<<
boolean isGuaranteeRequired(Long loanId);
=======
Date retrieveMinimumDateOfRepaymentTransaction(Long loanId);
PaidInAdvanceData retrieveTotalPaidInAdvance(Long loanId);
LoanTransactionData retrieveRefundByCashTemplate(Long loanId);
>>>>>>>
boolean isGuaranteeRequired(Long loanId);
Date retrieveMinimumDateOfRepaymentTransaction(Long loanId);
PaidInAdvanceData retrieveTotalPaidInAdvance(Long loanId);
LoanTransactionData retrieveRefundByCashTemplate(Long loanId); |
<<<<<<<
public Collection<CalendarData> retrieveCalendarsByEntity(final Long entityId, final Integer entityTypeId, final List<EnumOptionData> calendarTypeOptions) {
=======
public Collection<CalendarData> retrieveCalendarsByEntity(final Long entityId, final Integer entityTypeId, List<Integer> calendarTypeOptions) {
>>>>>>>
public Collection<CalendarData> retrieveCalendarsByEntity(final Long entityId, final Integer entityTypeId,
final List<Integer> calendarTypeOptions) {
<<<<<<<
public String createSqlValuesInString(final List<EnumOptionData> calendarTypeOptions){
=======
public String getSqlCalendarTypeOptionsInString(List<Integer> calendarTypeOptions){
String sqlCalendarTypeOptions = "";
>>>>>>>
public String getSqlCalendarTypeOptionsInString(final List<Integer> calendarTypeOptions) {
String sqlCalendarTypeOptions = "";
<<<<<<<
}
=======
}
>>>>>>>
} |
<<<<<<<
@Column(name = "principal_threshold_for_last_instalment", scale = 2, precision = 5, nullable = false)
private BigDecimal principalThresholdForLastInstalment;
=======
@Column(name = "account_moves_out_of_npa_only_on_arrears_completion")
private boolean accountMovesOutOfNPAOnlyOnArrearsCompletion;
>>>>>>>
@Column(name = "principal_threshold_for_last_instalment", scale = 2, precision = 5, nullable = false)
private BigDecimal principalThresholdForLastInstalment;
@Column(name = "account_moves_out_of_npa_only_on_arrears_completion")
private boolean accountMovesOutOfNPAOnlyOnArrearsCompletion;
<<<<<<<
BigDecimal principalThresholdForLastInstalment = command
.bigDecimalValueOfParameterNamed(LoanProductConstants.principalThresholdForLastInstalmentParamName);
if (principalThresholdForLastInstalment == null) {
principalThresholdForLastInstalment = multiDisburseLoan ? LoanProductConstants.DEFAULT_PRINCIPAL_THRESHOLD_FOR_MULTI_DISBURSE_LOAN
: LoanProductConstants.DEFAULT_PRINCIPAL_THRESHOLD_FOR_SINGLE_DISBURSE_LOAN;
}
=======
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion = command
.booleanPrimitiveValueOfParameterNamed(LoanProductConstants.accountMovesOutOfNPAOnlyOnArrearsCompletionParamName);
>>>>>>>
BigDecimal principalThresholdForLastInstalment = command
.bigDecimalValueOfParameterNamed(LoanProductConstants.principalThresholdForLastInstalmentParamName);
if (principalThresholdForLastInstalment == null) {
principalThresholdForLastInstalment = multiDisburseLoan ? LoanProductConstants.DEFAULT_PRINCIPAL_THRESHOLD_FOR_MULTI_DISBURSE_LOAN
: LoanProductConstants.DEFAULT_PRINCIPAL_THRESHOLD_FOR_SINGLE_DISBURSE_LOAN;
}
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion = command
.booleanPrimitiveValueOfParameterNamed(LoanProductConstants.accountMovesOutOfNPAOnlyOnArrearsCompletionParamName);
<<<<<<<
holdGuarantorFunds, loanProductGuaranteeDetails, principalThresholdForLastInstalment);
=======
holdGuarantorFunds, loanProductGuaranteeDetails, accountMovesOutOfNPAOnlyOnArrearsCompletion);
>>>>>>>
holdGuarantorFunds, loanProductGuaranteeDetails, principalThresholdForLastInstalment,
accountMovesOutOfNPAOnlyOnArrearsCompletion);
<<<<<<<
final LoanProductGuaranteeDetails loanProductGuaranteeDetails, final BigDecimal principalThresholdForLastInstalment) {
=======
final LoanProductGuaranteeDetails loanProductGuaranteeDetails, final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion) {
>>>>>>>
final LoanProductGuaranteeDetails loanProductGuaranteeDetails, final BigDecimal principalThresholdForLastInstalment,
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion) {
<<<<<<<
this.principalThresholdForLastInstalment = principalThresholdForLastInstalment;
=======
this.accountMovesOutOfNPAOnlyOnArrearsCompletion = accountMovesOutOfNPAOnlyOnArrearsCompletion;
>>>>>>>
this.principalThresholdForLastInstalment = principalThresholdForLastInstalment;
this.accountMovesOutOfNPAOnlyOnArrearsCompletion = accountMovesOutOfNPAOnlyOnArrearsCompletion;
<<<<<<<
if (command.isChangeInBigDecimalParameterNamed(LoanProductConstants.principalThresholdForLastInstalmentParamName,
this.principalThresholdForLastInstalment)) {
BigDecimal newValue = command
.bigDecimalValueOfParameterNamed(LoanProductConstants.principalThresholdForLastInstalmentParamName);
actualChanges.put(LoanProductConstants.principalThresholdForLastInstalmentParamName, newValue);
this.principalThresholdForLastInstalment = newValue;
}
=======
if (command.isChangeInBooleanParameterNamed(LoanProductConstants.accountMovesOutOfNPAOnlyOnArrearsCompletionParamName,
this.accountMovesOutOfNPAOnlyOnArrearsCompletion)) {
final boolean newValue = command
.booleanPrimitiveValueOfParameterNamed(LoanProductConstants.accountMovesOutOfNPAOnlyOnArrearsCompletionParamName);
actualChanges.put(LoanProductConstants.accountMovesOutOfNPAOnlyOnArrearsCompletionParamName, newValue);
this.accountMovesOutOfNPAOnlyOnArrearsCompletion = newValue;
}
>>>>>>>
if (command.isChangeInBigDecimalParameterNamed(LoanProductConstants.principalThresholdForLastInstalmentParamName,
this.principalThresholdForLastInstalment)) {
BigDecimal newValue = command
.bigDecimalValueOfParameterNamed(LoanProductConstants.principalThresholdForLastInstalmentParamName);
actualChanges.put(LoanProductConstants.principalThresholdForLastInstalmentParamName, newValue);
this.principalThresholdForLastInstalment = newValue;
}
if (command.isChangeInBooleanParameterNamed(LoanProductConstants.accountMovesOutOfNPAOnlyOnArrearsCompletionParamName,
this.accountMovesOutOfNPAOnlyOnArrearsCompletion)) {
final boolean newValue = command
.booleanPrimitiveValueOfParameterNamed(LoanProductConstants.accountMovesOutOfNPAOnlyOnArrearsCompletionParamName);
actualChanges.put(LoanProductConstants.accountMovesOutOfNPAOnlyOnArrearsCompletionParamName, newValue);
this.accountMovesOutOfNPAOnlyOnArrearsCompletion = newValue;
}
<<<<<<<
public BigDecimal getPrincipalThresholdForLastInstalment() {
return this.principalThresholdForLastInstalment;
}
=======
public boolean isArrearsBasedOnOriginalSchedule() {
boolean isBasedOnOriginalSchedule = false;
if (getProductInterestRecalculationDetails() != null) {
isBasedOnOriginalSchedule = getProductInterestRecalculationDetails().isArrearsBasedOnOriginalSchedule();
}
return isBasedOnOriginalSchedule;
}
>>>>>>>
public BigDecimal getPrincipalThresholdForLastInstalment() {
return this.principalThresholdForLastInstalment;
}
public boolean isArrearsBasedOnOriginalSchedule() {
boolean isBasedOnOriginalSchedule = false;
if (getProductInterestRecalculationDetails() != null) {
isBasedOnOriginalSchedule = getProductInterestRecalculationDetails().isArrearsBasedOnOriginalSchedule();
}
return isBasedOnOriginalSchedule;
} |
<<<<<<<
private final BigDecimal principalThresholdForLastInstalment;
=======
private final Integer instalmentAmountInMultiplesOf;
>>>>>>>
private final BigDecimal principalThresholdForLastInstalment;
private final Integer instalmentAmountInMultiplesOf;
<<<<<<<
final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, final boolean isInterestRecalculationEnabled,
BigDecimal principalThresholdForLastInstalment) {
=======
final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, final boolean isInterestRecalculationEnabled,
Integer instalmentAmountInMultiplesOf) {
>>>>>>>
final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, final boolean isInterestRecalculationEnabled,
BigDecimal principalThresholdForLastInstalment, Integer instalmentAmountInMultiplesOf) {
<<<<<<<
recalculationFrequencyType, principalThresholdForLastInstalment);
=======
recalculationFrequencyType, instalmentAmountInMultiplesOf);
>>>>>>>
recalculationFrequencyType, principalThresholdForLastInstalment, instalmentAmountInMultiplesOf);
<<<<<<<
final List<LoanTermVariationsData> emiAmountVariations, final LocalDate interestChargedFromDate,
final BigDecimal principalThresholdForLastInstalment) {
=======
final List<LoanTermVariationsData> emiAmountVariations, final LocalDate interestChargedFromDate,
Integer instalmentAmountInMultiplesOf) {
>>>>>>>
final List<LoanTermVariationsData> emiAmountVariations, final LocalDate interestChargedFromDate,
final BigDecimal principalThresholdForLastInstalment, Integer instalmentAmountInMultiplesOf) {
<<<<<<<
rescheduleStrategyMethod, interestRecalculationCompoundingMethod, restCalendarInstance, recalculationFrequencyType,
principalThresholdForLastInstalment);
=======
rescheduleStrategyMethod, interestRecalculationCompoundingMethod, restCalendarInstance, recalculationFrequencyType,
instalmentAmountInMultiplesOf);
>>>>>>>
rescheduleStrategyMethod, interestRecalculationCompoundingMethod, restCalendarInstance, recalculationFrequencyType,
principalThresholdForLastInstalment, instalmentAmountInMultiplesOf);
<<<<<<<
final RecalculationFrequencyType recalculationFrequencyType, final BigDecimal principalThresholdForLastInstalment) {
=======
final RecalculationFrequencyType recalculationFrequencyType, Integer instalmentAmountInMultiplesOf) {
>>>>>>>
final RecalculationFrequencyType recalculationFrequencyType, final BigDecimal principalThresholdForLastInstalment,
Integer instalmentAmountInMultiplesOf) {
<<<<<<<
interestRecalculationCompoundingMethod, restCalendarInstance, recalculationFrequencyType,
principalThresholdForLastInstalment);
=======
interestRecalculationCompoundingMethod, restCalendarInstance, recalculationFrequencyType, instalmentAmountInMultiplesOf);
>>>>>>>
interestRecalculationCompoundingMethod, restCalendarInstance, recalculationFrequencyType,
principalThresholdForLastInstalment, instalmentAmountInMultiplesOf);
<<<<<<<
applicationTerms.recalculationFrequencyType, applicationTerms.principalThresholdForLastInstalment);
=======
applicationTerms.recalculationFrequencyType, applicationTerms.instalmentAmountInMultiplesOf);
>>>>>>>
applicationTerms.recalculationFrequencyType, applicationTerms.principalThresholdForLastInstalment,
applicationTerms.instalmentAmountInMultiplesOf);
<<<<<<<
final CalendarInstance restCalendarInstance, final RecalculationFrequencyType recalculationFrequencyType,
final BigDecimal principalThresholdForLastInstalment) {
=======
final CalendarInstance restCalendarInstance, final RecalculationFrequencyType recalculationFrequencyType,
final Integer instalmentAmountInMultiplesOf) {
>>>>>>>
final CalendarInstance restCalendarInstance, final RecalculationFrequencyType recalculationFrequencyType,
final BigDecimal principalThresholdForLastInstalment, final Integer instalmentAmountInMultiplesOf) {
<<<<<<<
this.principalThresholdForLastInstalment = principalThresholdForLastInstalment;
=======
this.instalmentAmountInMultiplesOf = instalmentAmountInMultiplesOf;
>>>>>>>
this.principalThresholdForLastInstalment = principalThresholdForLastInstalment;
this.instalmentAmountInMultiplesOf = instalmentAmountInMultiplesOf; |
<<<<<<<
Collection<PortfolioAccountData> retrieveAllForLookup(final PortfolioAccountDTO portfolioAccountDTO);
=======
Collection<PortfolioAccountData> retrieveAllForLookup(Integer toAccountType, Long toClientId, long[] accountStatus);
Collection<PortfolioAccountData> retrieveAllForLookup(Integer toAccountType, Long toClientId, String currencyCode, long[] accountStatus, Integer depositType);
PortfolioAccountData retrieveOneByPaidInAdvance(Long accountId, Integer accountTypeId);
>>>>>>>
Collection<PortfolioAccountData> retrieveAllForLookup(final PortfolioAccountDTO portfolioAccountDTO);
PortfolioAccountData retrieveOneByPaidInAdvance(Long accountId, Integer accountTypeId); |
<<<<<<<
"officeId", "officeName", "loanOfficerFlag", "externalId", "mobileNo", "allowedOffices", "isActive"));
=======
"officeId", "officeName", "isLoanOfficer", "externalId", "mobileNo", "allowedOffices"));
>>>>>>>
"officeId", "officeName", "isLoanOfficer", "externalId", "mobileNo", "allowedOffices", "isActive")); |
<<<<<<<
this.createStandingInstructionAtDisbursement = createStandingInstructionAtDisbursement;
=======
/*
* During loan origination stage and before loan is approved
* principal_amount, approved_principal and principal_amount_demanded
* will same amount and that amount is same as applicant loan demanded
* amount.
*/
this.proposedPrincipal = this.loanRepaymentScheduleDetail.getPrincipal().getAmount();
>>>>>>>
this.createStandingInstructionAtDisbursement = createStandingInstructionAtDisbursement;
/*
* During loan origination stage and before loan is approved
* principal_amount, approved_principal and principal_amount_demanded
* will same amount and that amount is same as applicant loan demanded
* amount.
*/
this.proposedPrincipal = this.loanRepaymentScheduleDetail.getPrincipal().getAmount(); |
<<<<<<<
private static final String RECOVER_FROM_GUARANTORS_COMMAND = "recoverGuarantees";
=======
private static final String MAKE_REFUND_BY_CASH_COMMAND = "refundByCash";
>>>>>>>
private static final String RECOVER_FROM_GUARANTORS_COMMAND = "recoverGuarantees";
private static final String MAKE_REFUND_BY_CASH_COMMAND = "refundByCash"; |
<<<<<<<
=======
if (isDateInTheFuture(activationLocalDate)) {
final String defaultUserMessage = "Activation date cannot be in the future.";
final ApiParameterError error = ApiParameterError.parameterError("error.msg.clients.activationDate.in.the.future",
defaultUserMessage, ClientApiConstants.activationDateParamName, activationLocalDate);
final List<ApiParameterError> dataValidationErrors = new ArrayList<ApiParameterError>();
dataValidationErrors.add(error);
throw new PlatformApiDataValidationException(dataValidationErrors);
}
>>>>>>> |
<<<<<<<
=======
import java.util.List;
import org.joda.time.DateTimeConstants;
>>>>>>>
<<<<<<<
import org.mifosplatform.portfolio.loanaccount.data.HolidayDetailDTO;
=======
import org.mifosplatform.portfolio.common.domain.DayOfWeekType;
>>>>>>>
import org.mifosplatform.portfolio.loanaccount.data.HolidayDetailDTO;
<<<<<<<
loanApplicationTerms.getRepaymentEvery(), adjustedDate);
adjustedDate = WorkingDaysUtil.getOffSetDateIfNonWorkingDay(adjustedDate, nextDueRepaymentPeriodDate,
holidayDetailDTO.getWorkingDays());
=======
loanApplicationTerms.getRepaymentEvery(), adjustedDate, loanApplicationTerms.getNthDay(), loanApplicationTerms.getWeekDayType());
adjustedDate = WorkingDaysUtil.getOffSetDateIfNonWorkingDay(adjustedDate, nextDueRepaymentPeriodDate, workingDays);
>>>>>>>
loanApplicationTerms.getRepaymentEvery(), adjustedDate, loanApplicationTerms.getNthDay(),
loanApplicationTerms.getWeekDayType());
adjustedDate = WorkingDaysUtil.getOffSetDateIfNonWorkingDay(adjustedDate, nextDueRepaymentPeriodDate,
holidayDetailDTO.getWorkingDays()); |
<<<<<<<
GlobalConfigurationData retrieveGlobalConfiguration();
GlobalConfigurationPropertyData retrieveGlobalConfiguration(Long configId);
=======
//GlobalConfigurationData retrieveGlobalConfiguration();
GlobalConfigurationData retrieveGlobalConfiguration(boolean survey);
// GlobalConfigurationData retrieveGlobalConfiguration(List<String> configurationName);
>>>>>>>
GlobalConfigurationPropertyData retrieveGlobalConfiguration(Long configId);
GlobalConfigurationData retrieveGlobalConfiguration(boolean survey); |
<<<<<<<
private static final Map<String, String[]> targetMethosMap = new HashMap<>();
=======
private static final Map<String, ClassMethodNamesPair> targetMethosMap = new HashMap<String, ClassMethodNamesPair>();
>>>>>>>
private static final Map<String, ClassMethodNamesPair> targetMethosMap = new HashMap<>(); |
<<<<<<<
} else if (wrapper.isGuaranteeRecovery()) {
handler = this.applicationContext.getBean("recoverFromGuarantorCommandHandler", NewCommandSourceHandler.class);
} else {
=======
}
else if (wrapper.isLoanRefundByCash()) {
handler = this.applicationContext.getBean("loanRefundByCashCommandHandler", NewCommandSourceHandler.class);
}
else if (wrapper.isUndoLoanRefund()) {
handler = this.applicationContext.getBean("loanRefundAdjustmentCommandHandler", NewCommandSourceHandler.class);
}
else {
>>>>>>>
} else if (wrapper.isGuaranteeRecovery()) {
handler = this.applicationContext.getBean("recoverFromGuarantorCommandHandler", NewCommandSourceHandler.class);
} else if (wrapper.isLoanRefundByCash()) {
handler = this.applicationContext.getBean("loanRefundByCashCommandHandler", NewCommandSourceHandler.class);
} else if (wrapper.isUndoLoanRefund()) {
handler = this.applicationContext.getBean("loanRefundAdjustmentCommandHandler", NewCommandSourceHandler.class);
} else { |
<<<<<<<
final BigDecimal principalThresholdForLastInstalment = null;
=======
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion = false;
>>>>>>>
final BigDecimal principalThresholdForLastInstalment = null;
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion = false;
<<<<<<<
interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, productGuaranteeData,
principalThresholdForLastInstalment);
=======
interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, productGuaranteeData,
accountMovesOutOfNPAOnlyOnArrearsCompletion);
>>>>>>>
interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, productGuaranteeData,
principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion);
<<<<<<<
final BigDecimal principalThresholdForLastInstalment = null;
=======
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion = false;
>>>>>>>
final BigDecimal principalThresholdForLastInstalment = null;
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion = false;
<<<<<<<
holdGuaranteeFunds, productGuaranteeData, principalThresholdForLastInstalment);
=======
holdGuaranteeFunds, productGuaranteeData, accountMovesOutOfNPAOnlyOnArrearsCompletion);
>>>>>>>
holdGuaranteeFunds, productGuaranteeData, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion);
<<<<<<<
final Integer minimumDaysBetweenDisbursalAndFirstRepayment, boolean holdGuaranteeFunds,
final LoanProductGuaranteeData loanProductGuaranteeData, final BigDecimal principalThresholdForLastInstalment) {
=======
final Integer minimumDaysBetweenDisbursalAndFirstRepayment, final boolean holdGuaranteeFunds,
final LoanProductGuaranteeData loanProductGuaranteeData, final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion) {
>>>>>>>
final Integer minimumDaysBetweenDisbursalAndFirstRepayment, boolean holdGuaranteeFunds,
final LoanProductGuaranteeData loanProductGuaranteeData, final BigDecimal principalThresholdForLastInstalment,
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion) {
<<<<<<<
this.principalThresholdForLastInstalment = principalThresholdForLastInstalment;
=======
this.accountMovesOutOfNPAOnlyOnArrearsCompletion = accountMovesOutOfNPAOnlyOnArrearsCompletion;
>>>>>>>
this.principalThresholdForLastInstalment = principalThresholdForLastInstalment;
this.accountMovesOutOfNPAOnlyOnArrearsCompletion = accountMovesOutOfNPAOnlyOnArrearsCompletion;
<<<<<<<
this.principalThresholdForLastInstalment = productData.principalThresholdForLastInstalment;
=======
this.accountMovesOutOfNPAOnlyOnArrearsCompletion = productData.accountMovesOutOfNPAOnlyOnArrearsCompletion;
>>>>>>>
this.principalThresholdForLastInstalment = productData.principalThresholdForLastInstalment;
this.accountMovesOutOfNPAOnlyOnArrearsCompletion = productData.accountMovesOutOfNPAOnlyOnArrearsCompletion; |
<<<<<<<
public CommandWrapperBuilder createMap(Long relId) {
this.actionName = "CREATE";
this.entityName = "ENTITYMAPPING";
this.entityId = relId;
this.href = "/entitytoentitymapping/" + relId;
return this;
}
public CommandWrapperBuilder updateMap(Long mapId) {
this.actionName = "UPDATE";
this.entityName = "ENTITYMAPPING";
this.entityId = mapId;
this.href = "/entitytoentitymapping" + mapId;
return this;
}
public CommandWrapperBuilder deleteMap(final Long mapId) {
this.actionName = "DELETE";
this.entityName = "ENTITYMAPPING";
this.entityId = mapId;
this.href = "/entitytoentitymapping/" + mapId;
return this;
}
public CommandWrapperBuilder updateWorkingDays() {
this.actionName = "UPDATE";
this.entityName = "WORKINGDAYS";
this.href = "/workingdays/";
return this;
}
=======
public CommandWrapperBuilder activatePasswordValidationPolicy(final Long validationPolicyId) {
this.actionName = "UPDATE";
this.entityName = "PASSWORD_VALIDATION_POLICY";
this.entityId =validationPolicyId ;
this.href = "/passwordValidationPolicy/" + validationPolicyId;
return this;
}
>>>>>>>
public CommandWrapperBuilder createMap(Long relId) {
this.actionName = "CREATE";
this.entityName = "ENTITYMAPPING";
this.entityId = relId;
this.href = "/entitytoentitymapping/" + relId;
return this;
}
public CommandWrapperBuilder updateMap(Long mapId) {
this.actionName = "UPDATE";
this.entityName = "ENTITYMAPPING";
this.entityId = mapId;
this.href = "/entitytoentitymapping" + mapId;
return this;
}
public CommandWrapperBuilder deleteMap(final Long mapId) {
this.actionName = "DELETE";
this.entityName = "ENTITYMAPPING";
this.entityId = mapId;
this.href = "/entitytoentitymapping/" + mapId;
return this;
}
public CommandWrapperBuilder updateWorkingDays() {
this.actionName = "UPDATE";
this.entityName = "WORKINGDAYS";
this.href = "/workingdays/";
return this;
}
public CommandWrapperBuilder activatePasswordValidationPolicy(final Long validationPolicyId) {
this.actionName = "UPDATE";
this.entityName = "PASSWORD_VALIDATION_POLICY";
this.entityId = validationPolicyId;
this.href = "/passwordValidationPolicy/" + validationPolicyId;
return this;
} |
<<<<<<<
import org.mifosplatform.portfolio.group.exception.ClientNotInGroupException;
=======
import org.mifosplatform.portfolio.group.exception.CenterNotActiveException;
import org.mifosplatform.portfolio.group.exception.GroupNotActiveException;
>>>>>>>
import org.mifosplatform.portfolio.group.exception.ClientNotInGroupException;
import org.mifosplatform.portfolio.group.exception.CenterNotActiveException;
import org.mifosplatform.portfolio.group.exception.GroupNotActiveException;
<<<<<<<
accountType = AccountType.INDIVIDUAL;
=======
if (client.isNotActive()) { throw new ClientNotActiveException(clientId); }
>>>>>>>
accountType = AccountType.INDIVIDUAL;
if (client.isNotActive()) { throw new ClientNotActiveException(clientId); }
<<<<<<<
accountType = AccountType.GROUP;
}
if (group != null && client != null) {
if (!group.hasClientAsMember(client)) { throw new ClientNotInGroupException(clientId, groupId); }
accountType = AccountType.JLG;
=======
if (group.isNotActive()) {
if (group.isCenter()) { throw new CenterNotActiveException(groupId); }
throw new GroupNotActiveException(groupId);
}
>>>>>>>
accountType = AccountType.GROUP;
}
if (group != null && client != null) {
if (!group.hasClientAsMember(client)) { throw new ClientNotInGroupException(clientId, groupId); }
accountType = AccountType.JLG;
if (group.isNotActive()) {
if (group.isCenter()) { throw new CenterNotActiveException(groupId); }
throw new GroupNotActiveException(groupId);
} |
<<<<<<<
final SavingsAccountTransactionDTO transactionDTO = new SavingsAccountTransactionDTO(fmt, activationDate,
minRequiredOpeningBalance.getAmount(), existingTransactionIds, existingReversedTransactionIds, null);
=======
final SavingsAccountTransactionDTO transactionDTO = new SavingsAccountTransactionDTO(fmt, activationDate, minRequiredOpeningBalance.getAmount(),
existingTransactionIds, existingReversedTransactionIds, null);
>>>>>>>
final SavingsAccountTransactionDTO transactionDTO = new SavingsAccountTransactionDTO(fmt, activationDate,
minRequiredOpeningBalance.getAmount(), existingTransactionIds, existingReversedTransactionIds, null);
<<<<<<<
final Money openingAccountBalance = Money.zero(this.currency);
recalculateDailyBalances(openingAccountBalance);
=======
// no openingBalance concept supported yet but probably will to allow
// for migrations.
final Money openingAccountBalance = Money.zero(this.currency);
// update existing transactions so derived balance fields are
// correct.
recalculateDailyBalances(openingAccountBalance);
>>>>>>>
// no openingBalance concept supported yet but probably will to
// allow
// for migrations.
final Money openingAccountBalance = Money.zero(this.currency);
// update existing transactions so derived balance fields are
// correct.
recalculateDailyBalances(openingAccountBalance); |
<<<<<<<
product, inArrears);
=======
product, graceOnArrearsAgeing);
>>>>>>>
product, inArrears, graceOnArrearsAgeing);
<<<<<<<
maxOutstandingLoanBalance, emiAmountVariations, memberVariations, product, inArrears);
=======
maxOutstandingLoanBalance, emiAmountVariations, memberVariations, product, graceOnArrearsAgeing);
>>>>>>>
maxOutstandingLoanBalance, emiAmountVariations, memberVariations, product, inArrears, graceOnArrearsAgeing);
<<<<<<<
acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears);
=======
acc.emiAmountVariations, acc.memberVariations, acc.product, acc.graceOnArrearsAgeing);
>>>>>>>
acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears, acc.graceOnArrearsAgeing);
<<<<<<<
emiAmountVariations, memberVariations, product, inArrears);
=======
emiAmountVariations, memberVariations, product, graceOnArrearsAgeing);
>>>>>>>
emiAmountVariations, memberVariations, product, inArrears, graceOnArrearsAgeing);
<<<<<<<
acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears);
=======
acc.emiAmountVariations, acc.memberVariations, acc.product, acc.graceOnArrearsAgeing);
>>>>>>>
acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears, acc.graceOnArrearsAgeing);
<<<<<<<
product.getOutstandingLoanBalance(), emiAmountVariations, memberVariations, product, inArrears);
=======
product.getOutstandingLoanBalance(), emiAmountVariations, memberVariations, product, product.getGraceOnDueDate());
>>>>>>>
product.getOutstandingLoanBalance(), emiAmountVariations, memberVariations, product, inArrears, product.getGraceOnArrearsAgeing());
<<<<<<<
product.getOutstandingLoanBalance(), acc.emiAmountVariations, acc.memberVariations, product, acc.inArrears);
=======
product.getOutstandingLoanBalance(), acc.emiAmountVariations, acc.memberVariations, product, product.getGraceOnDueDate());
>>>>>>>
product.getOutstandingLoanBalance(), acc.emiAmountVariations, acc.memberVariations, product, acc.inArrears,
product.getGraceOnArrearsAgeing());
<<<<<<<
final Boolean multiDisburseLoan, final BigDecimal fixedEmiAmont, final BigDecimal outstandingLoanBalance,
final Boolean inArrears) {
=======
final Boolean multiDisburseLoan, final BigDecimal fixedEmiAmont, final BigDecimal outstandingLoanBalance,
final Integer graceOnArrearsAgeing) {
>>>>>>>
final Boolean multiDisburseLoan, final BigDecimal fixedEmiAmont, final BigDecimal outstandingLoanBalance,
final Boolean inArrears, final Integer graceOnArrearsAgeing) {
<<<<<<<
emiAmountVariations, memberVariations, product, inArrears);
=======
emiAmountVariations, memberVariations, product, graceOnArrearsAgeing);
>>>>>>>
emiAmountVariations, memberVariations, product, inArrears, graceOnArrearsAgeing);
<<<<<<<
acc.maxOutstandingLoanBalance, emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears);
=======
acc.maxOutstandingLoanBalance, emiAmountVariations, acc.memberVariations, acc.product, acc.graceOnArrearsAgeing);
>>>>>>>
acc.maxOutstandingLoanBalance, emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears,
acc.graceOnArrearsAgeing);
<<<<<<<
acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears);
=======
acc.emiAmountVariations, acc.memberVariations, acc.product, acc.graceOnArrearsAgeing);
>>>>>>>
acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears, acc.graceOnArrearsAgeing);
<<<<<<<
acc.emiAmountVariations, memberVariations, acc.product, acc.inArrears);
=======
acc.emiAmountVariations, memberVariations, acc.product, acc.graceOnArrearsAgeing);
>>>>>>>
acc.emiAmountVariations, memberVariations, acc.product, acc.inArrears, acc.graceOnArrearsAgeing);
<<<<<<<
final LoanProductData product, final Boolean inArrears) {
=======
final LoanProductData product, final Integer graceOnArrearsAgeing) {
>>>>>>>
final LoanProductData product, final Boolean inArrears, final Integer graceOnArrearsAgeing) {
<<<<<<<
this.inArrears = inArrears;
=======
this.graceOnArrearsAgeing = graceOnArrearsAgeing;
>>>>>>>
this.inArrears = inArrears;
this.graceOnArrearsAgeing = graceOnArrearsAgeing; |
<<<<<<<
=======
if(connManager != null)
connManager.deRegister(this);
closeReason = reason;
>>>>>>>
closeReason = reason; |
<<<<<<<
processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING, "TYPE!!!! " + allWrapperTypes.size());
Set<DataClass> dataClasses = new LinkedHashSet<>();
=======
>>>>>>>
Set<DataClass> dataClasses = new LinkedHashSet<>(); |
<<<<<<<
import com.kabouzeid.gramophone.model.UiPreferenceChangedEvent;
=======
>>>>>>>
import com.kabouzeid.gramophone.model.UIPreferenceChangedEvent;
<<<<<<<
@Subscribe
public void onUIChangeEvent(UiPreferenceChangedEvent event) {
switch (event.getAction()) {
case UiPreferenceChangedEvent.ALBUM_OVERVIEW_PALETTE_CHANGED:
usePalette = (boolean) event.getValue();
notifyDataSetChanged();
break;
}
}
=======
>>>>>>> |
<<<<<<<
=======
import android.graphics.drawable.BitmapDrawable;
>>>>>>>
<<<<<<<
private void resetColors() {
int songTitleTextColor = Util.resolveColor(this, R.attr.title_text_color);
int artistNameTextColor = Util.resolveColor(this, R.attr.caption_text_color);
int defaultBarColor = Util.resolveColor(this, R.attr.default_bar_color);
=======
private void setStandardColors() {
int songTitleTextColor = DialogUtils.resolveColor(this, R.attr.title_text_color);
int artistNameTextColor = DialogUtils.resolveColor(this, R.attr.caption_text_color);
int defaultBarColor = DialogUtils.resolveColor(this, R.attr.default_bar_color);
>>>>>>>
private void resetColors() {
int songTitleTextColor = DialogUtils.resolveColor(this, R.attr.title_text_color);
int artistNameTextColor = DialogUtils.resolveColor(this, R.attr.caption_text_color);
int defaultBarColor = DialogUtils.resolveColor(this, R.attr.default_bar_color); |
<<<<<<<
a1.getArtistName(),
a2.getArtistName());
Comparator<Album> byYear = (a1, a2) -> a1.getYear() - a2.getYear();
Comparator<Album> byDateAdded = (a1, a2) -> ComparatorUtil.compareLongInts(a1.getDateAdded(), a2.getDateAdded());
=======
getArtistName.apply(a1),
getArtistName.apply(a2));
Comparator<Album> byYearDesc = (a1, a2) -> a2.getYear() - a1.getYear();
Comparator<Album> byDateAddedDesc = (a1, a2) -> ComparatorUtil.compareLongInts(a2.getDateAdded(), a1.getDateAdded());
>>>>>>>
a1.getArtistName(),
a2.getArtistName());
Comparator<Album> byYearDesc = (a1, a2) -> a2.getYear() - a1.getYear();
Comparator<Album> byDateAddedDesc = (a1, a2) -> ComparatorUtil.compareLongInts(a2.getDateAdded(), a1.getDateAdded()); |
<<<<<<<
import android.app.Activity;
=======
>>>>>>>
<<<<<<<
import com.kabouzeid.gramophone.util.Util;
import com.koushikdutta.ion.Ion;
=======
>>>>>>>
import com.koushikdutta.ion.Ion;
<<<<<<<
import java.util.List;
=======
import java.util.ArrayList;
>>>>>>>
import java.util.ArrayList; |
<<<<<<<
protected ZeppelinConnection connection;
private URI uri;
=======
protected ThreadLocal<ZeppelinConnection> connection = new ThreadLocal<ZeppelinConnection>() {
@Override protected ZeppelinConnection initialValue() { //Lazy Init by subClass impl
return getConnection();
}
};
>>>>>>>
private URI uri;
protected ThreadLocal<ZeppelinConnection> connection = new ThreadLocal<ZeppelinConnection>() {
@Override protected ZeppelinConnection initialValue() { //Lazy Init by subClass impl
return getConnection();
}
}; |
<<<<<<<
.add("zeppelin.spark.concurrentSQL", "false",
"Execute multiple SQL concurrently if set true.")
=======
.add("zeppelin.spark.useHiveContext", "false",
"use HiveContext instead of SQLContext if it is true")
>>>>>>>
.add("zeppelin.spark.useHiveContext", "false",
"use HiveContext instead of SQLContext if it is true")
.add("zeppelin.spark.concurrentSQL", "false",
"Execute multiple SQL concurrently if set true.")
<<<<<<<
public boolean concurrentSQL() {
return Boolean.parseBoolean(getProperty("zeppelin.spark.concurrentSQL"));
}
=======
private boolean useHiveContext() {
return Boolean.parseBoolean(getProperty("zeppelin.spark.useHiveContext"));
}
>>>>>>>
private boolean useHiveContext() {
return Boolean.parseBoolean(getProperty("zeppelin.spark.useHiveContext"));
}
public boolean concurrentSQL() {
return Boolean.parseBoolean(getProperty("zeppelin.spark.concurrentSQL"));
}
<<<<<<<
if (concurrentSQL()) {
sc.setLocalProperty("spark.scheduler.pool", "fair");
}
=======
>>>>>>>
if (concurrentSQL()) {
sc.setLocalProperty("spark.scheduler.pool", "fair");
} |
<<<<<<<
shuffle3000(scrambled);
compareSymmetric();
}
static void shuffle3000(List<? extends Object> scrambled) {
Collections.shuffle(scrambled, new Random(3000));
Collections.sort(scrambled, new NaturalOrderComparator());
System.out.println("Sorted: " + scrambled);
}
static void compareSymmetric() {
NaturalOrderComparator naturalOrderComparator = new NaturalOrderComparator();
int compare1 = naturalOrderComparator.compare("1-2", "1-02");
int compare2 = naturalOrderComparator.compare("1-02", "1-2");
System.out.println(compare1 + " == " + compare2);
compare1 = naturalOrderComparator.compare("pic 5", "pic05");
compare2 = naturalOrderComparator.compare("pic05", "pic 5");
System.out.println(compare1 + " == " + compare2);
=======
floatsWithCommas();
}
static void floatsWithCommas() {
List<String> unSorted = Arrays.asList("0.9", "1.0c", "1.2", "1.3", "0.6", "1.1", "0.7", "0.3", "1.0b", "1.0", "0.8");
System.out.println("Unsorted: " + unSorted);
unSorted.sort(new NaturalOrderComparator());
System.out.println("Sorted: " + unSorted);
>>>>>>>
shuffle3000(scrambled);
compareSymmetric();
floatsWithCommas();
}
static void shuffle3000(List<? extends Object> scrambled) {
Collections.shuffle(scrambled, new Random(3000));
Collections.sort(scrambled, new NaturalOrderComparator());
System.out.println("Sorted: " + scrambled);
}
static void compareSymmetric() {
NaturalOrderComparator naturalOrderComparator = new NaturalOrderComparator();
int compare1 = naturalOrderComparator.compare("1-2", "1-02");
int compare2 = naturalOrderComparator.compare("1-02", "1-2");
System.out.println(compare1 + " == " + compare2);
compare1 = naturalOrderComparator.compare("pic 5", "pic05");
compare2 = naturalOrderComparator.compare("pic05", "pic 5");
System.out.println(compare1 + " == " + compare2);
}
static void floatsWithCommas() {
List<String> unSorted = Arrays.asList("0.9", "1.0c", "1.2", "1.3", "0.6", "1.1", "0.7", "0.3", "1.0b", "1.0", "0.8");
System.out.println("Unsorted: " + unSorted);
unSorted.sort(new NaturalOrderComparator());
System.out.println("Sorted: " + unSorted); |
<<<<<<<
import java.beans.Introspector;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.logging.Level;
import org.apache.commons.lang3.StringUtils;
import org.xml.sax.ErrorHandler;
=======
>>>>>>>
import java.beans.Introspector;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.logging.Level;
import javax.activation.MimeType;
import org.apache.commons.lang3.StringUtils;
import org.xml.sax.ErrorHandler;
<<<<<<<
private JDefinedClass addBuilderClass(ClassOutline clazz, JFieldVar[] declaredFields, JFieldVar[] superclassFields) {
=======
private JDefinedClass addBuilderClass(ClassOutline clazz, FieldOutline[] declaredFields, FieldOutline[] unhandledSuperclassFields, FieldOutline[] allSuperclassFields) {
>>>>>>>
private JDefinedClass addBuilderClass(ClassOutline clazz, JFieldVar[] declaredFields, JFieldVar[] unhandledSuperclassFields, JFieldVar[] allSuperclassFields) {
<<<<<<<
for (JFieldVar field : declaredFields) {
addProperty(builderClass, field);
JMethod unconditionalWithMethod = addWithMethod(builderClass, field);
if (createWithIfNotNullMethod) {
addWithIfNotNullMethod(builderClass, field, unconditionalWithMethod);
}
if (isCollection(field)) {
addAddMethod(builderClass, field);
}
}
for (JFieldVar field : superclassFields) {
addProperty(builderClass, field);
JMethod unconditionalWithMethod = addWithMethod(builderClass, field);
if (createWithIfNotNullMethod) {
addWithIfNotNullMethod(builderClass, field, unconditionalWithMethod);
}
if (isCollection(field)) {
addAddMethod(builderClass, field);
=======
addBuilderMethodsForFields(builderClass, declaredFields);
// handle all superclass fields not handled by any superclass builder
addBuilderMethodsForFields(builderClass, unhandledSuperclassFields);
if (builderInheritance) {
// re-type inherited builder methods
for (int i=0; i < allSuperclassFields.length - unhandledSuperclassFields.length; i++) {
FieldOutline inheritedField = allSuperclassFields[i];
JMethod unconditionalWithMethod = addWithMethod(builderClass, inheritedField, true);
if (createWithIfNotNullMethod) {
addWithIfNotNullMethod(builderClass, inheritedField, unconditionalWithMethod, true);
}
if (inheritedField.getPropertyInfo().isCollection()) {
addAddMethod(builderClass, inheritedField, true);
}
>>>>>>>
addBuilderMethodsForFields(builderClass, declaredFields);
// handle all superclass fields not handled by any superclass builder
addBuilderMethodsForFields(builderClass, unhandledSuperclassFields);
if (builderInheritance) {
// re-type inherited builder methods
for (int i=0; i < allSuperclassFields.length - unhandledSuperclassFields.length; i++) {
JFieldVar inheritedField = allSuperclassFields[i];
JMethod unconditionalWithMethod = addWithMethod(builderClass, inheritedField, true);
if (createWithIfNotNullMethod) {
addWithIfNotNullMethod(builderClass, inheritedField, unconditionalWithMethod, true);
}
if (isCollection(inheritedField)) {
addAddMethod(builderClass, inheritedField, true);
}
<<<<<<<
if (!superClassWithSameName) {
JMethod method = clazz.implClass.method(JMod.PUBLIC | JMod.STATIC, builderClass,
Introspector.decapitalize(clazz.implClass.name()) + "Builder");
JVar param = method.param(JMod.FINAL, clazz.implClass, "o1");
method.body()._return(JExpr._new(builderClass).arg(param));
}
=======
return false;
>>>>>>>
return false;
<<<<<<<
private JMethod addWithMethod(JDefinedClass builderClass, JFieldVar field) {
String fieldName = StringUtils.capitalize(field.name());
=======
private JMethod addWithMethod(JDefinedClass builderClass, FieldOutline field, boolean inherit) {
String fieldName = field.getPropertyInfo().getName(true);
>>>>>>>
private JMethod addWithMethod(JDefinedClass builderClass, JFieldVar field, boolean inherit) {
String fieldName = StringUtils.capitalize(field.name());
<<<<<<<
private JMethod addWithIfNotNullMethod(JDefinedClass builderClass, JFieldVar field, JMethod unconditionalWithMethod) {
if (field.type().isPrimitive())
=======
private JMethod addWithIfNotNullMethod(JDefinedClass builderClass, FieldOutline field, JMethod unconditionalWithMethod, boolean inherit) {
if (field.getRawType().isPrimitive())
>>>>>>>
private JMethod addWithIfNotNullMethod(JDefinedClass builderClass, JFieldVar field, JMethod unconditionalWithMethod, boolean inherit) {
if (field.type().isPrimitive())
<<<<<<<
private JMethod addAddMethod(JDefinedClass builderClass, JFieldVar field) {
=======
private JMethod addAddMethod(JDefinedClass builderClass, FieldOutline field, boolean inherit) {
>>>>>>>
private JMethod addAddMethod(JDefinedClass builderClass, JFieldVar field, boolean inherit) {
<<<<<<<
private void replaceCollectionGetter(JFieldVar field, final JMethod getter) {
JDefinedClass clazz = (JDefinedClass) field.type();
=======
private String getBuilderClassName(JClass clazz) {
if (isUseSimpleBuilderName()) {
return "Builder";
}
return clazz.name() + "Builder";
}
private JClass getBuilderClass(JClass clazz) {
//Current limitation: this only works for classes from this model / outline, i.e. that are part of this generator run
if (!createBuilder || clazz.isAbstract()) {
return null;
}
String builderClassName = getBuilderClassName(clazz);
if (clazz instanceof JDefinedClass) {
JDefinedClass definedClass = (JDefinedClass)clazz;
for (Iterator<JDefinedClass> i = definedClass.classes(); i.hasNext();) {
JDefinedClass innerClass = i.next();
if (builderClassName.equals(innerClass.name())) {
return innerClass;
}
}
}
return null;
}
private void replaceCollectionGetter(FieldOutline field, final JMethod getter) {
JDefinedClass clazz = field.parent().implClass;
>>>>>>>
private String getBuilderClassName(JClass clazz) {
if (isUseSimpleBuilderName()) {
return "Builder";
}
return clazz.name() + "Builder";
}
private JClass getBuilderClass(JClass clazz) {
//Current limitation: this only works for classes from this model / outline, i.e. that are part of this generator run
if (!createBuilder || clazz.isAbstract()) {
return null;
}
String builderClassName = getBuilderClassName(clazz);
if (clazz instanceof JDefinedClass) {
JDefinedClass definedClass = (JDefinedClass)clazz;
for (Iterator<JDefinedClass> i = definedClass.classes(); i.hasNext();) {
JDefinedClass innerClass = i.next();
if (builderClassName.equals(innerClass.name())) {
return innerClass;
}
}
}
return null;
}
private void replaceCollectionGetter(JFieldVar field, final JMethod getter) {
JDefinedClass clazz = (JDefinedClass) field.type();
<<<<<<<
private JExpression defaultValue(JFieldVar fieldOutline) {
JType javaType = fieldOutline.type();
=======
private JExpression defaultValue(JType javaType, FieldOutline fieldOutline) {
if(setDefaultValuesInConstructor) {
//try to find default value for element
if (fieldOutline.getPropertyInfo().defaultValue == null
&& fieldOutline.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
XSParticle part = (XSParticle) fieldOutline.getPropertyInfo().getSchemaComponent();
if (part.getTerm().isElementDecl()) {
XSElementDecl elem = part.getTerm().asElementDecl();
if (elem.getDefaultValue() != null) {
TypeUse typeUse = null;
final CAdapter ad = fieldOutline.getPropertyInfo().getAdapter();
for (CTypeInfo cti : fieldOutline.getPropertyInfo().ref()) {
if (cti instanceof TypeUse) {
if(ad!=null){
final CNonElement cti2 = (CNonElement) cti;
typeUse = new TypeUse() {
@Override
public boolean isCollection() {
return false;
}
@Override
public CAdapter getAdapterUse() {
return null;
}
@Override
public CNonElement getInfo() {
return null;
}
@Override
public ID idUse() {
return null;
}
@Override
public MimeType getExpectedMimeType() {
return null;
}
@Override
public JExpression createConstant(Outline outline, XmlString lexical) {
JExpression cons = cti2.createConstant(outline, lexical);
return JExpr._new(ad.getAdapterClass(outline)).invoke("unmarshal").arg(cons);
}
};
} else {
typeUse = (TypeUse) cti;
}
break;
}
}
fieldOutline.getPropertyInfo().defaultValue = CDefaultValue.create(typeUse, elem.getDefaultValue());
}
}
}
if (fieldOutline.getPropertyInfo().defaultValue != null) {
return fieldOutline.getPropertyInfo().defaultValue.compute(fieldOutline.parent().parent());
}
}
>>>>>>>
private JExpression defaultValueNew(JType javaType, FieldOutline fieldOutline) {
if(setDefaultValuesInConstructor) {
//try to find default value for element
if (fieldOutline.getPropertyInfo().defaultValue == null
&& fieldOutline.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
XSParticle part = (XSParticle) fieldOutline.getPropertyInfo().getSchemaComponent();
if (part.getTerm().isElementDecl()) {
XSElementDecl elem = part.getTerm().asElementDecl();
if (elem.getDefaultValue() != null) {
TypeUse typeUse = null;
final CAdapter ad = fieldOutline.getPropertyInfo().getAdapter();
for (CTypeInfo cti : fieldOutline.getPropertyInfo().ref()) {
if (cti instanceof TypeUse) {
if(ad!=null){
final CNonElement cti2 = (CNonElement) cti;
typeUse = new TypeUse() {
@Override
public boolean isCollection() {
return false;
}
@Override
public CAdapter getAdapterUse() {
return null;
}
@Override
public CNonElement getInfo() {
return null;
}
@Override
public ID idUse() {
return null;
}
@Override
public MimeType getExpectedMimeType() {
return null;
}
@Override
public JExpression createConstant(Outline outline, XmlString lexical) {
JExpression cons = cti2.createConstant(outline, lexical);
return JExpr._new(ad.getAdapterClass(outline)).invoke("unmarshal").arg(cons);
}
};
} else {
typeUse = (TypeUse) cti;
}
break;
}
}
fieldOutline.getPropertyInfo().defaultValue = CDefaultValue.create(typeUse, elem.getDefaultValue());
}
}
}
if (fieldOutline.getPropertyInfo().defaultValue != null) {
return fieldOutline.getPropertyInfo().defaultValue.compute(fieldOutline.parent().parent());
}
}
if (javaType.isPrimitive()) {
if (fieldOutline.parent().parent().getCodeModel().BOOLEAN.equals(javaType)) {
return JExpr.lit(false);
} else if (fieldOutline.parent().parent().getCodeModel().SHORT.equals(javaType)) {
return JExpr.cast(fieldOutline.parent().parent().getCodeModel().SHORT, JExpr.lit(0));
} else {
return JExpr.lit(0);
}
}
return JExpr._null();
}
private JExpression defaultValue(JFieldVar fieldOutline) {
JType javaType = fieldOutline.type();
<<<<<<<
for (JFieldVar field : superclassFields) {
String propertyName = field.name();
JType type = field.type();
if (type instanceof JDefinedClass) {
JMethod getter = getGetterProperty(clazz ,field.name());
if (isCollection(field)) {
JVar tmpVar = ctor.body().decl(0, getJavaType(field), "_" + propertyName, JExpr.invoke(o, getter));
JConditional conditional = ctor.body()._if(tmpVar.eq(JExpr._null()));
conditional._then().assign(JExpr.refthis(propertyName), getNewCollectionExpression(codeModel, getJavaType(field)));
conditional._else().assign(JExpr.refthis(propertyName), getDefensiveCopyExpression(codeModel, getJavaType(field), tmpVar));
} else {
ctor.body().assign(JExpr.refthis(propertyName), JExpr.invoke(o, getter));
}
=======
for (FieldOutline field : superclassFields) {
String propertyName = field.getPropertyInfo().getName(false);
JMethod getter = getGetterProperty(field);
if (field.getPropertyInfo().isCollection()) {
JVar tmpVar = ctor.body().decl(0, getJavaType(field), "_" + propertyName, JExpr.invoke(o, getter));
JConditional conditional = ctor.body()._if(tmpVar.eq(JExpr._null()));
conditional._then().assign(JExpr.refthis(propertyName), getNewCollectionExpression(codeModel, getJavaType(field)));
conditional._else().assign(JExpr.refthis(propertyName), getDefensiveCopyExpression(codeModel, getJavaType(field), tmpVar));
} else {
ctor.body().assign(JExpr.refthis(propertyName), JExpr.invoke(o, getter));
>>>>>>>
for (JFieldVar field : superclassFields) {
String propertyName = field.name();
JType type = field.type();
if (type instanceof JDefinedClass) {
JMethod getter = getGetterProperty(clazz ,field.name());
if (isCollection(field)) {
JVar tmpVar = ctor.body().decl(0, getJavaType(field), "_" + propertyName, JExpr.invoke(o, getter));
JConditional conditional = ctor.body()._if(tmpVar.eq(JExpr._null()));
conditional._then().assign(JExpr.refthis(propertyName), getNewCollectionExpression(codeModel, getJavaType(field)));
conditional._else().assign(JExpr.refthis(propertyName), getDefensiveCopyExpression(codeModel, getJavaType(field), tmpVar));
} else {
ctor.body().assign(JExpr.refthis(propertyName), JExpr.invoke(o, getter));
}
<<<<<<<
private JFieldVar[] getDeclaredFields(JDefinedClass clazz) {
return clazz.fields().values().stream().filter(f -> !(isFinal(f) && isStatic(f))).toArray(JFieldVar[]::new);
}
private JFieldVar[] getSuperclassFields(JDefinedClass clazz) {
List<JDefinedClass> superclasses = getSuperClasses(clazz);
=======
private FieldOutline[] getSuperclassFields(ClassOutline clazz) {
// first get all superclasses
List<ClassOutline> superclasses = new ArrayList<>();
ClassOutline superclass = clazz.getSuperClass();
while (superclass != null) {
superclasses.add(superclass);
superclass = superclass.getSuperClass();
}
>>>>>>>
private JFieldVar[] getDeclaredFields(JDefinedClass clazz) {
return clazz.fields().values().stream().filter(f -> !(isFinal(f) && isStatic(f))).toArray(JFieldVar[]::new);
}
private JFieldVar[] getSuperclassFields(JDefinedClass clazz) {
List<JDefinedClass> superclasses = getSuperClasses(clazz);
<<<<<<<
List<JFieldVar> superclassFields = new ArrayList<>();
=======
List<FieldOutline> superclassFields = new ArrayList<>();
>>>>>>>
List<JFieldVar> superclassFields = new ArrayList<>(); |
<<<<<<<
=======
import java.beans.Introspector;
import java.io.StringWriter;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.logging.Level;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.reflect.FieldUtils;
import org.xml.sax.ErrorHandler;
import com.sun.codemodel.JAnnotationUse;
import com.sun.codemodel.JAnnotationValue;
>>>>>>>
import com.sun.codemodel.JAnnotationUse;
import com.sun.codemodel.JAnnotationValue; |
<<<<<<<
import android.app.Notification;
=======
>>>>>>>
<<<<<<<
onAlertChoice(ConfigConstants.DETECTION_TYPE_ALWAYS_BLOCKED_HERE);
showToastOnNoLocation();
checkForActivatedLocation();
locationFinder.blockMicOrSpoof(); //try to get the microphone access for choosing the blocking method
activateSpoofingStatusNotification(); //activates the notification for the spoofing process
=======
onAlertChoice(1);
locationFinder.blockMicOrSpoof();
NotificationHelper.activateSpoofingStatusNotification(getApplicationContext()); //activates the notification for the spoofing process
>>>>>>>
onAlertChoice(ConfigConstants.DETECTION_TYPE_ALWAYS_BLOCKED_HERE);
showToastOnNoLocation();
checkForActivatedLocation();
locationFinder.blockMicOrSpoof();
NotificationHelper.activateSpoofingStatusNotification(getApplicationContext()); //activates the notification for the spoofing process
<<<<<<<
onAlertChoice(ConfigConstants.DETECTION_TYPE_THIS_TIME);
locationFinder.blockMicOrSpoof(); //start scanning again
activateScanningStatusNotification(); //activates the notification for the scanning process
=======
onAlertChoice(2);
locationFinder.blockMicOrSpoof();
NotificationHelper.activateSpoofingStatusNotification(getApplicationContext());
>>>>>>>
onAlertChoice(ConfigConstants.DETECTION_TYPE_THIS_TIME);
locationFinder.blockMicOrSpoof();
NotificationHelper.activateSpoofingStatusNotification(getApplicationContext()); |
<<<<<<<
errorNotification("Sync not configured");
=======
displayErrorNotification(context
.getString(R.string.sync_not_configured));
>>>>>>>
errorNotification("Sync not configured");
<<<<<<<
private void pull() throws IOException, CertificateException, SSLHandshakeException {
updateNotification(20, "Downloading checksum file");
String remoteChecksumContents = "";
=======
private void pull() throws IOException, CertificateException {
updateNotification(20, context.getString(R.string.downloading)
+ " checksums.dat");
String remoteChecksumContents = "";
>>>>>>>
private void pull() throws IOException, CertificateException, SSLHandshakeException {
updateNotification(20, context.getString(R.string.downloading) + " checksums.data");
String remoteChecksumContents = "";
<<<<<<<
private void errorNotification(String errorMsg) {
this.notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
Intent notifyIntent = new Intent(context, OutlineActivity.class);
notifyIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent contentIntent = PendingIntent.getActivity(context, 0,
notifyIntent, 0);
notification = new Notification(R.drawable.icon,
"Synchronization Failed", System.currentTimeMillis());
notification.contentIntent = contentIntent;
notification.flags = notification.flags;
notification.contentView = new RemoteViews(context
.getPackageName(), R.layout.sync_notification);
notification.contentView.setImageViewResource(R.id.status_icon, R.drawable.icon);
notification.contentView.setTextViewText(R.id.status_text, errorMsg);
notification.contentView.setProgressBar(R.id.status_progress, 100, 100, false);
notificationManager.notify(notifyRef, notification);
}
=======
>>>>>>>
private void errorNotification(String errorMsg) {
this.notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
Intent notifyIntent = new Intent(context, OutlineActivity.class);
notifyIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent contentIntent = PendingIntent.getActivity(context, 0,
notifyIntent, 0);
notification = new Notification(R.drawable.icon,
"Synchronization Failed", System.currentTimeMillis());
notification.contentIntent = contentIntent;
notification.flags = notification.flags;
notification.contentView = new RemoteViews(context
.getPackageName(), R.layout.sync_notification);
notification.contentView.setImageViewResource(R.id.status_icon, R.drawable.icon);
notification.contentView.setTextViewText(R.id.status_text, errorMsg);
notification.contentView.setProgressBar(R.id.status_progress, 100, 100, false);
notificationManager.notify(notifyRef, notification);
}
<<<<<<<
=======
private void displayErrorNotification(String message) {
notification.contentView.setTextViewText(R.id.status_text, message);
// TODO Cancel old and create new notification
notificationManager.notify(notifyRef, notification);
}
>>>>>>> |
<<<<<<<
import com.matburt.mobileorg.Gui.Agenda.AgendasActivity;
=======
import com.matburt.mobileorg.Gui.Wizard.WizardActivity;
>>>>>>>
import com.matburt.mobileorg.Gui.Agenda.AgendasActivity;
import com.matburt.mobileorg.Gui.Wizard.WizardActivity; |
<<<<<<<
import net.moddity.droidnubekit.responsemodels.DNKRecord;
import net.moddity.droidnubekit.responsemodels.DNKRecordField;
=======
>>>>>>>
import net.moddity.droidnubekit.responsemodels.DNKRecord;
import net.moddity.droidnubekit.responsemodels.DNKRecordField;
<<<<<<<
import retrofit.Callback;
=======
import retrofit.Callback;
import retrofit.RequestInterceptor;
>>>>>>>
import retrofit.Callback;
import retrofit.RequestInterceptor;
<<<<<<<
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.registerTypeAdapter(new TypeToken<Map<String, DNKRecordField>>() {}.getType(), new DNKRecordFieldDeserializer());
=======
RequestInterceptor requestInterceptor = new RequestInterceptor() {
@Override
public void intercept(RequestInterceptor.RequestFacade request) {
if(ckSession != null)
request.addQueryParam("ckSession", ckSession);
}
};
>>>>>>>
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.registerTypeAdapter(new TypeToken<Map<String, DNKRecordField>>() {}.getType(), new DNKRecordFieldDeserializer());
RequestInterceptor requestInterceptor = new RequestInterceptor() {
@Override
public void intercept(RequestInterceptor.RequestFacade request) {
if(ckSession != null)
request.addQueryParam("ckSession", ckSession);
}
};
<<<<<<<
.setConverter(new GsonConverter(gsonBuilder.create()))
=======
.setRequestInterceptor(requestInterceptor)
>>>>>>>
.setConverter(new GsonConverter(gsonBuilder.create()))
.setRequestInterceptor(requestInterceptor) |
<<<<<<<
@Suite.SuiteClasses({AlphaBetaSearchTest.class, MinimaxSearchTest.class, AssignmentTest.class, CSPTest.class, MapCSPTest.class,
MetricsTest.class, TreeCspSolverTest.class, AStarSearchTest.class, GreedyBestFirstSearchTest.class, RecursiveBestFirstSearchTest.class,
SimulatedAnnealingSearchTest.class, AndOrSearchTest.class, LRTAStarAgentTest.class, OnlineDFSAgentTest.class,
=======
@Suite.SuiteClasses({ AssignmentTest.class, CSPTest.class, MapCSPTest.class, MetricsTest.class, TreeCspSolverTest.class,
AStarSearchTest.class, GreedyBestFirstSearchTest.class, RecursiveBestFirstSearchTest.class,
AndOrSearchTest.class, LRTAStarAgentTest.class, OnlineDFSAgentTest.class,
>>>>>>>
@Suite.SuiteClasses({AlphaBetaSearchTest.class, MinimaxSearchTest.class, AssignmentTest.class, CSPTest.class, MapCSPTest.class,
MetricsTest.class, TreeCspSolverTest.class, AStarSearchTest.class, GreedyBestFirstSearchTest.class, RecursiveBestFirstSearchTest.class,
AndOrSearchTest.class, LRTAStarAgentTest.class, OnlineDFSAgentTest.class, |
<<<<<<<
/**
* No matter how formatter tries to add linewrapping there is none in the formatted result.
*
* @see PPFormatter#assignmentExpressionConfiguration(FormattingConfig c)
*/
public void test_Format_AssignmentExpression() throws Exception {
String code = "$a = 1\n$b = 2\n";
XtextResource r = getResourceFromString(code);
String s = serializeFormatted(r.getContents().get(0));
assertEquals("serialization should produce specified result", code, s);
}
=======
>>>>>>>
/**
* No matter how formatter tries to add linewrapping there is none in the formatted result.
*
* @see PPFormatter#assignmentExpressionConfiguration(FormattingConfig c)
*/
public void test_Format_AssignmentExpression() throws Exception {
String code = "$a = 1\n$b = 2\n";
XtextResource r = getResourceFromString(code);
String s = serializeFormatted(r.getContents().get(0));
assertEquals("serialization should produce specified result", code, s);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.