Skip navigation links
oracle.jdeveloper.builder
Class SourceModel
java.lang.Object
oracle.jdeveloper.builder.SourceModel
- Direct Known Subclasses:
- ClassSourceModel, FileBuilderModel.FileSourceModel, FolderSourceModel, PackageSourceModel
-
public class SourceModel
- extends java.lang.Object
Field Summary |
protected java.net.URL |
_url
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_url
protected java.net.URL _url
SourceModel
public SourceModel()
getURL
public java.net.URL getURL()
setURL
public final void setURL(java.net.URL url)
- Sets the URL. Note that this method only sets the directory of the SourceModel to the parent of the specified url. It does not modify the filename of the SourceModel. This behavior, while wrong, is being preserved for behavioral compatibility.
-
- Parameters:
url
- a url
verifyPath
public final boolean verifyPath()
createNode
public Node createNode()
checkForExistingFile
public final boolean checkForExistingFile()
generateDefaultFileName
public void generateDefaultFileName(java.lang.String baseName)
getFileName
public java.lang.String getFileName()
setFileName
public void setFileName(java.lang.String newFileName)
getRelativeDirectory
public final java.lang.String getRelativeDirectory()
setRelativeDirectory
public void setRelativeDirectory(java.lang.String newDirectory)
getDirectory
public java.net.URL getDirectory()
getDirectoryString
protected java.lang.String getDirectoryString()
setDirectory
public final void setDirectory(java.net.URL url)
isInSourcePath
public boolean isInSourcePath(java.net.URL url)
getBaseURL
public final java.net.URL getBaseURL()
getProject
public final Project getProject()
setProject
public void setProject(Project newProj)
throws java.lang.IllegalArgumentException
-
- Throws:
java.lang.IllegalArgumentException
updateBaseURLFromProject
protected void updateBaseURLFromProject()
getExtension
public java.lang.String getExtension()
- Retrieves the extension used when creating new files. The extension should include the '.'.
-
- Returns:
- the file extension to use when creating the file associated with this
SourceModel
.
getDefaultNameStartIndex
protected int getDefaultNameStartIndex()
getNodeType
protected <T extends Node> java.lang.Class<T> getNodeType()
- Get the Node type for the source file.
-
- Returns:
- the Node subclass that should be instantiated for this source model, or null if the default Node type should be used.
getSourcePath
protected URLPath getSourcePath()
getContentSetKey
protected java.lang.String getContentSetKey()
- Gets the key that identifies the content set for this SourceModel. This key is used to determine the content set to which to add new files that are created with this source model. Subclasses should override this method to add generated files to a content set other than Resources. Note, the key returned must match a valid ContentSetProvider key.
-
- Returns:
- the content set key
- See Also:
createNode()
, ContentSetProvider
setAllowUrlsNotInSourcePath
public void setAllowUrlsNotInSourcePath(boolean allowUrlsNotInSourcePath)
getAllowUrlsNotInSourcePath
public boolean getAllowUrlsNotInSourcePath()
Skip navigation links
Copyright © 1997, 2015, Oracle. All rights reserved.