本文整理了Java中org.modeshape.schematic.document.Document.toMap()
方法的一些代码示例,展示了Document.toMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Document.toMap()
方法的具体详情如下:
包路径:org.modeshape.schematic.document.Document
类名称:Document
方法名:toMap
[英]Returns a map representing this BSONObject.
[中]返回表示此BSONObject的映射。
代码示例来源:origin: org.modeshape/modeshape-schematic
@Override
public void putAll( Document object ) {
if (object != this) {
// Prevent going through BasicBsonObject.unmodifiableView if we can ...
Map<String, ?> original = object instanceof BasicDocument ? (BasicDocument)object : object.toMap();
for (Map.Entry<String, ?> entry : original.entrySet()) {
put(entry.getKey(), unwrap(entry.getValue()));
}
}
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void putAll( Document object ) {
if (object != this) {
// Prevent going through BasicBsonObject.unmodifiableView if we can ...
Map<String, ?> original = object instanceof BasicDocument ? (BasicDocument)object : object.toMap();
for (Map.Entry<String, ?> entry : original.entrySet()) {
put(entry.getKey(), unwrap(entry.getValue()));
}
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
protected Bucket( BucketId id, Document bucketDoc, DocumentTranslator translator ) {
assert id != null;
assert bucketDoc != null;
this.id = id;
this.nameFactory = translator.getNameFactory();
this.stringValueFactory = translator.getStringFactory();
if (bucketDoc.isEmpty()) {
this.childNamesByKey = Collections.emptyMap();
this.childKeysByName = Collections.emptyMap();
} else {
int size = bucketDoc.size();
this.childNamesByKey = new LinkedHashMap<>(size);
this.childKeysByName = new HashMap<>(size);
for (Map.Entry<String, ?> entry : bucketDoc.toMap().entrySet()) {
NodeKey nodeKey = new NodeKey(entry.getKey());
String name = entry.getValue().toString();
childNamesByKey.put(nodeKey, name);
childKeysByName.put(name, nodeKey);
}
}
}
代码示例来源:origin: ModeShape/modeshape
protected Bucket( BucketId id, Document bucketDoc, DocumentTranslator translator ) {
assert id != null;
assert bucketDoc != null;
this.id = id;
this.nameFactory = translator.getNameFactory();
this.stringValueFactory = translator.getStringFactory();
if (bucketDoc.isEmpty()) {
this.childNamesByKey = Collections.emptyMap();
this.childKeysByName = Collections.emptyMap();
} else {
int size = bucketDoc.size();
this.childNamesByKey = new LinkedHashMap<>(size);
this.childKeysByName = new HashMap<>(size);
for (Map.Entry<String, ?> entry : bucketDoc.toMap().entrySet()) {
NodeKey nodeKey = new NodeKey(entry.getKey());
String name = entry.getValue().toString();
childNamesByKey.put(nodeKey, name);
childKeysByName.put(name, nodeKey);
}
}
}
代码示例来源:origin: ModeShape/modeshape
return ((Document)value).toMap();
代码示例来源:origin: org.fcrepo/modeshape-jcr
return ((Document)value).toMap();
内容来源于网络,如有侵权,请联系作者删除!