Examples of WGRelationData


Examples of de.innovationgate.webgate.api.WGRelationData

       
       
        List<WGRelationData> incoming = new ArrayList();
       
        for (ContentRelation rel : (List<ContentRelation>) crit.list()) {
            WGRelationData relData = createWGRelationData(rel);
            incoming.add(relData);
        }
       
        return incoming;
       
View Full Code Here

Examples of de.innovationgate.webgate.api.WGRelationData


    protected WGRelationData createWGRelationData(ContentRelation rel) {
        Content content = rel.getParentcontent();
        WGContentKey cKey = new WGContentKey(content.getStructentry().getKey(), content.getLanguage().getName(), content.getVersion().intValue());
        WGRelationData relData = new WGRelationData(cKey, rel.getName(), rel.getTargetstructentry(), rel.getTargetlanguage(), rel.getType(), rel.getGroup());
        return relData;
    }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGRelationData

       
      if (useRelation && doc instanceof WGContent) {
        WGContent content = (WGContent)doc;
        List<String> values = new ArrayList<String>();
       
        WGRelationData relationData = content.getRelationData(fieldname);
            if (relationData != null) {
                values.add(relationData.getTargetStructkey().toString());
            }
            else {
                for (WGRelationData relData : content.getRelationsDataOfGroup(fieldname)) {
                    values.add(relData.getTargetStructkey().toString());
                }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGRelationData

            }               
    }
    }

    private WGRelationData createRelationData(String relName, String relType, WGContent parentContent, String relationStr) throws WGAPIException, WGIllegalArgumentException {
        WGRelationData relData = null;
        TMLContext relationContext = gettargetcontext().context("docid:"+ relationStr, false);
        if (relationContext != null) {
          if (relType.equalsIgnoreCase("normal")) {
              relData = new WGRelationData(parentContent.getContentKey(), relName, relationContext.content().getStructKey(), relationContext.content().getLanguage().getName(), WGContent.RELATIONTYPE_NORMAL, null);
          }
          else if (relType.equalsIgnoreCase("protected")) {
              relData = new WGRelationData(parentContent.getContentKey(), relName, relationContext.content().getStructKey(), relationContext.content().getLanguage().getName(), WGContent.RELATIONTYPE_PROTECTED, null);
          }
          else {
            throw new WGIllegalArgumentException("Unknown relationtype '" + relType + "'.");
          }
        }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGRelationData

           
            // index content relations
            Iterator<String> relationNames = content.getRelationNames().iterator();
            while (relationNames.hasNext()) {
              String relationName = relationNames.next();
              WGRelationData data = content.getRelationData(relationName);
              if (data != null) {
                String luceneItemName = RELATION_PREFIX + relationName.toLowerCase();
                addKeyword(document, luceneItemName, data.getTargetStructkey().toString() + "." + data.getTargetLanguage());
                addSortField(document, luceneItemName, data.getTargetStructkey().toString() + "." + data.getTargetLanguage())
              }             
            }
           
            // index file attachments
            List filenames = content.getFileNames();
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.