*/
package org.opendaylight.yangtools.yang.model.api;
+import com.google.common.base.Optional;
+import javax.annotation.concurrent.Immutable;
+import org.opendaylight.yangtools.yang.common.QName;
+
import java.net.URI;
import java.util.Date;
import java.util.Set;
-import org.opendaylight.yangtools.yang.common.QName;
-
/**
- * The interface contains the methods for manipulating all the top level context
- * data (data from all red modules) like YANG notifications, extensions,
+ * The interface represents static view of compiled yang files,
+ * contains the methods for obtaining all the top level context
+ * data (data from all modules) like YANG notifications, extensions,
* operations...
+ * Instances MUST be immutable and thus usage in multi threaded
+ * environment is safe.
*/
+@Immutable
public interface SchemaContext extends ContainerSchemaNode {
public static final QName NAME = QName.create(URI.create("urn:ietf:params:xml:ns:netconf:base:1.0"), null, "data");
*/
Module findModuleByNamespaceAndRevision(final URI namespace, final Date revision);
+
+ /**
+ * Get yang source code represented as string for matching
+ * {@link org.opendaylight.yangtools.yang.model.api.ModuleIdentifier}.
+ * @param moduleIdentifier must provide a non-null
+ * {@link org.opendaylight.yangtools.yang.model.api.ModuleIdentifier#getName()},
+ * other methods might return null.
+ * @return value iif matching module is found in schema context.
+ */
+ Optional<String> getModuleSource(ModuleIdentifier moduleIdentifier);
+
+ /**
+ * Get all module and submodule identifiers.
+ */
+ Set<ModuleIdentifier> getAllModuleIdentifiers();
+
}