Package org.jdom

Examples of org.jdom.Namespace


       
        Element propstat = new Element(E_PROPSTAT, DNSP);
        Element prop = new Element(E_PROP, DNSP);
        propstat.addContent(prop);
       
        Namespace namespace = Namespace.NO_NAMESPACE;
        if (property.getNamespace() != null) {
            namespace = NamespaceCache.getNamespace(property.getNamespace());
        }
        Element propertyElement = new Element(property.getName(), namespace);
        prop.addContent(propertyElement);
View Full Code Here


     *
     * @return     the <code>&lt;privilege&gt;</code> element.
     */
    private Element createPrivilege(String privilegeName, boolean useDavNamespace) {
        Element privilege = new Element(E_PRIVILEGE, DNSP);
        Namespace namespace = DNSP;
        if ( ! useDavNamespace ) {
            namespace = NamespaceCache.SLIDE_NAMESPACE;
        }
        Element privilegeNameElement = new Element(privilegeName, namespace);
        privilege.addContent(privilegeNameElement);
View Full Code Here

                                       String propertyName,
                                       Object propertyValue,
                                       String contextPath,
                                       String servletPath) {
        Element property = null;
        Namespace namespace = Namespace.NO_NAMESPACE;
        Namespace valueDefaultNamespace = null;
        if (namespaceString != null) {
            namespace = NamespaceCache.getNamespace(namespaceString);
            if (NamespaceCache.DEFAULT_URI.equals(namespace.getURI())) {
                // use the DAV: as the default namespace
                // for XML values of DAV: properties
View Full Code Here

    public static QueryScope getScope(Element basicSearchElementJDOM)
        throws BadQueryException {
        if (basicSearchElementJDOM == null)
            throw new BadQueryException (NO_QUERY_ELEMENT);

        Namespace namespace = basicSearchElementJDOM.getNamespace();
        Element fromElement = basicSearchElementJDOM.getChild
            (Literals.FROM, namespace);

        // FROM is mandatory
        if (fromElement == null)
View Full Code Here

        throws BadQueryException
    {
        if (basicSearchElementJDOM == null)
            throw new BadQueryException (NO_QUERY_ELEMENT);

        Namespace namespace = basicSearchElementJDOM.getNamespace();
        Element fromElement = basicSearchElementJDOM.getChild
            (Literals.FROM, namespace);

        // FROM is mandatory
        if (fromElement == null)
View Full Code Here

                NodeRevisionDescriptor destinationNrd =
                    content.retrieve( slideToken, content.retrieve(slideToken, destinationUri) );
                XMLValue v = new XMLValue( (String)destinationNrd.getProperty( P_PARENT_SET ).getValue() );
                Iterator i = v.iterator();
                while (i.hasNext()) {
                    Namespace dnsp = Namespace.getNamespace(S_DAV);
                    Element parentElm = (Element)i.next();
                    String segment = parentElm.getChild(E_SEGMENT, dnsp).getTextTrim();
                    String href = parentElm.getChild(E_HREF, dnsp).getTextTrim();
                    parentBindings.put( href, segment );
                }
View Full Code Here

    public BasicQueryScope (Element fromElement)
        throws BadQueryException
    {
        this.depth = QueryScope.DEPTH_INFINITY;
       
        Namespace namespace  = fromElement.getNamespace();
        String name = fromElement.getName ();
       
        if (! (namespace.getURI().equals (NodeProperty.DEFAULT_NAMESPACE)
                   && name.equals (Literals.FROM)))
            throw new BadQueryException ("expected DAV:from");
       
        Element scope = fromElement.getChild (Literals.SCOPE, namespace);
       
View Full Code Here

        return new EndpointDescription(map);
    }

    @SuppressWarnings("unchecked")
    private static EndpointDescription getLegacyEndpointDescription(Element el) {
        Namespace ns = Namespace.getNamespace(REMOTE_SERVICES_NS);

        List<String> iNames = getProvidedInterfaces(el.getChildren(PROVIDE_INTERFACE_ELEMENT, ns));
        Map<String, Object> remoteProps = getProperties(el.getChildren(PROPERTY_ELEMENT, ns));
       
        if (remoteProps.get(Constants.OBJECTCLASS) == null) {
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public static String getEndpointDescriptionXML(Map m) {
        Document d = new Document();
        Namespace ns = Namespace.getNamespace("http://www.osgi.org/xmlns/rsa/v1.0.0");
        Element rootEl = new Element("endpoint-descriptions", ns);
        d.setRootElement(rootEl);
        Element contentEl = new Element("endpoint-description", ns);
        rootEl.addContent(contentEl);
View Full Code Here

        if (d.getRootElement().getNamespaceURI().equals(REMOTE_SERVICES_ADMIN_NS)) {
            elements.addAll(d.getRootElement().getChildren(ENDPOINT_DESCRIPTION_ELEMENT,
                    Namespace.getNamespace(REMOTE_SERVICES_ADMIN_NS)));
        }
       
        Namespace nsOld = Namespace.getNamespace(REMOTE_SERVICES_NS);
        elements.addAll(d.getRootElement().getChildren(SERVICE_DESCRIPTION_ELEMENT, nsOld));
       
        return elements;
    }   
View Full Code Here

TOP

Related Classes of org.jdom.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.