Package de.zeigermann.xml

Examples of de.zeigermann.xml.XMLStringWriter.writeXMLDeclaration()


  public void put(String key, Object value) throws IOException {
        if ( value instanceof StreamableValue) {
            Projector.getRepository().setResource(new URIValue(key), (StreamableValue)value, context.getCredentials());
        } else if ( value instanceof Value ) {
            XMLStringWriter writer = XMLStringWriter.create();
            writer.writeXMLDeclaration();
            ValueFactoryManager.getInstance().saveValue((Value)value, writer);
            Projector.getRepository().setResource(new URIValue(key), new StringValue(writer.toString()), context.getCredentials());
        } else {
          throw new IOException("Could not write value to repository! Given value is '"+value+"'");
        }
View Full Code Here


        return (Context)threadContext.get();
    }

     public void saveJobs() {
        XMLStringWriter writer = XMLStringWriter.create();
        writer.writeXMLDeclaration();
        writer.writeStartTag(XMLWriter.createStartTag("jobs"));
        synchronized ( jobs ) {
          for ( Iterator i = jobs.iterator(); i.hasNext(); ) {
                Job job = (Job)i.next();
                if (job.isPersistent()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.