updated documentation
This commit is contained in:
@@ -51,21 +51,22 @@ public class Contact implements IZUGFeRDExportableContact {
|
|||||||
/***
|
/***
|
||||||
* XML parsing constructor
|
* XML parsing constructor
|
||||||
* @param nodes the nodelist returned e.g. from xpath
|
* @param nodes the nodelist returned e.g. from xpath
|
||||||
*
|
|
||||||
* e.g. sth like
|
|
||||||
* <ram:DefinedTradeContact>
|
|
||||||
* <ram:PersonName>Name</ram:PersonName>
|
|
||||||
* <ram:TelephoneUniversalCommunication>
|
|
||||||
* <ram:CompleteNumber>069 100-0</ram:CompleteNumber>
|
|
||||||
* </ram:TelephoneUniversalCommunication>
|
|
||||||
* <ram:EmailURIUniversalCommunication>
|
|
||||||
* <ram:URIID>test@example.com</ram:URIID>
|
|
||||||
* </ram:EmailURIUniversalCommunication>
|
|
||||||
* </ram:DefinedTradeContact>
|
|
||||||
*/
|
*/
|
||||||
public Contact(NodeList nodes) {
|
public Contact(NodeList nodes) {
|
||||||
if (nodes.getLength() > 0) {
|
if (nodes.getLength() > 0) {
|
||||||
|
|
||||||
|
/*
|
||||||
|
will parse sth like
|
||||||
|
<ram:DefinedTradeContact>
|
||||||
|
<ram:PersonName>Name</ram:PersonName>
|
||||||
|
<ram:TelephoneUniversalCommunication>
|
||||||
|
<ram:CompleteNumber>069 100-0</ram:CompleteNumber>
|
||||||
|
</ram:TelephoneUniversalCommunication>
|
||||||
|
<ram:EmailURIUniversalCommunication>
|
||||||
|
<ram:URIID>test@example.com</ram:URIID>
|
||||||
|
</ram:EmailURIUniversalCommunication>
|
||||||
|
</ram:DefinedTradeContact>
|
||||||
|
*/
|
||||||
for (int nodeIndex = 0; nodeIndex < nodes.getLength(); nodeIndex++) {
|
for (int nodeIndex = 0; nodeIndex < nodes.getLength(); nodeIndex++) {
|
||||||
//nodes.item(i).getTextContent())) {
|
//nodes.item(i).getTextContent())) {
|
||||||
Node currentItemNode = nodes.item(nodeIndex);
|
Node currentItemNode = nodes.item(nodeIndex);
|
||||||
|
|||||||
@@ -14,14 +14,32 @@ public class ReferencedDocument implements IReferencedDocument {
|
|||||||
this.referenceTypeCode = referenceTypeCode;
|
this.referenceTypeCode = referenceTypeCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ReferencedDocument(String issuerAssignedID, String referenceTypeCode) {
|
||||||
|
this.issuerAssignedID = issuerAssignedID;
|
||||||
|
this.typeCode = "916"; // additional invoice related document
|
||||||
|
this.referenceTypeCode = referenceTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* sets an ID assigned by the sender
|
||||||
|
* @param issuerAssignedID
|
||||||
|
*/
|
||||||
public void setIssuerAssignedID(String issuerAssignedID) {
|
public void setIssuerAssignedID(String issuerAssignedID) {
|
||||||
this.issuerAssignedID = issuerAssignedID;
|
this.issuerAssignedID = issuerAssignedID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* which type is the document? e.g. "916" for additional invoice related
|
||||||
|
* @param typeCode
|
||||||
|
*/
|
||||||
public void setTypeCode(String typeCode) {
|
public void setTypeCode(String typeCode) {
|
||||||
this.typeCode = typeCode;
|
this.typeCode = typeCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* type of the reference of this line, a UNTDID 1153 code
|
||||||
|
* @param referenceTypeCode
|
||||||
|
*/
|
||||||
public void setReferenceTypeCode(String referenceTypeCode) {
|
public void setReferenceTypeCode(String referenceTypeCode) {
|
||||||
this.referenceTypeCode = referenceTypeCode;
|
this.referenceTypeCode = referenceTypeCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,23 @@
|
|||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
public interface IReferencedDocument {
|
public interface IReferencedDocument {
|
||||||
|
|
||||||
|
/***
|
||||||
|
* sets an ID assigned by the sender
|
||||||
|
* @return String of an ID
|
||||||
|
*/
|
||||||
String getIssuerAssignedID();
|
String getIssuerAssignedID();
|
||||||
|
|
||||||
|
/***
|
||||||
|
* which type is the document? e.g. "916" for additional invoice related
|
||||||
|
* @return string of a most likely numeric code
|
||||||
|
*/
|
||||||
String getTypeCode();
|
String getTypeCode();
|
||||||
|
|
||||||
|
/***
|
||||||
|
* type of the reference of this line, a UNTDID 1153 code
|
||||||
|
* @return String of a code
|
||||||
|
*/
|
||||||
String getReferenceTypeCode();
|
String getReferenceTypeCode();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user