@Test public void shouldImportJcrBuiltinNodeTypesForJSR283() throws Exception { importer.importFrom(openCndFile("jcr-builtins-283-early-draft.cnd"), problems); if (problems.size() != 0) printProblems(); registerImportedNamespaces(); assertThat(problems.size(), is(0)); assertNodeType("nt:base", new String[] {"mode:defined"}, NO_PRIMARY_NAME, NodeOptions.Abstract, NodeOptions.Queryable); assertProperty("nt:base", "jcr:primaryType", "Name", NO_DEFAULTS, new PropertyOptions[] {PropertyOptions.Mandatory, PropertyOptions.Autocreated, PropertyOptions.Protected, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable}, OnParentVersion.Compute); assertProperty("nt:base", "jcr:mixinTypes", "Name", NO_DEFAULTS, new PropertyOptions[] {PropertyOptions.Multiple, PropertyOptions.Protected, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable}, OnParentVersion.Compute); assertNodeType("nt:unstructured", NO_SUPERTYPES, NO_PRIMARY_NAME, NodeOptions.Ordered, NodeOptions.Queryable); assertProperty("nt:unstructured", "*", "Undefined", NO_DEFAULTS, PropertyOptions.Multiple, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable); assertChild("nt:unstructured", "*", "nt:base", "nt:unstructured", OnParentVersion.Version, ChildOptions.Multiple, ChildOptions.Sns); assertNodeType("mix:referenceable", NO_SUPERTYPES, NO_PRIMARY_NAME, NodeOptions.Mixin, NodeOptions.Queryable); assertProperty("mix:referenceable", "jcr:uuid", "String", NO_DEFAULTS, OnParentVersion.Initialize, PropertyOptions.Mandatory, PropertyOptions.Autocreated, PropertyOptions.Protected, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable); assertNodeType("mix:lockable", NO_SUPERTYPES, NO_PRIMARY_NAME, NodeOptions.Mixin, NodeOptions.Queryable); assertProperty("mix:lockable", "jcr:lockOwner", "String", NO_DEFAULTS, OnParentVersion.Ignore, PropertyOptions.Protected, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable); assertProperty("mix:lockable", "jcr:lockIsDeep", "Boolean", NO_DEFAULTS, OnParentVersion.Ignore, PropertyOptions.Protected, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable); assertNodeType("nt:propertyDefinition", NO_SUPERTYPES, NO_PRIMARY_NAME, NodeOptions.Queryable); assertProperty("nt:propertyDefinition", "jcr:name", "Name", NO_DEFAULTS, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable); assertProperty("nt:propertyDefinition", "jcr:autoCreated", "Boolean", NO_DEFAULTS, PropertyOptions.Mandatory, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable); assertProperty("nt:propertyDefinition", "jcr:mandatory", "Boolean", NO_DEFAULTS, PropertyOptions.Mandatory, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable); assertProperty("nt:propertyDefinition", "jcr:onParentVersion", "String", NO_DEFAULTS, new PropertyOptions[] { PropertyOptions.Mandatory, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable}, null, new String[] { "COPY", "VERSION", "INITIALIZE", "COMPUTE", "IGNORE", "ABORT"}); assertProperty("nt:propertyDefinition", "jcr:protected", "Boolean", NO_DEFAULTS, PropertyOptions.Mandatory, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable); assertProperty("nt:propertyDefinition", "jcr:requiredType", "String", NO_DEFAULTS, new PropertyOptions[] { PropertyOptions.Mandatory, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable}, null, new String[] { "STRING", "BINARY", "LONG", "DOUBLE", "BOOLEAN", "DATE", "NAME", "PATH", "REFERENCE", "UNDEFINED"}); assertProperty("nt:propertyDefinition", "jcr:valueConstraints", "String", NO_DEFAULTS, PropertyOptions.Multiple, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable); assertProperty("nt:propertyDefinition", "jcr:defaultValues", "Undefined", NO_DEFAULTS, PropertyOptions.Multiple, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable); assertProperty("nt:propertyDefinition", "jcr:multiple", "Boolean", NO_DEFAULTS, PropertyOptions.Mandatory, PropertyOptions.FullTextSearchable, PropertyOptions.QueryOrderable); }
public void importFrom( InputStream stream, Problems problems, String resourceName ) throws IOException { importFrom(IoUtil.read(stream), problems, resourceName); }
CndImporter { public void importFrom( InputStream stream, Problems problems, String resourceName ) throws IOException { importFrom(IoUtil.read(stream), problems, resourceName); } }
CndImporter { public void importFrom( InputStream stream, Problems problems, String resourceName ) throws IOException { importFrom(IoUtil.read(stream), problems, resourceName); } CndImporter( ExecutionContext context ); }
CndImporter { public void importFrom( InputStream stream, Problems problems, String resourceName ) throws IOException { importFrom(IoUtil.read(stream), problems, resourceName); } CndImporter( ExecutionContext context ); void importFrom( InputStream stream,
                            Problems problems,
                            String resourceName ); void importFrom( File file,
                            Problems problems ); void importFrom( String content,
                            Problems problems,
                            String resourceName ); void importBuiltIns( Problems problems ); Set<NamespaceRegistry.Namespace> getNamespaces(); List<NodeTypeDefinition> getNodeTypeDefinitions(); }
CndImporter { public void importFrom( InputStream stream, Problems problems, String resourceName ) throws IOException { importFrom(IoUtil.read(stream), problems, resourceName); } CndImporter( ExecutionContext context ); void importFrom( InputStream stream,
                            Problems problems,
                            String resourceName ); void importFrom( File file,
                            Problems problems ); void importFrom( String content,
                            Problems problems,
                            String resourceName ); void importBuiltIns( Problems problems ); Set<NamespaceRegistry.Namespace> getNamespaces(); List<NodeTypeDefinition> getNodeTypeDefinitions(); static final boolean DEFAULT_USE_VENDOR_EXTENSIONS; static final boolean DEFAULT_COMPATIBLE_WITH_PREJCR2; }