public void addContent(final Object value) { final List<Object> objFromModel = this.model.getContent(); if (objFromModel != null) { objFromModel.add(value); } }
@Override public final String getContent() { String res = null; if (this.jaxbTypeObj.getContent() != null && this.jaxbTypeObj.getContent().size() > 0) { res = this.jaxbTypeObj.getContent().get(0).toString().trim(); } return res; }
public List<Element> getContent() { final List<Element> result = new ArrayList<Element>(); final List<Object> contentOfModel = this.model.getContent(); for (final Object itemObj : contentOfModel) { if (itemObj instanceof Element) { result.add(((Element) itemObj)); } } return result; }
@Override public final void setContent(String value) { final List<Object> objFromModel = this.jaxbTypeObj.getContent(); if (objFromModel != null) { if (objFromModel.size() > 0) { objFromModel.clear(); } objFromModel.add(0, value.trim()); } }
public void toString(ToStringBuilder toStringBuilder) { { List<Object> theContent; theContent = this.getContent(); toStringBuilder.append("content", theContent); } { String theDialect; theDialect = this.getDialect(); toStringBuilder.append("dialect", theDialect); } }
public void hashCode(HashCodeBuilder hashCodeBuilder) { hashCodeBuilder.append(this.getContent()); hashCodeBuilder.append(this.getDialect()); }
public void equals(Object object, EqualsBuilder equalsBuilder) { if (!(object instanceof QueryExpressionType)) { equalsBuilder.appendSuper(false); return ; } if (this == object) { return ; } final QueryExpressionType that = ((QueryExpressionType) object); equalsBuilder.append(this.getContent(), that.getContent()); equalsBuilder.append(this.getDialect(), that.getDialect()); }
/** * Method used to set an xml fragment representation of a {@link ProcessPolicyType} object into a * {@link SubscriptionPolicyType} object * * @param xpathsObj {@link String} object whom the xml representation must be set * @param messageContent {@link QueryExpressionType} object in which the xml representation must be set * @throws WSNotificationExtensionException */ public static void setXpathExpressionsType(final String xpathsObj ,final QueryExpressionType messageContent) throws WSNotificationExtensionException{ final List<Object> listObj = ((com.ebmwebsourcing.wsstar.jaxb.notification.base.QueryExpressionType) ((AbstractSchemaElementImpl<?>)messageContent).getModel()).getContent(); if (listObj!= null){ //Element xpathsAsElt = WSNotificationExtensionFactory.getInstance().createWSNotificationExtensionWriter().writeXpathExpressionsType(xpathsObj).getDocumentElement(); final JAXBElement<String> xpathasJaxB = new JAXBElement<String> (WsnExtensionConstants.XPATHS_QNAME,java.lang.String.class,xpathsObj); listObj.add(xpathasJaxB); } }
/** * method that get - if the expected xml fragment exists -a {@link String} * object from a {@link QueryExpressionType} object. * * @param listOfObj from which the xml representation is supposed to be found * @return a {@link String} object * @throws WSNotificationExtensionException */ public static String getXpathExpression(final QueryExpressionType messageContent) throws WSNotificationExtensionException{ String result = null; final List<Object> listObj = ((com.ebmwebsourcing.wsstar.jaxb.notification.base.QueryExpressionType) ((AbstractSchemaElementImpl<?>) messageContent).getModel()).getContent(); if (listObj!= null) { for (final Object item : listObj) { if (item instanceof Element && ((Element)item).getLocalName().compareTo(WsnExtensionConstants.XPATHS_QNAME.getLocalPart()) == 0 && ((Element)item).getNamespaceURI().compareTo(WsnExtensionConstants.XPATHS_QNAME.getNamespaceURI()) == 0){ result = ((Element)item).getTextContent(); } else if ((item instanceof JAXBElement<?>) && (((JAXBElement<?>)item).getName().equals(WsnExtensionConstants.XPATHS_QNAME)) && (((JAXBElement<?>)item).getValue() instanceof String) ) { result = (String)((JAXBElement<?>)item).getValue(); } } } return result; }
/** * Method used to get {@link SOAParameterType} object from * {@link QueryExpressionType} object * * @param msgContent {@link QueryExpressionType} object * @return {@link SOAParameterType} object * @throws WSNotificationExtensionException */ public static SOAParameterType getSOAParameter(final QueryExpressionType msgContent) throws WSNotificationExtensionException{ final List<Object> listObj = ((com.ebmwebsourcing.wsstar.jaxb.notification.base.QueryExpressionType) ((AbstractSchemaElementImpl<?>)msgContent).getModel()).getContent(); return WsnSpecificTypeHelper.getSOAParameter(listObj); }
/** * Method used to set an xml fragment representation of a {@link SOAParameterType} object into a * {@link QueryExpressionType} object * * @param soaParameter {@link SOAParameterType} object whom the xml representation must be set * @param msgContent {@link QueryExpressionType} object in which the xml representation must be set * @throws WSNotificationExtensionException */ public static void setSOAParameter(final SOAParameterType soaParamObj ,final QueryExpressionType msgContent) throws WSNotificationExtensionException{ final List<Object> listObj = ((com.ebmwebsourcing.wsstar.jaxb.notification.base.QueryExpressionType) ((AbstractSchemaElementImpl<?>)msgContent).getModel()).getContent(); WsnSpecificTypeHelper.setSOAParameter(soaParamObj, listObj); }
public Object copyTo(Object target, CopyBuilder copyBuilder) { final QueryExpressionType copy = ((target == null)?new QueryExpressionType():((QueryExpressionType) target)); { List<Object> sourceContent; sourceContent = this.getContent(); List<Object> copyContent = ((List<Object> ) copyBuilder.copy(sourceContent)); copy.content = null; List<Object> uniqueContentl = copy.getContent(); uniqueContentl.addAll(copyContent); } { String sourceDialect; sourceDialect = this.getDialect(); String copyDialect = ((String) copyBuilder.copy(sourceDialect)); copy.setDialect(copyDialect); } return copy; }
/** * A way to create a {@link com.ebmwebsourcing.wsstar.jaxb.notification.base.QueryExpressionType} * object from a {@link QueryExpressionType} "api type" one * * @param apiTypeObj */ public static com.ebmwebsourcing.wsstar.jaxb.notification.base.QueryExpressionType toJaxbModel(QueryExpressionType apiTypeObj) { com.ebmwebsourcing.wsstar.jaxb.notification.base.QueryExpressionType jaxbTypeObj = null; if (apiTypeObj instanceof QueryExpressionTypeImpl){ jaxbTypeObj = ((QueryExpressionTypeImpl)apiTypeObj).getJaxbTypeObj(); } else { jaxbTypeObj = WsnbJAXBContext.WSNB_JAXB_FACTORY.createQueryExpressionType(); jaxbTypeObj.setDialect(apiTypeObj.getDialect().toString()); jaxbTypeObj.getContent().add(apiTypeObj.getContent()); } return jaxbTypeObj; }