public static String getReference(Document document){ return getReference(document.getMetadata(), !document.getDocuments().isEmpty()); }
if(value.getDocuments()!=null){ jgen.writeArrayFieldStart("document"); for(Document childDocument:value.getDocuments()){ serialize(childDocument, jgen, provider);
public DocumentUnderEvaluationImpl(Document document, ConditionEngineMetadata conditionEngineMetadata, ApiProperties apiProperties){ this(conditionEngineMetadata, apiProperties); // we hold onto a list of MetadataValues internally, so convert at this point so we do it only once. for( Map.Entry<String, String> entry : document.getMetadata().entries()) { this.metadata.put( entry.getKey(), new MetadataValue(apiProperties, entry.getValue())); } // we hold onto a list of MetadataValues internally, so convert at this point so we do it only once. for( Map.Entry<String, InputStream> entry : document.getStreams().entries()) { this.streams.put( entry.getKey(), new MetadataValue(apiProperties, entry.getValue())); } this.addMetadataString(DocumentFields.ChildDocumentCount, String.valueOf(document.getDocuments().size())); final int depth = getDepth(); this.documents = document.getDocuments().stream(). map(d -> { DocumentUnderEvaluation documentUnderEvaluation = new DocumentUnderEvaluationImpl(d, conditionEngineMetadata, apiProperties); documentUnderEvaluation.addMetadataString( DocumentFields.ChildDocumentDepth, String.valueOf(depth+1)); return documentUnderEvaluation; }).collect(Collectors.toList()); setupPreevaluatedInformation(document); }
if (document.getDocuments() != null) { newDocument.setDocuments(document.getDocuments().stream().map(this::convert).collect(Collectors.toList()));