Package org.apache.slide.content

Examples of org.apache.slide.content.NodeProperty$Kind


        Element aProperties=new Element("properties");
       
        for (Enumeration aEnum=aDescriptor.enumerateProperties();aEnum.hasMoreElements();) {
            Object aObject=aEnum.nextElement();
            // System.out.println("---------- encodeRevisionDescriptor aObject="+aObject+" "+aObject.getClass().getName());
            NodeProperty aProp=(NodeProperty)aObject;
            aProperties.addContent(encodeNodeProperty(aProp));
        }
        aRevisions.addContent(aProperties);
        return aRevisions;
    }
View Full Code Here


            Hashtable aProperties=new Hashtable();
            Element aPropertiesElement=(Element)aChild.getChild("properties");
            List aPropertiesList=aPropertiesElement.getChildren();
            for (int k=0;k<aPropertiesList.size();k++) {
                Element aProperty=(Element)aPropertiesList.get(k);
                NodeProperty aProp=decodeNodeProperty(aProperty,aUri);
                String key =
                    aProperty.getAttributeValue("namespace")+aProperty.getAttributeValue("name");
                aProperties.put(key,aProp);
            }
            NodeRevisionDescriptor aNode=new NodeRevisionDescriptor(aRevisionNumber,aBranchName,aLabels,aProperties);
View Full Code Here

        Vector aPermission=new Vector();
        for (int i=0;i<aList.size();i++) {
            Element aChild=(Element)aList.get(i);
            aPermission.addElement(decodePermission(aChild,aUri));
        }
        return new NodeProperty(aName,aValue,aNamespace,aType,aProtected);
    }
View Full Code Here

        }
        if (m_descriptor == null) {
            // FIXME: is this correct?
            return true;
        }
        NodeProperty property = m_descriptor.getProperty("resourcetype");
        if (property != null && ((String) property.getValue()).startsWith("<collection/>")) {
            return true;
        }
        return false;
    }
View Full Code Here

        if (m_descriptor == null) {
            return null;
        }

        final String quote = "\"";
        NodeProperty property = m_descriptor.getProperty(name, namespace);

        if (property == null) {
            return null;
        }

        String pre = "<"+name+" xmlns="+quote+namespace+quote+" >";
        String post = "</"+name+" >";

        StringReader reader = new StringReader(pre+property.getValue().toString()+post);
        InputSource src = new InputSource(reader);

        DOMParser parser = null;
        Document doc = null;
View Full Code Here

        try {
            parser = (DOMParser) m_manager.lookup(DOMParser.ROLE);
            final String quote = "\"";
            Enumeration e = m_descriptor.enumerateProperties();
            while (e.hasMoreElements()) {
                NodeProperty property = (NodeProperty) e.nextElement();
                String name = property.getName();
                String namespace = property.getNamespace();
                String pre = "<"+name+" xmlns="+quote+namespace+quote+" >";
                String post = "</"+name+" >";
                xml = pre+property.getValue().toString()+post;
               
                StringReader reader = new StringReader(xml);
                Document doc = parser.parseDocument(new InputSource(reader));
                properties.add(new SourceProperty(doc.getDocumentElement()));
            }
View Full Code Here

        Content content = nat.getContentHelper();
       
        try {
            NodeRevisionDescriptors revisions = content.retrieve(ROOT,userUri);
            NodeRevisionDescriptor revision = content.retrieve(ROOT,revisions);
            NodeProperty property = revision.getProperty(
                "password",NodeProperty.SLIDE_NAMESPACE);
           
            return property.getValue().equals(password);
        }
        catch (Exception e) {
            e.printStackTrace();
            throw e;
        }
View Full Code Here

           
            // create the user descriptor
            NodeRevisionDescriptor descriptor = new NodeRevisionDescriptor();
            descriptor.setCreationDate(new Date());
            descriptor.setLastModified(new Date());
            descriptor.setProperty(new NodeProperty(
                "password",password,NodeProperty.SLIDE_NAMESPACE));
            content.create(slideToken,userUri,descriptor,null);
           
            nat.commit();
        }
View Full Code Here

            // check if the subject exists
            structure.retrieve(slideToken,subjectUri);
           
            NodeRevisionDescriptors descriptors = content.retrieve(slideToken,objectUri);
            NodeRevisionDescriptor descriptor = content.retrieve(slideToken,descriptors);
            NodeProperty property = descriptor.getProperty("group-member-set","DAV:");
           
            String value = null;
            if (property != null) {
                value = (String) property.getValue();
                if (value.indexOf(subjectUri) != -1) {
                    // user already a member of this group
                    return;
                }
            }
View Full Code Here

       
        try {
           
            NodeRevisionDescriptors revisions = content.retrieve(slideToken,objectUri);
            NodeRevisionDescriptor revision = content.retrieve(slideToken,revisions);
            NodeProperty property = revision.getProperty("group-member-set","DAV:");
           
            if (property == null) {
                // group has no members
                return;
            }
            String value = (String) property.getValue();
           
            int index = value.indexOf(subjectUri);
            if (index == -1) {
                // subject is not a member of this group
                return;
View Full Code Here

TOP

Related Classes of org.apache.slide.content.NodeProperty$Kind

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.