Package org.apache.abdera.model

Examples of org.apache.abdera.model.Element


            return null;
        }
    }

    public String getName() {
        Element name = getNameElement();
        return (name != null) ? name.getText() : null;
    }
View Full Code Here


    public Element setEmail(String email) {
        complete();
        if (email != null) {
            FOMFactory fomfactory = (FOMFactory)factory;
            Element el = fomfactory.newEmail(null);
            el.setText(email);
            _setChild(EMAIL, (OMElement)el);
            return el;
        } else {
            _removeChildren(EMAIL, false);
            return null;
View Full Code Here

            return null;
        }
    }

    public String getEmail() {
        Element email = getEmailElement();
        return (email != null) ? email.getText() : null;
    }
View Full Code Here

        return FOMHelper.getCategories(this, scheme);
    }

    public Entry addCategory(Category category) {
        complete();
        Element el = category.getParentElement();
        if (el != null && el instanceof Categories) {
            Categories cats = category.getParentElement();
            category = (Category)category.clone();
            try {
                if (category.getScheme() == null && cats.getScheme() != null)
View Full Code Here

            public void run() {
                try {
                    LoggingThread.markSilent(true);
                    List<? extends Element> elements = c.convert(batch);
                    for (int i = 0; i < elements.size(); i++) {
                        Element element = elements.get(i);
                        if (!d.deliver(element)) {
                            System.err.println("Delivery to " + d.getEndpointAddress()
                                + " failed, shutting engine down");
                            List<LogRecord> undelivered = null;
                            if (i == 0) {
View Full Code Here

        List<org.apache.cxf.management.web.logging.LogRecord> list =
            new ArrayList<org.apache.cxf.management.web.logging.LogRecord>();
        for (Element element : el.getElements()) {
            org.apache.cxf.management.web.logging.LogRecord record =
                new org.apache.cxf.management.web.logging.LogRecord();
            Element loggerName = element.getFirstChild(
                                     new QName("http://cxf.apache.org/log", "loggerName", "log"));
            if (loggerName != null) {
                record.setLoggerName(loggerName.getText());
            }
            Element throwable = element.getFirstChild(
                                     new QName("http://cxf.apache.org/log", "throwable", "log"));
            if (throwable != null) {
                record.setThrowable(throwable.getText());
            }
            list.add(record);
        }
        records.setLogRecords(list);
        return records;
View Full Code Here

        }
        return dom;
    }

    protected Element domToFom(org.w3c.dom.Element element, SecurityOptions options) {
        Element el = null;
        if (element != null) {
            try {
                Serializer ser = new XMLSerializer();
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                ser.setOutputByteStream(out);
View Full Code Here

        } else if (!isFeed && isCollection) {
            reportError("Atom entry can only be created from a single object", null);
        }
        Factory factory = Abdera.getNewFactory();
       
        Element atomElement = null;
        try {
            if (isFeed && !isCollection) {
                atomElement = createFeedFromCollectionWrapper(factory, o, cls);
            } else if (!isFeed && !isCollection) {
                atomElement = createEntryFromObject(factory, o, cls);
View Full Code Here

            log.debug(
                    "Cached resource returned since no modification has been done on the resource");
            return cache.getCachedResource(path);
        }
        String eTag = clientResponse.getHeader("ETag");
        Element introspection = clientResponse.getDocument().getRoot();
        ResourceImpl resource;
        if (introspection instanceof Feed) {
            // This is a collection
            Feed feed = (Feed) introspection;
            String state = feed.getSimpleExtension(new QName(APPConstants.NAMESPACE, "state"));
View Full Code Here

                throw new ResourceNotFoundException(path);
            }
            abderaClient.teardown();
            throw new RegistryException(clientResponse.getStatusText());
        }
        Element introspection = clientResponse.getDocument().getRoot();
        if (!(introspection instanceof Feed)) {
            abderaClient.teardown();
            throw new RegistryException("Got " + introspection.getQName() +
                    " when expecting <feed>!");
        }
        CollectionImpl resource;
        // This is a collection
        Feed feed = (Feed) introspection;
View Full Code Here

TOP

Related Classes of org.apache.abdera.model.Element

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.