public class DefaultProject extends Object implements Serializable, PropertyChangeListener, Project
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultProject.DocumentWindowInfo |
| Modifier and Type | Field and Description |
|---|---|
static 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(PropertyChangeListener arg0) |
void |
addView(DefaultViewDocument v)
Deprecated.
see
#add(AbstractDocument) |
boolean |
canImportDocuments(String data,
String doctype) |
protected void |
clean() |
Document |
createDocument(String type) |
void |
deleteObserver(Observer o) |
void |
deleteObservers() |
void |
delView(int i)
Deprecated.
see
#remove(AbstractDocument) |
String |
exportDocumentsAsText(List<Document> documents) |
String |
exportToXML(AbstractDocument[] selectedItems)
Deprecated.
aun por decidir que API darle al copy/paste
|
Document |
getActiveDocument() |
Document |
getActiveDocument(Class<? extends Document> documentClass) |
Document |
getActiveDocument(String documentTypeName) |
String |
getColor()
Deprecated.
|
String |
getComments()
Return the comments associateds with the project
|
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 Color |
getDefaultSelectionColor()
Deprecated.
use getPreferences().getDefaultSelectionColor()
|
Document |
getDocument(String name)
Returns the document with the name specified by name.
|
Document |
getDocument(String name,
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.
|
List<Document> |
getDocuments()
Return a list of documents in the project.
|
List<Document> |
getDocuments(String type)
Return a list with all documents of especified type.
|
List<Document> |
getDocumentsByType(String type)
Deprecated.
|
Map |
getExtendedProperties()
Returns a hash map with all new properties associated to this layer.
|
ProjectExtent[] |
getExtents() |
File |
getFile() |
String |
getModificationDate()
Retuen the modification date of the project.
|
String |
getName()
Return the name of the project
|
String |
getOwner()
Return the author of the project,
|
static ProjectPreferences |
getPreferences() |
Document |
getProjectDocumentByName(String name,
String type)
Deprecated.
|
IProjection |
getProjection() |
Object |
getProperty(Object key)
Returns a reference to an object (property) associated to this layer.
|
Color |
getSelectionColor()
Obtiene el color de selecci�n que se usar� en el proyecto
|
String |
getUniqueNameForDocument(String type,
String name) |
Set<String> |
getUnloadedObjects() |
String |
getViewName(FLayer layer)
Return the view that contains the especified layer.
|
List<Document> |
getViews()
Deprecated.
|
boolean |
hasChanged() |
void |
importDocuments(String data,
String doctype) |
void |
importFromXML(String sourceString,
String docType)
Deprecated.
aun por decidir que API darle al copy/paste
|
boolean |
isEmpty() |
boolean |
isValidXMLForImport(String sourceString,
String docType)
Deprecated.
aun por decidir que API darle al copy/paste
|
Iterator<Document> |
iterator() |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
loadState(File in) |
void |
loadState(InputStream in) |
void |
loadState(InputStream in,
File rootFolder) |
void |
propertyChange(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(File out) |
void |
saveState(OutputStream out) |
void |
saveState(OutputStream out,
File rootFolder) |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setColor(String color)
Deprecated.
see
setSelectionColor(String), to be remove in gvSIG
2.1.0 |
void |
setComments(String string)
Set the comments associateds with the project
|
protected void |
setCreationDate(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(Color color)
Deprecated.
use getPreferences().setDefaultSelectionColor()
|
protected void |
setModificationDate(String string) |
void |
setModified(boolean modified)
Sets the modified state of project.
|
void |
setName(String name)
Set the name of he project.
|
void |
setOwner(String owner)
Sets the author of the project
|
void |
setProjection(IProjection projection) |
void |
setProperty(Object key,
Object obj)
Inserts an object as a property to this layer.
|
void |
setSelectionColor(Color selectionColor)
Sets the selecction color
|
void |
setSelectionColor(String selectionColor)
Sets the selecction color
|
public static String VERSION
protected void clean()
public static ProjectPreferences getPreferences()
public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerpublic void addPropertyChangeListener(PropertyChangeListener arg0)
addPropertyChangeListener in interface Projectpublic String getCreationDate()
getCreationDate in interface Projectprotected void setCreationDate(String creationDate)
public Document createDocument(String type)
createDocument in interface DocumentsContainerpublic String getName()
public void setName(String name)
public String getComments()
getComments in interface Projectpublic void setComments(String string)
setComments in interface Projectcomments - as stringpublic String getModificationDate()
getModificationDate in interface Projectprotected void setModificationDate(String string)
public String getOwner()
public void setOwner(String owner)
public Color getSelectionColor()
getSelectionColor in interface Projectpublic void setSelectionColor(String selectionColor)
setSelectionColor in interface Projectselection - color as stringpublic void setSelectionColor(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 List<Document> getDocuments()
getDocuments in interface DocumentsContainerpublic List<Document> getDocuments(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 Iterator<Document> iterator()
iterator in interface Iterable<Document>iterator in interface DocumentsContainerpublic boolean isEmpty()
isEmpty in interface DocumentsContainerpublic String getViewName(FLayer layer)
getViewName in interface Projectlayer - 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(String name, String type)
getDocument in interface DocumentsContainername - Nombre del documentotype - nombre de registro en el extensionPointpublic Document getDocument(String name)
DocumentsContainergetDocument in interface DocumentsContainerpublic void saveState(File out) throws PersistenceException
saveState in interface ProjectPersistenceExceptionpublic void saveState(OutputStream out) throws PersistenceException
saveState in interface ProjectPersistenceExceptionpublic void saveState(OutputStream out, File rootFolder) throws PersistenceException
PersistenceExceptionpublic void loadState(InputStream in)
public void loadState(InputStream in, File rootFolder)
public Set<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 Object getProperty(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(Object key, Object obj)
ExtendedPropertiesSupportsetProperty in interface ExtendedPropertiesSupportkey - the key associated to the propertyobj - the propertyExtendedPropertiesSupport.getProperty(Object),
ExtendedPropertiesSupport.getExtendedProperties()public Map getExtendedProperties()
ExtendedPropertiesSupportgetExtendedProperties in interface ExtendedPropertiesSupportExtendedPropertiesSupport.getProperty(Object),
ExtendedPropertiesSupport.setProperty(Object, Object)public static void registerPersistent()
public static void setDefaultSelectionColor(Color color)
public static 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(String color)
setSelectionColor(String), to be remove in gvSIG
2.1.0public String getColor()
getSelectionColor()public 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(String name, String type)
getDocument(String, String)public List<Document> getDocumentsByType(String type)
getDocuments(String)public String exportToXML(AbstractDocument[] selectedItems) throws SaveException
SaveExceptionpublic void importFromXML(String sourceString, String docType)
public boolean isValidXMLForImport(String sourceString, String docType)
public boolean canImportDocuments(String data, String doctype)
canImportDocuments in interface Projectpublic String exportDocumentsAsText(List<Document> documents)
exportDocumentsAsText in interface Projectpublic void importDocuments(String data, String doctype)
importDocuments in interface Projectpublic Document getActiveDocument()
getActiveDocument in interface DocumentsContainerpublic Document getActiveDocument(String documentTypeName)
getActiveDocument in interface DocumentsContainerpublic Document getActiveDocument(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