public class DefaultProject extends java.lang.Object implements java.io.Serializable, java.beans.PropertyChangeListener, Project
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultProject.DocumentWindowInfo |
FILE_BAK, FILE_EXTENSION, PROJECT_PANEL_PAGE_GROUP, PROJECT_PROPERTIES_PAGE_GROUP| Modifier and Type | Method and Description |
|---|---|
void |
add(Document document)
Adds a document to the project
|
void |
addDocument(Document document)
Adds a document to the project
|
void |
addExtent(ProjectExtent arg1) |
void |
addObserver(org.gvsig.tools.observer.Observer o) |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener arg0) |
boolean |
canImportDocuments(java.lang.String data,
java.lang.String doctype) |
protected void |
clean() |
Document |
createDocument(java.lang.String type) |
java.io.File |
createProjectCopy(boolean error) |
void |
deleteObserver(org.gvsig.tools.observer.Observer o) |
void |
deleteObservers() |
java.lang.String |
exportDocumentsAsText(java.util.List<Document> documents) |
Document |
getActiveDocument() |
Document |
getActiveDocument(java.lang.Class<? extends Document> documentClass) |
Document |
getActiveDocument(java.lang.String documentTypeName) |
org.gvsig.andami.ui.mdiManager.IWindow |
getActiveWindow(java.lang.Class<? extends Document> documentClass) |
java.lang.String |
getComments()
Return the comments associateds with the project
|
java.lang.String |
getCreationDate()
Return the creation date of the project
|
Document |
getDocument(java.util.function.Predicate<Document> condition)
Returns the first document that fit the condition specified.
|
Document |
getDocument(java.lang.String name)
Returns the document with the name specified by name.
|
Document |
getDocument(java.lang.String name,
java.lang.String type)
Obtiene un documento a partir de su nombre y el nombre de registro en el
pointExtension, este �ltimo se puede obtener del
Project****Factory.registerName.
|
java.util.List<Document> |
getDocuments()
Return a list of documents in the project.
|
java.util.List<Document> |
getDocuments(java.lang.Class<? extends Document> documentClass)
Utility method that call getDocuments(Predicate
|
java.util.List<Document> |
getDocuments(java.util.function.Predicate<Document> filter)
Return a list of all the documents of the project that meet the
specified filter.The list of documents will be ordered
alphabetically by the name of the document.
|
java.util.List<Document> |
getDocuments(java.lang.String type)
Return a list with all documents of especified type.
|
java.util.Map |
getExtendedProperties()
Deprecated.
|
ProjectExtent[] |
getExtents() |
java.io.File |
getFile() |
Document |
getFirstDocument(java.lang.Class<? extends Document> documentClass) |
java.util.List<java.lang.Exception> |
getLoadErrors() |
java.lang.String |
getModificationDate()
Retuen the modification date of the project.
|
java.lang.String |
getName()
Return the name of the project
|
java.util.List<Document> |
getOpenDocuments(java.lang.Class<? extends Document> documentClass)
Utility method that call getOpenDocuments(Predicate
|
java.util.List<Document> |
getOpenDocuments(java.util.function.Predicate<Document> filter)
Return a list of all open documents of the project that meet the
specified filter.The document list follows the same order as
the windows of these, being the first in case of complying with
the filter, the corresponding to the active window.
|
java.util.List<Document> |
getOpenDocuments(java.lang.String type)
Utility method that call getOpenDocuments(Predicate
|
java.lang.String |
getOwner()
Return the author of the project,
|
static ProjectPreferences |
getPreferences() |
org.cresques.cts.IProjection |
getProjection() |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
java.lang.Object |
getProperty(java.lang.Object key)
Deprecated.
|
java.lang.Object |
getProperty(java.lang.String name) |
java.awt.Color |
getSelectionColor()
Obtiene el color de selecci�n que se usar� en el proyecto
|
java.lang.String |
getUniqueNameForDocument(java.lang.String type,
java.lang.String name) |
java.util.Set<java.lang.String> |
getUnloadedObjects() |
java.lang.String |
getViewName(org.gvsig.fmap.mapcontext.layers.FLayer layer)
Return the view that contains the especified layer.
|
boolean |
hasChanged() |
void |
importDocuments(java.lang.String data,
java.lang.String doctype) |
boolean |
isEmpty() |
java.util.Iterator<Document> |
iterator() |
void |
loadFromState(org.gvsig.tools.persistence.PersistentState state) |
void |
loadState(java.io.File in) |
void |
loadState(java.io.InputStream in)
Deprecated.
|
void |
loadState(java.io.InputStream in,
java.io.File rootFolder) |
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
static void |
registerPersistent() |
void |
remove(Document doc)
Remove a document of the project
|
void |
removeDocument(Document doc)
Remove a document of the project
|
ProjectExtent |
removeExtent(int arg0) |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
saveState(java.io.File out) |
void |
saveState(java.io.File file,
java.awt.image.BufferedImage preview) |
void |
saveState(java.io.OutputStream out)
Deprecated.
|
void |
saveState(java.io.OutputStream out,
java.io.File rootFolder) |
void |
saveToState(org.gvsig.tools.persistence.PersistentState state) |
void |
setComments(java.lang.String string)
Set the comments associateds with the project
|
protected void |
setCreationDate(java.lang.String creationDate) |
protected void |
setModificationDate(java.lang.String string) |
void |
setModified(boolean modified)
Sets the modified state of project.
|
void |
setName(java.lang.String name)
Set the name of he project.
|
void |
setOwner(java.lang.String owner)
Sets the author of the project
|
void |
setProjection(org.cresques.cts.IProjection projection) |
void |
setProperty(java.lang.Object key,
java.lang.Object obj)
Deprecated.
|
void |
setProperty(java.lang.String name,
java.lang.Object value) |
void |
setSelectionColor(java.awt.Color selectionColor)
Sets the selecction color
|
void |
setSelectionColor(java.lang.String selectionColor)
Sets the selecction color
|
public void add(Document document)
public void addDocument(Document document)
DocumentsContaineraddDocument in interface DocumentsContainerdocument - as Documentpublic void addExtent(ProjectExtent arg1)
public void addObserver(org.gvsig.tools.observer.Observer o)
addObserver in interface org.gvsig.tools.observer.Observablepublic void addPropertyChangeListener(java.beans.PropertyChangeListener arg0)
addPropertyChangeListener in interface Projectpublic boolean canImportDocuments(java.lang.String data,
java.lang.String doctype)
canImportDocuments in interface Projectprotected void clean()
public Document createDocument(java.lang.String type)
createDocument in interface DocumentsContainerpublic java.io.File createProjectCopy(boolean error)
public void deleteObserver(org.gvsig.tools.observer.Observer o)
deleteObserver in interface org.gvsig.tools.observer.Observablepublic void deleteObservers()
deleteObservers in interface org.gvsig.tools.observer.Observablepublic java.lang.String exportDocumentsAsText(java.util.List<Document> documents)
exportDocumentsAsText in interface Projectpublic Document getActiveDocument()
getActiveDocument in interface DocumentsContainerpublic Document getActiveDocument(java.lang.Class<? extends Document> documentClass)
getActiveDocument in interface DocumentsContainerpublic Document getActiveDocument(java.lang.String documentTypeName)
getActiveDocument in interface DocumentsContainerpublic org.gvsig.andami.ui.mdiManager.IWindow getActiveWindow(java.lang.Class<? extends Document> documentClass)
getActiveWindow in interface DocumentsContainerpublic java.lang.String getComments()
getComments in interface Projectpublic java.lang.String getCreationDate()
getCreationDate in interface Projectpublic Document getDocument(java.util.function.Predicate<Document> condition)
DocumentsContainergetDocument in interface DocumentsContainerpublic Document getDocument(java.lang.String name)
DocumentsContainergetDocument in interface DocumentsContainerpublic Document getDocument(java.lang.String name, java.lang.String type)
getDocument in interface DocumentsContainername - Nombre del documentotype - nombre de registro en el extensionPointpublic java.util.List<Document> getDocuments()
getDocuments in interface DocumentsContainerpublic java.util.List<Document> getDocuments(java.lang.Class<? extends Document> documentClass)
DocumentsContainergetDocuments in interface DocumentsContainerdocumentClass - of the documents that should return.public java.util.List<Document> getDocuments(java.util.function.Predicate<Document> filter)
DocumentsContainergetDocuments in interface DocumentsContainerfilter - that determines what documents should be returned.public java.util.List<Document> getDocuments(java.lang.String type)
getDocuments in interface DocumentsContainertype - of document@Deprecated public java.util.Map getExtendedProperties()
getExtendedProperties in interface org.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupportpublic ProjectExtent[] getExtents()
getExtents in interface Projectpublic Document getFirstDocument(java.lang.Class<? extends Document> documentClass)
getFirstDocument in interface DocumentsContainerpublic java.util.List<java.lang.Exception> getLoadErrors()
getLoadErrors in interface Projectpublic java.lang.String getModificationDate()
getModificationDate in interface Projectpublic java.lang.String getName()
public java.util.List<Document> getOpenDocuments(java.lang.Class<? extends Document> documentClass)
DocumentsContainergetOpenDocuments in interface DocumentsContainerdocumentClass - of the documents that should return.public java.util.List<Document> getOpenDocuments(java.util.function.Predicate<Document> filter)
DocumentsContainergetOpenDocuments in interface DocumentsContainerfilter - that determines what documents should be returned.public java.util.List<Document> getOpenDocuments(java.lang.String type)
DocumentsContainergetOpenDocuments in interface DocumentsContainertype - of the documents that should return.public java.lang.String getOwner()
public static ProjectPreferences getPreferences()
public org.cresques.cts.IProjection getProjection()
getProjection in interface Projectpublic java.util.Map<java.lang.String,java.lang.Object> getProperties()
getProperties in interface org.gvsig.tools.util.PropertiesSupport@Deprecated public java.lang.Object getProperty(java.lang.Object key)
getProperty in interface org.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupportpublic java.lang.Object getProperty(java.lang.String name)
getProperty in interface org.gvsig.tools.util.PropertiesSupportpublic java.awt.Color getSelectionColor()
getSelectionColor in interface Projectpublic java.lang.String getUniqueNameForDocument(java.lang.String type,
java.lang.String name)
public java.util.Set<java.lang.String> getUnloadedObjects()
getUnloadedObjects in interface Projectpublic java.lang.String getViewName(org.gvsig.fmap.mapcontext.layers.FLayer layer)
getViewName in interface Projectlayer - java.lang.RuntimeException - Si la capa que se pasa como par�metro no se
encuentra en ninguna vistapublic boolean hasChanged()
hasChanged in interface Projectpublic void importDocuments(java.lang.String data,
java.lang.String doctype)
importDocuments in interface Projectpublic boolean isEmpty()
isEmpty in interface DocumentsContainerpublic java.util.Iterator<Document> iterator()
iterator in interface java.lang.Iterable<Document>iterator in interface DocumentsContainerpublic void loadFromState(org.gvsig.tools.persistence.PersistentState state)
throws org.gvsig.tools.persistence.exception.PersistenceException
loadFromState in interface org.gvsig.tools.persistence.Persistentorg.gvsig.tools.persistence.exception.PersistenceException@Deprecated public void loadState(java.io.InputStream in)
public void loadState(java.io.InputStream in,
java.io.File rootFolder)
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerpublic static void registerPersistent()
public void remove(Document doc)
Projectpublic void removeDocument(Document doc)
DocumentsContainerremoveDocument in interface DocumentsContainerdoc - as Documentpublic ProjectExtent removeExtent(int arg0)
removeExtent in interface Projectpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener in interface Projectpublic void saveState(java.io.File out)
throws org.gvsig.tools.persistence.exception.PersistenceException
public void saveState(java.io.File file,
java.awt.image.BufferedImage preview)
@Deprecated
public void saveState(java.io.OutputStream out)
throws org.gvsig.tools.persistence.exception.PersistenceException
public void saveState(java.io.OutputStream out,
java.io.File rootFolder)
throws org.gvsig.tools.persistence.exception.PersistenceException
public void saveToState(org.gvsig.tools.persistence.PersistentState state)
throws org.gvsig.tools.persistence.exception.PersistenceException
saveToState in interface org.gvsig.tools.persistence.Persistentorg.gvsig.tools.persistence.exception.PersistenceExceptionpublic void setComments(java.lang.String string)
setComments in interface Projectcomments - as stringprotected void setCreationDate(java.lang.String creationDate)
protected void setModificationDate(java.lang.String string)
public void setModified(boolean modified)
setModified in interface Projectmodified - as booleanpublic void setName(java.lang.String name)
public void setOwner(java.lang.String owner)
public void setProjection(org.cresques.cts.IProjection projection)
setProjection in interface Project@Deprecated
public void setProperty(java.lang.Object key,
java.lang.Object obj)
setProperty in interface org.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupportpublic void setProperty(java.lang.String name,
java.lang.Object value)
setProperty in interface org.gvsig.tools.util.PropertiesSupportpublic void setSelectionColor(java.awt.Color selectionColor)
setSelectionColor in interface Projectselection - color as Colorpublic void setSelectionColor(java.lang.String selectionColor)
setSelectionColor in interface Projectselection - color as stringCopyright © 2025 gvSIG Association. All rights reserved.