Package org.gephi.project.impl

Examples of org.gephi.project.impl.ProjectInformationImpl


        cancel = true;
        return true;
    }

    public Project readAll(XMLStreamReader reader, Project project) throws Exception {
        ProjectInformationImpl info = project.getLookup().lookup(ProjectInformationImpl.class);
        WorkspaceProviderImpl workspaces = project.getLookup().lookup(WorkspaceProviderImpl.class);
        this.project = (ProjectImpl) project;

        boolean end = false;
        while (reader.hasNext() && !end) {
            Integer eventType = reader.next();
            if (eventType.equals(XMLEvent.START_ELEMENT)) {
                String name = reader.getLocalName();
                if ("gephiFile".equalsIgnoreCase(name)) {
                    //Version
                    String version = reader.getAttributeValue(null, "version");
                    if (version == null || version.isEmpty() || Double.parseDouble(version) < 0.7) {
                        throw new GephiFormatException("Gephi project file version must be at least 0.7");
                    }
                } else if ("project".equalsIgnoreCase(name)) {
                    info.setName(reader.getAttributeValue(null, "name"));
                } else if ("workspace".equalsIgnoreCase(name)) {
                    Workspace workspace = readWorkspace(reader);

                    //Current workspace
                    if (workspace.getLookup().lookup(WorkspaceInformationImpl.class).isOpen()) {
View Full Code Here

TOP

Related Classes of org.gephi.project.impl.ProjectInformationImpl

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.