Examples of CollectionInfo


Examples of com.omertron.themoviedbapi.model.CollectionInfo

     */
    @Test
    public void testGetCollectionInfo() throws MovieDbException {
        LOG.info("getCollectionInfo");
        String language = "";
        CollectionInfo result = tmdb.getCollectionInfo(ID_COLLECTION_STAR_WARS, language);
        assertFalse("No collection information", result.getParts().isEmpty());
    }
View Full Code Here

Examples of com.semagia.atomico.server.dm.impl.CollectionInfo

        final String linkAdr = "http://www.semagia.com/link";
        final URI link = URI.create(linkAdr);
        final String id = "http://www.semagia.com/test";
        final String title = "title";
        final long updated = now();
        final ICollectionInfo collInfo = new CollectionInfo(id, title, updated, "collId");
        feed.addEntry(collInfo, link);
        assertEquals(1, feed.getEntries().size());
        final ICollectionEntry entry = feed.getEntries().iterator().next();
        assertNotNull(entry);
        assertEquals(id, entry.getId());
View Full Code Here

Examples of com.semagia.atomico.server.dm.impl.CollectionInfo

            // noop.
        }
        final String id = "http://www.semagia.com/test";
        final String title = "title";
        final long updated = now();
        final ICollectionInfo collInfo = new CollectionInfo(id, title, updated, "collId");
        try {
            feed.addEntry(collInfo, null);
            fail("feed.addEntry(info, null) is illegal");
        }
        catch (IllegalArgumentException ex) {
View Full Code Here

Examples of org.apache.abdera.protocol.server.CollectionInfo

    public Collection<CollectionInfo> getCollections(RequestContext request) {
        LinkedList<CollectionInfo> result = new LinkedList<CollectionInfo>();
        Feed feed;
        Parser parser = Abdera.getInstance().getParser();
        CollectionInfo info;
        Storage storage = getStorage();
        for (String id : getFeedIds(request)) {
            try {
                feed = (Feed) parser.parse(
                        new StringReader(storage.readFeed(id))).getRoot();
View Full Code Here

Examples of org.exolab.castor.builder.info.CollectionInfo

            String vName = memberName + "List";

            // if xmlName is null it means that
            // we are processing a container object (group)
            // so we need to adjust the name of the members of the collection
            CollectionInfo cInfo;
            cInfo = this.getInfoFactory().createCollection(xsType, vName, memberName,
                                                       component.getCollectionType(), getJavaNaming(), useJava50);

            XSListType xsList = cInfo.getXSList();
            if (!simpleTypeCollection) {
                xsList.setMaximumSize(maxOccurs);
                xsList.setMinimumSize(minOccurs);
            } else {
                if (xsList instanceof XSList) {
View Full Code Here

Examples of org.exolab.castor.builder.info.CollectionInfo

    private void createResetMethod(final FieldInfo member,
            final String localClassName,
            final JSourceCode jsc) {
        // -- reset method (handle collections only)
        if (new XMLInfoNature(member).isMultivalued()) {
            CollectionInfo cInfo = (CollectionInfo) member;
            // FieldInfo content = cInfo.getContent();
            jsc.add("public void resetValue(Object object)"
                    + " throws IllegalStateException, IllegalArgumentException {");
            jsc.indent();
            jsc.add("try {");
            jsc.indent();
            jsc.add(localClassName);
            jsc.append(" target = (");
            jsc.append(localClassName);
            jsc.append(") object;");
            String cName = _config.getJavaNaming().toJavaClassName(cInfo.getElementName());
            // if (cInfo instanceof CollectionInfoJ2) {
            // jsc.add("target.clear" + cName + "();");
            // } else {
            jsc.add("target.removeAll" + cName + "();");
            // }
View Full Code Here

Examples of org.exolab.castor.builder.info.CollectionInfo

                                           final String elementName, final String collectionName,
                                           final JavaNaming javaNaming, final boolean useJava50) {
        String temp = collectionName;
        if (temp == null || temp.length() == 0) { temp = _default; }

        final CollectionInfo cInfo;
        if (temp.equalsIgnoreCase(SourceGeneratorConstants.FIELD_INFO_VECTOR)) {
             cInfo = new CollectionInfo(contentType, name, elementName, useJava50,
                     this.collectionMemberAndAccessorFactory, this.fieldMemberAndAccessorFactory);
        } else if (temp.equalsIgnoreCase(SourceGeneratorConstants.FIELD_INFO_ARRAY_LIST)) {
             cInfo = new CollectionInfoJ2(contentType, name, elementName, "arraylist", useJava50,
                     this.collectionJ2MemberAndAccessorFactory, this.fieldMemberAndAccessorFactory);
        } else if (temp.equalsIgnoreCase(SourceGeneratorConstants.FIELD_INFO_ODMG)) {
             cInfo = new CollectionInfoODMG30(contentType, name, elementName, useJava50,
                     this.collectionODMG30MemberAndAccessorFactory, this.fieldMemberAndAccessorFactory);
        } else if (temp.equalsIgnoreCase(SourceGeneratorConstants.FIELD_INFO_COLLECTION)) {
            cInfo = new CollectionInfoJ2Collection(contentType, name, elementName, useJava50,
                    this.collectionJ2NoIndexMemberAndAccessorFactory, this.fieldMemberAndAccessorFactory);
        } else if (temp.equalsIgnoreCase(SourceGeneratorConstants.FIELD_INFO_SET)) {
            cInfo = new CollectionInfoJ2Set(contentType, name, elementName, useJava50,
                    this.collectionJ2NoIndexMemberAndAccessorFactory, this.fieldMemberAndAccessorFactory);
        } else if (temp.equalsIgnoreCase(SourceGeneratorConstants.FIELD_INFO_SORTED_SET)) {
            cInfo = new CollectionInfoJ2SortedSet(contentType, name, elementName, useJava50,
                    this.collectionJ2NoIndexMemberAndAccessorFactory, this.fieldMemberAndAccessorFactory);
        } else {
            throw new InvalidParameterException("Unrecognized collection type: " + temp);
        }

        //--not sure it is pluggable enough, it is not really beautiful to specify
        //--the collection to use here
        cInfo.setCreateExtraMethods(_extraMethods);
        if (_referenceSuffix != null) {
            cInfo.setReferenceMethodSuffix(_referenceSuffix);
        }
        if (_bound) { cInfo.setBound(true); }
        return cInfo;
    }
View Full Code Here

Examples of org.exolab.castor.builder.info.CollectionInfo

    /**
     * {@inheritDoc}
     */
    public void generateInitializerCode(final FieldInfo fieldInfo,
            final JSourceCode sourceCode) {
        CollectionInfo collectionInfo = (CollectionInfo) fieldInfo;
        sourceCode.add("this.");
        sourceCode.append(fieldInfo.getName());
        sourceCode.append(" = new ");
        JType jType = collectionInfo.getXSList().getJType();
        sourceCode.append(((JCollectionType) jType).getInstanceName());
        sourceCode.append("();");
    } // -- generateConstructorCode
View Full Code Here

Examples of org.exolab.castor.builder.info.CollectionInfo

     * {@inheritDoc}
     */
    public final void createAccessMethods(final FieldInfo fieldInfo,
            final JClass jClass, final boolean useJava50,
            final AnnotationBuilder[] annotationBuilders) {
        CollectionInfo collectionInfo = (CollectionInfo) fieldInfo;
        this.createAddAndRemoveMethods(collectionInfo, jClass);
        this.createGetAndSetMethods(collectionInfo, jClass, useJava50, annotationBuilders);
        this.createGetCountMethod(collectionInfo, jClass);
        this.createCollectionIterationMethods(collectionInfo, jClass, useJava50);
    } // -- createAccessMethods
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.