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 |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
VERSION |
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) |
void |
addView(DefaultViewDocument v)
Add a view to the project
|
boolean |
canImportDocuments(java.lang.String data,
java.lang.String doctype) |
protected void |
clean() |
Document |
createDocument(java.lang.String type) |
void |
deleteObserver(org.gvsig.tools.observer.Observer o) |
void |
deleteObservers() |
void |
delView(int i)
Remove a view of the project
|
java.lang.String |
exportDocumentsAsText(java.util.List<Document> documents) |
java.lang.String |
exportToXML(AbstractDocument[] selectedItems) |
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 |
getColor()
Return the selection color
|
java.lang.String |
getComments()
Return the comments associateds with the project
|
java.lang.String |
getCreationDate()
Return the creation date of the project
|
static int |
getDefaultDistanceArea() |
static int |
getDefaultDistanceUnits() |
static int |
getDefaultMapUnits() |
static org.cresques.cts.IProjection |
getDefaultProjection() |
static java.awt.Color |
getDefaultSelectionColor() |
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.List<Document> |
getDocumentsByType(java.lang.String 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() |
Document |
getProjectDocumentByName(java.lang.String name,
java.lang.String type) |
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.
|
java.util.List<Document> |
getViews()
Return the list of views of the project
|
boolean |
hasChanged() |
void |
importDocuments(java.lang.String data,
java.lang.String doctype) |
void |
importFromXML(java.lang.String sourceString,
java.lang.String docType) |
boolean |
isEmpty() |
boolean |
isValidXMLForImport(java.lang.String sourceString,
java.lang.String docType) |
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,
java.io.File rootFolder) |
void |
logExceptionToFile(java.lang.Exception ex,
java.io.File file,
boolean append)
Guarda el stack trace de una excepción en un fichero, con la opción de
sobrescribir o añadir al contenido existente.
|
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 file,
java.awt.image.BufferedImage preview) |
void |
saveToState(org.gvsig.tools.persistence.PersistentState state) |
void |
setColor(java.lang.String color) |
void |
setComments(java.lang.String string)
Set the comments associateds with the project
|
protected void |
setCreationDate(java.lang.String creationDate) |
static void |
setDefaultDistanceArea(int distanceArea) |
static void |
setDefaultDistanceUnits(int distanceUnits) |
static void |
setDefaultMapUnits(int mapUnits) |
static void |
setDefaultProjection(org.cresques.cts.IProjection defaultProjection) |
static void |
setDefaultSelectionColor(java.awt.Color color) |
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 void addView(DefaultViewDocument v)
public 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 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 void delView(int i)
index - of the view as integerpublic java.lang.String exportDocumentsAsText(java.util.List<Document> documents)
exportDocumentsAsText in interface Projectpublic java.lang.String exportToXML(AbstractDocument[] selectedItems) throws SaveException
SaveExceptionpublic 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 getColor()
public java.lang.String getComments()
getComments in interface Projectpublic java.lang.String getCreationDate()
getCreationDate in interface Projectpublic static int getDefaultDistanceArea()
public static int getDefaultDistanceUnits()
public static int getDefaultMapUnits()
public static org.cresques.cts.IProjection getDefaultProjection()
public static java.awt.Color getDefaultSelectionColor()
public 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 documentpublic java.util.List<Document> getDocumentsByType(java.lang.String type)
@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 Document getProjectDocumentByName(java.lang.String name, java.lang.String type)
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 java.util.List<Document> getViews()
public boolean hasChanged()
hasChanged in interface Projectpublic void importDocuments(java.lang.String data,
java.lang.String doctype)
importDocuments in interface Projectpublic void importFromXML(java.lang.String sourceString,
java.lang.String docType)
public boolean isEmpty()
isEmpty in interface DocumentsContainerpublic boolean isValidXMLForImport(java.lang.String sourceString,
java.lang.String docType)
public 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.PersistenceExceptionpublic void loadState(java.io.InputStream in,
java.io.File rootFolder)
public void logExceptionToFile(java.lang.Exception ex,
java.io.File file,
boolean append)
ex - La excepción que se desea guardar.file - El fichero donde se guardará la excepción.append - Si es 'true', añade la excepción al final del fichero.
Si es 'false', sobrescribe el fichero.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 file,
java.awt.image.BufferedImage preview)
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 setColor(java.lang.String color)
public void setComments(java.lang.String string)
setComments in interface Projectcomments - as stringprotected void setCreationDate(java.lang.String creationDate)
public static void setDefaultDistanceArea(int distanceArea)
public static void setDefaultDistanceUnits(int distanceUnits)
public static void setDefaultMapUnits(int mapUnits)
public static void setDefaultProjection(org.cresques.cts.IProjection defaultProjection)
public static void setDefaultSelectionColor(java.awt.Color color)
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 © 2026 gvSIG Association. All rights reserved.