Examples of ObjectInfo


Examples of com.db4o.ext.ObjectInfo

    final String databaseID;
   
    if(mDB == null)
      databaseID = "mDB==null!";
    else {
      final ObjectInfo oi = mDB.getObjectInfo(this);
      if(oi == null)
        databaseID = "object not stored";
      else
        databaseID = Long.toString(oi.getInternalID());
    }
   
    return super.toString() + " (databaseID: " + databaseID + ")";
  }
View Full Code Here

Examples of com.emc.esu.api.ObjectInfo

    }

    private ObjectInfo adaptObjectInfo( com.emc.atmos.api.bean.ObjectInfo objectInfo ) throws JAXBException {
        if ( objectInfo == null ) return null;

        ObjectInfo newObjectInfo = new ObjectInfo();
        newObjectInfo.setObjectId( (ObjectId) adaptIdentifier( objectInfo.getObjectId() ) );
        newObjectInfo.setSelection( objectInfo.getSelection() );

        if ( objectInfo.getExpiration() != null ) {
            ObjectExpiration objectExpiration = new ObjectExpiration();
            objectExpiration.setEnabled( objectInfo.getExpiration().isEnabled() );
            objectExpiration.setEndAt( objectInfo.getExpiration().getEndAt() );
            newObjectInfo.setExpiration( objectExpiration );
        }

        if ( objectInfo.getRetention() != null ) {
            ObjectRetention objectRetention = new ObjectRetention();
            objectRetention.setEnabled( objectInfo.getRetention().isEnabled() );
            objectRetention.setEndAt( objectInfo.getRetention().getEndAt() );
            newObjectInfo.setRetention( objectRetention );
        }

        if ( objectInfo.getReplicas() != null ) {
            List<ObjectReplica> replicas = new ArrayList<ObjectReplica>();
            for ( Replica replica : objectInfo.getReplicas() ) {
                ObjectReplica newReplica = new ObjectReplica();
                newReplica.setId( "" + replica.getId() );
                newReplica.setCurrent( replica.isCurrent() );
                newReplica.setLocation( replica.getLocation() );
                newReplica.setReplicaType( replica.getType() );
                newReplica.setStorageType( replica.getStorageType() );
                replicas.add( newReplica );
            }
            newObjectInfo.setReplicas( replicas );
        }

        StringWriter xmlString = new StringWriter();
        getMarshaller().marshal( objectInfo, xmlString );
        newObjectInfo.setRawXml( xmlString.toString() );

        return newObjectInfo;
    }
View Full Code Here

Examples of com.threerings.miso.data.ObjectInfo

            Point ts = MisoUtil.tileToScreen(_metrics, tx, ty, new Point());

//             log.info("Added portal", "portal", portal, "screen", StringUtil.toString(p), "tile",
//                StringUtil.coordsToString(tx, ty), "tscreen", StringUtil.toString(ts));

            ObjectInfo info = new ObjectInfo(0, tx, ty);
            info.action = "portal:" + portal.portalId;

            // TODO: cache me
            ObjectTile tile = new PortalObjectTile(
                ts.x + _metrics.tilehwid - p.x + (PORTAL_ICON_WIDTH / 2),
View Full Code Here

Examples of eu.mosaic.cloud.driver.ObjectInfo

    for (S3ObjectSummary crtObject : objSummaries) {
      String fileName = crtObject.getKey();
      long fileSize = crtObject.getSize();
      Date lastModifDate = crtObject.getLastModified();

      ObjectInfo crtDsObj = new ObjectInfo(fileName, fileSize, lastModifDate);
      objects.add(crtDsObj);
    }

    return objects;
  }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.server.ObjectInfo

     * change this behavior, override this method.</li>
     * </ul>
     */
    public ObjectInfo getObjectInfo(String repositoryId, String objectId) {
        Map<String, ObjectInfo> oim = getObjectInfoMap();
        ObjectInfo info = oim.get(objectId);
        if (info == null) {
            // object info has not been found -> create one
            try {
                // switch off object info collection to avoid side effects
                addObjectInfos = false;
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.server.ObjectInfo

            String relativePathSegment, UrlBuilder baseUrl, boolean isRoot) throws XMLStreamException, JAXBException {
        if (object == null) {
            throw new CmisRuntimeException("Object not set!");
        }

        ObjectInfo info = service.getObjectInfo(repositoryId, object.getId());
        if (info == null) {
            throw new CmisRuntimeException("Object Info not found for: " + object.getId());
        }

        // start
        entry.startEntry(isRoot);

        // write object
        String contentSrc = null;

        if (info.hasContent()) {
            UrlBuilder contentSrcBuilder = compileUrlBuilder(baseUrl, RESOURCE_CONTENT, info.getId());
            if (info.getFileName() != null) {
                contentSrcBuilder.addPathSegment(info.getFileName());
            }

            contentSrc = contentSrcBuilder.toString();
        }

        entry.writeObject(object, info, contentSrc, info.getContentType(), pathSegment, relativePathSegment);

        // write links
        entry.writeServiceLink(baseUrl.toString(), repositoryId);

        entry.writeSelfLink(compileUrl(baseUrl, RESOURCE_ENTRY, info.getId()), info.getId());
        entry.writeEnclosureLink(compileUrl(baseUrl, RESOURCE_ENTRY, info.getId()));
        entry.writeEditLink(compileUrl(baseUrl, RESOURCE_ENTRY, info.getId()));
        entry.writeDescribedByLink(compileUrl(baseUrl, RESOURCE_TYPE, info.getTypeId()));
        entry.writeAllowableActionsLink(compileUrl(baseUrl, RESOURCE_ALLOWABLEACIONS, info.getId()));

        if (info.hasParent()) {
            entry.writeUpLink(compileUrl(baseUrl, RESOURCE_PARENTS, info.getId()), Constants.MEDIATYPE_FEED);
        }

        if (info.getBaseType() == BaseTypeId.CMIS_FOLDER) {
            entry.writeDownLink(compileUrl(baseUrl, RESOURCE_CHILDREN, info.getId()), Constants.MEDIATYPE_FEED);

            if (info.supportsDescendants()) {
                entry.writeDownLink(compileUrl(baseUrl, RESOURCE_DESCENDANTS, info.getId()),
                        Constants.MEDIATYPE_DESCENDANTS);
            }

            if (info.supportsFolderTree()) {
                entry.writeFolderTreeLink(compileUrl(baseUrl, RESOURCE_FOLDERTREE, info.getId()));
            }
        }

        if (info.getVersionSeriesId() != null) {
            UrlBuilder vsUrl = compileUrlBuilder(baseUrl, RESOURCE_VERSIONS, info.getId());
            vsUrl.addParameter(Constants.PARAM_VERSION_SERIES_ID, info.getVersionSeriesId());
            entry.writeVersionHistoryLink(vsUrl.toString());
        }

        if (!info.isCurrentVersion()) {
            UrlBuilder cvUrl = compileUrlBuilder(baseUrl, RESOURCE_ENTRY, info.getId());
            cvUrl.addParameter(Constants.PARAM_RETURN_VERSION, ReturnVersion.LATEST);
            entry.writeEditLink(cvUrl.toString());
        }

        if (info.getBaseType() == BaseTypeId.CMIS_DOCUMENT) {
            entry.writeEditMediaLink(compileUrl(baseUrl, RESOURCE_CONTENT, info.getId()), info.getContentType());
        }

        if (info.getWorkingCopyId() != null) {
            entry.writeWorkingCopyLink(compileUrl(baseUrl, RESOURCE_ENTRY, info.getWorkingCopyId()));
        }

        if (info.getWorkingCopyOriginalId() != null) {
            entry.writeViaLink(compileUrl(baseUrl, RESOURCE_ENTRY, info.getWorkingCopyOriginalId()));
        }

        if (info.getRenditionInfos() != null) {
            for (RenditionInfo ri : info.getRenditionInfos()) {
                UrlBuilder rurl = compileUrlBuilder(baseUrl, RESOURCE_CONTENT,
                        info.getId());
                rurl.addParameter(Constants.PARAM_STREAM_ID, ri.getId());
                entry.writeAlternateLink(rurl.toString(), ri.getContenType(),
                        ri.getKind(), ri.getTitle(), ri.getLength());
            }
        }

        if (info.hasAcl()) {
            entry.writeAclLink(compileUrl(baseUrl, RESOURCE_ACL, info.getId()));
        }

        if (info.supportsPolicies()) {
            entry.writePoliciesLink(compileUrl(baseUrl, RESOURCE_POLICIES, info.getId()));
        }

        if (info.supportsRelationships()) {
            entry.writeRelationshipsLink(compileUrl(baseUrl, RESOURCE_RELATIONSHIPS, info.getId()));
        }

        if (info.getRelationshipSourceIds() != null) {
            for (String id : info.getRelationshipSourceIds()) {
                entry.writeRelationshipSourceLink(compileUrl(baseUrl, RESOURCE_ENTRY, id));
            }
        }

        if (info.getRelationshipTargetIds() != null) {
            for (String id : info.getRelationshipTargetIds()) {
                entry.writeRelationshipTargetLink(compileUrl(baseUrl, RESOURCE_ENTRY, id));
            }
        }

        // write children
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.server.ObjectInfo

            String relativePathSegment, UrlBuilder baseUrl, boolean isRoot) throws XMLStreamException, JAXBException {
        if (object == null) {
            throw new CmisRuntimeException("Object not set!");
        }

        ObjectInfo info = null;
        try {
            info = service.getObjectInfo(repositoryId, object.getId());
        } catch (Exception e) {
            // ignore all exceptions
        }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.server.ObjectInfo

        // execute
        Holder<String> checkOutId = new Holder<String>(parser.getId());
        service.checkOut(repositoryId, checkOutId, null, null);

        ObjectInfo objectInfo = service.getObjectInfo(repositoryId, checkOutId.getValue());
        if (objectInfo == null) {
            throw new CmisRuntimeException("Object Info is missing!");
        }

        ObjectData object = objectInfo.getObject();
        if (object == null) {
            throw new CmisRuntimeException("Object is null!");
        }

        if (object.getId() == null) {
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.server.ObjectInfo

        AtomFeed feed = new AtomFeed();
        feed.startDocument(response.getOutputStream());
        feed.startFeed(true);

        // write basic Atom feed elements
        ObjectInfo latestObjectInfo = service.getObjectInfo(repositoryId, versions.get(0).getId());
        ObjectInfo firstObjectInfo = service.getObjectInfo(repositoryId, versions.get(versions.size() - 1).getId());

        feed.writeFeedElements(versionSeriesId, firstObjectInfo.getCreatedBy(), latestObjectInfo.getName(),
                latestObjectInfo.getLastModificationDate(), null, null);

        // write links
        UrlBuilder baseUrl = compileBaseUrl(request, repositoryId);
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.server.ObjectInfo

                createProperties(cp, null, typeCache), folderId,
                createContentStream(request), versioningState,
                createPolicies(cp), createAddAcl(cp),
                createRemoveAcl(cp), null);

        ObjectInfo objectInfo = service.getObjectInfo(repositoryId, newObjectId);
        if (objectInfo == null) {
            throw new CmisRuntimeException("Object Info is missing!");
        }

        ObjectData object = objectInfo.getObject();
        if (object == null) {
            throw new CmisRuntimeException("Object is null!");
        }

        JSONObject jsonObject = JSONConverter.convert(object, typeCache);
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.