use of com.helger.peppolid.bdxr.smp1.process.BDXR1ProcessIdentifier in project peppol-commons by phax.
the class BDXR1IdentifierFactory method createProcessIdentifier.
@Nullable
public BDXR1ProcessIdentifier createProcessIdentifier(@Nullable final String sScheme, @Nullable final String sValue) {
final String sRealScheme = nullNotEmpty(sScheme);
final String sRealValue = nullNotEmpty(isProcessIdentifierCaseInsensitive(sRealScheme) ? getUnifiedValue(sValue) : sValue);
if (isProcessIdentifierSchemeValid(sRealScheme) && isProcessIdentifierValueValid(sRealValue))
return new BDXR1ProcessIdentifier(sRealScheme, sRealValue);
return null;
}
use of com.helger.peppolid.bdxr.smp1.process.BDXR1ProcessIdentifier in project phoss-smp by phax.
the class SMPProcess method getAsJAXBObjectBDXR1.
@Nullable
public com.helger.xsds.bdxr.smp1.ProcessType getAsJAXBObjectBDXR1() {
if (m_aEndpoints.isEmpty()) {
// Empty ServiceEndpointList is not allowed
return null;
}
final com.helger.xsds.bdxr.smp1.ProcessType ret = new com.helger.xsds.bdxr.smp1.ProcessType();
// Explicit constructor call is needed here!
ret.setProcessIdentifier(new BDXR1ProcessIdentifier(m_aProcessIdentifier));
final com.helger.xsds.bdxr.smp1.ServiceEndpointList aEndpointList = new com.helger.xsds.bdxr.smp1.ServiceEndpointList();
for (final ISMPEndpoint aEndpoint : m_aEndpoints.values()) aEndpointList.addEndpoint(aEndpoint.getAsJAXBObjectBDXR1());
ret.setServiceEndpointList(aEndpointList);
ret.setExtension(getAsBDXRExtension());
return ret;
}
Aggregations