Package org.alfresco.webservice.content

Examples of org.alfresco.webservice.content.Content


          PropertiesUtils.ingestProperties(rd, properties, contentProperties);

          // binaries ingestion - in Alfresco we could have more than one binary for each node (custom content models)
          for (NamedValue contentProperty : contentProperties) {
            //we are ingesting all the binaries defined as d:content property in the Alfresco content model
            Content binary = ContentReader.read(endpoint, username, password, socketTimeout, session, predicate, contentProperty.getName());
            fileLength = binary.getLength();
            is = ContentReader.getBinary(endpoint, binary, username, password, socketTimeout, session);
            rd.setBinary(is, fileLength);
           
            //id is the node reference only if the node has an unique content stream
            //For a node with a single d:content property: id = node reference
            String id = PropertiesUtils.getNodeReference(properties);
           
            //For a node with multiple d:content properties: id = node reference;QName
            //The QName of a property of type d:content will be appended to the node reference
            if(contentProperties.size()>1){
              id = id + INGESTION_SEPARATOR_FOR_MULTI_BINARY + contentProperty.getName();
            }
           
            //version label
            String version = PropertiesUtils.getVersionLabel(properties);
           
            //the document uri is related to the specific d:content property available in the node
            //we want to ingest each content stream that are nested in a single node
            String documentURI = binary.getUrl();
            activities.ingestDocument(id, version, documentURI, rd);
          }
         
          AuthenticationUtils.endSession();
         
View Full Code Here


          PropertiesUtils.ingestProperties(rd, properties, contentProperties);

          // binaries ingestion - in Alfresco we could have more than one binary for each node (custom content models)
          for (NamedValue contentProperty : contentProperties) {
            //we are ingesting all the binaries defined as d:content property in the Alfresco content model
            Content binary = ContentReader.read(endpoint, username, password, socketTimeout, session, predicate, contentProperty.getName());
            fileLength = binary.getLength();
            is = ContentReader.getBinary(endpoint, binary, username, password, socketTimeout, session);
            rd.setBinary(is, fileLength);
           
            //id is the node reference only if the node has an unique content stream
            //For a node with a single d:content property: id = node reference
            String id = PropertiesUtils.getNodeReference(properties);
           
            //For a node with multiple d:content properties: id = node reference;QName
            //The QName of a property of type d:content will be appended to the node reference
            if(contentProperties.size()>1){
              id = id + INGESTION_SEPARATOR_FOR_MULTI_BINARY + contentProperty.getName();
            }
           
            //version label
            String version = PropertiesUtils.getVersionLabel(properties);
           
            //the document uri is related to the specific d:content property available in the node
            //we want to ingest each content stream that are nested in a single node
            String documentURI = binary.getUrl();
            activities.ingestDocument(id, version, documentURI, rd);
          }
         
          AuthenticationUtils.endSession();
         
View Full Code Here

          // binaries ingestion - in Alfresco we could have more than one binary for each node (custom content models)
          List<NamedValue> contentProperties = PropertiesUtils.getContentProperties(properties);
          for (NamedValue contentProperty : contentProperties) {
            //we are ingesting all the binaries defined as d:content property in the Alfresco content model
            Content binary = ContentReader.read(username, password, session, predicate, contentProperty.getName());
            fileLength = binary.getLength();
            is = ContentReader.getBinary(binary, username, password, session);
            rd.setBinary(is, fileLength);
          }

        } finally {
View Full Code Here

          PropertiesUtils.ingestProperties(rd, properties, contentProperties);

          // binaries ingestion - in Alfresco we could have more than one binary for each node (custom content models)
          for (NamedValue contentProperty : contentProperties) {
            //we are ingesting all the binaries defined as d:content property in the Alfresco content model
            Content binary = ContentReader.read(username, password, session, predicate, contentProperty.getName());
            fileLength = binary.getLength();
            is = ContentReader.getBinary(binary, username, password, session);
            rd.setBinary(is, fileLength);
           
            //id is the node reference only if the node has an unique content stream
            //For a node with a single d:content property: id = node reference
            String id = PropertiesUtils.getNodeReference(properties);
           
            //For a node with multiple d:content properties: id = node reference;QName
            //The QName of a property of type d:content will be appended to the node reference
            if(contentProperties.size()>1){
              id = id + INGESTION_SEPARATOR_FOR_MULTI_BINARY + contentProperty.getName();
            }
           
            //version label
            String version = PropertiesUtils.getVersionLabel(properties);
           
            //the document uri is related to the specific d:content property available in the node
            //we want to ingest each content stream that are nested in a single node
            String documentURI = binary.getUrl();
            activities.ingestDocument(id, version, documentURI, rd);
          }
         
        } catch (ParseException e) {
          errorCode = "IO ERROR";
View Full Code Here

          // binaries ingestion - in Alfresco we could have more than one binary for each node (custom content models)
          List<NamedValue> contentProperties = PropertiesUtils.getContentProperties(properties);
          for (NamedValue contentProperty : contentProperties) {
            //we are ingesting all the binaries defined as d:content property in the Alfresco content model
            Content binary = ContentReader.read(username, password, session, predicate, contentProperty.getName());
            fileLength = binary.getLength();
            is = ContentReader.getBinary(binary, username, password, session);
            rd.setBinary(is, fileLength);
           
            //id is the node reference only if the node has an unique content stream
            //For a node with a single d:content property: id = node reference
            String id = PropertiesUtils.getNodeReference(properties);
           
            //For a node with multiple d:content properties: id = node reference;QName
            //The QName of a property of type d:content will be appended to the node reference
            if(contentProperties.size()>1){
              id = id + INGESTION_SEPARATOR_FOR_MULTI_BINARY + contentProperty.getName();
            }
           
            //version label
            String version = PropertiesUtils.getVersionLabel(properties);
           
            //the document uri is related to the specific d:content property available in the node
            //we want to ingest each content stream that are nested in a single node
            String documentURI = binary.getUrl();
            activities.ingestDocument(id, version, documentURI, rd);
          }
         
        } finally {
          try {
View Full Code Here

            PropertiesUtils.ingestProperties(rd, properties, contentProperties);

            // binaries ingestion - in Alfresco we could have more than one binary for each node (custom content models)
            for (NamedValue contentProperty : contentProperties) {
              //we are ingesting all the binaries defined as d:content property in the Alfresco content model
              Content binary = ContentReader.read(endpoint, username, password, socketTimeout, session, predicate, contentProperty.getName());
              fileLength = binary.getLength();
              is = ContentReader.getBinary(endpoint, binary, username, password, socketTimeout, session);
              rd.setBinary(is, fileLength);
             
              //id is the node reference only if the node has an unique content stream
              //For a node with a single d:content property: id = node reference
              String id = PropertiesUtils.getNodeReference(properties);
             
              //For a node with multiple d:content properties: id = node reference;QName
              //The QName of a property of type d:content will be appended to the node reference
              if(contentProperties.size()>1){
                id = id + INGESTION_SEPARATOR_FOR_MULTI_BINARY + contentProperty.getName();
              }
             
              //version label
              String version = PropertiesUtils.getVersionLabel(properties);
             
              //the document uri is related to the specific d:content property available in the node
              //we want to ingest each content stream that are nested in a single node
              String documentURI = binary.getUrl();
              activities.ingestDocumentWithException(id, version, documentURI, rd);
            }
           
            AuthenticationUtils.endSession();
           
View Full Code Here

TOP

Related Classes of org.alfresco.webservice.content.Content

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.