public VDBResources(VirtualFile root, VDBMetaData vdb) throws IOException { LinkedHashMap<String, VDBResources.Resource> visibilityMap = new LinkedHashMap<String, VDBResources.Resource>(); for(VirtualFile f: root.getChildrenRecursively()) { if (f.isFile()) { // remove the leading vdb name from the entry String path = f.getPathName().substring(root.getPathName().length()); if (!path.startsWith("/")) { //$NON-NLS-1$ path = "/" + path; //$NON-NLS-1$ } visibilityMap.put(path, new VDBResources.Resource(f)); } } this.vdbEntries = visibilityMap; }
public VDBResources(VirtualFile root, VDBMetaData vdb) throws IOException { LinkedHashMap<String, VDBResources.Resource> visibilityMap = new LinkedHashMap<String, VDBResources.Resource>(); for(VirtualFile f: root.getChildrenRecursively()) { if (f.isFile()) { // remove the leading vdb name from the entry String path = f.getPathName().substring(root.getPathName().length()); if (!path.startsWith("/")) { //$NON-NLS-1$ path = "/" + path; //$NON-NLS-1$ } visibilityMap.put(path, new VDBResources.Resource(f)); } } this.vdbEntries = visibilityMap; }
public VDBResources(VirtualFile root, VDBMetaData vdb) throws IOException { LinkedHashMap<String, VDBResources.Resource> visibilityMap = new LinkedHashMap<String, VDBResources.Resource>(); for(VirtualFile f: root.getChildrenRecursively()) { if (f.isFile()) { // remove the leading vdb name from the entry String path = f.getPathName().substring(root.getPathName().length()); if (!path.startsWith("/")) { //$NON-NLS-1$ path = "/" + path; //$NON-NLS-1$ } visibilityMap.put(path, new VDBResources.Resource(f)); } } this.vdbEntries = visibilityMap; }
resources.put("/x.xsd", new VDBResources.Resource(VFS.getRootVirtualFile()));
@Before public void setUp() { MetadataStore metadataStore = new MetadataStore(); CompositeMetadataStore store = new CompositeMetadataStore(metadataStore); VDBMetaData vdbMetaData = new VDBMetaData(); vdbMetaData.setName("foo"); //$NON-NLS-1$ vdbMetaData.setVersion(1); Map<String, VDBResources.Resource> vdbEntries = new LinkedHashMap<String, VDBResources.Resource>(); vdbEntries.put(MY_RESOURCE_PATH, new VDBResources.Resource(root.getChild("foo"))); metadataFactory = new RuntimeMetadataImpl(new TransformationMetadata(vdbMetaData, store, vdbEntries, null, null)); }