/** * Convert from 2004/03 Relationship to 2005/08 RelatesToType. * * @param exposed the 2004/03 Relationship * @return an equivalent 2005/08 RelatesToType */ public static RelatesToType convert(org.apache.cxf.ws.addressing.v200403.Relationship exposed) { RelatesToType internal = null; if (exposed != null) { internal = ContextUtils.WSA_OBJECT_FACTORY.createRelatesToType(); internal.setValue(exposed.getValue()); QName exposedRelationshipType = exposed.getRelationshipType(); if (exposedRelationshipType != null) { String internalRelationshipType = Names.WSA_REPLY_NAME.equals(exposedRelationshipType .getLocalPart()) ? Names.WSA_RELATIONSHIP_REPLY : exposedRelationshipType.toString(); internal.setRelationshipType(internalRelationshipType); } internal.getOtherAttributes().putAll(exposed.getOtherAttributes()); } return internal; }
public void setRelatesTo(MAPRelatesTo relatesTo) { if (relatesTo != null) { RelatesToType relatesToImpl = new RelatesToType(); relatesToImpl.setValue(relatesTo.getRelatesTo()); relatesToImpl.setRelationshipType(relatesTo.getType().toString()); implementation.setRelatesTo(relatesToImpl); } else { implementation.setRelatesTo(null); } }
/** * @param relatesTo the current RelatesTo * @return true iff the relationship type is reply */ private boolean isRelationshipReply(RelatesToType relatesTo) { return Names.WSA_RELATIONSHIP_REPLY.equals(relatesTo.getRelationshipType()); }
/** * Convert from 2005/08 RelatesToType to 2004/08 Relationship. * * @param internal the 2005/08 RelatesToType * @return an equivalent 2004/08 Relationship */ public static Relationship convert(RelatesToType internal) { Relationship exposed = null; if (internal != null) { exposed = Names200408.WSA_OBJECT_FACTORY.createRelationship(); exposed.setValue(internal.getValue()); String internalRelationshipType = internal.getRelationshipType(); if (internalRelationshipType != null) { QName exposedRelationshipType = null; if (!Names.WSA_RELATIONSHIP_REPLY.equals(internalRelationshipType)) { exposedRelationshipType = new QName(internalRelationshipType); } exposed.setRelationshipType(exposedRelationshipType); } putAll(exposed.getOtherAttributes(), internal.getOtherAttributes()); } return exposed; }
RelatesToType relatesTo = new RelatesToType(); relatesTo.setValue(property); maps.setRelatesTo(relatesTo);
buf.append(relatesTo.getValue());
/** * Helper method to get a RealtesTo instance. * * @param uri the related URI * @return a RelatesToType encapsulating the URI */ public static RelatesToType getRelatesTo(String uri) { RelatesToType relatesTo = WSA_OBJECT_FACTORY.createRelatesToType(); relatesTo.setValue(uri); return relatesTo; }
public MAPRelatesTo getRelatesTo() { MAPBuilder builder = CXFMAPBuilder.getBuilder(); RelatesToType relatesTo = implementation.getRelatesTo(); if (relatesTo != null) { String type = relatesTo.getRelationshipType(); QName relatesToType; int index = type.indexOf("}"); if (index == -1) { relatesToType = new QName(type); } else { String ns = type.substring(1, index + 1); String name = type.substring(index + 1); relatesToType = new QName(ns, name); } return builder.newRelatesTo(relatesTo.getValue(), relatesToType); } else { return null; } }
/** * Create an instance of {@link RelatesToType } * */ public RelatesToType createRelatesToType() { return new RelatesToType(); }
/** * Convert from 2005/08 RelatesToType to 2004/03 Relationship. * * @param internal the 2005/08 RelatesToType * @return an equivalent 2004/03 Relationship */ public static org.apache.cxf.ws.addressing.v200403.Relationship convertTo200403(RelatesToType internal) { org.apache.cxf.ws.addressing.v200403.Relationship exposed = null; if (internal != null) { exposed = Names200403.WSA_OBJECT_FACTORY.createRelationship(); exposed.setValue(internal.getValue()); String internalRelationshipType = internal.getRelationshipType(); if (internalRelationshipType != null) { QName exposedRelationshipType = null; if (!Names.WSA_RELATIONSHIP_REPLY.equals(internalRelationshipType)) { exposedRelationshipType = new QName(internalRelationshipType); } exposed.setRelationshipType(exposedRelationshipType); } putAll(exposed.getOtherAttributes(), internal.getOtherAttributes()); } return exposed; }
RelatesToType relatesTo = new RelatesToType(); relatesTo.setValue(property); maps.setRelatesTo(relatesTo);
buf.append(relatesTo.getValue());
/** * Helper method to get a RealtesTo instance. * * @param uri the related URI * @return a RelatesToType encapsulating the URI */ public static RelatesToType getRelatesTo(String uri) { RelatesToType relatesTo = WSA_OBJECT_FACTORY.createRelatesToType(); relatesTo.setValue(uri); return relatesTo; }
/** * Create an instance of {@link RelatesToType } * */ public RelatesToType createRelatesToType() { return new RelatesToType(); }
/** * Convert from 2005/08 RelatesToType to 2004/03 Relationship. * * @param internal the 2005/08 RelatesToType * @return an equivalent 2004/03 Relationship */ public static org.apache.cxf.ws.addressing.v200403.Relationship convertTo200403(RelatesToType internal) { org.apache.cxf.ws.addressing.v200403.Relationship exposed = null; if (internal != null) { exposed = Names200403.WSA_OBJECT_FACTORY.createRelationship(); exposed.setValue(internal.getValue()); String internalRelationshipType = internal.getRelationshipType(); if (internalRelationshipType != null) { QName exposedRelationshipType = null; if (!Names.WSA_RELATIONSHIP_REPLY.equals(internalRelationshipType)) { exposedRelationshipType = new QName(internalRelationshipType); } exposed.setRelationshipType(exposedRelationshipType); } putAll(exposed.getOtherAttributes(), internal.getOtherAttributes()); } return exposed; }
/** * Convert from 2004/03 Relationship to 2005/08 RelatesToType. * * @param exposed the 2004/03 Relationship * @return an equivalent 2005/08 RelatesToType */ public static RelatesToType convert(org.apache.cxf.ws.addressing.v200403.Relationship exposed) { RelatesToType internal = null; if (exposed != null) { internal = ContextUtils.WSA_OBJECT_FACTORY.createRelatesToType(); internal.setValue(exposed.getValue()); QName exposedRelationshipType = exposed.getRelationshipType(); if (exposedRelationshipType != null) { String internalRelationshipType = Names.WSA_REPLY_NAME.equals(exposedRelationshipType .getLocalPart()) ? Names.WSA_RELATIONSHIP_REPLY : exposedRelationshipType.toString(); internal.setRelationshipType(internalRelationshipType); } internal.getOtherAttributes().putAll(exposed.getOtherAttributes()); } return internal; }
RelatesToType relatesTo = new RelatesToType(); relatesTo.setValue(property); maps.setRelatesTo(relatesTo);
/** * Marks a message as partial response * * @param message the current message */ private void markPartialResponse(SoapMessage message, AddressingProperties maps) { if (ContextUtils.isRequestor(message) && null != maps && (null == maps.getRelatesTo() || (null != maps.getRelatesTo() && Names.WSA_UNSPECIFIED_RELATIONSHIP.equals(maps.getRelatesTo().getValue())))) { message.put(Message.PARTIAL_RESPONSE_MESSAGE, Boolean.TRUE); } }
/** * Helper method to get a RealtesTo instance. * * @param uri the related URI * @return a RelatesToType encapsulating the URI */ public static RelatesToType getRelatesTo(String uri) { RelatesToType relatesTo = WSA_OBJECT_FACTORY.createRelatesToType(); relatesTo.setValue(uri); return relatesTo; }
/** * Create an instance of {@link RelatesToType } * */ public RelatesToType createRelatesToType() { return new RelatesToType(); }