Search in sources :

Example 1 with BDXR1ProcessIdentifier

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;
}
Also used : BDXR1ProcessIdentifier(com.helger.peppolid.bdxr.smp1.process.BDXR1ProcessIdentifier) Nullable(javax.annotation.Nullable)

Example 2 with BDXR1ProcessIdentifier

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;
}
Also used : ProcessType(com.helger.xsds.peppol.smp1.ProcessType) BDXR1ProcessIdentifier(com.helger.peppolid.bdxr.smp1.process.BDXR1ProcessIdentifier) Nullable(javax.annotation.Nullable)

Aggregations

BDXR1ProcessIdentifier (com.helger.peppolid.bdxr.smp1.process.BDXR1ProcessIdentifier)2 Nullable (javax.annotation.Nullable)2 ProcessType (com.helger.xsds.peppol.smp1.ProcessType)1