本文整理了Java中org.modeshape.jcr.ExecutionContext.<init>()
方法的一些代码示例,展示了ExecutionContext.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExecutionContext.<init>()
方法的具体详情如下:
包路径:org.modeshape.jcr.ExecutionContext
类名称:ExecutionContext
方法名:<init>
[英]Create an instance of an execution context that uses the AccessController#getContext(), with default implementations for all other components (including default namespaces in the #getNamespaceRegistry().
[中]创建一个使用AccessController#getContext()的执行上下文实例,并为所有其他组件(包括#getNamespaceRegistry()中的默认命名空间)创建默认实现。
代码示例来源:origin: org.fcrepo/modeshape-jcr
private CndImporter importNodesFromCND( InputStream cndInputStream ) throws IOException {
Problems problemsDuringImport = new SimpleProblems();
CndImporter cndImporter = new CndImporter(new ExecutionContext());
cndImporter.importFrom(cndInputStream, problemsDuringImport, null);
if (problemsDuringImport.hasErrors()) {
problemsDuringImport.writeTo(LOGGER);
return null;
}
return cndImporter;
}
代码示例来源:origin: ModeShape/modeshape
@Before
public void beforeEach() {
context = new QueryContext(new ExecutionContext(), mock(RepositoryCache.class), Collections.singleton("workspace"),
mock(Schemata.class), mock(RepositoryIndexes.class), mock(NodeTypes.class),
mock(BufferManager.class));
rule = PushSelectCriteria.INSTANCE;
}
代码示例来源:origin: ModeShape/modeshape
@Before
public void beforeEach() {
rule = RewriteAsRangeCriteria.INSTANCE;
rules = new LinkedList<OptimizerRule>();
rules.add(rule);
context = new QueryContext(new ExecutionContext(), mock(RepositoryCache.class), Collections.singleton("workspace"),
mock(Schemata.class), mock(RepositoryIndexes.class), mock(NodeTypes.class),
mock(BufferManager.class));
print = false;
}
代码示例来源:origin: ModeShape/modeshape
@Before
public void beforeEach() {
context = new QueryContext(new ExecutionContext(), mock(RepositoryCache.class), Collections.singleton("workspace"),
mock(Schemata.class), mock(RepositoryIndexes.class), mock(NodeTypes.class),
mock(BufferManager.class));
bestRule = ChooseJoinAlgorithm.USE_BEST_JOIN_ALGORITHM;
nestedRule = ChooseJoinAlgorithm.USE_ONLY_NESTED_JOIN_ALGORITHM;
}
代码示例来源:origin: ModeShape/modeshape
@Before
public void beforeEach() {
context = new QueryContext(new ExecutionContext(), mock(RepositoryCache.class), Collections.singleton("workspace"),
mock(Schemata.class), mock(RepositoryIndexes.class), mock(NodeTypes.class),
mock(BufferManager.class));
rule = AddAccessNodes.INSTANCE;
}
代码示例来源:origin: ModeShape/modeshape
@Before
public void beforeEach() {
context = new QueryContext(new ExecutionContext(), mock(RepositoryCache.class), Collections.singleton("workspace"),
mock(Schemata.class), mock(RepositoryIndexes.class), mock(NodeTypes.class),
mock(BufferManager.class));
rule = AddJoinConditionColumnsToSources.INSTANCE;
context.getHints().hasJoin = true;
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
SystemNamespaceRegistry( JcrRepository.RunningState repository ) {
this.repository = repository;
this.cache = new SimpleNamespaceRegistry();
// Pre-load all of the built-in namespaces ...
this.cache.register(new ExecutionContext().getNamespaceRegistry().getNamespaces());
}
代码示例来源:origin: ModeShape/modeshape
SystemNamespaceRegistry( JcrRepository.RunningState repository ) {
this.repository = repository;
this.cache = new SimpleNamespaceRegistry();
// Pre-load all of the built-in namespaces ...
this.cache.register(new ExecutionContext().getNamespaceRegistry().getNamespaces());
}
代码示例来源:origin: ModeShape/modeshape
protected MockJcrTypeSystem( JcrValueFactory valueFactory ) {
this.executionContext = new ExecutionContext();
this.valueFactory = valueFactory;
this.delegate = this.executionContext.getValueFactories().getTypeSystem();
}
代码示例来源:origin: ModeShape/modeshape
@Before
public void before() {
MockitoAnnotations.initMocks(this);
context = new ExecutionContext();
factories = context.getValueFactories();
value = new JcrValue(factories, PropertyType.BOOLEAN, Boolean.TRUE);
}
代码示例来源:origin: ModeShape/modeshape
@Override
@Before
public void beforeEach() {
super.beforeEach();
this.context = new ExecutionContext();
this.bufferMgr = new BufferManager(context);
}
代码示例来源:origin: ModeShape/modeshape
@Before
@Override
public void beforeEach() {
super.beforeEach();
print = false;
context = new ExecutionContext();
cache = createCache();
}
代码示例来源:origin: ModeShape/modeshape
@Before
public void beforeEach() {
context = new ExecutionContext();
mgr = new BufferManager(context);
types = context.getValueFactories().getTypeSystem();
}
代码示例来源:origin: ModeShape/modeshape
@Test( expected = IllegalArgumentException.class )
public void shouldFailToParseUnknownLanguage() {
TypeSystem typeSystem = new ExecutionContext().getValueFactories().getTypeSystem();
parsers.parse(typeSystem, "unknown language", "This is a bogus query");
}
代码示例来源:origin: ModeShape/modeshape
@Before
public void beforeEach() {
context = new ExecutionContext();
db = DBMaker.newMemoryDB().make();
serializers = MapDB.serializers(context.getValueFactories());
}
代码示例来源:origin: ModeShape/modeshape
@Override
@Before
public void beforeEach() {
super.beforeEach();
this.context = new ExecutionContext();
this.bufferMgr = new BufferManager(context);
this.types = new ValueTypeSystem(context.getValueFactories());
}
代码示例来源:origin: ModeShape/modeshape
@Override
@Before
public void beforeEach() {
super.beforeEach();
this.context = new ExecutionContext();
this.bufferMgr = new BufferManager(context);
this.types = new ValueTypeSystem(context.getValueFactories());
}
代码示例来源:origin: ModeShape/modeshape
@Override
@Before
public void beforeEach() {
super.beforeEach();
this.context = new ExecutionContext();
this.bufferMgr = new BufferManager(context);
this.types = new ValueTypeSystem(context.getValueFactories());
}
代码示例来源:origin: ModeShape/modeshape
@Before
public void beforeEach() {
problems = new SimpleProblems();
context = new ExecutionContext();
context.getNamespaceRegistry().register(ModeShapeLexicon.Namespace.PREFIX, ModeShapeLexicon.Namespace.URI);
context.getNamespaceRegistry().register(JcrLexicon.Namespace.PREFIX, JcrLexicon.Namespace.URI);
context.getNamespaceRegistry().register(JcrNtLexicon.Namespace.PREFIX, JcrNtLexicon.Namespace.URI);
// Set up the importer ...
importer = new CndImporter(context);
}
代码示例来源:origin: ModeShape/modeshape
@Test
public void shouldConvertValuesToCoreTypes() {
ExecutionContext ctx = new ExecutionContext();
Name n1 = ctx.getValueFactories().getNameFactory().create("mix:title");
Name n2 = ctx.getValueFactories().getNameFactory().create("mix:titl");
index.add(key("key8"), "mixinTypes", new Object[]{n1});
index.commit();
SetCriteria sc = new SetCriteria(propertyValue(def4), new Literal(n1), new Literal(n2));
validate(sc, "key8");
}
内容来源于网络,如有侵权,请联系作者删除!