Package org.apache.slide.projector.value

Examples of org.apache.slide.projector.value.ElementValue


    public XMLValue getPropertyAsXMLValue(URI uri, String namespace, String name, Credentials credentials) throws IOException {
    Property property = getProperty(uri, namespace, name, credentials);
    if ( property == null ) return null;
    DOMBuilder builder = new DOMBuilder();
        Element element = builder.build(property.getElement());
    return new ElementValue(element);
    }
View Full Code Here


    }

    public Value load(Element element) {
      Iterator iterator = element.getChildren().iterator();
      if ( iterator.hasNext() ) {
        return new ElementValue((Element)iterator.next());
      }
    return new ElementValue(element);
  }
View Full Code Here

      }
    }
   
    public static Value createValueFromNode(Object node) throws ProcessException {
      if ( node instanceof Element ) {
        return new ElementValue((Element)node);
      } else if ( node instanceof Attribute ) {
        return new StringValue(((Attribute)node).getValue());
      } else if ( node instanceof Text ) {
        return new StringValue(((Text)node).getText());
      } else if ( node instanceof Comment ) {
View Full Code Here

      }
    return new ElementValue(element);
  }
   
    public void save(Value value, XMLStringWriter writer) {
      ElementValue elementValue = (ElementValue)value;
      try {
        xmlOutputter.output(elementValue.getRootElement(), writer);
      } catch (IOException e) {
        logger.log(Level.SEVERE, "Could not persist ElementValue", e);
      }
      writer.writeEndTag(XMLWriter.createEndTag(getElementName()));
    }
View Full Code Here

TOP

Related Classes of org.apache.slide.projector.value.ElementValue

Copyright © 2018 www.massapicom. 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.