WisIT/src/main/java/org/openestate/io/wis_it/WisItDocument.java
public static WisItDocument newDocument(WIS wis) throws ParserConfigurationException, JAXBException {
        if (wis.getOBJEKTE() == null)
            wis.setOBJEKTE(WisItUtils.getFactory().createWISOBJEKTE());
        wis.getOBJEKTE().setANZAHL(BigInteger.valueOf(wis.getOBJEKTE().getOBJEKT().size()));

        Document document = XmlUtils.newDocument();
        WisItUtils.createMarshaller("UTF-8", true).marshal(wis, document);
        return new WisItDocument(document);
    }
public static WisItDocument newDocument(WIS wis) throws ParserConfigurationException, JAXBException {
        if (wis.getOBJEKTE() == null)
            wis.setOBJEKTE(WisItUtils.getFactory().createWISOBJEKTE());
        wis.getOBJEKTE().setANZAHL(BigInteger.valueOf(wis.getOBJEKTE().getOBJEKT().size()));

        Document document = XmlUtils.newDocument();
        WisItUtils.createMarshaller("UTF-8", true).marshal(wis, document);
        return new WisItDocument(document);
    }
public static WisItDocument newDocument ( WIS wis ) throws ParserConfigurationException , JAXBException { if ( wis . getOBJEKTE ( ) == null ) wis . setOBJEKTE ( WisItUtils . getFactory ( ) . createWISOBJEKTE ( ) ) ; wis . getOBJEKTE ( ) . setANZAHL ( BigInteger . valueOf ( wis . getOBJEKTE ( ) . getOBJEKT ( ) . size ( ) ) ) ; Document document = XmlUtils . newDocument ( ) ; WisItUtils . createMarshaller ( "UTF-8" , true ) . marshal ( wis , document ) ; return new WisItDocument ( document ) ; }
Creates a {@link WisItDocument} from a {@link WIS} object.

@param wis Java object, that represents the &lt;WIS&gt; root element
@return created document
@throws ParserConfigurationException if the parser is not properly configured
@throws JAXBException                if a problem with JAXB occurred
Creates a { @link WisItDocument } from a { @link WIS } object .