Pair.make(Dependencies.FIELD_RESOURCE, "Long"),
Pair.make(Dependencies.FIELD_NAME, "String"),
Pair.make(Dependencies.FIELD_TYPES, "Text"),
- Pair.make(Dependencies.FIELD_GUID, "Text")
+ Pair.make(Dependencies.FIELD_GUID, "Text"),
+ Pair.make(Dependencies.FIELD_NAME_SEARCH, "Text"),
+ Pair.make(Dependencies.FIELD_TYPES_SEARCH, "Text")
};
final Resource resource;
ArrayList<Object[]> result = new ArrayList<Object[]>();
for (Entry entry : entries) {
if(entry.name == null) continue;
- result.add(new Object[] { ss.getRandomAccessId(entry.parent), ss.getRandomAccessId(entry.resource), entry.name, entry.types, entry.id });
+ result.add(new Object[] { ss.getRandomAccessId(entry.parent), ss.getRandomAccessId(entry.resource), entry.name, entry.types, entry.id, entry.name, entry.types });
}
return result;
@Override
public List<Map<String, Object>> query(RequestProcessor session, String search, String bindingPattern, Object[] constants, int maxResultCount) {
- if(!Dependencies.getBindingPattern().equals(bindingPattern)) throw new IllegalArgumentException("DependenciesRelation supports indexing only with 'bfffff'");
+ if(!Dependencies.getBindingPattern().equals(bindingPattern)) throw new IllegalArgumentException("DependenciesRelation supports indexing only with 'bfffffff'");
IndexedRelations indexer = session.getService(IndexedRelations.class);
return indexer.query(null, search, session, resource, (Resource)constants[0], maxResultCount);
}
@Override
public List<Resource> queryResources(RequestProcessor session, String search, String bindingPattern, Object[] constants, int maxResultCount) {
- if(!Dependencies.getBindingPattern().equals(bindingPattern)) throw new IllegalArgumentException("DependenciesRelation supports indexing only with 'bfffff'");
+ if(!Dependencies.getBindingPattern().equals(bindingPattern)) throw new IllegalArgumentException("DependenciesRelation supports indexing only with 'bfffffff'");
IndexedRelations indexer = session.getService(IndexedRelations.class);
return indexer.queryResources(null, search, session, resource, (Resource)constants[0], maxResultCount);
}
@Override
public List<Map<String, Object>> list(RequestProcessor session, String bindingPattern, Object[] constants, int maxResultCount) {
- if(!Dependencies.getBindingPattern().equals(bindingPattern)) throw new IllegalArgumentException("DependenciesRelation supports indexing only with 'bfffff'");
+ if(!Dependencies.getBindingPattern().equals(bindingPattern)) throw new IllegalArgumentException("DependenciesRelation supports indexing only with 'bfffffff'");
IndexedRelations indexer = session.getService(IndexedRelations.class);
return indexer.query(null, null, session, resource, (Resource)constants[0], maxResultCount);
}
if(!entry.isValid(graph)) continue;
Resource parent = graph.getPossibleObject(entry.component, L0.PartOf);
if (parent != null) {
- _additions.add(new Object[] { ss.getRandomAccessId(parent), ss.getRandomAccessId(entry.component), name, types, id != null ? id.indexString() : "" });
+ _additions.add(new Object[] { ss.getRandomAccessId(parent), ss.getRandomAccessId(entry.component), name, types, id != null ? id.indexString() : "", name, types});
} else {
//LOGGER.info("resource " + entry.component + ": no parent for entry " + name + " " + types);
}
if(part != null) {
_replacementKeys.add(ss.getRandomAccessId(entry.component));
_replacementObjects.add(new Object[] { ss.getRandomAccessId(part),
- ss.getRandomAccessId(entry.component), name, types, id != null ? id.indexString() : "" });
+ ss.getRandomAccessId(entry.component), name, types, id != null ? id.indexString() : "", name, types});
}
}
}
ArrayList<Object[]> result = new ArrayList<Object[]>(entries.size());
for (Entry entry : entries) {
- result.add(new Object[] { ss.getRandomAccessId(entry.parent), ss.getRandomAccessId(entry.resource), entry.name, entry.types, entry.id });
+ result.add(new Object[] { ss.getRandomAccessId(entry.parent), ss.getRandomAccessId(entry.resource), entry.name, entry.types, entry.id, entry.name, entry.types });
}
Layer0X L0X = Layer0X.getInstance(graph);