Package org.gephi.project.spi

Examples of org.gephi.project.spi.WorkspacePersistenceProvider


        boolean end = false;
        while (reader.hasNext() && !end) {
            Integer eventType = reader.next();
            if (eventType.equals(XMLEvent.START_ELEMENT)) {
                String name = reader.getLocalName();
                WorkspacePersistenceProvider pp = providers.get(name);
                if (pp != null) {
                    currentProvider = pp;
                    try {
                        pp.readXML(reader, workspace);
                    } catch (UnsupportedOperationException e) {
                    }
                }
            } else if (eventType.equals(XMLStreamReader.END_ELEMENT)) {
                if ("workspace".equalsIgnoreCase(reader.getLocalName())) {
View Full Code Here


    public void writeWorkspaceChildren(XMLStreamWriter writer, Workspace workspace) throws Exception {
        for (Map.Entry<String, WorkspacePersistenceProvider> entry : PersistenceProviderUtils.getXMLPersistenceProviders().entrySet()) {
            try {
                String identifier = entry.getKey();
                WorkspacePersistenceProvider pp = entry.getValue();
                writer.writeComment("Persistence from '" + identifier + "' (" + pp.getClass().getName() + ")");
                pp.writeXML(writer, workspace);
            } catch (UnsupportedOperationException e) {
            }
        }
    }
View Full Code Here

        boolean end = false;
        while (reader.hasNext() && !end) {
            Integer eventType = reader.next();
            if (eventType.equals(XMLEvent.START_ELEMENT)) {
                String name = reader.getLocalName();
                WorkspacePersistenceProvider pp = PersistenceProviderUtils.getXMLPersistenceProviders().get(name);
                if (pp != null) {
                    currentProvider = pp;
                    try {
                        pp.readXML(reader, workspace);
                    } catch (UnsupportedOperationException e) {
                    }
                }
            } else if (eventType.equals(XMLStreamReader.END_ELEMENT)) {
                if ("workspace".equalsIgnoreCase(reader.getLocalName())) {
View Full Code Here

TOP

Related Classes of org.gephi.project.spi.WorkspacePersistenceProvider

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.