Examples/src/main/java/org/openestate/io/examples/DaftIeWritingExample.java
@SuppressWarnings("CatchMayIgnoreException")
    protected static OverseasSaleAdType createAdForSale() {
        // create an example real estate for sale
        OverseasSaleAdType ad = FACTORY.createOverseasSaleAdType();
        ad.setAcres(BigDecimal.valueOf(RandomUtils.nextDouble(10, 1000)));
        ad.setAddress("Beispielstraße 123");
        ad.setAgentId("123");
        ad.setArea("Berlin");
        ad.setBathroomNumber(BigInteger.valueOf(RandomUtils.nextInt(0, 5)));
        ad.setBedroomNumber(BigInteger.valueOf(RandomUtils.nextInt(0, 5)));
        ad.setCcEmail("test@openestate.org");
        ad.setCo2Rating("some notes about CO2 rating");
        ad.setCommercialType(CommercialType.SHOP);
        ad.setContactName("Max Mustermann");
        ad.setCountry("DE");
        ad.setDescription("A description about the property.");
        ad.setDirections("some notes about directions");
        ad.setEnergyRating("some notes about energy rating");
        ad.setExternalId(String.valueOf(RandomUtils.nextInt(1, 1000)));
        ad.setHouseType(HouseType.DETACHED);
        ad.setIsNewDevelopment(RandomUtils.nextInt(0, 2) == 1);
        ad.setMainEmail("test@openstate.org");
        ad.setNewDevelopmentAvailability("some notes about development");
        ad.setPhone1("030/123456");
        ad.setPhone2("030/123457");
        ad.setPhoneInfo("Some information about contacts via phone.");
        ad.setPrice(BigInteger.valueOf(RandomUtils.nextInt(100, 1000000)));
        ad.setPriceType(OverseasSaleAdType.PriceType.REGION);
        ad.setPropertyStatus(OverseasSaleAdType.PropertyStatus.FOR_SALE);
        ad.setPropertyType(PropertyType.HOUSE);
        ad.setRegion("Berlin");
        ad.setSquareMetres(BigDecimal.valueOf(RandomUtils.nextDouble(10, 1000)));
        ad.setUnitsAvailable(BigInteger.valueOf(RandomUtils.nextInt(1, 50)));
        ad.setViewingDetails("some notes about viewing details");

        // add some features
        ad.setFeatures(FACTORY.createFeaturesType());
        ad.getFeatures().getFeature().add("another feature");
        ad.getFeatures().getFeature().add("some more feature");

        // add some pdf documents
        ad.setPdfs(FACTORY.createPdfsType());
        try {
            ad.getPdfs().getPdf().add(new URI("http://www.mywebsite.org/document1.pdf"));
            ad.getPdfs().getPdf().add(new URI("http://www.mywebsite.org/document2.pdf"));
        } catch (URISyntaxException ex) {
        }

        // add some photos
        ad.setPhotos(FACTORY.createPhotosType());
        try {
            ad.getPhotos().getPhoto().add(new URI("http://www.mywebsite.org/image1.jpg"));
            ad.getPhotos().getPhoto().add(new URI("http://www.mywebsite.org/image2.jpg"));
            ad.getPhotos().getPhoto().add(new URI("http://www.mywebsite.org/image3.jpg"));
        } catch (URISyntaxException ex) {
        }

        return ad;
    }
@SuppressWarnings("CatchMayIgnoreException")
    protected static OverseasSaleAdType createAdForSale() {
        // create an example real estate for sale
        OverseasSaleAdType ad = FACTORY.createOverseasSaleAdType();
        ad.setAcres(BigDecimal.valueOf(RandomUtils.nextDouble(10, 1000)));
        ad.setAddress("Beispielstraße 123");
        ad.setAgentId("123");
        ad.setArea("Berlin");
        ad.setBathroomNumber(BigInteger.valueOf(RandomUtils.nextInt(0, 5)));
        ad.setBedroomNumber(BigInteger.valueOf(RandomUtils.nextInt(0, 5)));
        ad.setCcEmail("test@openestate.org");
        ad.setCo2Rating("some notes about CO2 rating");
        ad.setCommercialType(CommercialType.SHOP);
        ad.setContactName("Max Mustermann");
        ad.setCountry("DE");
        ad.setDescription("A description about the property.");
        ad.setDirections("some notes about directions");
        ad.setEnergyRating("some notes about energy rating");
        ad.setExternalId(String.valueOf(RandomUtils.nextInt(1, 1000)));
        ad.setHouseType(HouseType.DETACHED);
        ad.setIsNewDevelopment(RandomUtils.nextInt(0, 2) == 1);
        ad.setMainEmail("test@openstate.org");
        ad.setNewDevelopmentAvailability("some notes about development");
        ad.setPhone1("030/123456");
        ad.setPhone2("030/123457");
        ad.setPhoneInfo("Some information about contacts via phone.");
        ad.setPrice(BigInteger.valueOf(RandomUtils.nextInt(100, 1000000)));
        ad.setPriceType(OverseasSaleAdType.PriceType.REGION);
        ad.setPropertyStatus(OverseasSaleAdType.PropertyStatus.FOR_SALE);
        ad.setPropertyType(PropertyType.HOUSE);
        ad.setRegion("Berlin");
        ad.setSquareMetres(BigDecimal.valueOf(RandomUtils.nextDouble(10, 1000)));
        ad.setUnitsAvailable(BigInteger.valueOf(RandomUtils.nextInt(1, 50)));
        ad.setViewingDetails("some notes about viewing details");

        // add some features
        ad.setFeatures(FACTORY.createFeaturesType());
        ad.getFeatures().getFeature().add("another feature");
        ad.getFeatures().getFeature().add("some more feature");

        // add some pdf documents
        ad.setPdfs(FACTORY.createPdfsType());
        try {
            ad.getPdfs().getPdf().add(new URI("http://www.mywebsite.org/document1.pdf"));
            ad.getPdfs().getPdf().add(new URI("http://www.mywebsite.org/document2.pdf"));
        } catch (URISyntaxException ex) {
        }

        // add some photos
        ad.setPhotos(FACTORY.createPhotosType());
        try {
            ad.getPhotos().getPhoto().add(new URI("http://www.mywebsite.org/image1.jpg"));
            ad.getPhotos().getPhoto().add(new URI("http://www.mywebsite.org/image2.jpg"));
            ad.getPhotos().getPhoto().add(new URI("http://www.mywebsite.org/image3.jpg"));
        } catch (URISyntaxException ex) {
        }

        return ad;
    }
@ SuppressWarnings ( "CatchMayIgnoreException" ) protected static OverseasSaleAdType createAdForSale ( ) { // create an example real estate for sale OverseasSaleAdType ad = FACTORY . createOverseasSaleAdType ( ) ; ad . setAcres ( BigDecimal . valueOf ( RandomUtils . nextDouble ( 10 , 1000 ) ) ) ; ad . setAddress ( "Beispielstraße 123") ; ad . setAgentId ( "123" ) ; ad . setArea ( "Berlin" ) ; ad . setBathroomNumber ( BigInteger . valueOf ( RandomUtils . nextInt ( 0 , 5 ) ) ) ; ad . setBedroomNumber ( BigInteger . valueOf ( RandomUtils . nextInt ( 0 , 5 ) ) ) ; ad . setCcEmail ( "test@openestate.org" ) ; ad . setCo2Rating ( "some notes about CO2 rating" ) ; ad . setCommercialType ( CommercialType . SHOP ) ; ad . setContactName ( "Max Mustermann" ) ; ad . setCountry ( "DE" ) ; ad . setDescription ( "A description about the property." ) ; ad . setDirections ( "some notes about directions" ) ; ad . setEnergyRating ( "some notes about energy rating" ) ; ad . setExternalId ( String . valueOf ( RandomUtils . nextInt ( 1 , 1000 ) ) ) ; ad . setHouseType ( HouseType . DETACHED ) ; ad . setIsNewDevelopment ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; ad . setMainEmail ( "test@openstate.org" ) ; ad . setNewDevelopmentAvailability ( "some notes about development" ) ; ad . setPhone1 ( "030/123456" ) ; ad . setPhone2 ( "030/123457" ) ; ad . setPhoneInfo ( "Some information about contacts via phone." ) ; ad . setPrice ( BigInteger . valueOf ( RandomUtils . nextInt ( 100 , 1000000 ) ) ) ; ad . setPriceType ( OverseasSaleAdType . PriceType . REGION ) ; ad . setPropertyStatus ( OverseasSaleAdType . PropertyStatus . FOR_SALE ) ; ad . setPropertyType ( PropertyType . HOUSE ) ; ad . setRegion ( "Berlin" ) ; ad . setSquareMetres ( BigDecimal . valueOf ( RandomUtils . nextDouble ( 10 , 1000 ) ) ) ; ad . setUnitsAvailable ( BigInteger . valueOf ( RandomUtils . nextInt ( 1 , 50 ) ) ) ; ad . setViewingDetails ( "some notes about viewing details" ) ; // add some features ad . setFeatures ( FACTORY . createFeaturesType ( ) ) ; ad . getFeatures ( ) . getFeature ( ) . add ( "another feature" ) ; ad . getFeatures ( ) . getFeature ( ) . add ( "some more feature" ) ; // add some pdf documents ad . setPdfs ( FACTORY . createPdfsType ( ) ) ; try { ad . getPdfs ( ) . getPdf ( ) . add ( new URI ( "http://www.mywebsite.org/document1.pdf" ) ) ; ad . getPdfs ( ) . getPdf ( ) . add ( new URI ( "http://www.mywebsite.org/document2.pdf" ) ) ; } catch ( URISyntaxException ex ) { } // add some photos ad . setPhotos ( FACTORY . createPhotosType ( ) ) ; try { ad . getPhotos ( ) . getPhoto ( ) . add ( new URI ( "http://www.mywebsite.org/image1.jpg" ) ) ; ad . getPhotos ( ) . getPhoto ( ) . add ( new URI ( "http://www.mywebsite.org/image2.jpg" ) ) ; ad . getPhotos ( ) . getPhoto ( ) . add ( new URI ( "http://www.mywebsite.org/image3.jpg" ) ) ; } catch ( URISyntaxException ex ) { } return ad ; }
Create an {@link OverseasRentalAdType} with some example data.

@return created example object
Create an { @link OverseasRentalAdType } with some example data .