Skip to content
This repository was archived by the owner on Feb 15, 2024. It is now read-only.

Commit 0c4bb80

Browse files
committed
configured javadoc plugin to ignore generated classes and packages not meant to be used directely
1 parent 59d4d29 commit 0c4bb80

20 files changed

Lines changed: 76 additions & 889 deletions

dataformat-uanodeset/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@
149149
</execution>
150150
</executions>
151151
</plugin>
152+
<plugin>
153+
<groupId>org.apache.maven.plugins</groupId>
154+
<artifactId>maven-javadoc-plugin</artifactId>
155+
<configuration>
156+
<!-- excluding generated classes and mappers which are not meant to be used directly -->
157+
<excludePackageNames>com.kscs.util.*:org.opcfoundation.*:io.adminshell.aas.v3.dataformat.i4aas.mappers:io.adminshell.aas.v3.dataformat.i4aas.mappers.*</excludePackageNames>
158+
</configuration>
159+
</plugin>
152160
</plugins>
153161
</build>
154162
</project>

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/I4AASDeserializer.java

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,42 +15,22 @@
1515
*/
1616
package io.adminshell.aas.v3.dataformat.i4aas;
1717

18-
import java.util.List;
19-
20-
import javax.xml.bind.JAXBException;
21-
22-
import org.opcfoundation.ua._2011._03.uanodeset.UANode;
23-
import org.opcfoundation.ua._2011._03.uanodeset.UANodeSet;
24-
2518
import io.adminshell.aas.v3.dataformat.DeserializationException;
2619
import io.adminshell.aas.v3.dataformat.Deserializer;
27-
import io.adminshell.aas.v3.dataformat.i4aas.parsers.EnvironmentParser;
28-
import io.adminshell.aas.v3.dataformat.i4aas.parsers.ParserContext;
29-
import io.adminshell.aas.v3.dataformat.i4aas.parsers.UANodeWrapper;
3020
import io.adminshell.aas.v3.model.AssetAdministrationShellEnvironment;
3121

22+
/**
23+
* Deserializer Implementation for I4AAS
24+
*
25+
*/
3226
public class I4AASDeserializer implements Deserializer {
3327

28+
/**
29+
* reads a I4AAS as string and return the model object
30+
*/
3431
@Override
3532
public AssetAdministrationShellEnvironment read(String value) throws DeserializationException {
36-
try {
37-
UANodeSet uaNodeSet = new UANodeSetUnmarshaller().unmarshall(value);
38-
ParserContext parserContext = new ParserContext(uaNodeSet);
39-
UANodeWrapper environment = parserContext.getPreparsedEnvironment();
40-
return new EnvironmentParser(environment, new ParserContext(uaNodeSet)).parse();
41-
} catch (JAXBException e) {
42-
throw new DeserializationException("Deserialization failed due to a JAXBException.", e);
43-
}
44-
}
45-
46-
protected UANode findAASEnvironment(UANodeSet nodeSet) throws DeserializationException {
47-
List<UANode> uaObjectOrUAVariableOrUAMethod = nodeSet.getUAObjectOrUAVariableOrUAMethod();
48-
for (UANode uaNode : uaObjectOrUAVariableOrUAMethod) {
49-
if (uaNode.getBrowseName().contains("AASEnvironment")) {
50-
return uaNode;
51-
}
52-
}
53-
throw new DeserializationException("No AASEnvironment found.");
33+
throw new UnsupportedOperationException("Not Implemented yet.");
5434
}
5535

5636
@Override

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/I4AASSerializer.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,15 @@
2525
import io.adminshell.aas.v3.dataformat.i4aas.mappers.MappingContext;
2626
import io.adminshell.aas.v3.model.AssetAdministrationShellEnvironment;
2727

28+
/**
29+
* Serializer Implementation for I4AAS
30+
*
31+
*/
2832
public class I4AASSerializer implements Serializer {
2933

34+
/**
35+
* takes a AAS model and returns a I4AAS as string.
36+
*/
3037
@Override
3138
public String write(AssetAdministrationShellEnvironment aasEnvironment) throws SerializationException {
3239
MappingContext mappingContext = new MappingContext(aasEnvironment);

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/UANodeSetMarshaller.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,25 @@
2525
import org.opcfoundation.ua._2011._03.uanodeset.UANodeSet;
2626
import org.opcfoundation.ua.i4aas.v3.types.AASKeyDataType;
2727

28+
/**
29+
* Marshaller with predefined context and properties relevant for serialization.
30+
*
31+
*/
2832
public class UANodeSetMarshaller {
2933

3034
private UANodeSet nodeset;
3135

36+
/**
37+
* @param nodeset the nodeset to be marshalled
38+
*/
3239
public UANodeSetMarshaller(UANodeSet nodeset) {
3340
this.nodeset = nodeset;
3441
}
3542

43+
/**
44+
* @return marshalled UANodeSet given in constructor
45+
* @throws JAXBException if action failed
46+
*/
3647
public String marshallAsString() throws JAXBException {
3748
JAXBContext jaxbCtx = org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(new Class[] {UANodeSet.class, ListOfExtensionObject.class, AASKeyDataType.class}, null);
3849
Marshaller marshaller = jaxbCtx.createMarshaller();

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/UANodeSetUnmarshaller.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,39 @@
2828
import org.opcfoundation.ua._2011._03.uanodeset.UANodeSet;
2929
import org.opcfoundation.ua.i4aas.v3.types.AASKeyDataType;
3030

31+
32+
/**
33+
* Unmarshaller with predefined context and properties relevant for deserialization.
34+
*
35+
*/
3136
public class UANodeSetUnmarshaller {
3237

3338
private JAXBContext jaxbCtx;
3439
private Unmarshaller unmarshaller;
3540

41+
/**
42+
* @throws JAXBException if the internal creation of a context based unmarshaller failed
43+
*/
3644
public UANodeSetUnmarshaller() throws JAXBException {
3745
jaxbCtx = org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(
3846
new Class[] { UANodeSet.class, ListOfExtensionObject.class, AASKeyDataType.class }, null);
3947
unmarshaller = jaxbCtx.createUnmarshaller();
4048
}
4149

50+
/**
51+
* @param input UANodeSet as XML string
52+
* @return unmarshalled UANodeSet
53+
* @throws JAXBException if action failed
54+
*/
4255
public UANodeSet unmarshall(String input) throws JAXBException {
4356
return (UANodeSet) unmarshaller.unmarshal(new StringReader(input));
4457
}
4558

59+
/**
60+
* @param input UANodeSet as XML inputstream
61+
* @return unmarshalled UANodeSet
62+
* @throws JAXBException if action failed
63+
*/
4664
public UANodeSet unmarshall(InputStream input) throws JAXBException {
4765
return (UANodeSet) unmarshaller.unmarshal(input);
4866
}

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/mappers/I4AASMapper.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,45 @@
2828
import io.adminshell.aas.v3.dataformat.i4aas.mappers.utils.UaIdentifier;
2929
import io.adminshell.aas.v3.model.LangString;
3030

31+
/**
32+
* Generic base class used for all mapper implementation.
33+
*
34+
* @param <SOURCE> mapping source
35+
* @param <TARGET> mapping target
36+
*/
3137
public abstract class I4AASMapper<SOURCE, TARGET extends UANode> {
3238

3339
protected MappingContext ctx;
3440
protected SOURCE source;
3541
protected TARGET target;
3642

43+
/**
44+
* @param src
45+
* @param ctx
46+
*/
3747
public I4AASMapper(SOURCE src, MappingContext ctx) {
3848
this.source = src;
3949
this.ctx = ctx;
4050
}
4151

52+
/**
53+
* @return the mapping complete target object with all children attached
54+
*/
4255
public final TARGET map() {
4356
target = createTargetObject();
4457
addToNodeset();
4558
mapAndAttachChildren();
4659
return target;
4760
}
4861

62+
/**
63+
* @return return the object filled with attributes directly bound to the target.
64+
*/
4965
protected abstract TARGET createTargetObject();
5066

67+
/**
68+
* action to be called when the children objects must be mapped and attached to the target.
69+
*/
5170
protected abstract void mapAndAttachChildren();
5271

5372
private void addToNodeset() {

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/parsers/AssetAdministrationShellParser.java

Lines changed: 0 additions & 39 deletions
This file was deleted.

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/parsers/ConditionParserAction.java

Lines changed: 0 additions & 37 deletions
This file was deleted.

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/parsers/EnvironmentParser.java

Lines changed: 0 additions & 45 deletions
This file was deleted.

dataformat-uanodeset/src/main/java/io/adminshell/aas/v3/dataformat/i4aas/parsers/I4AASParser.java

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)