Package org.exist.http

Examples of org.exist.http.RESTServer$Namespace


        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

        return ATOM_10_NS;
    }
   
    public boolean isMyType(Document document) {
        Element rssRoot = document.getRootElement();
        Namespace defaultNS = rssRoot.getNamespace();
        return (defaultNS!=null) && defaultNS.equals(getAtomNamespace());
    }
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

    @Override
    public boolean applyChange(MavenProject project, Element root) throws ProjectRewriteException
    {
        boolean modified = false;

        Namespace ns = getNamespaceOrNull(root);
        Element properties = root.getChild("properties", ns);
        List<Element> artifactContainers = new ArrayList<Element>();
        artifactContainers.add(root);

        artifactContainers.addAll(getElementListOrEmpty(root, "profiles/profile",ns));
View Full Code Here

TOP

Related Classes of org.exist.http.RESTServer$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.