Examples/src/main/java/org/openestate/io/examples/KyeroWritingExample.java
@SuppressWarnings("CatchMayIgnoreException")
    protected static PropertyType createProperty() {
        final String id = RandomStringUtils.random(5);
        int imageCount = 0;

        // create an example real estate
        PropertyType obj = FACTORY.createPropertyType();
        obj.setBaths(BigInteger.valueOf(RandomUtils.nextLong(0, 5)));
        obj.setBeds(BigInteger.valueOf(RandomUtils.nextLong(0, 5)));
        obj.setCountry("Germany");
        obj.setCurrency(CurrencyType.EUR);
        obj.setDate(Calendar.getInstance());
        obj.setId(id);
        obj.setLeasehold(RandomUtils.nextInt(0, 2) == 1);
        obj.setLocationDetail("some details about the location");
        obj.setNewBuild(RandomUtils.nextInt(0, 2) == 1);
        obj.setNotes("some notes about the property");
        obj.setPartOwnership(RandomUtils.nextInt(0, 2) == 1);
        obj.setPool(RandomUtils.nextInt(0, 2) == 1);
        obj.setPrice(RandomUtils.nextLong(10000, 9999999));
        obj.setPriceFreq(PriceFreqType.SALE);
        obj.setProvince("Berlin");
        obj.setRef(RandomStringUtils.random(5));
        obj.setTown("Berlin");
        obj.setType("house");

        obj.setDesc(FACTORY.createLangType());
        obj.getDesc().setCa("Catalan property description");
        obj.getDesc().setDa("Danish property description");
        obj.getDesc().setDe("German property description");
        obj.getDesc().setEn("English property description");
        obj.getDesc().setEs("Spanish property description");
        obj.getDesc().setFi("Finnish property description");
        obj.getDesc().setFr("French property description");
        obj.getDesc().setIt("Italian property description");
        obj.getDesc().setNl("Dutch property description");
        obj.getDesc().setNo("Norwegian property description");
        obj.getDesc().setPt("Portuguese property description");
        obj.getDesc().setRu("Russian property description");
        obj.getDesc().setSv("Swedish property description");

        obj.setEnergyRating(FACTORY.createEnergyRatingType());
        obj.getEnergyRating().setConsumption(EnergyRatingMarkType.C);
        obj.getEnergyRating().setEmissions(EnergyRatingMarkType.E);

        obj.setFeatures(FACTORY.createFeaturesType());
        obj.getFeatures().getFeature().add("name of a feature");
        obj.getFeatures().getFeature().add("name of another feature");

        obj.setImages(FACTORY.createImagesType());
        obj.getImages().getImage().add(createPropertyImage(id, ++imageCount));
        obj.getImages().getImage().add(createPropertyImage(id, ++imageCount));
        obj.getImages().getImage().add(createPropertyImage(id, ++imageCount));

        obj.setLocation(FACTORY.createGpsLocationType());
        obj.getLocation().setLatitude(BigDecimal.valueOf(RandomUtils.nextDouble(0, 90)));
        obj.getLocation().setLongitude(BigDecimal.valueOf(RandomUtils.nextDouble(0, 90)));

        obj.setSurfaceArea(FACTORY.createSurfaceType());
        obj.getSurfaceArea().setBuilt(BigInteger.valueOf(RandomUtils.nextLong(50, 250)));
        obj.getSurfaceArea().setPlot(BigInteger.valueOf(RandomUtils.nextLong(100, 1500)));

        obj.setUrl(FACTORY.createUrlType());
        try {
            obj.getUrl().setCa(new URI("http://catalan.website.com/property/" + id + ".htm"));
            obj.getUrl().setDa(new URI("http://danish.website.com/property/" + id + ".htm"));
            obj.getUrl().setDe(new URI("http://german.website.com/property/" + id + ".htm"));
            obj.getUrl().setEn(new URI("http://english.website.com/property/" + id + ".htm"));
            obj.getUrl().setEs(new URI("http://spanish.website.com/property/" + id + ".htm"));
            obj.getUrl().setFi(new URI("http://finnish.website.com/property/" + id + ".htm"));
            obj.getUrl().setFr(new URI("http://french.website.com/property/" + id + ".htm"));
            obj.getUrl().setIt(new URI("http://italian.website.com/property/" + id + ".htm"));
            obj.getUrl().setNl(new URI("http://dutch.website.com/property/" + id + ".htm"));
            obj.getUrl().setNo(new URI("http://norwegian.website.com/property/" + id + ".htm"));
            obj.getUrl().setPt(new URI("http://portuguese.website.com/property/" + id + ".htm"));
            obj.getUrl().setRu(new URI("http://russian.website.com/property/" + id + ".htm"));
            obj.getUrl().setSv(new URI("http://swedish.website.com/property/" + id + ".htm"));
        } catch (URISyntaxException ex) {
        }

        return obj;
    }
@SuppressWarnings("CatchMayIgnoreException")
    protected static PropertyType createProperty() {
        final String id = RandomStringUtils.random(5);
        int imageCount = 0;

        // create an example real estate
        PropertyType obj = FACTORY.createPropertyType();
        obj.setBaths(BigInteger.valueOf(RandomUtils.nextLong(0, 5)));
        obj.setBeds(BigInteger.valueOf(RandomUtils.nextLong(0, 5)));
        obj.setCountry("Germany");
        obj.setCurrency(CurrencyType.EUR);
        obj.setDate(Calendar.getInstance());
        obj.setId(id);
        obj.setLeasehold(RandomUtils.nextInt(0, 2) == 1);
        obj.setLocationDetail("some details about the location");
        obj.setNewBuild(RandomUtils.nextInt(0, 2) == 1);
        obj.setNotes("some notes about the property");
        obj.setPartOwnership(RandomUtils.nextInt(0, 2) == 1);
        obj.setPool(RandomUtils.nextInt(0, 2) == 1);
        obj.setPrice(RandomUtils.nextLong(10000, 9999999));
        obj.setPriceFreq(PriceFreqType.SALE);
        obj.setProvince("Berlin");
        obj.setRef(RandomStringUtils.random(5));
        obj.setTown("Berlin");
        obj.setType("house");

        obj.setDesc(FACTORY.createLangType());
        obj.getDesc().setCa("Catalan property description");
        obj.getDesc().setDa("Danish property description");
        obj.getDesc().setDe("German property description");
        obj.getDesc().setEn("English property description");
        obj.getDesc().setEs("Spanish property description");
        obj.getDesc().setFi("Finnish property description");
        obj.getDesc().setFr("French property description");
        obj.getDesc().setIt("Italian property description");
        obj.getDesc().setNl("Dutch property description");
        obj.getDesc().setNo("Norwegian property description");
        obj.getDesc().setPt("Portuguese property description");
        obj.getDesc().setRu("Russian property description");
        obj.getDesc().setSv("Swedish property description");

        obj.setEnergyRating(FACTORY.createEnergyRatingType());
        obj.getEnergyRating().setConsumption(EnergyRatingMarkType.C);
        obj.getEnergyRating().setEmissions(EnergyRatingMarkType.E);

        obj.setFeatures(FACTORY.createFeaturesType());
        obj.getFeatures().getFeature().add("name of a feature");
        obj.getFeatures().getFeature().add("name of another feature");

        obj.setImages(FACTORY.createImagesType());
        obj.getImages().getImage().add(createPropertyImage(id, ++imageCount));
        obj.getImages().getImage().add(createPropertyImage(id, ++imageCount));
        obj.getImages().getImage().add(createPropertyImage(id, ++imageCount));

        obj.setLocation(FACTORY.createGpsLocationType());
        obj.getLocation().setLatitude(BigDecimal.valueOf(RandomUtils.nextDouble(0, 90)));
        obj.getLocation().setLongitude(BigDecimal.valueOf(RandomUtils.nextDouble(0, 90)));

        obj.setSurfaceArea(FACTORY.createSurfaceType());
        obj.getSurfaceArea().setBuilt(BigInteger.valueOf(RandomUtils.nextLong(50, 250)));
        obj.getSurfaceArea().setPlot(BigInteger.valueOf(RandomUtils.nextLong(100, 1500)));

        obj.setUrl(FACTORY.createUrlType());
        try {
            obj.getUrl().setCa(new URI("http://catalan.website.com/property/" + id + ".htm"));
            obj.getUrl().setDa(new URI("http://danish.website.com/property/" + id + ".htm"));
            obj.getUrl().setDe(new URI("http://german.website.com/property/" + id + ".htm"));
            obj.getUrl().setEn(new URI("http://english.website.com/property/" + id + ".htm"));
            obj.getUrl().setEs(new URI("http://spanish.website.com/property/" + id + ".htm"));
            obj.getUrl().setFi(new URI("http://finnish.website.com/property/" + id + ".htm"));
            obj.getUrl().setFr(new URI("http://french.website.com/property/" + id + ".htm"));
            obj.getUrl().setIt(new URI("http://italian.website.com/property/" + id + ".htm"));
            obj.getUrl().setNl(new URI("http://dutch.website.com/property/" + id + ".htm"));
            obj.getUrl().setNo(new URI("http://norwegian.website.com/property/" + id + ".htm"));
            obj.getUrl().setPt(new URI("http://portuguese.website.com/property/" + id + ".htm"));
            obj.getUrl().setRu(new URI("http://russian.website.com/property/" + id + ".htm"));
            obj.getUrl().setSv(new URI("http://swedish.website.com/property/" + id + ".htm"));
        } catch (URISyntaxException ex) {
        }

        return obj;
    }
@ SuppressWarnings ( "CatchMayIgnoreException" ) protected static PropertyType createProperty ( ) { final String id = RandomStringUtils . random ( 5 ) ; int imageCount = 0 ; // create an example real estate PropertyType obj = FACTORY . createPropertyType ( ) ; obj . setBaths ( BigInteger . valueOf ( RandomUtils . nextLong ( 0 , 5 ) ) ) ; obj . setBeds ( BigInteger . valueOf ( RandomUtils . nextLong ( 0 , 5 ) ) ) ; obj . setCountry ( "Germany" ) ; obj . setCurrency ( CurrencyType . EUR ) ; obj . setDate ( Calendar . getInstance ( ) ) ; obj . setId ( id ) ; obj . setLeasehold ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setLocationDetail ( "some details about the location" ) ; obj . setNewBuild ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setNotes ( "some notes about the property" ) ; obj . setPartOwnership ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setPool ( RandomUtils . nextInt ( 0 , 2 ) == 1 ) ; obj . setPrice ( RandomUtils . nextLong ( 10000 , 9999999 ) ) ; obj . setPriceFreq ( PriceFreqType . SALE ) ; obj . setProvince ( "Berlin" ) ; obj . setRef ( RandomStringUtils . random ( 5 ) ) ; obj . setTown ( "Berlin" ) ; obj . setType ( "house" ) ; obj . setDesc ( FACTORY . createLangType ( ) ) ; obj . getDesc ( ) . setCa ( "Catalan property description" ) ; obj . getDesc ( ) . setDa ( "Danish property description" ) ; obj . getDesc ( ) . setDe ( "German property description" ) ; obj . getDesc ( ) . setEn ( "English property description" ) ; obj . getDesc ( ) . setEs ( "Spanish property description" ) ; obj . getDesc ( ) . setFi ( "Finnish property description" ) ; obj . getDesc ( ) . setFr ( "French property description" ) ; obj . getDesc ( ) . setIt ( "Italian property description" ) ; obj . getDesc ( ) . setNl ( "Dutch property description" ) ; obj . getDesc ( ) . setNo ( "Norwegian property description" ) ; obj . getDesc ( ) . setPt ( "Portuguese property description" ) ; obj . getDesc ( ) . setRu ( "Russian property description" ) ; obj . getDesc ( ) . setSv ( "Swedish property description" ) ; obj . setEnergyRating ( FACTORY . createEnergyRatingType ( ) ) ; obj . getEnergyRating ( ) . setConsumption ( EnergyRatingMarkType . C ) ; obj . getEnergyRating ( ) . setEmissions ( EnergyRatingMarkType . E ) ; obj . setFeatures ( FACTORY . createFeaturesType ( ) ) ; obj . getFeatures ( ) . getFeature ( ) . add ( "name of a feature" ) ; obj . getFeatures ( ) . getFeature ( ) . add ( "name of another feature" ) ; obj . setImages ( FACTORY . createImagesType ( ) ) ; obj . getImages ( ) . getImage ( ) . add ( createPropertyImage ( id , ++ imageCount ) ) ; obj . getImages ( ) . getImage ( ) . add ( createPropertyImage ( id , ++ imageCount ) ) ; obj . getImages ( ) . getImage ( ) . add ( createPropertyImage ( id , ++ imageCount ) ) ; obj . setLocation ( FACTORY . createGpsLocationType ( ) ) ; obj . getLocation ( ) . setLatitude ( BigDecimal . valueOf ( RandomUtils . nextDouble ( 0 , 90 ) ) ) ; obj . getLocation ( ) . setLongitude ( BigDecimal . valueOf ( RandomUtils . nextDouble ( 0 , 90 ) ) ) ; obj . setSurfaceArea ( FACTORY . createSurfaceType ( ) ) ; obj . getSurfaceArea ( ) . setBuilt ( BigInteger . valueOf ( RandomUtils . nextLong ( 50 , 250 ) ) ) ; obj . getSurfaceArea ( ) . setPlot ( BigInteger . valueOf ( RandomUtils . nextLong ( 100 , 1500 ) ) ) ; obj . setUrl ( FACTORY . createUrlType ( ) ) ; try { obj . getUrl ( ) . setCa ( new URI ( "http://catalan.website.com/property/" + id + ".htm" ) ) ; obj . getUrl ( ) . setDa ( new URI ( "http://danish.website.com/property/" + id + ".htm" ) ) ; obj . getUrl ( ) . setDe ( new URI ( "http://german.website.com/property/" + id + ".htm" ) ) ; obj . getUrl ( ) . setEn ( new URI ( "http://english.website.com/property/" + id + ".htm" ) ) ; obj . getUrl ( ) . setEs ( new URI ( "http://spanish.website.com/property/" + id + ".htm" ) ) ; obj . getUrl ( ) . setFi ( new URI ( "http://finnish.website.com/property/" + id + ".htm" ) ) ; obj . getUrl ( ) . setFr ( new URI ( "http://french.website.com/property/" + id + ".htm" ) ) ; obj . getUrl ( ) . setIt ( new URI ( "http://italian.website.com/property/" + id + ".htm" ) ) ; obj . getUrl ( ) . setNl ( new URI ( "http://dutch.website.com/property/" + id + ".htm" ) ) ; obj . getUrl ( ) . setNo ( new URI ( "http://norwegian.website.com/property/" + id + ".htm" ) ) ; obj . getUrl ( ) . setPt ( new URI ( "http://portuguese.website.com/property/" + id + ".htm" ) ) ; obj . getUrl ( ) . setRu ( new URI ( "http://russian.website.com/property/" + id + ".htm" ) ) ; obj . getUrl ( ) . setSv ( new URI ( "http://swedish.website.com/property/" + id + ".htm" ) ) ; } catch ( URISyntaxException ex ) { } return obj ; }
Create a {@link PropertyType} object with some example data.

@return created example object
Create a { @link PropertyType } object with some example data .