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
Deprecated.
see ApplicationLocator.getManager().getVersion()
|
FILE_EXTENSION, 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(Observer o) |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener arg0) |
void |
addView(DefaultViewDocument v)
Deprecated.
see
#add(AbstractDocument) |
boolean |
canImportDocuments(java.lang.String data,
java.lang.String doctype) |
protected void |
clean() |
Document |
createDocument(java.lang.String type) |
void |
deleteObserver(Observer o) |
void |
deleteObservers() |
void |
delView(int i)
Deprecated.
see
#remove(AbstractDocument) |
java.lang.String |
exportDocumentsAsText(java.util.List<Document> documents) |
java.lang.String |
exportToXML(AbstractDocument[] selectedItems)
Deprecated.
aun por decidir que API darle al copy/paste
|
Document |
getActiveDocument() |
Document |
getActiveDocument(java.lang.Class<? extends Document> documentClass) |
Document |
getActiveDocument(java.lang.String documentTypeName) |
java.lang.String |
getColor()
Deprecated.
|
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()
Deprecated.
use getPreferences().getDefaultDistanceArea()
|
static int |
getDefaultDistanceUnits()
Deprecated.
use getPreferences().getDefaultDistanceUnits()
|
static int |
getDefaultMapUnits()
Deprecated.
use getPreferences().getDefaultMapUnits()
|
static IProjection |
getDefaultProjection()
Deprecated.
use getPreferences().getDefaultProjection()
|
static java.awt.Color |
getDefaultSelectionColor()
Deprecated.
use getPreferences().getDefaultSelectionColor()
|
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.String type)
Return a list with all documents of especified type.
|
java.util.List<Document> |
getDocumentsByType(java.lang.String type)
Deprecated.
|
java.util.Map |
getExtendedProperties()
Returns a hash map with all new properties associated to this layer.
|
ProjectExtent[] |
getExtents() |
java.io.File |
getFile() |
java.lang.String |
getModificationDate()
Retuen the modification date of the project.
|
java.lang.String |
getName()
Return the name of the project
|
java.lang.String |
getOwner()
Return the author of the project,
|
static ProjectPreferences |
getPreferences() |
Document |
getProjectDocumentByName(java.lang.String name,
java.lang.String type)
Deprecated.
|
IProjection |
getProjection() |
java.lang.Object |
getProperty(java.lang.Object key)
Returns a reference to an object (property) associated to this layer.
|
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(FLayer layer)
Return the view that contains the especified layer.
|
java.util.List<Document> |
getViews()
Deprecated.
|
boolean |
hasChanged() |
void |
importDocuments(java.lang.String data,
java.lang.String doctype) |
void |
importFromXML(java.lang.String sourceString,
java.lang.String docType)
Deprecated.
aun por decidir que API darle al copy/paste
|
boolean |
isEmpty() |
boolean |
isValidXMLForImport(java.lang.String sourceString,
java.lang.String docType)
Deprecated.
aun por decidir que API darle al copy/paste
|
java.util.Iterator<Document> |
iterator() |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
loadState(java.io.File in) |
void |
loadState(java.io.InputStream in) |
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 |
saveState(java.io.File out) |
void |
saveState(java.io.OutputStream out) |
void |
saveState(java.io.OutputStream out,
java.io.File rootFolder) |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setColor(java.lang.String color)
Deprecated.
see
setSelectionColor(String), to be remove in gvSIG
2.1.0 |
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)
Deprecated.
use getPreferences().setDefaultDistanceArea()
|
static void |
setDefaultDistanceUnits(int distanceUnits)
Deprecated.
use getPreferences().setDefaultDistanceUnits()
|
static void |
setDefaultMapUnits(int mapUnits)
Deprecated.
use getPreferences().setDefaultMapUnits()
|
static void |
setDefaultProjection(IProjection defaultProjection)
Deprecated.
use getPreferences().setDefaultProjection()
|
static void |
setDefaultSelectionColor(java.awt.Color color)
Deprecated.
use getPreferences().setDefaultSelectionColor()
|
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(IProjection projection) |
void |
setProperty(java.lang.Object key,
java.lang.Object obj)
Inserts an object as a property to this layer.
|
void |
setSelectionColor(java.awt.Color selectionColor)
Sets the selecction color
|
void |
setSelectionColor(java.lang.String selectionColor)
Sets the selecction color
|
public static java.lang.String VERSION
protected void clean()
public static ProjectPreferences getPreferences()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerpublic void addPropertyChangeListener(java.beans.PropertyChangeListener arg0)
addPropertyChangeListener in interface Projectpublic java.lang.String getCreationDate()
getCreationDate in interface Projectprotected void setCreationDate(java.lang.String creationDate)
public Document createDocument(java.lang.String type)
createDocument in interface DocumentsContainerpublic java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getComments()
getComments in interface Projectpublic void setComments(java.lang.String string)
setComments in interface Projectcomments - as stringpublic java.lang.String getModificationDate()
getModificationDate in interface Projectprotected void setModificationDate(java.lang.String string)
public java.lang.String getOwner()
public void setOwner(java.lang.String owner)
public java.awt.Color getSelectionColor()
getSelectionColor in interface Projectpublic void setSelectionColor(java.lang.String selectionColor)
setSelectionColor in interface Projectselection - color as stringpublic void setSelectionColor(java.awt.Color selectionColor)
setSelectionColor in interface Projectselection - color as Colorpublic IProjection getProjection()
getProjection in interface Projectpublic void setProjection(IProjection projection)
setProjection in interface Projectpublic void setModified(boolean modified)
setModified in interface Projectmodified - as booleanpublic boolean hasChanged()
hasChanged in interface Projectpublic java.util.List<Document> getDocuments()
getDocuments in interface DocumentsContainerpublic java.util.List<Document> getDocuments(java.lang.String type)
getDocuments in interface DocumentsContainertype - of documentpublic void add(Document document)
public void addDocument(Document document)
DocumentsContaineraddDocument in interface DocumentsContainerdocument - as Documentpublic void remove(Document doc)
Projectpublic void removeDocument(Document doc)
DocumentsContainerremoveDocument in interface DocumentsContainerdoc - as Documentpublic java.util.Iterator<Document> iterator()
iterator in interface java.lang.Iterable<Document>iterator in interface DocumentsContainerpublic boolean isEmpty()
isEmpty in interface DocumentsContainerpublic java.lang.String getViewName(FLayer layer)
getViewName in interface Projectlayer - java.lang.RuntimeException - Si la capa que se pasa como par�metro no se
encuentra en ninguna vistapublic void addExtent(ProjectExtent arg1)
public ProjectExtent removeExtent(int arg0)
removeExtent in interface Projectpublic ProjectExtent[] getExtents()
getExtents in interface Projectpublic Document getDocument(java.lang.String name, java.lang.String type)
getDocument in interface DocumentsContainername - Nombre del documentotype - nombre de registro en el extensionPointpublic Document getDocument(java.lang.String name)
DocumentsContainergetDocument in interface DocumentsContainerpublic java.lang.String getUniqueNameForDocument(java.lang.String type,
java.lang.String name)
public void saveState(java.io.File out)
throws PersistenceException
saveState in interface ProjectPersistenceExceptionpublic void saveState(java.io.OutputStream out)
throws PersistenceException
saveState in interface ProjectPersistenceExceptionpublic void saveState(java.io.OutputStream out,
java.io.File rootFolder)
throws PersistenceException
PersistenceExceptionpublic void loadState(java.io.InputStream in)
public void loadState(java.io.InputStream in,
java.io.File rootFolder)
public java.util.Set<java.lang.String> getUnloadedObjects()
getUnloadedObjects in interface Projectpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic java.lang.Object getProperty(java.lang.Object key)
ExtendedPropertiesSupportReturns a reference to an object (property) associated to this layer.
For example, you can attach a network definition to key "network" and check if a layer has a network loaded using getAssociatedObject("network") and that it's not null.
getProperty in interface ExtendedPropertiesSupportkey - the key associated to the propertynull if key is not foundExtendedPropertiesSupport.getExtendedProperties(),
ExtendedPropertiesSupport.setProperty(Object, Object)public void setProperty(java.lang.Object key,
java.lang.Object obj)
ExtendedPropertiesSupportsetProperty in interface ExtendedPropertiesSupportkey - the key associated to the propertyobj - the propertyExtendedPropertiesSupport.getProperty(Object),
ExtendedPropertiesSupport.getExtendedProperties()public java.util.Map getExtendedProperties()
ExtendedPropertiesSupportgetExtendedProperties in interface ExtendedPropertiesSupportExtendedPropertiesSupport.getProperty(Object),
ExtendedPropertiesSupport.setProperty(Object, Object)public static void registerPersistent()
public static void setDefaultSelectionColor(java.awt.Color color)
public static java.awt.Color getDefaultSelectionColor()
public static int getDefaultMapUnits()
public static int getDefaultDistanceUnits()
public static int getDefaultDistanceArea()
public static void setDefaultMapUnits(int mapUnits)
public static void setDefaultDistanceUnits(int distanceUnits)
public static void setDefaultDistanceArea(int distanceArea)
public static void setDefaultProjection(IProjection defaultProjection)
public static IProjection getDefaultProjection()
public void setColor(java.lang.String color)
setSelectionColor(String), to be remove in gvSIG
2.1.0public java.lang.String getColor()
getSelectionColor()public java.util.List<Document> getViews()
getDocumentsByType(String)public void addView(DefaultViewDocument v)
#add(AbstractDocument)public void delView(int i)
#remove(AbstractDocument)index - of the view as integerpublic Document getProjectDocumentByName(java.lang.String name, java.lang.String type)
getDocument(String, String)public java.util.List<Document> getDocumentsByType(java.lang.String type)
getDocuments(String)public java.lang.String exportToXML(AbstractDocument[] selectedItems) throws SaveException
SaveExceptionpublic void importFromXML(java.lang.String sourceString,
java.lang.String docType)
public boolean isValidXMLForImport(java.lang.String sourceString,
java.lang.String docType)
public boolean canImportDocuments(java.lang.String data,
java.lang.String doctype)
canImportDocuments in interface Projectpublic java.lang.String exportDocumentsAsText(java.util.List<Document> documents)
exportDocumentsAsText in interface Projectpublic void importDocuments(java.lang.String data,
java.lang.String doctype)
importDocuments in interface Projectpublic Document getActiveDocument()
getActiveDocument in interface DocumentsContainerpublic Document getActiveDocument(java.lang.String documentTypeName)
getActiveDocument in interface DocumentsContainerpublic Document getActiveDocument(java.lang.Class<? extends Document> documentClass)
getActiveDocument in interface DocumentsContainerpublic void addObserver(Observer o)
addObserver in interface Observablepublic void deleteObserver(Observer o)
deleteObserver in interface Observablepublic void deleteObservers()
deleteObservers in interface Observable