@ManagedAttribute(description="Returns registered Schema properties") public CompositeData getProperties() { Properties props = getEntity().getProperties(); return propsToComposite(entityName, "properties", props); }
if (schema != null) { substituteProperties(properties, schema.getProperties());
public int initMember(final Member member) { // get schemas; for each schema registered on this member int cnt = 0; String[] aSchemas = getMemberSchemas(member); for (String name: aSchemas) { Schema schema = entityCache.get(name); if (schema != null) { Properties props = schema.getProperties(); if (initSchema(schema.getName(), props)) { cnt++; Future<String> future = execService.submitToMember(new SchemaMemberExtractor(name), member); try { String uuid = future.get(); //10, TimeUnit.SECONDS); } catch (InterruptedException | ExecutionException ex) { // | TimeoutException ex) { logger.error("initMember.error 1; ", ex); continue; } } } else { logger.info("initMember.error; no schema found for name: {}; " + "looks like invalid node configuration", name); } } return cnt; }
Properties props = schema.getProperties(); props.setProperty(pn_schema_name, schemaName); PropertiesPropertySource pps = new PropertiesPropertySource(schemaName, props);
} else { XQStaticContext ctx = xqConn.getStaticContext(); props2Context(schemaManager.getEntity().getProperties(), ctx); props2Context(props, ctx); XQPreparedExpression xqpExp = xqConn.prepareExpression(query, ctx);
@ManagedOperation(description="Parse XQuery. Return array of parameter names, if any") @ManagedOperationParameters({ @ManagedOperationParameter(name = "query", description = "A query request provided in XQuery syntax"), @ManagedOperationParameter(name = "props", description = "Query processing properties")}) public String[] parseQuery(String query, Properties props) { XQPreparedExpression xqpExp = null; try { XQStaticContext ctx = xqConn.getStaticContext(); props2Context(schemaManager.getEntity().getProperties(), ctx); props2Context(props, ctx); xqpExp = xqConn.prepareExpression(query, ctx); QName[] vars = xqpExp.getAllExternalVariables(); String[] result = null; if (vars != null) { result = new String[vars.length]; for (int i=0; i < vars.length; i++) { result[i] = vars[i].toString(); } } xqpExp.close(); return result; } catch (XQException ex) { logger.error("parseQuery.error", ex); throw new RuntimeException(ex.getMessage()); } }
} else { XQStaticContext ctx = xqConn.getStaticContext(); props2Context(schemaManager.getEntity().getProperties(), ctx); props2Context(props, ctx); XQExpression xqExp = xqConn.createExpression(ctx);
out.writeUTF(xSchema.getDescription()); out.writeBoolean(xSchema.isActive()); out.writeObject(xSchema.getProperties()); out.writeInt(xSchema.getCollections().size()); for (Collection collection: xSchema.getCollections()) {