Package org.graphstream.ui.graphicGraph.stylesheet

Examples of org.graphstream.ui.graphicGraph.stylesheet.StyleSheet$NameSpace


  }

  @Override
  public boolean isMyType(Document document) {
    Element rssRoot = document.getRootElement();
    Namespace defaultNS = rssRoot.getNamespace();
    return (defaultNS != null) && defaultNS.equals(getAtomNamespace());
  }
View Full Code Here


  }

  @Override
  public boolean isMyType(Document document) {
    Element rssRoot = document.getRootElement();
    Namespace defaultNS = rssRoot.getNamespace();
    return (defaultNS != null) && defaultNS.equals(getAtomNamespace());
  }
View Full Code Here

   
    final Document document = (Document) models.get("jdom2");
   
    final XPathFactory xpathFactory = XPathFactory.instance();
    final Filter<LocatedElement> filter = Filters.fclass(LocatedElement.class);
    Namespace mavenNamespace = Namespace.getNamespace("m", "http://maven.apache.org/POM/4.0.0");
    final XPathExpression<LocatedElement> dependenciesXpath = xpathFactory.compile("/m:project/m:dependencies/m:dependency", filter, null, mavenNamespace);
    final XPathExpression<LocatedElement> managedDependenciesXpath = xpathFactory.compile("/m:project/m:dependencyManagement/m:dependency", filter, null, mavenNamespace);
   
    final List<LocatedElement> dependencies = dependenciesXpath.evaluate(document);
    final List<LocatedElement> managedDependencies = managedDependenciesXpath.evaluate(document);
View Full Code Here

        super(type);
    }

    public boolean isMyType(Document document) {
        Element rssRoot = document.getRootElement();
        Namespace defaultNS = rssRoot.getNamespace();
        boolean ok = defaultNS!=null && defaultNS.equals(getRSSNamespace());
        if (ok) {
            ok = super.isMyType(document);
        }
        return ok;
    }
View Full Code Here

        List parsers = getPlugins();
        List modules = null;
        for (int i=0;i<parsers.size();i++) {
            ModuleParser parser = (ModuleParser) parsers.get(i);
            String namespaceUri = parser.getNamespaceUri();
            Namespace namespace = Namespace.getNamespace(namespaceUri);
            if (hasElementsFrom(root, namespace)) {
                Module module = parser.parse(root);
                if (module != null) {
                    if (modules == null) {
                        modules = new ArrayList();
View Full Code Here

     */
    public boolean isMyType(Document document) {
        boolean ok = false;

        Element rssRoot = document.getRootElement();
        Namespace defaultNS = rssRoot.getNamespace();
        List additionalNSs = rssRoot.getAdditionalNamespaces();

        ok = defaultNS!=null && defaultNS.equals(getRDFNamespace());
        if (ok) {
            if (additionalNSs==null) {
                ok = false;
            }
            else {
View Full Code Here

     */
    public boolean isMyType(Document document) {
        boolean ok = false;

        Element rssRoot = document.getRootElement();
        Namespace defaultNS = rssRoot.getNamespace();
        List additionalNSs = rssRoot.getAdditionalNamespaces();

        ok = (defaultNS != null) && defaultNS.equals(getRSSNamespace());

        return ok;
    }
View Full Code Here

        List groups = listInfo.getChildren("group", NS);
        ArrayList values = new ArrayList();

        for (int i = 0; (groups != null) && (i < groups.size()); i++) {
            Element ge = (Element) groups.get(i);
            Namespace ns = (ge.getAttribute("ns") == null) ? element.getNamespace() : Namespace.getNamespace(ge.getAttributeValue("ns"));
            String elementName = ge.getAttributeValue("element");
            String label = ge.getAttributeValue("label");
            values.add(new Group(ns, elementName, label));
        }

        sle.setGroupFields((Group[]) values.toArray(new Group[values.size()]));
        values = (values.size() == 0) ? values : new ArrayList();

        List sorts = listInfo.getChildren("sort", NS);

        for (int i = 0; (sorts != null) && (i < sorts.size()); i++) {
            Element se = (Element) sorts.get(i);
            System.out.println("Parse cf:sort "+se.getAttributeValue("element")+se.getAttributeValue("data-type"));
            Namespace ns = (se.getAttributeValue("ns") == null) ? element.getNamespace() : Namespace.getNamespace(se.getAttributeValue("ns"));
            String elementName = se.getAttributeValue("element");
            String label = se.getAttributeValue("label");
            String dataType = se.getAttributeValue("data-type");
            boolean defaultOrder = (se.getAttributeValue("default") == null) ? false : new Boolean(se.getAttributeValue("default")).booleanValue();
            values.add(new Sort(ns, elementName, dataType, label, defaultOrder));
View Full Code Here

        List list = root.getAdditionalNamespaces();
        List additionalNamespaces = new java.util.ArrayList();
        additionalNamespaces.addAll(list); // the duplication will prevent a ConcurrentModificationException below

        for (int i = 0; i < additionalNamespaces.size(); i++) {
            Namespace ns = (Namespace) additionalNamespaces.get(i);
            String prefix = ns.getPrefix();
            if (prefix != null && prefix.length() > 0 && !usedPrefixes.contains(prefix)) {
                root.removeNamespaceDeclaration(ns);
            }
        }
    }
View Full Code Here

        return ATOM_03_NS;
    }

    public boolean isMyType(Document document) {
        Element rssRoot = document.getRootElement();
        Namespace defaultNS = rssRoot.getNamespace();
        return (defaultNS!=null) && defaultNS.equals(getAtomNamespace());
    }
View Full Code Here

TOP

Related Classes of org.graphstream.ui.graphicGraph.stylesheet.StyleSheet$NameSpace

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.