Skip to content

Commit ea2e588

Browse files
committed
Neue Quellen für kernsoftware 3.6.5 übernommen
1 parent c89969c commit ea2e588

File tree

383 files changed

+14824
-8813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

383 files changed

+14824
-8813
lines changed

de.bsvrz.dav.daf/src/de/bsvrz/dav/daf/PackageRuntimeInfo.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
package de.bsvrz.dav.daf;
33
public class PackageRuntimeInfo {
44
public static String getLicence() { return "LGPL";}
5-
public static String getRelease() { return "Kernsoftware 3.6.2";}
6-
public static String getVersion() { return "3.6.2.v12133";}
7-
public static String getRevision() { return "12133";}
8-
public static String getCompileTime() { return "20.03.2014 12:41:28";}
5+
public static String getRelease() { return "Kernsoftware 3.6.5";}
6+
public static String getVersion() { return "3.6.5";}
7+
public static String getRevision() { return "13522";}
8+
public static String getCompileTime() { return "21.05.2015 19:10:53";}
99
public static String getDependsOnCompiled() { return "de.bsvrz.sys.funclib.concurrent, de.bsvrz.sys.funclib.crypt, de.bsvrz.sys.funclib.debug, de.bsvrz.sys.funclib.filelock, de.bsvrz.sys.funclib.hexdump, de.bsvrz.sys.funclib.timeout, de.bsvrz.sys.funclib.commandLineArgs";}
10-
public static String getDependsOnSource() { return "de.bsvrz.sys.funclib.dataSerializer, de.bsvrz.sys.funclib.communicationStreams";}
10+
public static String getDependsOnSource() { return "";}
1111
public static String getDependsOnLib() { return "";}
1212
public static String getJvmVersion() { return "1.6";}
1313
}

de.bsvrz.dav.daf/src/de/bsvrz/dav/daf/communication/dataRepresentation/AbstractData.java

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,20 @@
2323
package de.bsvrz.dav.daf.communication.dataRepresentation;
2424

2525
import de.bsvrz.dav.daf.main.Data;
26-
import de.bsvrz.dav.daf.main.config.DataModel;
27-
import de.bsvrz.dav.daf.main.config.IntegerValueState;
28-
import de.bsvrz.dav.daf.main.config.ObjectLookup;
29-
import de.bsvrz.dav.daf.main.config.SystemObject;
26+
import de.bsvrz.dav.daf.main.config.*;
3027
import de.bsvrz.sys.funclib.debug.Debug;
3128

32-
import java.text.DateFormat;
33-
import java.text.NumberFormat;
34-
import java.text.ParseException;
35-
import java.text.ParsePosition;
36-
import java.text.SimpleDateFormat;
37-
import java.util.*;
29+
import java.text.*;
30+
import java.util.Date;
31+
import java.util.Iterator;
32+
import java.util.NoSuchElementException;
3833

3934
/**
4035
* Diese abstrakte Klasse stellt eine Oberklasse von Datentypen dar. Es werden die Methoden des Interfaces <code>data</code> erstmalig implementiert. Je nach
4136
* Bedarf werden diese wieder in den Subklassen überschrieben.
4237
*
4338
* @author Kappich Systemberatung
44-
* @version $Revision: 8326 $
39+
* @version $Revision: 13226 $
4540
*/
4641
public abstract class AbstractData implements Data {
4742

@@ -571,6 +566,23 @@ public SystemObject getSystemObject() {
571566
throw new RuntimeException(e);
572567
}
573568
}
569+
570+
public void checkObject(SystemObject object, Attribute attribute){
571+
if(object == null) return;
572+
if(attribute == null) return;
573+
AttributeType attributeType = attribute.getAttributeType();
574+
if(attributeType instanceof ReferenceAttributeType) {
575+
ReferenceAttributeType referenceAttributeType = (ReferenceAttributeType) attributeType;
576+
SystemObjectType referencedObjectType = referenceAttributeType.getReferencedObjectType();
577+
if(referencedObjectType == null) {
578+
// Es können beliebige Objekte referenziert werden
579+
return;
580+
}
581+
if(!object.isOfType(referencedObjectType)){
582+
throw new IllegalArgumentException("Objekt " + object + " soll am Attribut " + attribute + " gespeichert werden, aber der Attributtyp erlaubt nur Objekte vom Typ " + referencedObjectType.getPidOrNameOrId());
583+
}
584+
}
585+
}
574586

575587
public void setSystemObjectPid(String objectPid, ObjectLookup datamodel) {
576588
final SystemObject systemObject;

de.bsvrz.dav.daf/src/de/bsvrz/dav/daf/communication/dataRepresentation/AttributeBaseValueDataFactory.java

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -22,41 +22,9 @@
2222
package de.bsvrz.dav.daf.communication.dataRepresentation;
2323

2424
import de.bsvrz.dav.daf.communication.dataRepresentation.data.DataFactory;
25-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.ByteArrayAttribute;
26-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.ByteAttribute;
27-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.DataValue;
28-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.DoubleArrayAttribute;
29-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.DoubleAttribute;
30-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.FloatArrayAttribute;
31-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.FloatAttribute;
32-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.IntegerArrayAttribute;
33-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.IntegerAttribute;
34-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.LongAndStringAttribute;
35-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.LongArrayAttribute;
36-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.LongAttribute;
37-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.ShortArrayAttribute;
38-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.ShortAttribute;
39-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.StringArrayAttribute;
40-
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.StringAttribute;
25+
import de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.*;
4126
import de.bsvrz.dav.daf.main.Data;
42-
import de.bsvrz.dav.daf.main.config.Attribute;
43-
import de.bsvrz.dav.daf.main.config.AttributeGroup;
44-
import de.bsvrz.dav.daf.main.config.AttributeListDefinition;
45-
import de.bsvrz.dav.daf.main.config.AttributeSet;
46-
import de.bsvrz.dav.daf.main.config.AttributeType;
47-
import de.bsvrz.dav.daf.main.config.ConfigurationException;
48-
import de.bsvrz.dav.daf.main.config.DataModel;
49-
import de.bsvrz.dav.daf.main.config.DoubleAttributeType;
50-
import de.bsvrz.dav.daf.main.config.IntegerAttributeType;
51-
import de.bsvrz.dav.daf.main.config.IntegerValueRange;
52-
import de.bsvrz.dav.daf.main.config.IntegerValueState;
53-
import de.bsvrz.dav.daf.main.config.ObjectLookup;
54-
import de.bsvrz.dav.daf.main.config.ReferenceAttributeType;
55-
import de.bsvrz.dav.daf.main.config.ReferenceType;
56-
import de.bsvrz.dav.daf.main.config.StringAttributeType;
57-
import de.bsvrz.dav.daf.main.config.SystemObject;
58-
import de.bsvrz.dav.daf.main.config.TimeAttributeType;
59-
import de.bsvrz.dav.daf.main.config.UndefinedAttributeValueAccess;
27+
import de.bsvrz.dav.daf.main.config.*;
6028
import de.bsvrz.sys.funclib.debug.Debug;
6129

6230
import java.io.ByteArrayOutputStream;
@@ -72,7 +40,7 @@
7240
* Diese abstarkte Klasse stellt eine Oberklasse zur Erstellung der Basisattributwerte dar. Hier werden weiter Subklassen definiert, die zur
7341
*
7442
* @author Kappich Systemberatung
75-
* @version $Revision: 11583 $
43+
* @version $Revision: 13226 $
7644
*/
7745
public abstract class AttributeBaseValueDataFactory {
7846

@@ -1173,7 +1141,7 @@ protected DataModel getDataModel() {
11731141

11741142
boolean tryToStorePid(final String objectPid) {
11751143
final ReferenceAttributeType att = ((ReferenceAttributeType)getAttributeType());
1176-
if(att.getReferenceType() == ReferenceType.ASSOCIATION && att.isUndefinedAllowed()) {
1144+
if(att.getReferenceType() == ReferenceType.ASSOCIATION) {
11771145
_attributeValue.setValue(new LongAndStringAttribute(0, objectPid));
11781146
return true;
11791147
}
@@ -1201,6 +1169,7 @@ public void setSystemObject(SystemObject object) {
12011169
id = 0;
12021170
}
12031171
else {
1172+
checkObject(object, _attributeValue.getAttribute());
12041173
id = object.getId();
12051174
}
12061175
_attributeValue.setValue(new LongAttribute(id));
@@ -1754,7 +1723,7 @@ public long getId() {
17541723

17551724
boolean tryToStorePid(final String objectPid) {
17561725
final ReferenceAttributeType att = ((ReferenceAttributeType)getAttributeType());
1757-
if(att.getReferenceType() == ReferenceType.ASSOCIATION && att.isUndefinedAllowed()) {
1726+
if(att.getReferenceType() == ReferenceType.ASSOCIATION) {
17581727
if(_pids == null) _pids = new HashMap<Integer, String>();
17591728
_pids.put(_itemIndex, objectPid);
17601729
return true;
@@ -1778,6 +1747,7 @@ public void setSystemObject(SystemObject object) {
17781747
id = 0;
17791748
}
17801749
else {
1750+
checkObject(object, _attributeValue.getAttribute());
17811751
id = object.getId();
17821752
}
17831753
_ids[_itemIndex] = id;

de.bsvrz.dav.daf/src/de/bsvrz/dav/daf/communication/dataRepresentation/AttributeHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* Diese Klasse stellt Methoden zur Verfügung, um die Interfaces der Konfiguration zu entschlacken.
4141
*
4242
* @author Kappich Systemberatung
43-
* @version $Revision: 5084 $
43+
* @version $Revision: 13173 $
4444
*/
4545
public class AttributeHelper {
4646
/**
@@ -96,7 +96,7 @@ public static byte getDataValueType(AttributeType attributeType, boolean isArray
9696
* zurück. Die Reihenfolge der Attribute in der Liste entspricht der durch die {@link Attribute#getPosition
9797
* Position} der Attribute definierte Reihenfolge innerhalb der Attributgruppe bzw. Attributliste
9898
*
99-
* @return Liste von {@link Attribute Attributen} und {@link de.bsvrz.dav.daf.main.config.AttributeListDefinition AttributeListen}
99+
* @return Liste von {@link Attribute Attributen} und {@link de.bsvrz.dav.daf.main.config.AttributeListDefinition AttributListen}
100100
*/
101101
public static List<AttributeBaseValue> getAttributesValues(final AttributeSet attributeSet) {
102102
List<Attribute> attributes = attributeSet.getAttributes();

de.bsvrz.dav.daf/src/de/bsvrz/dav/daf/communication/dataRepresentation/data/byteArray/ByteArrayArrayData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*
3333
* @author Kappich+Kniß Systemberatung Aachen (K2S)
3434
* @author Roland Schmitz (rs)
35-
* @version $Revision: 8326 $ / $Date: 2010-11-16 12:00:46 +0100 (Di, 16 Nov 2010) $ / ($Author: jh $)
35+
* @version $Revision: 8326 $ / $Date: 2010-11-16 12:00:46 +0100 (Tue, 16 Nov 2010) $ / ($Author: jh $)
3636
*/
3737
public class ByteArrayArrayData extends ByteArrayStructuredData implements Data.Array, Data.TextArray, Data.TimeArray, Data.ReferenceArray, Data.NumberArray {
3838
private final int _length;

de.bsvrz.dav.daf/src/de/bsvrz/dav/daf/communication/dataRepresentation/data/byteArray/ByteArrayData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*
3434
* @author Kappich+Kniß Systemberatung Aachen (K2S)
3535
* @author Roland Schmitz (rs)
36-
* @version $Revision: 11528 $ / $Date: 2013-08-06 17:08:05 +0200 (Di, 06 Aug 2013) $ / ($Author: jh $)
36+
* @version $Revision: 11528 $ / $Date: 2013-08-06 17:08:05 +0200 (Tue, 06 Aug 2013) $ / ($Author: jh $)
3737
*/
3838
public abstract class ByteArrayData implements Data {
3939
protected final byte[] _bytes;

de.bsvrz.dav.daf/src/de/bsvrz/dav/daf/communication/dataRepresentation/data/byteArray/ByteArrayListArrayItemData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @author Kappich+Kniß Systemberatung Aachen (K2S)
2828
* @author Roland Schmitz (rs)
29-
* @version $Revision: 5049 $ / $Date: 2007-08-31 17:49:39 +0200 (Fr, 31 Aug 2007) $ / ($Author: rs $)
29+
* @version $Revision: 5049 $ / $Date: 2007-08-31 17:49:39 +0200 (Fri, 31 Aug 2007) $ / ($Author: rs $)
3030
*/
3131
public class ByteArrayListArrayItemData extends ByteArrayListData {
3232
private final int _itemIndex;

de.bsvrz.dav.daf/src/de/bsvrz/dav/daf/communication/dataRepresentation/data/byteArray/ByteArrayListData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*
3030
* @author Kappich+Kniß Systemberatung Aachen (K2S)
3131
* @author Roland Schmitz (rs)
32-
* @version $Revision: 8326 $ / $Date: 2010-11-16 12:00:46 +0100 (Di, 16 Nov 2010) $ / ($Author: jh $)
32+
* @version $Revision: 8326 $ / $Date: 2010-11-16 12:00:46 +0100 (Tue, 16 Nov 2010) $ / ($Author: jh $)
3333
*/
3434
public class ByteArrayListData extends ByteArrayStructuredData {
3535
public ByteArrayListData(byte[] bytes, int offset, AttributeInfo attributeInfo) {

de.bsvrz.dav.daf/src/de/bsvrz/dav/daf/communication/dataRepresentation/data/byteArray/ByteArrayPrimitiveArrayItemData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @author Kappich+Kniß Systemberatung Aachen (K2S)
2828
* @author Roland Schmitz (rs)
29-
* @version $Revision: 5049 $ / $Date: 2007-08-31 17:49:39 +0200 (Fr, 31 Aug 2007) $ / ($Author: rs $)
29+
* @version $Revision: 5049 $ / $Date: 2007-08-31 17:49:39 +0200 (Fri, 31 Aug 2007) $ / ($Author: rs $)
3030
*/
3131
public class ByteArrayPrimitiveArrayItemData extends ByteArrayPrimitiveData {
3232
private final int _itemIndex;

de.bsvrz.dav.daf/src/de/bsvrz/dav/daf/communication/dataRepresentation/data/byteArray/ByteArrayPrimitiveData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*
3333
* @author Kappich+Kniß Systemberatung Aachen (K2S)
3434
* @author Roland Schmitz (rs)
35-
* @version $Revision: 8326 $ / $Date: 2010-11-16 12:00:46 +0100 (Di, 16 Nov 2010) $ / ($Author: jh $)
35+
* @version $Revision: 8326 $ / $Date: 2010-11-16 12:00:46 +0100 (Tue, 16 Nov 2010) $ / ($Author: jh $)
3636
*/
3737
public class ByteArrayPrimitiveData extends ByteArrayData implements Data.TextValue, Data.TimeValue, Data.ReferenceValue, Data.NumberValue {
3838
public ByteArrayPrimitiveData(byte[] bytes, int offset, AttributeInfo attributeInfo) {

0 commit comments

Comments
 (0)