本文整理了Java中org.modeshape.jcr.ExecutionContext.getNamespaceRegistry()
方法的一些代码示例,展示了ExecutionContext.getNamespaceRegistry()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExecutionContext.getNamespaceRegistry()
方法的具体详情如下:
包路径:org.modeshape.jcr.ExecutionContext
类名称:ExecutionContext
方法名:getNamespaceRegistry
[英]Get the (mutable) namespace registry for this context.
[中]获取此上下文的(可变)命名空间注册表。
代码示例来源:origin: org.fcrepo/modeshape-jcr
/**
* Get the namespace registry with durable prefixes as used by the query indexes.
*
* @return the durable namespace registry; never null
*/
public NamespaceRegistry getNamespaceRegistry() {
// TODO: Durable namespace registry
return context.getNamespaceRegistry();
}
代码示例来源:origin: ModeShape/modeshape
/**
* Get the namespace registry with durable prefixes as used by the query indexes.
*
* @return the durable namespace registry; never null
*/
public NamespaceRegistry getNamespaceRegistry() {
// TODO: Durable namespace registry
return context.getNamespaceRegistry();
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
protected PathBasedChangeAdapter( ExecutionContext context,
NodeTypePredicate matcher,
String workspaceName,
ProvidedIndex<?> index,
Name propertyName) {
super(context, workspaceName, matcher, index);
assert propertyName != null;
this.propertyName = propertyName.getString(context.getNamespaceRegistry());
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public String getName() {
if (name == null) return null;
return name.getString(context.getNamespaceRegistry());
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
public ReadableVisitor( ExecutionContext context ) {
CheckArg.isNotNull(context, "context");
this.context = context;
this.registry = context == null ? null : context.getNamespaceRegistry();
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public String[] getDeclaredSupertypeNames() {
if (declaredSupertypeNames == null) return new String[0];
String[] names = new String[declaredSupertypeNames.length];
for (int i = 0; i < declaredSupertypeNames.length; i++) {
names[i] = declaredSupertypeNames[i].getString(context.getNamespaceRegistry());
}
return names;
}
代码示例来源:origin: ModeShape/modeshape
@Override
public String getPrimaryItemName() {
if (primaryItemName == null) {
return null;
}
// Translate the name to the correct prefix. Need to check the session to support url-remapping.
return primaryItemName.getString(context.getNamespaceRegistry());
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public String getPrimaryItemName() {
if (primaryItemName == null) {
return null;
}
// Translate the name to the correct prefix. Need to check the session to support url-remapping.
return primaryItemName.getString(context.getNamespaceRegistry());
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
protected final boolean matches( ExecutionContext context,
String actual,
Name name ) {
return actual.equals(name.getString(context.getNamespaceRegistry()));
}
代码示例来源:origin: ModeShape/modeshape
@Override
public String getName() {
// Translate the name to the correct prefix. Need to check the session to support url-remapping.
return name.getString(context.getNamespaceRegistry());
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
protected final boolean matches( ExecutionContext context,
IndexColumnDefinition defn,
Name name ) {
return defn.getPropertyName().equals(name.getString(context.getNamespaceRegistry()));
}
代码示例来源:origin: ModeShape/modeshape
/**
* Create an instance of an execution context that uses the {@link AccessController#getContext() current JAAS calling context}
* , with default implementations for all other components (including default namespaces in the
* {@link #getNamespaceRegistry() namespace registry}.
*/
@SuppressWarnings( "synthetic-access" )
public ExecutionContext() {
this(new NullSecurityContext(), null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null);
initializeDefaultNamespaces(this.getNamespaceRegistry());
assert securityContext != null;
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public String getDefaultPrimaryTypeName() {
if (defaultPrimaryType == null) return null;
return defaultPrimaryType.getString(getContext().getNamespaceRegistry());
}
代码示例来源:origin: ModeShape/modeshape
protected JcrValueFactory( ExecutionContext context ) {
this.valueFactories = context.getValueFactories();
this.namespaces = context.getNamespaceRegistry();
this.executionContextProcessId = context.getProcessId();
}
代码示例来源:origin: ModeShape/modeshape
@Override
public Iterator<Property> getProperties( Collection<?> namePatterns,
NodeCache cache ) {
WorkspaceCache wsCache = workspaceCache(cache);
final NamespaceRegistry registry = wsCache.context().getNamespaceRegistry();
return new PatternIterator<Property>(getProperties(wsCache), namePatterns) {
@Override
protected String matchable( Property value ) {
return value.getName().getString(registry);
}
};
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public Iterator<Property> getProperties( Collection<?> namePatterns,
NodeCache cache ) {
final AbstractSessionCache session = session(cache);
final NamespaceRegistry registry = session.context().getNamespaceRegistry();
return new PatternIterator<Property>(getProperties(session), namePatterns) {
@Override
protected String matchable( Property value ) {
return value.getName().getString(registry);
}
};
}
代码示例来源: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: org.fcrepo/modeshape-jcr
@Override
public String toString() {
return getOperationName() + " '"
+ this.startingPathInSource.getString(sourceCache.getContext().getNamespaceRegistry()) + "' in workspace '"
+ sourceCache.getWorkspace().toString() + "' into '"
+ this.targetNode.getPath(targetCache).getString(targetCache.getContext().getNamespaceRegistry())
+ "' in workspace '" + targetCache.getWorkspace().toString() + "'";
}
代码示例来源: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
private JcrPropertyDefinition propertyDefinitionFor( NodeType nodeType,
Name propertyName ) {
PropertyDefinition propertyDefs[] = nodeType.getPropertyDefinitions();
String property = propertyName.getString(context.getNamespaceRegistry());
for (int i = 0; i < propertyDefs.length; i++) {
if (propertyDefs[i].getName().equals(property)) {
return (JcrPropertyDefinition)propertyDefs[i];
}
}
throw new IllegalStateException("Could not find property definition name " + property + " for type " + nodeType.getName()
+ ". Test setup is invalid.");
}
内容来源于网络,如有侵权,请联系作者删除!