Examples of AtomElement


Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement

    /**
     * Parses a text tag and convert it into an integer.
     */
    private static AtomElement parseBigInteger(XMLStreamReader parser) throws Exception {
        QName name = parser.getName();
        return new AtomElement(name, new BigInteger(readText(parser)));
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement

        next(parser);

        while (true) {
            int event = parser.getEventType();
            if (event == XMLStreamReader.START_ELEMENT) {
                AtomElement element = parseWorkspaceElement(parser);

                // check if we can extract the workspace id
                if ((element != null) && (element.getObject() instanceof CmisRepositoryInfoType)) {
                    workspace.setId(((CmisRepositoryInfoType) element.getObject()).getRepositoryId());
                }

                // add to workspace
                workspace.addElement(element);
            } else if (event == XMLStreamReader.END_ELEMENT) {
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement

        // walk through all tags in entry
        while (true) {
            int event = parser.getEventType();
            if (event == XMLStreamReader.START_ELEMENT) {
                AtomElement element = parseElement(parser);
                if (element != null) {
                    // add to entry
                    result.addElement(element);

                    // find and set object id
                    if (element.getObject() instanceof CmisObjectType) {
                        for (CmisProperty prop : ((CmisObjectType) element.getObject()).getProperties().getProperty()) {
                            if (EnumPropertiesBase.CMIS_OBJECT_ID.value().equals(prop.getPropertyDefinitionId())) {
                                result.setId(((CmisPropertyId) prop).getValue().get(0));
                            }
                        }
                    } else if (element.getObject() instanceof CmisTypeDefinitionType) {
                        result.setId(((CmisTypeDefinitionType) element.getObject()).getId());
                    }
                }
            } else if (event == XMLStreamReader.END_ELEMENT) {
                break;
            } else {
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement

    /**
     * Parses an Allowable Actions document.
     */
    private static AtomAllowableActions parseAllowableActions(XMLStreamReader parser) throws Exception {
        AtomElement elemenet = unmarshalElement(parser, CmisAllowableActionsType.class);
        return new AtomAllowableActions((CmisAllowableActionsType) elemenet.getObject());
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement

    /**
     * Parses an ACL document.
     */
    private static AtomAcl parseACL(XMLStreamReader parser) throws Exception {
        AtomElement elemenet = unmarshalElement(parser, CmisAccessControlListType.class);
        return new AtomAcl((CmisAccessControlListType) elemenet.getObject());
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement

        QName name = parser.getName();

        Unmarshaller u = JaxBHelper.createUnmarshaller();
        JAXBElement<T> object = u.unmarshal(parser, cmisType);

        return new AtomElement(name, object.getValue());
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement

    /**
     * Parses a children element.
     */
    private AtomElement parseChildren(XMLStreamReader parser) throws Exception {
        AtomElement result = null;
        QName childName = parser.getName();

        next(parser);

        // walk through the children tag
        while (true) {
            int event = parser.getEventType();
            if (event == XMLStreamReader.START_ELEMENT) {
                QName name = parser.getName();

                if (Constants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
                    if (TAG_FEED.equals(name.getLocalPart())) {
                        result = new AtomElement(childName, parseFeed(parser));
                    } else {
                        skip(parser);
                    }
                } else {
                    skip(parser);
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement

            }
        }

        next(parser);

        return new AtomElement(name, result);
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement

            }
        }

        next(parser);

        return new AtomElement(name, result);
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomElement

        }

        // skip enclosed tags, if any
        skip(parser);

        return new AtomElement(name, result);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.