/** * Get the segmentation specified by name * * @param sessionid The sessionid in which user is working * @param segmentationName The segmentation name * @return JAXB representation of {@link XSegmentation} */ @GET @Path("/segmentations/{segmentationName}") public JAXBElement<XSegmentation> getSegmentation(@QueryParam("sessionid") LensSessionHandle sessionid, @PathParam("segmentationName") String segmentationName) throws LensException { checkSessionId(sessionid); return X_CUBE_OBJECT_FACTORY.createXSegmentation(getSvc().getSegmentation(sessionid, segmentationName)); }
public APIResult createSegmentation(XSegmentation seg) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("segmentations") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .post(Entity.xml(new GenericEntity<JAXBElement<XSegmentation>>(objFact .createXSegmentation(seg)){}))); }
public APIResult createSegmentation(XSegmentation seg) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("segmentations") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .post(Entity.xml(new GenericEntity<JAXBElement<XSegmentation>>(objFact .createXSegmentation(seg)){}))); }
public APIResult updateSegmentation(String segName, XSegmentation seg) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("segmentations").path(segName) .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML_TYPE) .put(Entity.xml(new GenericEntity<JAXBElement<XSegmentation>>(objFact. createXSegmentation(seg)){}))); }
public APIResult updateSegmentation(String segName, XSegmentation seg) { WebTarget target = getMetastoreWebTarget(); return translate(target.path("segmentations").path(segName) .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML_TYPE) .put(Entity.xml(new GenericEntity<JAXBElement<XSegmentation>>(objFact. createXSegmentation(seg)){}))); }
.post(Entity.entity( new GenericEntity<JAXBElement<XSegmentation>>( cubeObjectFactory.createXSegmentation(seg)){}, mediaType), APIResult.class); assertSuccess(result); .queryParam("sessionid", lensSessionId).request(mediaType) .put(Entity.entity(new GenericEntity<JAXBElement<XSegmentation>>( cubeObjectFactory.createXSegmentation(update)){}, mediaType), APIResult.class); assertSuccess(result);
public static XSegmentation xsegmentationFromSegmentation(Segmentation cSeg) { XSegmentation seg = XCF.createXSegmentation(); seg.setName(cSeg.getName()); seg.setProperties(new XProperties()); seg.setSegements(new XSegments()); seg.setWeight(cSeg.weight()); seg.setCubeName(cSeg.getBaseCube()); if (xPropertiesFromMap(cSeg.getProperties()) != null) { seg.getProperties().getProperty().addAll(xPropertiesFromMap(cSeg.getProperties())); } seg.getSegements().getSegment(). addAll(xSegmentsFromSegments(cSeg.getSegments())); return seg; }
public static XSegmentation xsegmentationFromSegmentation(Segmentation cSeg) { XSegmentation seg = XCF.createXSegmentation(); seg.setName(cSeg.getName()); seg.setProperties(new XProperties()); seg.setSegements(new XSegments()); seg.setWeight(cSeg.weight()); seg.setCubeName(cSeg.getBaseCube()); if (xPropertiesFromMap(cSeg.getProperties()) != null) { seg.getProperties().getProperty().addAll(xPropertiesFromMap(cSeg.getProperties())); } seg.getSegements().getSegment(). addAll(xSegmentsFromSegments(cSeg.getSegments())); return seg; }
private XSegmentation createSegmentation(String segName, String cubeName) { XSegmentation seg = cubeObjectFactory.createXSegmentation();