/** * {@inheritDoc} */ public void put(EffectiveNodeType ent) { // we define the weight as the total number of included node types // (through aggregation and inheritance) int weight = ent.getMergedNodeTypes().length; // the effective node type is identified by the list of merged // (i.e. aggregated) node types WeightedKey k = new WeightedKey(ent.getMergedNodeTypes(), weight); put(k, ent); }
/** * {@inheritDoc} */ public PropertyDefinition[] getPropertyDefinitions() { QPropertyDefinition[] pda = ent.getAllPropDefs(); PropertyDefinition[] propDefs = new PropertyDefinition[pda.length]; for (int i = 0; i < pda.length; i++) { propDefs[i] = ntMgr.getPropertyDefinition(pda[i]); } return propDefs; }
/** * {@inheritDoc} */ public NodeDefinition[] getChildNodeDefinitions() { QNodeDefinition[] cnda = ent.getAllNodeDefs(); NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length]; for (int i = 0; i < cnda.length; i++) { nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i]); } return nodeDefs; }
/** * {@inheritDoc} */ public void put(EffectiveNodeType ent) { put(getKey(ent.getMergedNodeTypes()), ent); }
/** * Registers the node types defined in the given input stream depending * on the content type specified for the stream. This will also register * any namespaces identified in the input stream if they have not already * been registered. * * {@inheritDoc} */ public NodeType[] registerNodeTypes(InputStream in, String contentType) throws IOException, RepositoryException { return registerNodeTypes(in, contentType, false); }
/** * {@inheritDoc} */ @Override public boolean isNodeType(Name nodeTypeName) { return ent.includesNodeType(nodeTypeName); }
/** * {@inheritDoc} */ public void externalReregistered(QNodeTypeDefinition ntDef) throws NoSuchNodeTypeException, InvalidNodeTypeDefException, RepositoryException { reregisterNodeType(ntDef, true); }
/** * {@inheritDoc} */ public void externalRegistered(Collection<QNodeTypeDefinition> ntDefs) throws RepositoryException, InvalidNodeTypeDefException { registerNodeTypes(ntDefs, true); }
/** * {@inheritDoc} */ public void externalUnregistered(Collection<Name> ntNames) throws RepositoryException, NoSuchNodeTypeException { unregisterNodeTypes(ntNames, true); }
/** * {@inheritDoc} */ public Key getKey(Name[] ntNames) { return new WeightedKey(ntNames); }
/** * @param nodeTypeName node type name * @return <code>true</code> if the specified node type is built-in; * <code>false</code> otherwise. */ public boolean isBuiltIn(Name nodeTypeName) { return builtInNTDefs.contains(nodeTypeName); }
/** * Package private factory method for creating a new 'empty' effective * node type instance. * * @return an 'empty' effective node type instance. */ static EffectiveNodeType create() { return new EffectiveNodeType(); }
/** * {@inheritDoc} */ public boolean hasOrderableChildNodes() { return ent.hasOrderableChildNodes(); }
/** * {@inheritDoc} */ public void put(EffectiveNodeType ent) { // we define the weight as the total number of included node types // (through aggregation and inheritance) int weight = ent.getMergedNodeTypes().length; // the effective node type is identified by the list of merged // (i.e. aggregated) node types WeightedKey k = new WeightedKey(ent.getMergedNodeTypes(), weight); put(k, ent); }
/** * {@inheritDoc} */ public PropertyDefinition[] getPropertyDefinitions() { QPropertyDefinition[] pda = ent.getAllPropDefs(); PropertyDefinition[] propDefs = new PropertyDefinition[pda.length]; for (int i = 0; i < pda.length; i++) { propDefs[i] = ntMgr.getPropertyDefinition(pda[i]); } return propDefs; }
/** * {@inheritDoc} */ public void put(EffectiveNodeType ent) { put(getKey(ent.getMergedNodeTypes()), ent); }
/** * Registers the node types defined in the given input stream depending * on the content type specified for the stream. This will also register * any namespaces identified in the input stream if they have not already * been registered. * * {@inheritDoc} */ public NodeType[] registerNodeTypes(InputStream in, String contentType) throws IOException, RepositoryException { return registerNodeTypes(in, contentType, false); }
/** * {@inheritDoc} */ public NodeDefinition[] getChildNodeDefinitions() { QNodeDefinition[] cnda = ent.getAllNodeDefs(); NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length]; for (int i = 0; i < cnda.length; i++) { nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i]); } return nodeDefs; }
/** * {@inheritDoc} */ public void externalUnregistered(Collection<Name> ntNames) throws RepositoryException, NoSuchNodeTypeException { unregisterNodeTypes(ntNames, true); }
/** * {@inheritDoc} */ public Key getKey(Name[] ntNames) { return new WeightedKey(ntNames); }